#DEFINITIONS: -*-sh-*- # An example ARTS controlfile that calculates absorption # coefficients with Doppler shift. # 2011-05-13 Stefan Buehler Arts2 { INCLUDE "general.arts" INCLUDE "continua.arts" # 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 ) VectorNLogSpace( p_grid, 10, 100000, 10 ) # Define the list of absorption species: SpeciesSet( abs_species, [ "H2O-PWR98", "O2-PWR93", "N2-SelfContStandardType" ] ) # Alternatively select all species that we can find in the scenario: #abs_speciesDefineAllInScenario( abs_species, "../atmosphere_data/tropical" ) # Atmospheric profiles AtmRawRead( t_field_raw, z_field_raw, vmr_field_raw, abs_species, "../atmosphere_data/tropical" ) # This separates the lines into the different tag groups and creates # the workspace variable `abs_lines_per_species': abs_lines_per_speciesCreateFromLines # 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 ) # Negative f_index means calculate for all frequencies. IndexSet( f_index, -1 ) # Calculate field of absorption coefficients: abs_fieldCalc # Write out: Tensor5Create(abs_field_nodoppler) Copy(abs_field_nodoppler, abs_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: abs_fieldCalc( abs_field, abs_scalar_gas_agenda, f_index, f_grid, atmosphere_dim, p_grid, lat_grid, lon_grid, t_field, vmr_field, doppler ) # Write out: Tensor5Create(abs_field_doppler) Copy(abs_field_doppler, abs_field) WriteXML( output_file_format, abs_field_doppler ) # Now with Doppler and lookup table! abs_lookupSetup abs_lookupCreate AgendaSet( abs_scalar_gas_agenda ){ abs_scalar_gasExtractFromLookup } # Calculate field of absorption coefficients: abs_fieldCalc( abs_field, abs_scalar_gas_agenda, f_index, f_grid, atmosphere_dim, p_grid, lat_grid, lon_grid, t_field, vmr_field, doppler ) # Write out: Tensor5Create(abs_field_doppler_lookup) Copy(abs_field_doppler_lookup, abs_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 ) }