#DEFINITIONS: -*-sh-*- # An example ARTS controlfile that calculates absorption # coefficients with Doppler shift. # 2011-05-13 Stefan Buehler Arts2 { INCLUDE "general/general.arts" INCLUDE "general/continua.arts" INCLUDE "general/agendas.arts" INCLUDE "general/planet_earth.arts" # Turn on frequency interpolation # (we could also try higher order interpolation here) IndexSet( abs_f_interp_order, 1 ) # Agenda for scalar gas absorption calculation Copy(abs_xsec_agenda, abs_xsec_agenda__noCIA) # Number of Stokes components to be computed # IndexSet( stokes_dim, 1 ) # On-the-fly absorption Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__OnTheFly ) # Read the spectroscopic line data from the ARTS catalogue and # create the workspace variable `lines'. abs_linesReadFromArts( abs_lines, "lines.xml", 1e9, 200e9 ) # This test catalogue was generated from the HITRAN catalogue in the # following way: #abs_linesReadFromHitran( abs_lines, # "PATH_TO_ARTS-DATA/spectroscopy/hitran96/hitran96_lowfreq.par", # 1e9, # 200e9 ) # Define the list of absorption species: abs_speciesSet( species=[ "H2O-PWR98", "O2-PWR93", "N2-SelfContStandardType" ] ) # Alternatively select all species that we can find in the scenario: #abs_speciesDefineAllInScenario( basename="testdata/tropical" ) # This separates the lines into the different tag groups and creates # the workspace variable `abs_lines_per_species': abs_lines_per_speciesCreateFromLines # Dimensionality of the atmosphere # AtmosphereSet1D VectorNLogSpace( p_grid, 10, 100000, 10 ) # Atmospheric profiles AtmRawRead( t_field_raw, z_field_raw, vmr_field_raw, abs_species, "testdata/tropical" ) # Now interpolate all the raw atmospheric input onto the pressure # grid and create the atmospheric variables `t_field', `z_field', `vmr_field' AtmFieldsCalc # Initialize the input variables of abs_coefCalc from the Atm fields: AbsInputFromAtmFields # Create the frequency grid `f_grid': VectorNLinSpace( f_grid, 500, 50e9, 150e9 ) # Calculate field of absorption coefficients: abs_xsec_agenda_checkedCalc propmat_clearsky_agenda_checkedCalc atmfields_checkedCalc propmat_clearsky_fieldCalc # Write out: Tensor7Create(abs_field_nodoppler) Copy(abs_field_nodoppler, propmat_clearsky_field) WriteXML( output_file_format, abs_field_nodoppler ) # Now with Doppler (still LBL)! # Create vector of Doppler shift values VectorCreate(doppler) # Make ramp with same dimension as p_grid nelemGet( nelem, p_grid ) VectorNLinSpace( doppler, nelem, 0, 1e9 ) # Calculate field of absorption coefficients: propmat_clearsky_fieldCalc( doppler=doppler ) # Write out: Tensor7Create(abs_field_doppler) Copy(abs_field_doppler, propmat_clearsky_field) WriteXML( output_file_format, abs_field_doppler ) # Now with Doppler and lookup table! # Make the absorption lookupt table frequency grid cover a larger range # (we will move outside the original f_grid due to Doppler). # At the same time, make it also denser for better accuracy. VectorCreate(f_grid_backup) Copy(f_grid_backup, f_grid) VectorNLinSpace( f_grid, 1000, 49e9, 151e9 ) abs_lookupSetup abs_lookupCalc # absorption from LUT Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__LookUpTable ) # Restore original frequency grid Copy(f_grid, f_grid_backup) # Calculate field of absorption coefficients: propmat_clearsky_fieldCalc( doppler=doppler ) # Write out: Tensor7Create(abs_field_doppler_lookup) Copy(abs_field_doppler_lookup, propmat_clearsky_field) WriteXML( output_file_format, abs_field_doppler_lookup ) # Write out aux variables for plotting: WriteXML( output_file_format, p_grid ) WriteXML( output_file_format, f_grid ) }