#DEFINITIONS: -*-sh-*- # #This control file performs an ARTS-MC radiative transfer simulation #through yCalc 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) # cosmic background radiation Copy( iy_space_agenda, iy_space_agenda__CosmicBackground ) # no refraction Copy( ppath_step_agenda, ppath_step_agenda__GeometricPath ) # Blackbody surface with skin temperature interpolated from t_surface field Copy( surface_rtprop_agenda, surface_rtprop_agenda__Blackbody_SurfTFromt_field ) IndexSet( stokes_dim, 1 ) AtmosphereSet3D jacobianOff #### LOAD DATA: these files were created with MCDataPrepare.arts ###### ReadXML( f_grid, "TestMonteCarloDataPrepare.f_grid.xml" ) ReadXML( p_grid, "p_grid.xml" ) ReadXML( lat_grid, "lat_grid.xml" ) ReadXML( lon_grid, "lon_grid.xml" ) ReadXML( t_field, "TestMonteCarloDataPrepare.t_field.xml" ) ReadXML( z_field, "TestMonteCarloDataPrepare.z_field.xml" ) ReadXML( vmr_field, "TestMonteCarloDataPrepare.vmr_field.xml" ) ReadXML( z_surface, "TestMonteCarloDataPrepare.z_surface.xml" ) ReadXML( abs_lookup, "TestMonteCarloDataPrepare.abs_lookup.xml" ) abs_speciesSet( species=["O2-PWR93","N2-SelfContStandardType","H2O-PWR98"] ) abs_lookupAdapt FlagOn( cloudbox_on ) ReadXML( cloudbox_limits, "TestMonteCarloDataPrepare.cloudbox_limits.xml" ) ReadXML( pnd_field, "TestMonteCarloDataPrepare.pnd_field.xml" ) ReadXML( scat_data, "TestMonteCarloDataPrepare.scat_data.xml" ) scat_dataCheck scat_data_checkedCalc atmfields_checkedCalc atmgeom_checkedCalc cloudbox_checkedCalc #### Define Agendas ################################################# # absorption from LUT Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__LookUpTable ) abs_xsec_agenda_checkedCalc propmat_clearsky_agenda_checkedCalc #### Define viewing position and line of sight ######################### rte_losSet( rte_los, atmosphere_dim, 99.7841941981, 180 ) rte_posSet( rte_pos, atmosphere_dim, 95000.1, 7.61968838781, 0 ) Matrix1RowFromVector( sensor_pos, rte_pos ) Matrix1RowFromVector( sensor_los, rte_los ) #### Include an antenna pattern ######################################### IndexSet( stokes_dim, 4 ) IndexSet( antenna_dim, 1 ) # VectorCreate( za_grid ) VectorSet( za_grid, [-0.2,-0.02,0.00,0.02,0.20 ] ) Matrix1ColFromVector( mblock_dlos_grid, za_grid ) # MatrixSetConstant( antenna_dlos, 1, 1, 0 ) # An antenna pattern from Odin-SMR is used here ReadXML( antenna_response, "antenna.SM_AC2ab.875ms.xml" ) IndexSet( sensor_norm, 1 ) sensor_responseInit sensor_responseAntenna sensor_checkedCalc #### Perform Monte Carlo RT Calculation ################################# StringSet( iy_unit, "RJBT" ) NumericSet( ppath_lmax, 3e3 ) NumericSet( mc_std_err, -1 ) IndexSet( mc_max_time, -1 ) IndexSet( mc_max_iter, 100 ) Copy( iy_main_agenda, iy_main_agenda__ScattMC ) ArrayOfStringSet( iy_aux_vars, [ "Error (uncorrelated)" ] ) yCalc #### Save results ######################### #output_file_formatSetAscii #WriteXML( output_file_format, y ) #WriteXML( output_file_format, y_aux ) #### Tests ######################## # Radiance test VectorCreate( vtmp ) Extract( vtmp, y_aux, 0 ) NumericCreate( y_error_0 ) Extract( y_error_0, vtmp, 0 ) NumericScale( y_error_0, y_error_0, 4. ) VectorCreate( y_0 ) Select( y_0, y, [ 0 ] ) VectorCreate( y_ref ) VectorSetConstant( y_ref, 1, 198.7 ) Print( y_0, 0 ) Print( y_ref, 0 ) Print( y_error_0, 0 ) Compare( y_0, y_ref, y_error_0, "Total radiance should be close to 198.7" ) }