#DEFINITIONS: -*-sh-*- # # Demonstration and test of a transmission calculation in a # refractive 3D atmosphere including scatterers. # Airborne type sensor uplooking through a cloud. # # Setup is a mixture of TestTransmission and TestRTeCalcMC, adapted for a # viewing geometry maximizing the differences between the clear and the cloudy # setup. # # 2017-08-30 Jana Mendrok Arts2 { INCLUDE "general/general.arts" INCLUDE "general/continua.arts" INCLUDE "general/agendas.arts" INCLUDE "general/planet_earth.arts" # Agenda for scalar gas absorption calculation Copy(abs_xsec_agenda, abs_xsec_agenda__noCIA) # on-the-fly absorption Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__OnTheFly ) # sensor-only path Copy( ppath_agenda, ppath_agenda__FollowSensorLosPath ) # Number of Stokes components to be computed # IndexSet( stokes_dim, 4 ) # Reference ellipsoid # refellipsoidEarth( refellipsoid, "WGS84" ) # Frequency grid # VectorSet( f_grid, [230e9] ) # A pressure grid rougly matching 0 to 80 km, in steps of 2 km. # VectorNLogSpace( p_grid, 41, 1013e2, 1 ) # Atmospheric dimensionality and lat/lon grids # #VectorNLinSpace( lat_grid, 11, 5, 13 ) #VectorNLinSpace( lon_grid, 11, -14, -10 ) ReadXML( lat_grid, "artscomponents/montecarlo/lat_grid.xml" ) ReadXML( lon_grid, "artscomponents/montecarlo/lon_grid.xml" ) AtmosphereSet3D # Definition of species # abs_speciesSet( species= ["H2O-PWR98", "N2-SelfContStandardType", "O2-PWR93"] ) # No line data needed here # abs_lines_per_speciesSetEmpty # Atmospheric profiles # AtmRawRead( basename = "testdata/tropical" ) # AtmFieldsCalcExpand1D # Get ground altitude (z_surface) from z_field IndexCreate( nlat ) nelemGet( nlat, lat_grid ) IndexCreate( nlon ) nelemGet( nlon, lon_grid ) MatrixSetConstant( z_surface, nlat, nlon, 0 ) # No jacobian calculations # jacobianOff # No scattering # cloudboxOff # Check model atmosphere # atmfields_checkedCalc atmgeom_checkedCalc cloudbox_checkedCalc # Propagation path agendas and variables # # refracted path Copy( ppath_step_agenda, ppath_step_agenda__RefractedPath ) Copy( refr_index_air_agenda, refr_index_air_agenda__GasMicrowavesEarth ) NumericSet( ppath_lmax, 2e3 ) NumericSet( ppath_lraytrace, 500 ) # Postion and line-of-sight of sensor # #VectorSet( rte_pos, [ 0, 5.1, -13.82 ] ) #VectorSet( rte_los, [ 80, 24 ] ) rte_losSet( rte_los, atmosphere_dim, 70., 180 ) rte_posSet( rte_pos, atmosphere_dim, 8000., 0, 0 ) VectorSet( rte_pos2, [] ) # No transmitter position defined # Radiative transfer agendas # Copy( iy_transmitter_agenda, iy_transmitter_agenda__UnitUnpolIntensity ) Copy( iy_main_agenda, iy_main_agenda__Transmission ) # Auxiliary variables # #ArrayOfStringSet( iy_aux_vars, # [ "Pressure", "Temperature", "VMR, species 0", "Absorption, summed", # "Absorption, species 1", "iy", "Transmission", "Optical depth" ] ) abs_xsec_agenda_checkedCalc propmat_clearsky_agenda_checkedCalc # Set cloud cloudboxSetManually( p1=71617.7922264, p2=17111.6808705, lat1=-1.9, lat2=1.9, lon1=-1.9, lon2=1.9 ) ScatSpeciesInit ScatElementsPndAndScatAdd( scat_data_files=["testdata/scatData/azi-random_f229-231T214-225r100NP-1ar1_5ice.xml"], pnd_field_files=[""] ) scat_dataCheck ScatSpeciesExtendTemperature( T_low=200. ) scat_dataCalc scat_data_checkedCalc ReadXML( pnd_field_raw, "artscomponents/montecarlo/pnd_field_raw.xml" ) pnd_fieldCalcFrompnd_field_raw # Calculate # iyCalc #WriteXML( output_file_format, iy, "cloudyREFERENCE.xml" ) MatrixCreate( iyREFERENCE ) ReadXML( iyREFERENCE, "cloudyREFERENCE.xml" ) Compare( iy, iyREFERENCE, 1e-6 ) }