#DEFINITIONS: -*-sh-*- # # Simple simulations of ground-based measurements of ozone at 110.8 GHz, # to test impact of winds. # # Author: Patrick Eriksson Arts2 { INCLUDE "general/general.arts" INCLUDE "general/agendas.arts" INCLUDE "general/planet_earth.arts" # Agenda for scalar gas absorption calculation Copy(abs_xsec_agenda, abs_xsec_agenda__noCIA) # (standard) emission calculation Copy( iy_main_agenda, iy_main_agenda__Emission ) # cosmic background radiation Copy( iy_space_agenda, iy_space_agenda__CosmicBackground ) # standard surface agenda (i.e., make use of surface_rtprop_agenda) Copy( iy_surface_agenda, iy_surface_agenda__UseSurfaceRtprop ) # sensor-only path Copy( ppath_agenda, ppath_agenda__FollowSensorLosPath ) # no refraction Copy( ppath_step_agenda, ppath_step_agenda__GeometricPath ) # Number of Stokes components to be computed IndexSet( stokes_dim, 1 ) # ---- f_grid ---------------------------------------------------------------- NumericCreate( v0 ) NumericSet( v0, 1.108360400e+11 ) VectorLinSpace( f_grid, -5e6, 5e6, 50e3 ) VectorAddScalar( f_grid, f_grid, v0 ) # ---- Species --------------------------------------------------------------- abs_speciesSet( species=[ "O3", "H2O" ] ) # ---- Atmospheric scenario -------------------------------------------------- # Dimensionality of the atmosphere AtmosphereSet1D # A pressure grid rougly matching 0 to 88 km in about 500 m steps. IndexCreate( np ) IndexSet( np, 180 ) VectorNLogSpace( p_grid, np, 1.013e5, 0.5 ) AtmRawRead( basename = "testdata/tropical" ) # All settings here: # # ---- Select atmosphere_dim, LOS angles and winds -------------------------- VectorSet( lat_grid, [-10, 10] ) VectorSet( lon_grid, [-10, 10] ) #AtmosphereSet1D #AtmosphereSet2D AtmosphereSet3D MatrixSet( sensor_los, [30,50] ) #AtmFieldsCalc AtmFieldsCalcExpand1D nrowsGet( nrows, t_field ) ncolsGet( ncols, t_field ) Tensor3SetConstant( wind_u_field,np, nrows, ncols, 50 ) Tensor3SetConstant( wind_v_field,np, nrows, ncols, 100 ) Tensor3SetConstant( wind_w_field,np, nrows, ncols, 2 ) # ---- Absorption ------------------------------------------------------------ ReadXML( abs_lines, "testdata/ozone_line.xml" ) abs_lines_per_speciesCreateFromLines abs_cont_descriptionInit # on-the-fly absorption Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__OnTheFly ) # We have to also set the absorption lookup table interpolation order, even though # we are not using the lookup table here. atmfields_checkedCalc will otherwise throw an error. IndexSet( abs_f_interp_order, 1 ) # ---- The surface ----------------------------------------------------- MatrixSetConstant( z_surface, nrows, ncols, 0 ) # ---- Observation position --------------------------------------------------- MatrixSetConstant( sensor_pos, 1, atmosphere_dim, 0 ) # ---- Final stuff ----------------------------------------------------------- sensorOff jacobianOff cloudboxOff abs_xsec_agenda_checkedCalc propmat_clearsky_agenda_checkedCalc atmfields_checkedCalc atmgeom_checkedCalc cloudbox_checkedCalc sensor_checkedCalc StringSet( iy_unit, "RJBT" ) # ---- Calculate ------------------------------------------------------------- yCalc #WriteXML( "ascii", f_grid, "f.xml" ) #WriteXML( "ascii", y, "yREFERENCE.xml" ) # Expected results # VectorCreate( yREFERENCE ) # ReadXML( yREFERENCE, "yREFERENCE.xml" ) # Compare( y, yREFERENCE, 1e-4 ) # ---- Without winds ---------------------------------------------------- #Tensor3SetConstant( wind_u_field,np, nrows, ncols, 0 ) #Tensor3SetConstant( wind_v_field,np, nrows, ncols, 0 ) #Tensor3SetConstant( wind_w_field,np, nrows, ncols, 0 ) #yCalc #WriteXML( output_file_format, y, "TestWinds.y0.xml" ) }