#DEFINITIONS: -*-sh-*- # # Demonstration of a calculation with absorption-only particles (handling them # as abs_species). # # Copy of the TestDOIT case, just replacing DOIT scattering parts by # particles-as-abs_species setup. # # Author: Jana Mendrok, Claudia Emde # 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) # (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 ) # No jacobian calculations jacobianOff # Frequency grid # -------------- # Note: The frequencies must be contained in the gas absorption lookup table. VectorSet( f_grid, [229.5e9,230.5e9] ) # Number of Stokes components to be computed #------------------------------------------- IndexSet( stokes_dim, 4 ) # Definition of the atmosphere # ---------------------------- # Dimensionality of the atmosphere AtmosphereSet1D # Pressure grid ReadXML( p_grid, "testdata/testdoit_p_grid.xml" ) # Definition of species abs_speciesSet( species=[ "H2O-PWR98", "O2-PWR93", "N2-SelfContStandardType" ] ) # Atmospheric profiles AtmRawRead( basename="testdata/tropical" ) # setting cloudbox_on (to off) here already. avoids writing & re-reading # scat_data later on (since cloudboxOff wipes out all cloud-related data). cloudboxOff # Specification of cloud # ----------------------- ScatSpeciesInit # Adding scattering elements. # Here actually both added elements are indentical. however, for testing and for # demonstration purposed, having 2 elements is better. ScatElementsToabs_speciesAdd( scat_data_files=["testdata/scatData/azi-random_f229-231T214-225r100NP-1ar1_5ice.xml", "testdata/scatData/azi-random_f229-231T214-225r100NP-1ar1_5ice.xml"], pnd_field_files=["testdata/testdoit_pnd_field_1D.xml", "testdata/testdoit_pnd_field_1D.xml"] ) scat_dataCalc scat_dataCheck # Gas absorption from lookup table # --------------------------------- # for how to create lookup tables, see ../absorption/TestAbs.arts ReadXML( abs_lookup, "testdata/testdoit_gas_abs_lookup.xml" ) abs_lookupAdapt # absorption from LUT #Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__LookUpTable ) AgendaSet( propmat_clearsky_agenda ) { Ignore(rtp_mag) Ignore(rtp_los) Ignore(rtp_nlte) propmat_clearskyInit propmat_clearskyAddFromLookup propmat_clearskyAddParticles2 } AtmFieldsCalc # Definition of Earth surface # ---------------------------- MatrixSetConstant( z_surface, 1, 1, 500 ) # Properties of surface: # - surface reflectivity from Liebe model # - surface skin temperature interpolated from atmospheric t_field # VectorCreate( n_t_grid ) AgendaSet( surface_rtprop_agenda ){ specular_losCalc InterpAtmFieldToPosition( out = surface_skin_t, field = t_field ) VectorSetConstant( n_t_grid, 1, surface_skin_t ) complex_refr_indexWaterLiebe93( complex_refr_index = surface_complex_refr_index, data_f_grid = f_grid, data_T_grid = n_t_grid ) surfaceFlatRefractiveIndex } # Definition of sensor position and LOS #-------------------------------------- # This file holds the viewing angles of the sensor: IndexSet( nelem, 1 ) VectorCreate( vector_1 ) VectorSetConstant( vector_1, nelem, 99.7841941981 ) #IndexSet( nelem, 19 ) #VectorNLinSpace( vector_1, 0, 180 ) # Sensor altitude from earth surface nelemGet( nelem, vector_1 ) VectorCreate( vector_2 ) VectorSetConstant( vector_2, nelem, 95000.1 ) Matrix1ColFromVector( sensor_pos, vector_2 ) Matrix1ColFromVector( sensor_los, vector_1 ) # SensorOff means that the result of the calculation are the radiances, # which are not modified by sensor properties sensorOff #==================start========================== atmfields_checkedCalc atmgeom_checkedCalc cloudbox_checkedCalc scat_data_checkedCalc sensor_checkedCalc abs_xsec_agenda_checkedCalc propmat_clearsky_agenda_checkedCalc #WriteXML( in=abs_species ) StringSet( iy_unit, "RJBT" ) yCalc WriteXML( in=y ) #==================stop========================== #==================check========================== VectorCreate(yREFERENCE) ReadXML( yREFERENCE, "yREFERENCE_AbsParticle.xml" ) Compare( y, yREFERENCE, 1e-6 ) } # End of Main