################################################################################ # # # This is a demo/template file. The USER is supposed to MODIFY it according # # to his/her needs (better, make a copy of it and adapt the copy). # # # ################################################################################ # # # This is a template file for doing scattering calculations of passive # # measurements using the Monte Carlo scattering solver. It is for a 1D # # atmosphere. # # The file is supposed to be used as an include file in a full radiative # # transfer case. Atmospheric scenario, surface and sensor settings, etc. have # # to be done in the calling file before this file is included (hence, # # executed). # # This file requires the following input parameters: # # atmosphere_dim as the WSV # # f_grid as the WSV # # iy_unit as the WSV # # stokes_dim as the WSV # # p_grid as the WSV # # z_field as the WSV # # t_field as the WSV # # vmr_field as the WSV # # pnd_field as the WSV # # scat_data as the WSV # # cloudbox_on as the WSV # # cloudbox_limits as the WSV # # abs_species as the WSV # # z_surface as the WSV # # t_surface as the WSV # # rte_pos as the WSV # # allzang (Vector) Sensor viewing angles # # bad_partition_functions_ok (Index) Partition function handling flag # # # # It provides following OUTPUT (written to file): # # iy as the WSV # # radiance; units selectable # # iy_aux as the WSV # # auxiliary output parameters (particularly of along-the-path # # type), selectable variety # # # # Selections and settings to be done are between the flags START USER SETTINGS # # and END USER SETTINGS. The rest of the file shall not be modified, # # particularly settings marked with 'do NOT modify'. # # # # This template does not makes use of further include files. # # # ################################################################################ Arts2 { # do NOT modify NumericCreate( ntmp ) VectorCreate( vtmp ) IndexCreate( nlat ) IndexCreate( nlon ) ################################################################################ # START USER SETTINGS - Modify settings according to you wishes # ################################################################################ # --- # Convergence limits for scattering solution # --- # Whichever is reached first stops the iteration (i.e., the calculation for more # "photons"). Setting a parameter to -1 means this paramter will be ignored in # the convergence decision. # --- # Statistical error of solution [W / (m2 sr Hz)] # Note: dTb_planck=0.1K roughly correspond to 5e-22, 5e-20, 5e-18 W/(m2 sr Hz) # at 5, 50, and 500GHz, respectively. NumericSet(mc_std_err, 5e-21) # Maximum run time of solver (per monochromatic frequency) IndexSet(mc_max_time, -1) # Maximum number of iterations (i.e., "photons") IndexSet(mc_max_iter, 250000) # --- # Define (auxiliary) data output # --- # Uncomment all parameters you want as auxiliary output (i.e., in addition to # total radiance/brigthness temperature). For meaning of each paramters see # online-doc of the WSM selected for iy_main_agenda (here: iyMC). # NOTE: Last element NOT to be followed by comma. # NOTE: Only use "Absorption, species X" up to the number of entries in # abs_species (clearsky calculations in Venus have at maximum 19 abs_species # entries, i.e. highest valid index is 18). # NOTE: Only use "PND, type Y" up to the number of entries in scat_data. # Planet toolbox particle calculations have at maximum 10 particle entries, # i.e., highest valid index is 9). # --- ArrayOfStringSet( iy_aux_vars, [ "Error (uncorrelated)" ] ) ################################################################################ # END USER SETTINGS # ################################################################################ # only MODIFY if you know, what you are doing (else the default setting should # be fine). ##### # setting agendas needed for RT calc (there are alternative settings, though) ##### Copy( iy_space_agenda, iy_space_agenda__CosmicBackground ) Copy( iy_surface_agenda, iy_surface_agenda__UseSurfaceRtprop ) # do NOT modify ##### # use MC scattering module ##### Copy( iy_main_agenda, iy_main_agenda__ScattMC ) # MC specific settings ##### MCSetSeedFromTime mc_antennaSetPencilBeam # adaption due to MC requires 3D ### # 1) set lat/lon components of platform position to dummies VectorSetConstant( vtmp, 2, 0. ) Append( rte_pos, vtmp ) # 2a) blow up the clear-sky atmosphere AtmosphereSet3D VectorLinSpace( lat_grid, -30, 50, 5 ) VectorLinSpace( lon_grid, -30, 30, 5 ) AtmFieldsExpand1D # 2b-1) adapt surface altitude to 3D nelemGet( nlat, lat_grid ) nelemGet( nlon, lon_grid ) VectorExtractFromMatrix( vtmp, z_surface, 0, "row" ) Extract( ntmp, vtmp, 0 ) MatrixSetConstant( z_surface, nlat, nlon, ntmp ) # 2b-2) adapt surface temperature to 3D # note: It's necessary only for surface cases B-3x, no effects on others. VectorExtractFromMatrix( vtmp, t_surface, 0, "row" ) Extract( ntmp, vtmp, 0 ) MatrixSetConstant( t_surface, nlat, nlon, ntmp ) # 2c) blow up the pnd_field to 3D. but only in a reduced region of the # full 3D atmo we consider (cloudbox needs sufficient clear-sky around!) Extract( itmp, cloudbox_limits, 0 ) Extract( pmax_cb, p_grid, itmp ) Extract( itmp, cloudbox_limits, 1 ) Extract( pmin_cb, p_grid, itmp ) cloudboxSetManually( p1=pmax_cb, p2=pmin_cb, lat1=-10, lat2=30, lon1=-10, lon2=10 ) pnd_fieldExpand1D # no Jacobians ##### jacobianOff # the checks necessary for full RT calc ##### atmfields_checkedCalc( bad_partition_functions_ok=bad_partition_functions_ok ) atmgeom_checkedCalc cloudbox_checkedCalc( scat_data=scat_data_raw, scat_data_type="raw" ) propmat_clearsky_agenda_checkedCalc # and the RT calc ##### Copy( strtmp, iy_unit ) StringSet( iy_unit, "1" ) NumericCreate( za ) AgendaCreate( forloop_agenda_angles ) AgendaSet( forloop_agenda_angles ) { Extract( za, allzang, forloop_index ) rte_losSet( za=za, aa=0. ) Print( rte_los, 0 ) iyCalc iyApplyUnit( iy_unit=strtmp ) WriteXMLIndexed( in=iy, file_index=forloop_index ) WriteXMLIndexed( in=iy_aux, file_index=forloop_index ) } IndexCreate( nangles ) nelemGet( nangles, allzang ) IndexStepDown( nangles, nangles ) Copy( forloop_agenda, forloop_agenda_angles ) ForLoop( forloop_agenda, 0, nangles, 1 ) }