#DEFINITIONS: -*-sh-*- #This control file handles a clearsky batch calculation including calculation of #an absorption lookup table. Six selected atmospheres from Chevallier91L data #are used for atmospheric input. No sensor characteristics are applied. Only two #frequencies and two line of sights are used, for calculation time reasons. # # Author: Jana Mendrok # Arts2 { INCLUDE "general/general.arts" INCLUDE "general/continua.arts" INCLUDE "general/agendas.arts" INCLUDE "general/agendasDOIT.arts" INCLUDE "general/planet_earth.arts" # 1.General Settings:--------------------------------------------- #----------------------------------------------------------------- # 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 ) # Set out put file format #------------------------ output_file_formatSetAscii # Define f_grid #-------------- VectorSet( f_grid, [9.0e10, 19.0e10]) #ReadXML(f_grid, "f_grid.xml") #VectorNLinSpace (f_grid, 10, 120e9, 300e9) #WriteXML (output_file_format, f_grid, "f_grid.xml") #Set stokes dim #-------------- IndexSet (stokes_dim, 1) #def of atmosphere #----------------- IndexSet (atmosphere_dim, 1) #Choose *y* output unit #---------------------- StringSet( iy_unit, "PlanckBT" ) #No jacobian calculations #----------------- jacobianOff # Modifiy the maximum propagation step, from the default(10.e3) # to 250 m:--------------------------------------------------- NumericSet( ppath_lmax, 250 ) # Surface properties #------------------- # Set surface reflectivity (=1-emissivity) # corresponds to emissivity=0.75 VectorSetConstant( surface_scalar_reflectivity, 1, 0.25 ) Copy( surface_rtprop_agenda, surface_rtprop_agenda__Specular_NoPol_ReflFix_SurfTFromt_surface ) # 2. Sensor:--------------------------------------------------------- #-------------------------------------------------------------------- # Definition of sensor position and LOS # ------------------------------------ # Line of sight MatrixSet( sensor_los, [131; 179]) # Sensor position nrowsGet( nrows, sensor_los ) ncolsGet( ncols, sensor_los ) MatrixSetConstant( sensor_pos, nrows, ncols, 850e3 ) # No sensor characteristics are specified sensorOff # 3. Read chevallier atmospheric profiles for batch calc-------------- #--------------------------------------------------------------------- ReadXML( batch_atm_fields_compact, "testdata/chevallierl91_all_extract.xml" ) # add constant profiles for O2 and N2 batch_atm_fields_compactAddConstant( name="abs_species-O2", value=0.2095 ) batch_atm_fields_compactAddConstant( name="abs_species-N2", value=0.7808 ) # 4. Absorption------------------------------------------------- #--------------------------------------------------------------- abs_speciesSet( species=[ "H2O-PWR98", "O3", "O2-PWR93", "N2-SelfContStandardType" ] ) # Creation of abs_lookup table #----------------------------- abs_linesReadFromSplitArtscat(abs_lines, abs_species, "spectroscopy/Perrin_artscat34/", 0, 3e12) abs_lines_per_speciesCreateFromLines abs_lookupSetupBatch abs_xsec_agenda_checkedCalc abs_lookupCalc abs_lookupAdapt # absorption from LUT Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__LookUpTable ) # no scattering cloudboxOff # Batch Agenda----------------------------------------------------------- #------------------------------------------------------------------------ AgendaSet( ybatch_calc_agenda ){ # Extract the atmospheric profiles for current atmosphere: Extract( atm_fields_compact, batch_atm_fields_compact, ybatch_index ) # Split up *atm_fields_compact* to # generate p_grid, t_field, z_field, massdensity_field, vmr_field: AtmFieldsFromCompact # Get some surface properties from corresponding atmospheric fields Extract( z_surface, z_field, 0 ) Extract( t_surface, t_field, 0 ) # Consistency checks atmfields_checkedCalc( bad_partition_functions_ok = 1 ) atmgeom_checkedCalc cloudbox_checkedCalc sensor_checkedCalc # Calculate complete measurement vector yCalc } # Set number of batch cases: nelemGet( ybatch_n, batch_atm_fields_compact ) #IndexSet(ybatch_start, 0) #IndexSet(ybatch_n, 4) #===========start batch calc===================== # Execute the batch calculations: # This test control file can be run multi-threaded, since it was approved # that none of the jobs fails. # If settings are changed, especially if the input atmospheres are altered # or exchanged, the robust option in *ybatchCalc* should be used. propmat_clearsky_agenda_checkedCalc ybatchCalc # Call *ybatchCalc* robust: # Set robust flag to 1. If one individual job fails, ARTS will continue # with the next batch job. # ybatchCalc( robust=1 ) #WriteXML( in=ybatch, filename="TestBatch.ybatch.ref.xml" ) # Verify results ArrayOfVectorCreate( ybatch_ref ) ReadXML( out=ybatch_ref, filename="TestBatch.ybatch.ref.xml" ) Compare( ybatch, ybatch_ref, 1e-6 ) #==================stop========================== } # End of Main