#DEFINITIONS: -*-sh-*- # # Demonstration of a simple ARTS clear sky calculation # # Author: Stefan Buehler and Patrick Eriksson Arts2 { INCLUDE "general.arts" INCLUDE "continua.arts" # Pick out the lines we want from HITRAN and save to arts line file # --- #abs_linesReadFromHitran2004( abs_lines, # "/storage1/pool/lookup2/hitran2004/HITRAN04.par", # 310e9, # 340e9 ) #WriteXML( output_file_format, abs_lines ) # Read line file # --- ReadXML( abs_lines, "abs_lines.xml" ) # Frequency grid # Note: Should be covered by line catalog. # --- #VectorSet( f_grid, [320e9] ) VectorNLinSpace( f_grid, 4, 320e9, 322e9 ) # Pressure grid # --- ReadXML( p_grid, "p_grid.xml" ) # Definition of species # --- SpeciesSet( abs_species, ["H2O-SelfContStandardType, H2O-ForeignContStandardType, H2O", "N2-SelfContStandardType", "O3"] ) # Sort the line file according to species # --- abs_lines_per_speciesCreateFromLines # Atmospheric profiles # --- AtmRawRead( t_field_raw, z_field_raw, vmr_field_raw, abs_species, "../atmosphere_data/tropical" ) # AtmFieldsCalc # get ground altitude (z_surface) from z_field Extract( z_surface, z_field, 0 ) # Definition of sensor position and LOS # --- MatrixSetConstant( sensor_pos, 2, 1, 600e3 ) # VectorCreate( los ) VectorNLinSpace( los, 2, 113, 113.5 ) Matrix1ColFromVector( sensor_los, los ) #IndexSet( stokes_dim, 2 ) # No sensor properties # --- sensorOff # We select here to use Rayleigh-Jean brightness temperatures # --- StringSet( y_unit, "RJBT" ) # Perform RT calculations # --- basics_checkedCalc cloudbox_checkedCalc yCalc # Write the result for the python test script output_file_formatSetAscii WriteXML( output_file_format, y, "TestClearSky.y1.xml" ) # Do the same calculation again, but with lookup table absorption # and Jacobian calculations. # Redefine abs_scalar_gas_agenda to use the lookup table # --- AgendaSet( abs_scalar_gas_agenda ){ abs_scalar_gasExtractFromLookup } # Set parameters for absorption lookup table generation # --- # Arguments omitted for better maintainability of this test file. abs_lookupSetup # Generate absorption lookup table # --- abs_lookupCreate # Define Jacobian #--- jacobianInit # Species #--- # Atmospheric grids used here as retrieval grids jacobianAddAbsSpecies( jacobian_quantities, jacobian_agenda, atmosphere_dim, p_grid, lat_grid, lon_grid, p_grid, lat_grid, lon_grid, "O3", "analytical", "rel", 0.01 ) nrowsGet( nrows, sensor_pos ) VectorNLinSpace( sensor_time, nrows, 0, 1 ) jacobianAddPointingZa( jacobian_quantities, jacobian_agenda, sensor_pos, sensor_time, 0, "recalc", 0.01 ) # Another test of jacobianAddFreqShiftAndStretch is found in Groundbased jacobianAddFreqShiftAndStretch( jacobian_quantities, jacobian_agenda, "interp", 50e3, 1 ) jacobianAddPolyfit( jacobian_quantities, jacobian_agenda, sensor_response_pol_grid, sensor_response_f_grid, sensor_response_za_grid, sensor_pos, 1, 0, 0, 0 ) jacobianClose # Redo RT calculation and save # --- yCalc output_file_formatSetAscii WriteXML( output_file_format, y, "TestClearSky.y2.xml" ) WriteXML( output_file_format, jacobian ) } # End of Main