################################################################################ # # # 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 Discrete Ordinate Iterative method 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 makes use of the following include files # # general/agendasDOIT.arts # # # ################################################################################ Arts2 { # do NOT modify IndexCreate( DOITmax_iterations ) NumericCreate( DOITinterpol_ratio ) VectorCreate( epsilonTb ) IndexCreate( Nza ) IndexCreate( Naa ) NumericCreate( ntmp ) VectorCreate( vtmp ) StringSet( tmpformat, "ascii" ) StringSet( strtmp, "tmp1.xml" ) ################################################################################ # START USER SETTINGS - Modify settings according to you wishes # ################################################################################ # --- # Angular grid discretization (regular grid) # --- # Note: Angular grid has to be fine enough to represent anisotropy of scattering # phase function and of radiation field (around horizontal/limb direction) # --- # number of zenith angles: ### IndexSet( Nza, 91 ) # number of azimuth angles: ### IndexSet( Naa, 37 ) # --- # Safety limit: Over what ratio of radiances (at two neighboring zenith angles) # do we allow to interpolate? # --- # # The lower the limit is, the finer the angular grid has to be around the limb # directions. This an issue particularly in thin atmospheres, where the # hemispheric gradient is huge. # Internal default: 100 NumericSet( DOITinterpol_ratio, 1e3 ) # --- # Convergence limits for scattering solution # --- # Controlled by maximum intensity change between iterations and maximum number # of iterations. Whichever is reached first stops the iteration. # --- # delta-Tb [K] between iterations per Stokes component # # Note: One value per stokes component, i.e., give at least as many values as # the stokes dimension of your calculation ### VectorSet( epsilonTb, [0.1, 0.01, 0.01, 0.01] ) # Maximum number of interations # # Internal default: 100 ### IndexSet( DOITmax_iterations, 100 ) # --- # 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: iyEmissionStandard). # 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). # --- ArrayOfStringSet( iy_aux_vars, [ "Pressure", "Temperature", "Absorption, summed", # "Absorption, species 0", # "Absorption, species 1", # "Absorption, species 2", # "Absorption, species 3", # "Absorption, species 4", # "Absorption, species 5", # "Absorption, species 6", # "Absorption, species 7", # "Absorption, species 8", # "Absorption, species 9", # "Absorption, species 10", # "Absorption, species 11", # "Absorption, species 12", # "Absorption, species 13", # "Absorption, species 14", # "Absorption, species 15", # "Absorption, species 16", # "Absorption, species 17", # "Absorption, species 18", "iy", # "Transmission", "Optical depth" ] ) ################################################################################ # END USER SETTINGS # ################################################################################ # do NOT modify Copy( iy_main_agenda, iy_main_agenda__Emission ) AgendaCreate( convloop_agenda ) AgendaSet( convloop_agenda ){ ReadXML( out=vtmp, filename=strtmp ) Extract( ntmp, epsilonTb, forloop_index ) Append( vtmp, ntmp ) WriteXML( output_file_format=tmpformat, in=vtmp, filename=strtmp ) } Touch( vtmp ) WriteXML( output_file_format=tmpformat, in=vtmp, filename=strtmp ) Copy( ncases, stokes_dim ) IndexStepDown( ncases, ncases ) Copy( forloop_agenda, convloop_agenda ) ForLoop( forloop_agenda, 0, ncases, 1 ) ReadXML( out=epsilonTb, filename=strtmp ) # 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 ) # DOIT specific settings ##### INCLUDE "general/agendasDOIT.arts" AgendaSet( doit_conv_test_agenda ){ doit_conv_flagAbsBT( epsilon=epsilonTb, max_iterations=DOITmax_iterations ) } # AgendaSet( iy_cloudbox_agenda ){ iyInterpLinCloudboxField( maxratio=DOITinterpol_ratio ) } # doit_za_interpSet( doit_za_interp, atmosphere_dim, "linear" ) DOAngularGridsSet( doit_za_grid_size, scat_aa_grid, scat_za_grid, Nza, Naa, "" ) # do NOT modify ##### # 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 # calculate scattered field inside cloudbox ##### DoitInit DoitGetIncoming( maxratio=DOITinterpol_ratio ) doit_i_fieldSetClearsky DoitCalc # and the (clearsky) RT calc ##### NumericCreate( za ) AgendaCreate( forloop_agenda_angles ) AgendaSet( forloop_agenda_angles ) { Extract( za, allzang, forloop_index ) rte_losSet( za=za, aa=za ) Print( rte_los, 0 ) iyCalc 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 ) }