# DEFINITIONS: -*-sh-*- # This control file handles a DOBatch calculation with # doit_i_fieldClearskyPlaneParallel # # Author: Oliver Lemke # 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]) #Set stokes dim #-------------- IndexSet (stokes_dim, 1) #def of atmosphere #----------------- IndexSet (atmosphere_dim, 1) #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 #----------------------------- # ATTENTION: The abs_lookup table used with this test control file was #generated by the following code. It is adapted to the specified abs_species, #to the specified atmospheric data and frequencies ranging from 80e9 Hz to #200e9 Hz. If changes to these inputs are applied the abs_lookup table must #be recalculated. # Read HITRAN catalog (needed for O3): #abs_linesReadFromHitran2004( abs_lines, # "/storage3/data/catalogue/hitran/hitran2004/HITRAN04.par", # 80e9, # 200e9 ) #abs_lines_per_speciesCreateFromLines #abs_lookupSetupBatch #abs_xsec_agenda_checkedCalc #abs_lookupCalc #WriteXML("ascii", abs_lookup, "abs_lookupBatch.xml") # Reading of abs_lookup table #---------------------------- ReadXML( abs_lookup, "../doitbatch/abs_lookupBatch.xml" ) # Check if lookup table is fitting input abs_lookupAdapt # absorption from LUT Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__LookUpTable ) # 7.AGENDAS-------------------------------------------------------------- #------------------------------------------------------------------------ # Check the include files to see the setting of Agendas and if needed, # overwrite them by re-setting the agendas here.------------------------ # Sets the angular grids for radiation calculation # -------------------------------------------------------------------- # For down- and up-looking geometries. DOAngularGridsSet( doit_za_grid_size, scat_aa_grid, scat_za_grid, 40, 19, "" ) cloudboxOff Tensor3Create(trans_field) # DOBatch Agenda----------------------------------------------------------- #------------------------------------------------------------------------ AgendaSet( dobatch_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 # Additionally moving TOA down to 10hPa altitude. AtmFieldsFromCompact( p_min=1e3 ) # 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 scat_data_checkedCalc sensor_checkedCalc # Here we choose our *y* output unit StringSet( iy_unit, "PlanckBT" ) # Calculate radiation field doit_i_fieldClearskyPlaneParallel(trans_field=trans_field) Touch(radiance_field) Touch(irradiance_field) Touch(spectral_irradiance_field) } # Set number of batch cases: nelemGet( ybatch_n, batch_atm_fields_compact ) #IndexSet(ybatch_start, 0) # Four cases is enough for this example 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 DOBatchCalc # Call *DOBatchCalc* robust: # Set robust flag to 1. If one individual job fails, ARTS will continue # with the next batch job. # DOBatchCalc(robust=1) #WriteXML( "binary", dobatch_doit_i_field) # Verify results ArrayOfTensor7Create( dobatch_ref ) ReadXML( dobatch_ref, "TestDOBatch.dobatch_doit_i_field.ref.xml" ) Compare( dobatch_doit_i_field, dobatch_ref, 1e-7, "Total BT should be close to the reference values") #==================stop========================== } # End of Main