ARTS 2.5.11 (git: 725533f0)
m_atmosphere.cc File Reference

Workspace functions to set variables defining the atmosphere (excluding the surface). More...

#include <cfloat>
#include <cmath>
#include <vector>
#include "arts_constants.h"
#include "arts_conversions.h"
#include "species_tags.h"
#include "absorption.h"
#include "agenda_class.h"
#include "arts.h"
#include "auto_md.h"
#include "check_input.h"
#include "cloudbox.h"
#include "geodetic.h"
#include "global_data.h"
#include "gridded_fields.h"
#include "igrf13.h"
#include "interpolation.h"
#include "interp.h"
#include "linescaling.h"
#include "matpack_data.h"
#include "messages.h"
#include "rte.h"
#include "special_interp.h"
#include "xml_io.h"

Go to the source code of this file.

Functions

void atm_fields_compactExpand (GriddedField4 &af, Index &nf, const String &name, const Index &prepend, const Verbosity &)
 atm_fields_compactExpand
 
void AtmFieldPRegridHelper (Index &ing_min, Index &ing_max, ArrayOfLagrangeLogInterpolation &lag_p, Matrix &itw, ConstVectorView p_grid_out, ConstVectorView p_grid_in, const Index &interp_order, const Verbosity &verbosity)
 Calculate grid positions and interpolations weights for AtmFieldPRegrid.
 
void AtmFieldPRegrid (Tensor3 &atmtensor_out, const Tensor3 &atmtensor_in_orig, const Vector &p_grid_new, const Vector &p_grid_old, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmFieldPRegrid.
 
void AtmFieldPRegrid (Tensor4 &atmtensor_out, const Tensor4 &atmtensor_in_orig, const Vector &p_grid_new, const Vector &p_grid_old, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmFieldPRegrid.
 
void FieldFromGriddedFieldCheckLatLonHelper (const Vector &lat_grid, const Vector &lon_grid, const Index ilat, const Index ilon, const GriddedField &gfield)
 Check for correct grid dimensions.
 
void FieldFromGriddedField (Matrix &field_out, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField2 &gfraw_in, const Verbosity &)
 WORKSPACE METHOD: FieldFromGriddedField.
 
void FieldFromGriddedField (Tensor3 &field_out, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &gfraw_in, const Verbosity &)
 WORKSPACE METHOD: FieldFromGriddedField.
 
void FieldFromGriddedField (Tensor4 &field_out, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField4 &gfraw_in, const Verbosity &)
 WORKSPACE METHOD: FieldFromGriddedField.
 
void FieldFromGriddedField (Tensor4 &field_out, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfGriddedField3 &gfraw_in, const Verbosity &verbosity)
 WORKSPACE METHOD: FieldFromGriddedField.
 
void GriddedFieldLatLonExpand (GriddedField2 &gfraw_out, const GriddedField2 &gfraw_in_orig, const Verbosity &)
 WORKSPACE METHOD: GriddedFieldLatLonExpand.
 
void GriddedFieldLatLonExpand (GriddedField3 &gfraw_out, const GriddedField3 &gfraw_in_orig, const Verbosity &)
 WORKSPACE METHOD: GriddedFieldLatLonExpand.
 
void GriddedFieldLatLonExpand (GriddedField4 &gfraw_out, const GriddedField4 &gfraw_in_orig, const Verbosity &)
 WORKSPACE METHOD: GriddedFieldLatLonExpand.
 
void GriddedFieldLatLonExpand (ArrayOfGriddedField3 &gfraw_out, const ArrayOfGriddedField3 &gfraw_in, const Verbosity &verbosity)
 WORKSPACE METHOD: GriddedFieldLatLonExpand.
 
void GriddedFieldPRegridHelper (Index &ing_min, Index &ing_max, ArrayOfLagrangeLogInterpolation &lag_p, Matrix &itw, GriddedField &gfraw_out, const GriddedField &gfraw_in, const Index p_grid_index, ConstVectorView p_grid, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
 Calculate grid positions and interpolations weights for GriddedFieldPRegrid.
 
void GriddedFieldPRegrid (GriddedField3 &gfraw_out, const Vector &p_grid, const GriddedField3 &gfraw_in_orig, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
 WORKSPACE METHOD: GriddedFieldPRegrid.
 
void GriddedFieldPRegrid (GriddedField4 &gfraw_out, const Vector &p_grid, const GriddedField4 &gfraw_in_orig, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
 WORKSPACE METHOD: GriddedFieldPRegrid.
 
void GriddedFieldPRegrid (ArrayOfGriddedField3 &agfraw_out, const Vector &p_grid, const ArrayOfGriddedField3 &agfraw_in, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
 WORKSPACE METHOD: GriddedFieldPRegrid.
 
void GriddedFieldLatLonRegridHelper (ArrayOfLagrangeInterpolation &lag_lat, ArrayOfLagrangeCyclic0to360Interpolation &lag_lon, Tensor4 &itw, GriddedField &gfraw_out, const GriddedField &gfraw_in, const Index lat_grid_index, const Index lon_grid_index, ConstVectorView lat_true, ConstVectorView lon_true, const Index &interp_order, const Verbosity &verbosity)
 Calculate grid positions and interpolations weights for GriddedFieldLatLonRegrid.
 
void GriddedFieldLatLonRegrid (GriddedField2 &gfraw_out, const Vector &lat_true, const Vector &lon_true, const GriddedField2 &gfraw_in_orig, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: GriddedFieldLatLonRegrid.
 
void GriddedFieldLatLonRegrid (GriddedField3 &gfraw_out, const Vector &lat_true, const Vector &lon_true, const GriddedField3 &gfraw_in_orig, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: GriddedFieldLatLonRegrid.
 
void GriddedFieldLatLonRegrid (GriddedField4 &gfraw_out, const Vector &lat_true, const Vector &lon_true, const GriddedField4 &gfraw_in_orig, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: GriddedFieldLatLonRegrid.
 
void GriddedFieldLatLonRegrid (ArrayOfGriddedField3 &agfraw_out, const Vector &lat_true, const Vector &lon_true, const ArrayOfGriddedField3 &agfraw_in, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: GriddedFieldLatLonRegrid.
 
void GriddedFieldZToPRegridHelper (Index &ing_min, Index &ing_max, ArrayOfLagrangeInterpolation &lag_p, Matrix &itw, const GriddedField &gfraw_in, const Index z_grid_index, ConstVectorView z_grid, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
 Calculate grid positions and interpolations weights for GriddedFieldZToPRegrid.
 
void GriddedFieldZToPRegrid (GriddedField3 &gfraw_out, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const GriddedField3 &gfraw_in_orig, const Index &interp_order, const Index &zeropadding, const Verbosity &verbosity)
 WORKSPACE METHOD: GriddedFieldZToPRegrid.
 
void atm_fields_compactFromMatrix (GriddedField4 &af, const Index &atmosphere_dim, const Matrix &im, const ArrayOfString &field_names, const Verbosity &)
 WORKSPACE METHOD: atm_fields_compactFromMatrix.
 
void atm_fields_compactAddConstant (GriddedField4 &af, const String &name, const Numeric &value, const Index &prepend, const ArrayOfString &condensibles, const Verbosity &verbosity)
 WORKSPACE METHOD: atm_fields_compactAddConstant.
 
void atm_fields_compactAddSpecies (GriddedField4 &atm_fields_compact, const String &name, const GriddedField3 &species, const Index &prepend, const Verbosity &verbosity)
 WORKSPACE METHOD: atm_fields_compactAddSpecies.
 
void atm_fields_compactCleanup (GriddedField4 &atm_fields_compact, const Numeric &threshold, const Verbosity &)
 WORKSPACE METHOD: atm_fields_compactCleanup.
 
void atm_fields_compactCreateFromField (GriddedField4 &atm_fields_compact, const String &name, const GriddedField3 &field, const Verbosity &)
 WORKSPACE METHOD: atm_fields_compactCreateFromField.
 
void batch_atm_fields_compactAddConstant (ArrayOfGriddedField4 &batch_atm_fields_compact, const String &name, const Numeric &value, const Index &prepend, const ArrayOfString &condensibles, const Verbosity &verbosity)
 WORKSPACE METHOD: batch_atm_fields_compactAddConstant.
 
void batch_atm_fields_compactAddSpecies (ArrayOfGriddedField4 &batch_atm_fields_compact, const String &name, const GriddedField3 &species, const Index &prepend, const Verbosity &verbosity)
 WORKSPACE METHOD: batch_atm_fields_compactAddSpecies.
 
void batch_atm_fields_compactCleanup (ArrayOfGriddedField4 &batch_atm_fields_compact, const Numeric &threshold, const Verbosity &verbosity)
 WORKSPACE METHOD: batch_atm_fields_compactCleanup.
 
void batch_atm_fields_compactFromArrayOfMatrix (ArrayOfGriddedField4 &batch_atm_fields_compact, const Index &atmosphere_dim, const ArrayOfMatrix &am, const ArrayOfString &field_names, const Verbosity &verbosity)
 WORKSPACE METHOD: batch_atm_fields_compactFromArrayOfMatrix.
 
void AtmFieldsAndParticleBulkPropFieldFromCompact (Vector &p_grid, Vector &lat_grid, Vector &lon_grid, Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, Tensor4 &particle_bulkprop_field, ArrayOfString &particle_bulkprop_names, const ArrayOfArrayOfSpeciesTag &abs_species, const GriddedField4 &atm_fields_compact, const Index &atmosphere_dim, const String &delim, const Numeric &p_min, const Index &check_gridnames, const Verbosity &)
 WORKSPACE METHOD: AtmFieldsAndParticleBulkPropFieldFromCompact.
 
void AtmosphereSet1D (Index &atmosphere_dim, Vector &lat_grid, Vector &lon_grid, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmosphereSet1D.
 
void AtmosphereSet2D (Index &atmosphere_dim, Vector &lon_grid, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmosphereSet2D.
 
void AtmosphereSet3D (Index &atmosphere_dim, Vector &lat_true, Vector &lon_true, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmosphereSet3D.
 
void AtmFieldsCalc (Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, EnergyLevelMap &nlte_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &t_field_raw, const GriddedField3 &z_field_raw, const ArrayOfGriddedField3 &vmr_field_raw, const ArrayOfGriddedField3 &nlte_field_raw, const ArrayOfQuantumIdentifier &nlte_ids, const Vector &nlte_energies, const Index &atmosphere_dim, const Index &interp_order, const Index &vmr_zeropadding, const Index &vmr_nonegative, const Index &nlte_when_negative, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmFieldsCalc.
 
void MagFieldsCalcIGRF (Tensor3 &mag_u_field, Tensor3 &mag_v_field, Tensor3 &mag_w_field, const Tensor3 &z_field, const Vector &lat_grid, const Vector &lon_grid, const Vector &refellipsoid, const Time &time, const Verbosity &)
 WORKSPACE METHOD: MagFieldsCalcIGRF.
 
void MagFieldsCalc (Tensor3 &mag_u_field, Tensor3 &mag_v_field, Tensor3 &mag_w_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &mag_u_field_raw, const GriddedField3 &mag_v_field_raw, const GriddedField3 &mag_w_field_raw, const Index &atmosphere_dim, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: MagFieldsCalc.
 
void MagFieldsFromAltitudeRawCalc (Tensor3 &mag_u_field, Tensor3 &mag_v_field, Tensor3 &mag_w_field, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const GriddedField3 &mag_u_field_raw, const GriddedField3 &mag_v_field_raw, const GriddedField3 &mag_w_field_raw, const Index &interp_order, const Numeric &extrapolation_factor, const Verbosity &verbosity)
 WORKSPACE METHOD: MagFieldsFromAltitudeRawCalc.
 
void WindFieldsCalc (Tensor3 &wind_u_field, Tensor3 &wind_v_field, Tensor3 &wind_w_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &wind_u_field_raw, const GriddedField3 &wind_v_field_raw, const GriddedField3 &wind_w_field_raw, const Index &atmosphere_dim, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: WindFieldsCalc.
 
void AtmFieldsCalcExpand1D (Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, EnergyLevelMap &nlte_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &t_field_raw, const GriddedField3 &z_field_raw, const ArrayOfGriddedField3 &vmr_field_raw, const ArrayOfGriddedField3 &nlte_field_raw, const ArrayOfQuantumIdentifier &nlte_ids, const Vector &nlte_energies, const Index &atmosphere_dim, const Index &interp_order, const Index &vmr_zeropadding, const Index &vmr_nonegative, const Index &nlte_when_negative, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmFieldsCalcExpand1D.
 
void MagFieldsCalcExpand1D (Tensor3 &mag_u_field, Tensor3 &mag_v_field, Tensor3 &mag_w_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &mag_u_field_raw, const GriddedField3 &mag_v_field_raw, const GriddedField3 &mag_w_field_raw, const Index &atmosphere_dim, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: MagFieldsCalcExpand1D.
 
void WindFieldsCalcExpand1D (Tensor3 &wind_u_field, Tensor3 &wind_v_field, Tensor3 &wind_w_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const GriddedField3 &wind_u_field_raw, const GriddedField3 &wind_v_field_raw, const GriddedField3 &wind_w_field_raw, const Index &atmosphere_dim, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: WindFieldsCalcExpand1D.
 
void AtmFieldsExpand1D (Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Index &atmosphere_dim, const Index &chk_vmr_nan, const Verbosity &)
 WORKSPACE METHOD: AtmFieldsExpand1D.
 
void AtmFieldsExtract1D (Index &atmosphere_dim, Vector &lat_grid, Vector &lon_grid, Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, const Index &ilat, const Index &ilon, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmFieldsExtract1D.
 
void AtmFieldsRefinePgrid (Vector &p_grid, Tensor3 &t_field, Tensor3 &z_field, Tensor4 &vmr_field, Index &atmfields_checked, Index &atmgeom_checked, Index &cloudbox_checked, const Vector &lat_grid, const Vector &lon_grid, const Index &atmosphere_dim, const Numeric &p_step, const Index &interp_order, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmFieldsRefinePgrid.
 
void AtmRawRead (GriddedField3 &t_field_raw, GriddedField3 &z_field_raw, ArrayOfGriddedField3 &vmr_field_raw, ArrayOfGriddedField3 &nlte_field_raw, ArrayOfQuantumIdentifier &nlte_quantum_identifiers, Vector &nlte_vibrational_energies, const ArrayOfArrayOfSpeciesTag &abs_species, const String &basename, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmRawRead.
 
void MagRawRead (GriddedField3 &mag_u_field_raw, GriddedField3 &mag_v_field_raw, GriddedField3 &mag_w_field_raw, const String &basename, const Verbosity &verbosity)
 WORKSPACE METHOD: MagRawRead.
 
void WindRawRead (GriddedField3 &wind_u_field_raw, GriddedField3 &wind_v_field_raw, GriddedField3 &wind_w_field_raw, const String &basename, const Verbosity &verbosity)
 WORKSPACE METHOD: WindRawRead.
 
void AtmWithNLTERawRead (GriddedField3 &t_field_raw, GriddedField3 &z_field_raw, ArrayOfGriddedField3 &vmr_field_raw, ArrayOfGriddedField3 &nlte_field_raw, ArrayOfQuantumIdentifier &nlte_quantum_identifiers, Vector &nlte_vibrational_energies, const ArrayOfArrayOfSpeciesTag &abs_species, const String &basename, const Index &expect_vibrational_energies, const Verbosity &verbosity)
 WORKSPACE METHOD: AtmWithNLTERawRead.
 
void z_surfaceFromFileAndGrid (Matrix &z_surface, const Vector &lat_grid, const Vector &lon_grid, const String &filename, const Index &interp_order, const Index &set_lowest_altitude_to_zero, const Verbosity &verbosity)
 WORKSPACE METHOD: z_surfaceFromFileAndGrid.
 
void z_surfaceConstantAltitude (Matrix &z_surface, const Vector &lat_grid, const Vector &lon_grid, const Numeric &altitude, const Verbosity &verbosity)
 WORKSPACE METHOD: z_surfaceConstantAltitude.
 
void InterpAtmFieldToPosition (Numeric &outvalue, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Vector &rtp_pos, const Tensor3 &field, const Verbosity &verbosity)
 WORKSPACE METHOD: InterpAtmFieldToPosition.
 
void p_gridDensify (Vector &p_grid, Index &atmfields_checked, Index &atmgeom_checked, Index &cloudbox_checked, const Vector &p_grid_old, const Index &nfill, const Verbosity &verbosity)
 WORKSPACE METHOD: p_gridDensify.
 
void p_gridRefine (Vector &p_grid, Index &atmfields_checked, Index &atmgeom_checked, Index &cloudbox_checked, const Vector &p_grid_old, const Numeric &p_step10, const Verbosity &)
 WORKSPACE METHOD: p_gridRefine.
 
void p_gridFromZRaw (Vector &p_grid, const GriddedField3 &z_field_raw, const Index &no_negZ, const Verbosity &)
 WORKSPACE METHOD: p_gridFromZRaw.
 
void lat_gridFromZRaw (Vector &lat_grid, const GriddedField3 &z_field_raw, const Verbosity &)
 WORKSPACE METHOD: lat_gridFromZRaw.
 
void lon_gridFromZRaw (Vector &lon_grid, const GriddedField3 &z_field_raw, const Verbosity &)
 WORKSPACE METHOD: lon_gridFromZRaw.
 
void atm_gridsFromZRaw (Vector &p_grid, Vector &lat_grid, Vector &lon_grid, const GriddedField3 &z_field_raw, const Index &no_negZ, const Verbosity &v)
 WORKSPACE METHOD: atm_gridsFromZRaw.
 
void lat_gridFromRawField (Vector &lat_grid, const GriddedField3 &field_raw, const Verbosity &)
 WORKSPACE METHOD: lat_gridFromRawField.
 
void lon_gridFromRawField (Vector &lon_grid, const GriddedField3 &field_raw, const Verbosity &)
 WORKSPACE METHOD: lon_gridFromRawField.
 
void wind_u_fieldIncludePlanetRotation (Tensor3 &wind_u_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &refellipsoid, const Tensor3 &z_field, const Numeric &planet_rotation_period, const Verbosity &)
 WORKSPACE METHOD: wind_u_fieldIncludePlanetRotation.
 
void z2g (Numeric &g, const Numeric &r, const Numeric &g0, const Numeric &z)
 
void z_fieldFromHSE (Workspace &ws, Tensor3 &z_field, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &lat_true, const Vector &lon_true, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &t_field, const Tensor4 &vmr_field, const Vector &refellipsoid, const Matrix &z_surface, const Index &atmfields_checked, const Agenda &g0_agenda, const Numeric &molarmass_dry_air, const Numeric &p_hse, const Numeric &z_hse_accuracy, const Verbosity &verbosity)
 WORKSPACE METHOD: z_fieldFromHSE.
 
void vmr_fieldSetConstant (Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const String &species, const Numeric &vmr_value, const Verbosity &)
 WORKSPACE METHOD: vmr_fieldSetConstant.
 
void vmr_fieldSetAllConstant (Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &vmr_values, const Verbosity &verbosity)
 WORKSPACE METHOD: vmr_fieldSetAllConstant.
 
void vmr_fieldSetRh (Workspace &ws, Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &t_field, const Vector &p_grid, const Agenda &water_p_eq_agenda, const Numeric &rh, const Numeric &vmr_threshold, const Verbosity &)
 WORKSPACE METHOD: vmr_fieldSetRh.
 
void nlte_fieldLteExternalPartitionFunction (Index &nlte_do, EnergyLevelMap &nlte_field, ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfQuantumIdentifier &nlte_quantum_identifiers, const Tensor3 &t_field, const Verbosity &verbosity)
 WORKSPACE METHOD: nlte_fieldLteExternalPartitionFunction.
 
void nlte_fieldLteInternalPartitionFunction (Index &nlte_do, EnergyLevelMap &nlte_field, ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfQuantumIdentifier &nlte_quantum_identifiers, const Tensor3 &t_field, const Verbosity &verbosity)
 WORKSPACE METHOD: nlte_fieldLteInternalPartitionFunction.
 

Variables

constexpr Numeric GAS_CONSTANT =Constant::ideal_gas_constant
 
constexpr Numeric EPSILON_LON_CYCLIC = 2 * DBL_EPSILON
 Data value accuracy requirement for values at 0 and 360 deg if longitudes are cyclic.
 

Detailed Description

Workspace functions to set variables defining the atmosphere (excluding the surface).

Author
Patrick Eriksson Patri.nosp@m.ck.E.nosp@m.rikss.nosp@m.on@c.nosp@m.halme.nosp@m.rs.s.nosp@m.e
Date
2002-05-16

These functions are listed in the doxygen documentation as entries of the file auto_md.h.

Definition in file m_atmosphere.cc.

Function Documentation

◆ atm_fields_compactAddConstant()

void atm_fields_compactAddConstant ( GriddedField4 atm_fields_compact,
const String name,
const Numeric &  value,
const Index &  prepend,
const ArrayOfString condensibles,
const Verbosity verbosity 
)

WORKSPACE METHOD: atm_fields_compactAddConstant.

Adds a constant field to atm_fields_compact.

This is handy, e.g., for nitrogen or oxygen. The constant value can be appended or prepended as an additional field to the already existing collection of fields. All dimensions (pressure, latitude, longitude) are filled up, so this works for 1D, 2D, or 3D atmospheres.

The passed name of the field has to be in accordance with the tagging structure described for atm_fields_compact.

A list of condensibles can be optionally specified if the VMR of the added species is assuming dry air. The VMR of the added species is then scaled down by the sum of the condensibles' VMR::

<br> VMR * (1 - VMR_sum_of_condensibles).

For Earth this should be set to ["abs_species-H2O"]

Author
Stefan Buehler, Oliver Lemke
Parameters
[in,out]atm_fields_compactWS Input/Output
[in]nameGeneric Input
[in]valueGeneric Input
[in]prependGeneric Input (Default: "0")
[in]condensiblesGeneric Input (Default: "[]")

Definition at line 1421 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, atm_fields_compactExpand(), c, GriddedField4::data, GriddedField::get_string_grid(), and Array< base >::nelem().

Referenced by atm_fields_compactAddConstant_g(), and batch_atm_fields_compactAddConstant().

◆ atm_fields_compactAddSpecies()

void atm_fields_compactAddSpecies ( GriddedField4 atm_fields_compact,
const String name,
const GriddedField3 value,
const Index &  prepend,
const Verbosity verbosity 
)

WORKSPACE METHOD: atm_fields_compactAddSpecies.

Adds a field to atm_fields_compact, with interpolation.

This method appends or prepends a GriddedField3 to atm_fields_compact. The GriddedField3 is interpolated upon the grid of atm_fields_compact*. A typical use case for this method may be to add a climatology of some gas when this gas is needed for radiative transfer calculations, but not yet present in atm_fields_compact. One case where this happens is when using the Chevalier91L dataset for infrared simulations.

The grids in atm_fields_compact must fully encompass the grids in the GriddedField3 to be added, for interpolation to succeed. If this is not the case, a RuntimeError is thrown.

The passed name of the field has to be in accordance with the tagging structure described for atm_fields_compact.

Author
Gerrit Holl
Parameters
[in,out]atm_fields_compactWS Input/Output
[in]nameGeneric Input
[in]valueGeneric Input
[in]prependGeneric Input (Default: "0")

Definition at line 1467 of file m_atmosphere.cc.

References ARTS_ASSERT, atm_fields_compactExpand(), GriddedField3::checksize(), GriddedField4::checksize(), chk_interpolation_grids(), GriddedField3::data, GriddedField4::data, GriddedField::get_numeric_grid(), gridpos(), interp(), interpweights(), Array< base >::nelem(), and p2gridpos().

Referenced by atm_fields_compactAddSpecies_g(), and batch_atm_fields_compactAddSpecies().

◆ atm_fields_compactCleanup()

void atm_fields_compactCleanup ( GriddedField4 atm_fields_compact,
const Numeric &  threshold,
const Verbosity verbosity 
)

WORKSPACE METHOD: atm_fields_compactCleanup.

Removes unrealistically small or erroneous data from atm_fields_compact* (or other GriddedField4 data)

This WSM checks if the data in atm_fields_compact contains values smaller than the given threshold. In this case, these values will be set to zero.

The method should be applied if atm_fields_compact contains unrealistically small or erroneous data (NWP/GCM model data occassionally contains negative values, which are numerical artefacts rather than physical values.)

Author
Jana Mendrok
Parameters
[in,out]atm_fields_compactWS Input/Output
[in]thresholdGeneric Input

Definition at line 1550 of file m_atmosphere.cc.

References ARTS_ASSERT, GriddedField4::checksize(), GriddedField4::data, and GriddedField::get_string_grid().

Referenced by atm_fields_compactCleanup_g(), and batch_atm_fields_compactCleanup().

◆ atm_fields_compactCreateFromField()

void atm_fields_compactCreateFromField ( GriddedField4 atm_fields_compact,
const String name,
const GriddedField3 field,
const Verbosity verbosity 
)

WORKSPACE METHOD: atm_fields_compactCreateFromField.

Initiates atm_fields_compact from a field.

atm_fields_compact* will have the same size and grids as the GriddedField3, but with one dimension as length 1.

Author
Richard Larsson
Parameters
[out]atm_fields_compactWS Output
[in]nameGeneric Input
[in]fieldGeneric Input

Definition at line 1571 of file m_atmosphere.cc.

References ARTS_ASSERT, GriddedField3::checksize(), GriddedField3::data, GriddedField4::data, GriddedField::get_numeric_grid(), and GriddedField::set_grid().

Referenced by atm_fields_compactCreateFromField_g().

◆ atm_fields_compactExpand()

void atm_fields_compactExpand ( GriddedField4 af,
Index &  nf,
const String name,
const Index &  prepend,
const Verbosity  
)

atm_fields_compactExpand

Add a species to an atm_fields_compact. Does not add any content, but only resizes the data and adds a field to the ArrayOfString respresenting the species for this GriddedField4. This helper function is used by e.g. atm_fields_compactAddSpecies* and atm_fields_compactAddConstant.

Return values
afThe new atm_fields_compact
nfThe new number of fields
Parameters
nameName of new field
prepend0 = append, otherwise prepend
Author
Gerrit Holl
Date
2011-05-04

Definition at line 83 of file m_atmosphere.cc.

References GriddedField4::data, GriddedField::get_string_grid(), Array< base >::nelem(), and GriddedField4::resize().

Referenced by atm_fields_compactAddConstant(), and atm_fields_compactAddSpecies().

◆ atm_fields_compactFromMatrix()

void atm_fields_compactFromMatrix ( GriddedField4 atm_fields_compact,
const Index &  atmosphere_dim,
const Matrix &  gin1,
const ArrayOfString field_names,
const Verbosity verbosity 
)

WORKSPACE METHOD: atm_fields_compactFromMatrix.

Sets atm_fields_compact from 1D fields given in form of a matrix.

For batch calculations it is handy to store atmospheric profiles in an array of matrix. We take such a matrix, and create atm_fields_compact* from it.

The matrix must contain one row for each pressure level.

Not all fields contained in the matrix must be selected into atm_fields_compact*, but the selection must at least contain fields of pressure, temperature, altitude and one absorption species. The matrix can contain some additional fields which are not directly used by ARTS for calculations but can be required for further processing, e.g. wind speed and direction. These fields do not need to be transfered into the atm_fields_compact variable.

Selection of fields into atm_fields_compact works by providing a field name tag in field_names for the selected fields, while unselected fields are tagged by 'ignore'. Order of tags in field_names is strictly taken as corresponding to column order in the matrix. The pressure fields are by convention the first column of the matrix, hence must not be tagged. That is, there must be given one field name tag less than matrix columns.

For detailed tagging conventions see atm_fields_compact.

Works only for atmosphere_dim == 1.

Author
Stefan Buehler
Daniel Kreyling
Jana Mendrok
Parameters
[out]atm_fields_compactWS Output
[in]atmosphere_dimWS Input
[in]gin1Generic Input
[in]field_namesGeneric Input

Definition at line 1359 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, GriddedField4::data, Array< base >::nelem(), GriddedField4::resize(), GriddedField::set_grid(), and my_basic_string< charT >::toupper().

Referenced by atm_fields_compactFromMatrix_g(), and batch_atm_fields_compactFromArrayOfMatrix().

◆ atm_gridsFromZRaw()

void atm_gridsFromZRaw ( Vector &  p_grid,
Vector &  lat_grid,
Vector &  lon_grid,
const GriddedField3 z_field_raw,
const Index &  no_negZ,
const Verbosity verbosity 
)

WORKSPACE METHOD: atm_gridsFromZRaw.

Calls p_gridFromZRaw, lat_gridFromZRaw and lon_gridFromZRaw

Author
Richard Larsson
Parameters
[out]p_gridWS Output
[out]lat_gridWS Output
[out]lon_gridWS Output
[in]z_field_rawWS Input
[in]no_negZGeneric Input (Default: "1")

Definition at line 3688 of file m_atmosphere.cc.

Referenced by atm_gridsFromZRaw_g().

◆ AtmFieldPRegrid() [1/2]

void AtmFieldPRegrid ( Tensor3 &  output,
const Tensor3 &  input,
const Vector &  p_grid_new,
const Vector &  p_grid_old,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmFieldPRegrid.

Interpolates the input field along the pressure dimension from p_grid_old to to p_grid_new.

Extrapolation is allowed within the common 0.5grid-step margin. in and out fields can be the same variable.

Author
Jana Mendrok
Parameters
[out]outputSupergeneric output
[in]inputGeneric Input
[in]p_grid_newGeneric Input
[in]p_grid_oldGeneric Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 158 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, and AtmFieldPRegridHelper().

Referenced by AtmFieldPRegrid_sg_Tensor3Tensor3_g(), AtmFieldPRegrid_sg_Tensor4Tensor4_g(), and AtmFieldsRefinePgrid().

◆ AtmFieldPRegrid() [2/2]

void AtmFieldPRegrid ( Tensor4 &  output,
const Tensor4 &  input,
const Vector &  p_grid_new,
const Vector &  p_grid_old,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmFieldPRegrid.

Interpolates the input field along the pressure dimension from p_grid_old to to p_grid_new.

Extrapolation is allowed within the common 0.5grid-step margin. in and out fields can be the same variable.

Author
Jana Mendrok
Parameters
[out]outputSupergeneric output
[in]inputGeneric Input
[in]p_grid_newGeneric Input
[in]p_grid_oldGeneric Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 213 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, AtmFieldPRegridHelper(), and b.

◆ AtmFieldPRegridHelper()

void AtmFieldPRegridHelper ( Index &  ing_min,
Index &  ing_max,
ArrayOfLagrangeLogInterpolation &  lag_p,
Matrix &  itw,
ConstVectorView  p_grid_out,
ConstVectorView  p_grid_in,
const Index &  interp_order,
const Verbosity verbosity 
)

Calculate grid positions and interpolations weights for AtmFieldPRegrid.

Definition at line 130 of file m_atmosphere.cc.

References chk_interpolation_pgrids(), CREATE_OUT2, and interpweights().

Referenced by AtmFieldPRegrid(), and AtmFieldPRegrid().

◆ AtmFieldsAndParticleBulkPropFieldFromCompact()

void AtmFieldsAndParticleBulkPropFieldFromCompact ( Vector &  p_grid,
Vector &  lat_grid,
Vector &  lon_grid,
Tensor3 &  t_field,
Tensor3 &  z_field,
Tensor4 &  vmr_field,
Tensor4 &  particle_bulkprop_field,
ArrayOfString particle_bulkprop_names,
const ArrayOfArrayOfSpeciesTag abs_species,
const GriddedField4 atm_fields_compact,
const Index &  atmosphere_dim,
const String delim,
const Numeric &  p_min,
const Index &  check_gridnames,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmFieldsAndParticleBulkPropFieldFromCompact.

Extract pressure grid and atmospheric fields from atm_fields_compact*.

An atmospheric scenario includes the following data for each position (pressure, latitude, longitude) in the atmosphere:

  1. temperature field
  2. the corresponding altitude field
  3. vmr fields for the gaseous species
  4. scattering species fields

This method splits up the data found in atm_fields_compact to p_grid, lat_grid, lon_grid, vmr_field, particle_bulkprop_field, and particle_bulkprop_names. See documentation of atm_fields_compact for a definition of the data.

Compact states are characterized by having all atmospheric fields already given on identical grids. That is, no interpolation needs to be and is performed. Keyword p_min allows to remove atmospheric levels with pressures lower than the given value (default: no removal). This reduces computational burden and is useful when upper atmospheric contributions are negligible.

Possible future extensions: Add a keyword parameter to refine the pressure grid if it is too coarse. Or a version that interpolates onto given grids, instead of using and returning the original grids.

Author
Jana Mendrok, Manfred Brath
Parameters
[out]p_gridWS Output
[out]lat_gridWS Output
[out]lon_gridWS Output
[out]t_fieldWS Output
[out]z_fieldWS Output
[out]vmr_fieldWS Output
[out]particle_bulkprop_fieldWS Output
[out]particle_bulkprop_namesWS Output
[in]abs_speciesWS Input
[in]atm_fields_compactWS Input
[in]atmosphere_dimWS Input
[in]delimGeneric Input (Default: "-")
[in]p_minGeneric Input (Default: "0")
[in]check_gridnamesGeneric Input (Default: "0")

Definition at line 1721 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, c, chk_atm_grids(), chk_griddedfield_gridname(), Array< base >::nelem(), parse_atmcompact_scattype(), parse_atmcompact_speciesname(), and parse_atmcompact_speciestype().

Referenced by AtmFieldsAndParticleBulkPropFieldFromCompact_g().

◆ AtmFieldsCalc()

void AtmFieldsCalc ( Tensor3 &  t_field,
Tensor3 &  z_field,
Tensor4 &  vmr_field,
EnergyLevelMap nlte_field,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const GriddedField3 t_field_raw,
const GriddedField3 z_field_raw,
const ArrayOfGriddedField3 vmr_field_raw,
const ArrayOfGriddedField3 nlte_field_raw,
const ArrayOfQuantumIdentifier nlte_level_identifiers,
const Vector &  nlte_vibrational_energies,
const Index &  atmosphere_dim,
const Index &  interp_order,
const Index &  vmr_zeropadding,
const Index &  vmr_nonegative,
const Index &  nlte_when_negative,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmFieldsCalc.

Interpolation of raw atmospheric T, z, VMR, and NLTE T/r fields to calculation grids.

An atmospheric scenario includes the following data for each position (pressure, latitude, longitude) in the atmosphere:

  1. temperature field
  2. the corresponding altitude field
  3. vmr fields for the gaseous species

This method interpolates the fields of raw data (t_field_raw, z_field_raw*, vmr_field_raw) which can be stored on arbitrary grids to the calculation grids (p_grid, lat_grid, lon_grid). If nlte_field_raw is empty, it is assumed to be so because LTE is assumed by the user and nlte_field will be empty.

Internally, AtmFieldsCalc applies GriddedFieldPRegrid and GriddedFieldLatLonRegrid*. Generally, 'half-grid-step' extrapolation is allowed and applied. However, if vmr_zeropadding=1 then VMRs at p_grid* levels exceeding the raw VMRs' pressure grid are set to 0 (applying the vmr_zeropadding option of GriddedFieldPRegrid).

Default is to just accept obtained VMRs. If you want to enforce that all VMR created are >= 0, set vmr_nonegative to 1. Negative values are then set 0. Beside being present in input data, negative VMR can be generated from the interpolation if interp_order is above 1.

Author
Claudia Emde
Stefan Buehler
Parameters
[out]t_fieldWS Output
[out]z_fieldWS Output
[out]vmr_fieldWS Output
[out]nlte_fieldWS Output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]t_field_rawWS Input
[in]z_field_rawWS Input
[in]vmr_field_rawWS Input
[in]nlte_field_rawWS Input
[in]nlte_level_identifiersWS Input
[in]nlte_vibrational_energiesWS Input
[in]atmosphere_dimWS Input
[in]interp_orderGeneric Input (Default: "1")
[in]vmr_zeropaddingGeneric Input (Default: "0")
[in]vmr_nonegativeGeneric Input (Default: "0")
[in]nlte_when_negativeGeneric Input (Default: "0")

Definition at line 1959 of file m_atmosphere.cc.

References ARTS_ASSERT, ARTS_USER_ERROR, ARTS_USER_ERROR_IF, chk_atm_grids(), chk_if_in_range(), chk_interpolation_grids(), chk_interpolation_pgrids(), CREATE_OUT2, GriddedField3::data, FieldFromGriddedField(), GriddedField::get_numeric_grid(), GriddedFieldLatLonRegrid(), GriddedFieldPRegrid(), interpweights(), EnergyLevelMap::levels, Array< base >::nelem(), None_t, Tensor3_t, EnergyLevelMap::ThrowIfNotOK(), EnergyLevelMap::type, EnergyLevelMap::value, var_string(), and EnergyLevelMap::vib_energy.

Referenced by AtmFieldsCalc_g(), and AtmFieldsCalcExpand1D().

◆ AtmFieldsCalcExpand1D()

void AtmFieldsCalcExpand1D ( Tensor3 &  t_field,
Tensor3 &  z_field,
Tensor4 &  vmr_field,
EnergyLevelMap nlte_field,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const GriddedField3 t_field_raw,
const GriddedField3 z_field_raw,
const ArrayOfGriddedField3 vmr_field_raw,
const ArrayOfGriddedField3 nlte_field_raw,
const ArrayOfQuantumIdentifier nlte_level_identifiers,
const Vector &  nlte_vibrational_energies,
const Index &  atmosphere_dim,
const Index &  interp_order,
const Index &  vmr_zeropadding,
const Index &  vmr_nonegative,
const Index &  nlte_when_negative,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmFieldsCalcExpand1D.

Interpolation of 1D raw atmospheric fields to create 2D or 3D homogeneous atmospheric fields.

The method works as AtmFieldsCalc, but accepts only raw 1D atmospheres. The raw atmosphere is interpolated to p_grid and the obtained values are applied for all latitudes, and also longitudes for 3D, to create a homogeneous atmosphere.

The method deals only with the atmospheric fields, and to create a true 2D or 3D version of a 1D case, a demand is also that the ellipsoid is set to be a sphere.

Author
Patrick Eriksson
Claudia Emde
Stefan Buehler
Parameters
[out]t_fieldWS Output
[out]z_fieldWS Output
[out]vmr_fieldWS Output
[out]nlte_fieldWS Output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]t_field_rawWS Input
[in]z_field_rawWS Input
[in]vmr_field_rawWS Input
[in]nlte_field_rawWS Input
[in]nlte_level_identifiersWS Input
[in]nlte_vibrational_energiesWS Input
[in]atmosphere_dimWS Input
[in]interp_orderGeneric Input (Default: "1")
[in]vmr_zeropaddingGeneric Input (Default: "0")
[in]vmr_nonegativeGeneric Input (Default: "0")
[in]nlte_when_negativeGeneric Input (Default: "0")

Definition at line 2828 of file m_atmosphere.cc.

References ARTS_ASSERT, ARTS_USER_ERROR_IF, AtmFieldsCalc(), chk_atm_grids(), chk_if_in_range(), EnergyLevelMap::levels, Array< base >::nelem(), Tensor3_t, EnergyLevelMap::ThrowIfNotOK(), EnergyLevelMap::type, EnergyLevelMap::value, and EnergyLevelMap::vib_energy.

Referenced by AtmFieldsCalcExpand1D_g().

◆ AtmFieldsExpand1D()

void AtmFieldsExpand1D ( Tensor3 &  t_field,
Tensor3 &  z_field,
Tensor4 &  vmr_field,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const Index &  atmosphere_dim,
const Index &  chk_vmr_nan,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmFieldsExpand1D.

Maps a 1D case to 2D or 3D homogeneous atmospheric fields.

This method takes a 1D atmospheric case and converts it to the corresponding case for 2D or 3D. The atmospheric fields (t_field, z_field and vmr_field) must be 1D and match p_grid. The size of the new data is determined by atmosphere_dim, lat_grid and lon_grid*. That is, these later variables have been changed since the original fields were created.

The method deals only with the atmospheric fields, and to create a true 2D or 3D version of a 1D case, a demand is also that the ellipsoid is set to be a sphere.

Author
Patrick Eriksson
Parameters
[in,out]t_fieldWS Input/Output
[in,out]z_fieldWS Input/Output
[in,out]vmr_fieldWS Input/Output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]atmosphere_dimWS Input
[in]chk_vmr_nanGeneric Input (Default: "1")

Definition at line 3043 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, chk_atm_field(), chk_atm_grids(), chk_if_in_range(), and max().

Referenced by AtmFieldsExpand1D_g().

◆ AtmFieldsExtract1D()

void AtmFieldsExtract1D ( Index &  atmosphere_dim,
Vector &  lat_grid,
Vector &  lon_grid,
Tensor3 &  t_field,
Tensor3 &  z_field,
Tensor4 &  vmr_field,
const Index &  ilat,
const Index &  ilon,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmFieldsExtract1D.

Converts 2D or 3D homogeneous atmospheric fields to a 1D case.

The method extracts data for given latitude and longitude index to create a 1D atmosphere. AtmosphereSet1D is called to set output values of atmosphere_dim, lat_grid and lon_grid. Nothing is done if atmosphere_dim already is 1.

Author
Patrick Eriksson
Parameters
[in,out]atmosphere_dimWS Input/Output
[in,out]lat_gridWS Input/Output
[in,out]lon_gridWS Input/Output
[in,out]t_fieldWS Input/Output
[in,out]z_fieldWS Input/Output
[in,out]vmr_fieldWS Input/Output
[in]ilatGeneric Input (Default: "0")
[in]ilonGeneric Input (Default: "0")

Definition at line 3100 of file m_atmosphere.cc.

References ARTS_USER_ERROR, ARTS_USER_ERROR_IF, and AtmosphereSet1D().

Referenced by AtmFieldsExtract1D_g().

◆ AtmFieldsRefinePgrid()

void AtmFieldsRefinePgrid ( Vector &  p_grid,
Tensor3 &  t_field,
Tensor3 &  z_field,
Tensor4 &  vmr_field,
Index &  atmfields_checked,
Index &  atmgeom_checked,
Index &  cloudbox_checked,
const Vector &  lat_grid,
const Vector &  lon_grid,
const Index &  atmosphere_dim,
const Numeric &  p_step,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmFieldsRefinePgrid.

Refines the pressure grid and regrids the clearsky atmospheric fields accordingly.

This method is, e.g., used for absorption lookup table testing. It can also be used to refine the p_grid and atmospheric fields from compact state atmospheres.

It adds additional vertical grid points to the atmospheric fields, by interpolating them in the usual ARTS way (linear in log pressure).

How fine the new grid will be is determined by the keyword parameter p_step. The definition of p_step, and the default interpolation behavior, is consistent with abs_lookupSetup and abs_lookupSetupBatch* (new points are added between the original ones, so that the spacing is always below p_step.)

Internally, AtmFieldsRefinePgrid applies p_gridRefine and AtmFieldPRegrid* to the clearsky atmospheric fields (T, z, vmr).

Atmospheric field related check WSV are reset to 0 (unchecked), i.e., the corresponding checkedCalc methods have to be performed (again) before yCalc or similar methods can be executed.

Author
Stefan Buehler
Parameters
[in,out]p_gridWS Input/Output
[in,out]t_fieldWS Input/Output
[in,out]z_fieldWS Input/Output
[in,out]vmr_fieldWS Input/Output
[out]atmfields_checkedWS Output
[out]atmgeom_checkedWS Output
[out]cloudbox_checkedWS Output
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]atmosphere_dimWS Input
[in]p_stepGeneric Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 3154 of file m_atmosphere.cc.

References AtmFieldPRegrid(), chk_atm_field(), chk_atm_grids(), and p_gridRefine().

Referenced by AtmFieldsRefinePgrid_g().

◆ AtmosphereSet1D()

void AtmosphereSet1D ( Index &  atmosphere_dim,
Vector &  lat_grid,
Vector &  lon_grid,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmosphereSet1D.

Sets the atmospheric dimension to 1D.

Sets atmosphere_dim to 1, and the latitude and longitude grids are set to be empty.

Author
Patrick Eriksson
Parameters
[out]atmosphere_dimWS Output
[out]lat_gridWS Output
[out]lon_gridWS Output

Definition at line 1907 of file m_atmosphere.cc.

References CREATE_OUT2, and CREATE_OUT3.

Referenced by AtmFieldsExtract1D(), and AtmosphereSet1D_g().

◆ AtmosphereSet2D()

void AtmosphereSet2D ( Index &  atmosphere_dim,
Vector &  lon_grid,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmosphereSet2D.

Sets the atmospheric dimension to be 2D.

Sets atmosphere_dim to 2 and the longitude grid to be empty.

Author
Patrick Eriksson
Parameters
[out]atmosphere_dimWS Output
[out]lon_gridWS Output

Definition at line 1926 of file m_atmosphere.cc.

References CREATE_OUT2, and CREATE_OUT3.

Referenced by AtmosphereSet2D_g().

◆ AtmosphereSet3D()

void AtmosphereSet3D ( Index &  atmosphere_dim,
Vector &  lat_true,
Vector &  lon_true,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmosphereSet3D.

Sets the atmospheric dimension to 3D.

Sets atmosphere_dim to 3, and lat_true and lon_true are set to be empty.

Author
Patrick Eriksson
Parameters
[out]atmosphere_dimWS Output
[out]lat_trueWS Output
[out]lon_trueWS Output

Definition at line 1942 of file m_atmosphere.cc.

References CREATE_OUT2, and CREATE_OUT3.

Referenced by AtmosphereSet3D_g().

◆ AtmRawRead()

void AtmRawRead ( GriddedField3 t_field_raw,
GriddedField3 z_field_raw,
ArrayOfGriddedField3 vmr_field_raw,
ArrayOfGriddedField3 nlte_field_raw,
ArrayOfQuantumIdentifier nlte_level_identifiers,
Vector &  nlte_vibrational_energies,
const ArrayOfArrayOfSpeciesTag abs_species,
const String basename,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmRawRead.

Reads atmospheric data from a scenario.

An atmospheric scenario includes the following data for each position (pressure, latitude, longitude) in the atmosphere:

  1. temperature field
  2. the corresponding altitude field
  3. vmr fields for the absorption species

The vmr fields read are governed by the species given in abs_species*. Beside gaseous species, these can also contain purely absorbing particulate matter. In the latter case the profiles are supposed to provide the mass content (unit kg/m3) for clouds and precipitation rate (unit kg/m2/s) for precipitation instead of the vmr.

The data is stored in different files. This methods reads all files and creates the variables t_field_raw, z_field_raw and vmr_field_raw*. nlte_field_raw is set to empty.

Files in a scenarios should be named matching the pattern of: basename.speciesname.xml (for temperature and altitude the expected 'speciesname' are 't' and'z', respectivly). The files can be anywhere, but they must all be in the same directory, selected by 'basename'. The files are chosen by the species name. If you have more than one tag group for the same species, the same profile will be used.

Author
Claudia Emde
Parameters
[out]t_field_rawWS Output
[out]z_field_rawWS Output
[out]vmr_field_rawWS Output
[out]nlte_field_rawWS Output
[out]nlte_level_identifiersWS Output
[out]nlte_vibrational_energiesWS Output
[in]abs_speciesWS Input
[in]basenameGeneric Input

Definition at line 3213 of file m_atmosphere.cc.

References CREATE_OUT3, Array< base >::nelem(), and xml_read_from_file().

Referenced by AtmRawRead_g().

◆ AtmWithNLTERawRead()

void AtmWithNLTERawRead ( GriddedField3 t_field_raw,
GriddedField3 z_field_raw,
ArrayOfGriddedField3 vmr_field_raw,
ArrayOfGriddedField3 nlte_field_raw,
ArrayOfQuantumIdentifier nlte_level_identifiers,
Vector &  nlte_vibrational_energies,
const ArrayOfArrayOfSpeciesTag abs_species,
const String basename,
const Index &  expect_vibrational_energies,
const Verbosity verbosity 
)

WORKSPACE METHOD: AtmWithNLTERawRead.

Reads atmospheric data from a scenario.

An atmospheric scenario includes the following data for each position (pressure, latitude, longitude) in the atmosphere:

  1. temperature field
  2. the corresponding altitude field
  3. vmr fields for the gaseous species
  4. Non-LTE temperature fields and matching identifiers

The data is stored in different files. This method reads all files and creates the variables t_field_raw, z_field_raw, vmr_field_raw*, nlte_field_raw, and nlte_level_identifiers.

Files in a scenarios should be named matching the pattern of: tropical.H2O.xml

The files can be anywhere, but they must be all in the same directory, selected by 'basename'. The files are chosen by the species name. If you have more than one tag group for the same species, the same profile will be used.

Author
Claudia Emde
Richard Larsson
Parameters
[out]t_field_rawWS Output
[out]z_field_rawWS Output
[out]vmr_field_rawWS Output
[out]nlte_field_rawWS Output
[out]nlte_level_identifiersWS Output
[out]nlte_vibrational_energiesWS Output
[in]abs_speciesWS Input
[in]basenameGeneric Input
[in]expect_vibrational_energiesGeneric Input (Default: "0")

Definition at line 3338 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, CREATE_OUT3, Array< base >::nelem(), and xml_read_from_file().

Referenced by AtmWithNLTERawRead_g().

◆ batch_atm_fields_compactAddConstant()

void batch_atm_fields_compactAddConstant ( ArrayOfGriddedField4 batch_atm_fields_compact,
const String name,
const Numeric &  value,
const Index &  prepend,
const ArrayOfString condensibles,
const Verbosity verbosity 
)

WORKSPACE METHOD: batch_atm_fields_compactAddConstant.

Adds a constant field to batch_atm_fields_compact.

Applies atm_fields_compactAddConstant to each batch. The format is equal to that WSM.

Author
Gerrit Holl
Parameters
[in,out]batch_atm_fields_compactWS Input/Output
[in]nameGeneric Input
[in]valueGeneric Input
[in]prependGeneric Input (Default: "0")
[in]condensiblesGeneric Input (Default: "[]")

Definition at line 1598 of file m_atmosphere.cc.

References atm_fields_compactAddConstant(), and Array< base >::nelem().

Referenced by batch_atm_fields_compactAddConstant_g().

◆ batch_atm_fields_compactAddSpecies()

void batch_atm_fields_compactAddSpecies ( ArrayOfGriddedField4 batch_atm_fields_compact,
const String name,
const GriddedField3 value,
const Index &  prepend,
const Verbosity verbosity 
)

WORKSPACE METHOD: batch_atm_fields_compactAddSpecies.

Adds a field to batch_atm_fields_compact, with interpolation.

This method appends or prepends a GriddedField3 to each atm_fields_compact. in batch_atm_fields_compact. For details, see atm_fields_compactAddSpecies.

Author
Gerrit Holl
Parameters
[in,out]batch_atm_fields_compactWS Input/Output
[in]nameGeneric Input
[in]valueGeneric Input
[in]prependGeneric Input (Default: "0")

Definition at line 1618 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, atm_fields_compactAddSpecies(), and Array< base >::nelem().

Referenced by batch_atm_fields_compactAddSpecies_g().

◆ batch_atm_fields_compactCleanup()

void batch_atm_fields_compactCleanup ( ArrayOfGriddedField4 batch_atm_fields_compact,
const Numeric &  threshold,
const Verbosity verbosity 
)

WORKSPACE METHOD: batch_atm_fields_compactCleanup.

Removes unrealistically small or erroneous data from each data field of batch_atm_fields_compact (or other AerrayOfGriddedField4 data)

This WSM checks if the data in batch_atm_fields_compact contains values smaller than the given threshold. In this case, these values will be set to zero.

The method should be applied if batch_atm_fields_compact contains unrealistically small or erroneous data (NWP/GCM model data occassionally contains negative values, which are numerical artefacts rather than physical values.)

Author
Jana Mendrok
Parameters
[in,out]batch_atm_fields_compactWS Input/Output
[in]thresholdGeneric Input

Definition at line 1652 of file m_atmosphere.cc.

References atm_fields_compactCleanup(), and Array< base >::nelem().

Referenced by batch_atm_fields_compactCleanup_g().

◆ batch_atm_fields_compactFromArrayOfMatrix()

void batch_atm_fields_compactFromArrayOfMatrix ( ArrayOfGriddedField4 batch_atm_fields_compact,
const Index &  atmosphere_dim,
const ArrayOfMatrix &  atmospheres_fields,
const ArrayOfString field_names,
const Verbosity verbosity 
)

WORKSPACE METHOD: batch_atm_fields_compactFromArrayOfMatrix.

Expand batch of 1D atmospheric state matrices to batch_atm_fields_compact.

This is used to handle 1D batch cases, e.g. from NWP/GCM model like the Chevallier91L data set, stored in a matrix (it is preferred, though, to immediatedly store the model fields as ArrayOfGriddedField4* and use ReadXML to load them directly into batch_atm_fields_compact*).

Works only for atmosphere_dim == 1.

See atm_fields_compactFromMatrix for basic documentation.

See batch_atm_fields_compactAddConstant and batch_atm_fields_compactAddSpecies* for adding additional fields.

Author
Stefan Buehler
Daniel Kreyling
Jana Mendrok
Parameters
[out]batch_atm_fields_compactWS Output
[in]atmosphere_dimWS Input
[in]atmospheres_fieldsGeneric Input
[in]field_namesGeneric Input

Definition at line 1664 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, and atm_fields_compactFromMatrix().

Referenced by batch_atm_fields_compactFromArrayOfMatrix_g().

◆ FieldFromGriddedField() [1/4]

void FieldFromGriddedField ( Matrix &  output,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const GriddedField2 input,
const Verbosity verbosity 
)

WORKSPACE METHOD: FieldFromGriddedField.

Extract the data from a GriddedField.

A check is performed that the grids from the GriddedField match p_grid, lat_grid and lon_grid.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]inputGeneric Input

Definition at line 304 of file m_atmosphere.cc.

References GriddedField2::data, and FieldFromGriddedFieldCheckLatLonHelper().

Referenced by AtmFieldsCalc(), FieldFromGriddedField_sg_MatrixGriddedField2_g(), FieldFromGriddedField_sg_Tensor3GriddedField3_g(), FieldFromGriddedField_sg_Tensor4ArrayOfGriddedField3_g(), FieldFromGriddedField_sg_Tensor4GriddedField4_g(), and pnd_fieldCalcFrompnd_field_raw().

◆ FieldFromGriddedField() [2/4]

void FieldFromGriddedField ( Tensor3 &  output,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const GriddedField3 input,
const Verbosity verbosity 
)

WORKSPACE METHOD: FieldFromGriddedField.

Extract the data from a GriddedField.

A check is performed that the grids from the GriddedField match p_grid, lat_grid and lon_grid.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]inputGeneric Input

Definition at line 319 of file m_atmosphere.cc.

References chk_griddedfield_gridname(), chk_if_equal(), GriddedField3::data, FieldFromGriddedFieldCheckLatLonHelper(), and GriddedField::get_numeric_grid().

◆ FieldFromGriddedField() [3/4]

void FieldFromGriddedField ( Tensor4 &  output,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const ArrayOfGriddedField3 input,
const Verbosity verbosity 
)

WORKSPACE METHOD: FieldFromGriddedField.

Extract the data from a GriddedField.

A check is performed that the grids from the GriddedField match p_grid, lat_grid and lon_grid.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]inputGeneric Input

Definition at line 355 of file m_atmosphere.cc.

References chk_griddedfield_gridname(), chk_if_equal(), CREATE_OUT1, FieldFromGriddedFieldCheckLatLonHelper(), and Array< base >::nelem().

◆ FieldFromGriddedField() [4/4]

void FieldFromGriddedField ( Tensor4 &  output,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const GriddedField4 input,
const Verbosity verbosity 
)

WORKSPACE METHOD: FieldFromGriddedField.

Extract the data from a GriddedField.

A check is performed that the grids from the GriddedField match p_grid, lat_grid and lon_grid.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]inputGeneric Input

Definition at line 337 of file m_atmosphere.cc.

References chk_griddedfield_gridname(), chk_if_equal(), GriddedField4::data, FieldFromGriddedFieldCheckLatLonHelper(), and GriddedField::get_numeric_grid().

◆ FieldFromGriddedFieldCheckLatLonHelper()

void FieldFromGriddedFieldCheckLatLonHelper ( const Vector &  lat_grid,
const Vector &  lon_grid,
const Index  ilat,
const Index  ilon,
const GriddedField gfield 
)

◆ GriddedFieldLatLonExpand() [1/4]

void GriddedFieldLatLonExpand ( ArrayOfGriddedField3 output,
const ArrayOfGriddedField3 input,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldLatLonExpand.

Expands the latitude and longitude grid of the GriddedField to [-90, 90] and [0,360], respectively.

Expansion is only done in the dimension(s), where the grid size is 1. The values from the input data will be duplicated to accomodate for the larger size of the output field. output and input can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]inputGeneric Input

Definition at line 579 of file m_atmosphere.cc.

References GriddedFieldLatLonExpand(), and Array< base >::nelem().

◆ GriddedFieldLatLonExpand() [2/4]

void GriddedFieldLatLonExpand ( GriddedField2 output,
const GriddedField2 input,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldLatLonExpand.

Expands the latitude and longitude grid of the GriddedField to [-90, 90] and [0,360], respectively.

Expansion is only done in the dimension(s), where the grid size is 1. The values from the input data will be duplicated to accomodate for the larger size of the output field. output and input can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]inputGeneric Input

Definition at line 388 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, chk_griddedfield_gridname(), GriddedField2::data, GriddedField2::resize(), GriddedField::set_grid(), GriddedField::set_grid_name(), and v.

Referenced by GriddedFieldLatLonExpand(), GriddedFieldLatLonExpand_sg_ArrayOfGriddedField3ArrayOfGriddedField3_g(), GriddedFieldLatLonExpand_sg_GriddedField2GriddedField2_g(), GriddedFieldLatLonExpand_sg_GriddedField3GriddedField3_g(), and GriddedFieldLatLonExpand_sg_GriddedField4GriddedField4_g().

◆ GriddedFieldLatLonExpand() [3/4]

void GriddedFieldLatLonExpand ( GriddedField3 output,
const GriddedField3 input,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldLatLonExpand.

Expands the latitude and longitude grid of the GriddedField to [-90, 90] and [0,360], respectively.

Expansion is only done in the dimension(s), where the grid size is 1. The values from the input data will be duplicated to accomodate for the larger size of the output field. output and input can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]inputGeneric Input

Definition at line 444 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, chk_griddedfield_gridname(), GriddedField3::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), GriddedField3::resize(), GriddedField::set_grid(), GriddedField::set_grid_name(), and v.

◆ GriddedFieldLatLonExpand() [4/4]

void GriddedFieldLatLonExpand ( GriddedField4 output,
const GriddedField4 input,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldLatLonExpand.

Expands the latitude and longitude grid of the GriddedField to [-90, 90] and [0,360], respectively.

Expansion is only done in the dimension(s), where the grid size is 1. The values from the input data will be duplicated to accomodate for the larger size of the output field. output and input can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]inputGeneric Input

Definition at line 505 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, chk_griddedfield_gridname(), GriddedField4::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), GriddedField4::resize(), GriddedField::set_grid(), GriddedField::set_grid_name(), and v.

◆ GriddedFieldLatLonRegrid() [1/4]

void GriddedFieldLatLonRegrid ( ArrayOfGriddedField3 output,
const Vector &  lat_true,
const Vector &  lon_true,
const ArrayOfGriddedField3 input,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldLatLonRegrid.

Interpolates the input field along the latitude and longitude dimensions to lat_true and lon_true.

If the input longitude grid is outside of lon_true it will be shifted left or right by 360. If it covers 360 degrees, a cyclic interpolation will be performed. input and output fields can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]inputGeneric Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 1178 of file m_atmosphere.cc.

References GriddedFieldLatLonRegrid(), and Array< base >::nelem().

◆ GriddedFieldLatLonRegrid() [2/4]

void GriddedFieldLatLonRegrid ( GriddedField2 output,
const Vector &  lat_true,
const Vector &  lon_true,
const GriddedField2 input,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldLatLonRegrid.

Interpolates the input field along the latitude and longitude dimensions to lat_true and lon_true.

If the input longitude grid is outside of lon_true it will be shifted left or right by 360. If it covers 360 degrees, a cyclic interpolation will be performed. input and output fields can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]inputGeneric Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 895 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, GriddedField2::data, EPSILON_LON_CYCLIC, GriddedField::get_grid_size(), GriddedField::get_numeric_grid(), GriddedFieldLatLonRegridHelper(), and GriddedField2::resize().

Referenced by AtmFieldsCalc(), GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid_sg_ArrayOfGriddedField3ArrayOfGriddedField3_g(), GriddedFieldLatLonRegrid_sg_GriddedField2GriddedField2_g(), GriddedFieldLatLonRegrid_sg_GriddedField3GriddedField3_g(), GriddedFieldLatLonRegrid_sg_GriddedField4GriddedField4_g(), MagFieldsCalc(), MagFieldsFromAltitudeRawCalc(), WindFieldsCalc(), and z_surfaceFromFileAndGrid().

◆ GriddedFieldLatLonRegrid() [3/4]

void GriddedFieldLatLonRegrid ( GriddedField3 output,
const Vector &  lat_true,
const Vector &  lon_true,
const GriddedField3 input,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldLatLonRegrid.

Interpolates the input field along the latitude and longitude dimensions to lat_true and lon_true.

If the input longitude grid is outside of lon_true it will be shifted left or right by 360. If it covers 360 degrees, a cyclic interpolation will be performed. input and output fields can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]inputGeneric Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 978 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, GriddedField3::data, EPSILON_LON_CYCLIC, GriddedField::get_grid_name(), GriddedField::get_grid_size(), GriddedField::get_numeric_grid(), GriddedFieldLatLonRegridHelper(), GriddedField3::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().

◆ GriddedFieldLatLonRegrid() [4/4]

void GriddedFieldLatLonRegrid ( GriddedField4 output,
const Vector &  lat_true,
const Vector &  lon_true,
const GriddedField4 input,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldLatLonRegrid.

Interpolates the input field along the latitude and longitude dimensions to lat_true and lon_true.

If the input longitude grid is outside of lon_true it will be shifted left or right by 360. If it covers 360 degrees, a cyclic interpolation will be performed. input and output fields can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]inputGeneric Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 1073 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, GriddedField4::data, EPSILON_LON_CYCLIC, GriddedField::get_grid_name(), GriddedField::get_grid_size(), GriddedField::get_numeric_grid(), GriddedFieldLatLonRegridHelper(), GriddedField4::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().

◆ GriddedFieldLatLonRegridHelper()

void GriddedFieldLatLonRegridHelper ( ArrayOfLagrangeInterpolation &  lag_lat,
ArrayOfLagrangeCyclic0to360Interpolation &  lag_lon,
Tensor4 &  itw,
GriddedField gfraw_out,
const GriddedField gfraw_in,
const Index  lat_grid_index,
const Index  lon_grid_index,
ConstVectorView  lat_true,
ConstVectorView  lon_true,
const Index &  interp_order,
const Verbosity verbosity 
)

◆ GriddedFieldPRegrid() [1/3]

void GriddedFieldPRegrid ( ArrayOfGriddedField3 output,
const Vector &  p_grid,
const ArrayOfGriddedField3 input,
const Index &  interp_order,
const Index &  zeropadding,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldPRegrid.

Interpolates the input field along the pressure dimension to p_grid.

If zero-padding is applied (zeropadding=1), pressures that are outside the p_grid are set to 0. This is thought, e.g., for VMR fields that outside the given pressure can safely be assumed to be zero. Note: Using zeropadding for altitude and temperature fields is strongly discouraged (it will work here, though, but likely trigger errors later on). Extrapolation is allowed within the common 0.5grid-step margin, but is overruled by zeropadding. input and output fields can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]p_gridWS Input
[in]inputGeneric Input
[in]interp_orderGeneric Input (Default: "1")
[in]zeropaddingGeneric Input (Default: "0")

Definition at line 810 of file m_atmosphere.cc.

References GriddedFieldPRegrid(), and Array< base >::nelem().

◆ GriddedFieldPRegrid() [2/3]

void GriddedFieldPRegrid ( GriddedField3 output,
const Vector &  p_grid,
const GriddedField3 input,
const Index &  interp_order,
const Index &  zeropadding,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldPRegrid.

Interpolates the input field along the pressure dimension to p_grid.

If zero-padding is applied (zeropadding=1), pressures that are outside the p_grid are set to 0. This is thought, e.g., for VMR fields that outside the given pressure can safely be assumed to be zero. Note: Using zeropadding for altitude and temperature fields is strongly discouraged (it will work here, though, but likely trigger errors later on). Extrapolation is allowed within the common 0.5grid-step margin, but is overruled by zeropadding. input and output fields can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]p_gridWS Input
[in]inputGeneric Input
[in]interp_orderGeneric Input (Default: "1")
[in]zeropaddingGeneric Input (Default: "0")

Definition at line 660 of file m_atmosphere.cc.

References GriddedField3::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), GriddedFieldPRegridHelper(), GriddedField3::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().

Referenced by AtmFieldsCalc(), GriddedFieldPRegrid(), GriddedFieldPRegrid_sg_ArrayOfGriddedField3ArrayOfGriddedField3_g(), GriddedFieldPRegrid_sg_GriddedField3GriddedField3_g(), GriddedFieldPRegrid_sg_GriddedField4GriddedField4_g(), MagFieldsCalc(), pnd_fieldCalcFrompnd_field_raw(), and WindFieldsCalc().

◆ GriddedFieldPRegrid() [3/3]

void GriddedFieldPRegrid ( GriddedField4 output,
const Vector &  p_grid,
const GriddedField4 input,
const Index &  interp_order,
const Index &  zeropadding,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldPRegrid.

Interpolates the input field along the pressure dimension to p_grid.

If zero-padding is applied (zeropadding=1), pressures that are outside the p_grid are set to 0. This is thought, e.g., for VMR fields that outside the given pressure can safely be assumed to be zero. Note: Using zeropadding for altitude and temperature fields is strongly discouraged (it will work here, though, but likely trigger errors later on). Extrapolation is allowed within the common 0.5grid-step margin, but is overruled by zeropadding. input and output fields can be the same variable.

Author
Oliver Lemke
Parameters
[out]outputSupergeneric output
[in]p_gridWS Input
[in]inputGeneric Input
[in]interp_orderGeneric Input (Default: "1")
[in]zeropaddingGeneric Input (Default: "0")

Definition at line 731 of file m_atmosphere.cc.

References b, GriddedField4::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), GriddedFieldPRegridHelper(), GriddedField4::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().

◆ GriddedFieldPRegridHelper()

void GriddedFieldPRegridHelper ( Index &  ing_min,
Index &  ing_max,
ArrayOfLagrangeLogInterpolation &  lag_p,
Matrix &  itw,
GriddedField gfraw_out,
const GriddedField gfraw_in,
const Index  p_grid_index,
ConstVectorView  p_grid,
const Index &  interp_order,
const Index &  zeropadding,
const Verbosity verbosity 
)

◆ GriddedFieldZToPRegrid()

void GriddedFieldZToPRegrid ( GriddedField3 output,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const Tensor3 &  z_field,
const GriddedField3 input,
const Index &  interp_order,
const Index &  zeropadding,
const Verbosity verbosity 
)

WORKSPACE METHOD: GriddedFieldZToPRegrid.

Interpolates the input field along the vertical dimension to p_grid.

This is done from z_field, and thus requires the atmosphere to be set beforehand.

The latitude and longitude grid of the input field must match lat_grid and lon_grid for the method to work.

BETA mode.

Author
Richard Larsson
Parameters
[out]outputGeneric output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]inputGeneric Input
[in]interp_orderGeneric Input (Default: "1")
[in]zeropaddingGeneric Input (Default: "0")

Definition at line 1264 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, chk_griddedfield_gridname(), GriddedField3::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), GriddedFieldZToPRegridHelper(), GriddedField3::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().

Referenced by GriddedFieldZToPRegrid_g().

◆ GriddedFieldZToPRegridHelper()

void GriddedFieldZToPRegridHelper ( Index &  ing_min,
Index &  ing_max,
ArrayOfLagrangeInterpolation &  lag_p,
Matrix &  itw,
const GriddedField gfraw_in,
const Index  z_grid_index,
ConstVectorView  z_grid,
const Index &  interp_order,
const Index &  zeropadding,
const Verbosity verbosity 
)

Calculate grid positions and interpolations weights for GriddedFieldZToPRegrid.

Definition at line 1217 of file m_atmosphere.cc.

References chk_griddedfield_gridname(), chk_interpolation_grids_loose_no_data_check(), chk_interpolation_pgrids(), CREATE_OUT2, GriddedField::get_numeric_grid(), and interpweights().

Referenced by GriddedFieldZToPRegrid().

◆ InterpAtmFieldToPosition()

void InterpAtmFieldToPosition ( Numeric &  output,
const Index &  atmosphere_dim,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const Tensor3 &  z_field,
const Vector &  rtp_pos,
const Tensor3 &  field,
const Verbosity verbosity 
)

WORKSPACE METHOD: InterpAtmFieldToPosition.

Point interpolation of atmospheric fields.

The default way to specify the position is by rtp_pos.

Linear interpolation is applied.

Author
Patrick Eriksson
Parameters
[out]outputGeneric output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]rtp_posWS Input
[in]fieldGeneric Input

Definition at line 3463 of file m_atmosphere.cc.

References chk_atm_field(), chk_atm_grids(), chk_rte_pos(), CREATE_OUT3, interp_atmfield_by_gp(), and rte_pos2gridpos().

Referenced by InterpAtmFieldToPosition_g().

◆ lat_gridFromRawField()

void lat_gridFromRawField ( Vector &  lat_grid,
const GriddedField3 field_raw,
const Verbosity verbosity 
)

WORKSPACE METHOD: lat_gridFromRawField.

Sets lat_grid according to given raw atmospheric field's lat_grid.

Similar to p_gridFromZRaw, but acting on a generic GriddedField3 (e.g., a wind or magnetic field component).

Author
Jana Mendrok
Parameters
[out]lat_gridWS Output
[in]field_rawGeneric Input

Definition at line 3702 of file m_atmosphere.cc.

Referenced by lat_gridFromRawField_g().

◆ lat_gridFromZRaw()

void lat_gridFromZRaw ( Vector &  lat_grid,
const GriddedField3 z_field_raw,
const Verbosity verbosity 
)

WORKSPACE METHOD: lat_gridFromZRaw.

Sets lat_grid according to input atmosphere's z_field_raw

Author
Richard Larsson
Parameters
[out]lat_gridWS Output
[in]z_field_rawWS Input

Definition at line 3670 of file m_atmosphere.cc.

Referenced by lat_gridFromZRaw_g().

◆ lon_gridFromRawField()

void lon_gridFromRawField ( Vector &  lon_grid,
const GriddedField3 field_raw,
const Verbosity verbosity 
)

WORKSPACE METHOD: lon_gridFromRawField.

Sets lon_grid according to given raw atmospheric field's lat_grid.

Similar to p_gridFromZRaw, but acting on a generic GriddedField3 (e.g., a wind or magnetic field component).

Author
Jana Mendrok
Parameters
[out]lon_gridWS Output
[in]field_rawGeneric Input

Definition at line 3711 of file m_atmosphere.cc.

Referenced by lon_gridFromRawField_g().

◆ lon_gridFromZRaw()

void lon_gridFromZRaw ( Vector &  lon_grid,
const GriddedField3 z_field_raw,
const Verbosity verbosity 
)

WORKSPACE METHOD: lon_gridFromZRaw.

Sets lon_grid according to input atmosphere's z_field_raw

Author
Richard Larsson
Parameters
[out]lon_gridWS Output
[in]z_field_rawWS Input

Definition at line 3679 of file m_atmosphere.cc.

Referenced by lon_gridFromZRaw_g().

◆ MagFieldsCalc()

void MagFieldsCalc ( Tensor3 &  mag_u_field,
Tensor3 &  mag_v_field,
Tensor3 &  mag_w_field,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const GriddedField3 mag_u_field_raw,
const GriddedField3 mag_v_field_raw,
const GriddedField3 mag_w_field_raw,
const Index &  atmosphere_dim,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: MagFieldsCalc.

Interpolation of raw magnetic fields to calculation grids. Heritage from AtmFieldsCalc

Internally, MagFieldsCalc applies GriddedFieldPRegrid and GriddedFieldLatLonRegrid*. Generally, 'half-grid-step' extrapolation is allowed and applied.

Author
Richard Larsson
Parameters
[out]mag_u_fieldWS Output
[out]mag_v_fieldWS Output
[out]mag_w_fieldWS Output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]mag_u_field_rawWS Input
[in]mag_v_field_rawWS Input
[in]mag_w_field_rawWS Input
[in]atmosphere_dimWS Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 2331 of file m_atmosphere.cc.

References ARTS_ASSERT, ARTS_USER_ERROR_IF, chk_atm_grids(), chk_if_in_range(), chk_interpolation_grids(), chk_interpolation_pgrids(), CREATE_OUT2, GriddedField3::data, GriddedField::get_numeric_grid(), GriddedFieldLatLonRegrid(), GriddedFieldPRegrid(), and interpweights().

Referenced by MagFieldsCalc_g(), MagFieldsCalcExpand1D(), and WindFieldsCalcExpand1D().

◆ MagFieldsCalcExpand1D()

void MagFieldsCalcExpand1D ( Tensor3 &  mag_u_field,
Tensor3 &  mag_v_field,
Tensor3 &  mag_w_field,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const GriddedField3 mag_u_field_raw,
const GriddedField3 mag_v_field_raw,
const GriddedField3 mag_w_field_raw,
const Index &  atmosphere_dim,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: MagFieldsCalcExpand1D.

Interpolation of 1D raw atmospheric fields to create 2D or 3D homogeneous magnetic fields. Derived from AtmFieldsCalcExpand1D

The method works as MagFieldsCalc, but accepts only raw 1D magnetic fields. The raw data is interpolated to p_grid and the obtained values are applied for all latitudes, and also longitudes for 3D, to create a homogeneous atmosphere.

Author
Richard Larsson
Parameters
[out]mag_u_fieldWS Output
[out]mag_v_fieldWS Output
[out]mag_w_fieldWS Output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]mag_u_field_rawWS Input
[in]mag_v_field_rawWS Input
[in]mag_w_field_rawWS Input
[in]atmosphere_dimWS Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 2919 of file m_atmosphere.cc.

References ARTS_ASSERT, ARTS_USER_ERROR_IF, chk_atm_grids(), chk_if_in_range(), and MagFieldsCalc().

Referenced by MagFieldsCalcExpand1D_g().

◆ MagFieldsCalcIGRF()

void MagFieldsCalcIGRF ( Tensor3 &  mag_u_field,
Tensor3 &  mag_v_field,
Tensor3 &  mag_w_field,
const Tensor3 &  z_field,
const Vector &  lat_grid,
const Vector &  lon_grid,
const Vector &  refellipsoid,
const Time time,
const Verbosity verbosity 
)

WORKSPACE METHOD: MagFieldsCalcIGRF.

Computes the magnetic field from part of the IGRF13 magnetic field model

Only accounts for period 2000-2020. Other times uses the limits. If within the select time period, linear interpolation in time is used

Latitude cutoff very near the poles using only a single value

Note that no conversion from geocentric uvw to geodetic uvw is performed, so some small artifacts are to be expected

Also note that positions close to the poles are given the same field-values

Author
Richard Larsson
Parameters
[out]mag_u_fieldWS Output
[out]mag_v_fieldWS Output
[out]mag_w_fieldWS Output
[in]z_fieldWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]refellipsoidWS Input
[in]timeWS Input

Definition at line 2307 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, IGRF::compute(), and IGRF::MagneticField::u.

Referenced by MagFieldsCalcIGRF_g().

◆ MagFieldsFromAltitudeRawCalc()

void MagFieldsFromAltitudeRawCalc ( Tensor3 &  mag_u_field,
Tensor3 &  mag_v_field,
Tensor3 &  mag_w_field,
const Vector &  lat_grid,
const Vector &  lon_grid,
const Tensor3 &  z_field,
const GriddedField3 mag_u_field_raw,
const GriddedField3 mag_v_field_raw,
const GriddedField3 mag_w_field_raw,
const Index &  interp_order,
const Numeric &  extrapolating,
const Verbosity verbosity 
)

WORKSPACE METHOD: MagFieldsFromAltitudeRawCalc.

Regrids the rawfield by lat-lon and interpolates to z_field.

Author
Richard Larsson
Parameters
[out]mag_u_fieldWS Output
[out]mag_v_fieldWS Output
[out]mag_w_fieldWS Output
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]mag_u_field_rawWS Input
[in]mag_v_field_rawWS Input
[in]mag_w_field_rawWS Input
[in]interp_orderGeneric Input (Default: "1")
[in]extrapolatingGeneric Input (Default: "1e99")

Definition at line 2539 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF, chk_interpolation_grids(), GriddedFieldLatLonRegrid(), interpweights(), u, v, and w.

Referenced by MagFieldsFromAltitudeRawCalc_g().

◆ MagRawRead()

void MagRawRead ( GriddedField3 mag_u_field_raw,
GriddedField3 mag_v_field_raw,
GriddedField3 mag_w_field_raw,
const String basename,
const Verbosity verbosity 
)

WORKSPACE METHOD: MagRawRead.

Reads magnetic field data from a scenario.

A full set of field components is read (NOTE: fails if scenario only contains selected field components). The files can be anywhere, but must all be in the same directory specified by 'basename'. Naming convention for the field component files is basename.mag_u.xml for the u-component, v- and w-components accordingly.

Author
Richard Larsson
Parameters
[out]mag_u_field_rawWS Output
[out]mag_v_field_rawWS Output
[out]mag_w_field_rawWS Output
[in]basenameGeneric Input

Definition at line 3272 of file m_atmosphere.cc.

References CREATE_OUT3, and xml_read_from_file().

Referenced by MagRawRead_g().

◆ nlte_fieldLteExternalPartitionFunction()

void nlte_fieldLteExternalPartitionFunction ( Index &  nlte_do,
EnergyLevelMap nlte_field,
ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const ArrayOfQuantumIdentifier nlte_level_identifiers,
const Tensor3 &  t_field,
const Verbosity verbosity 
)

WORKSPACE METHOD: nlte_fieldLteExternalPartitionFunction.

Turns on NTLE calculations.

Sets NLTE ratios to those expected for LTE calculations with a known partition function

Author
Richard Larsson
Parameters
[out]nlte_doWS Output
[out]nlte_fieldWS Output
[in,out]abs_lines_per_speciesWS Input/Output
[in]nlte_level_identifiersWS Input
[in]t_fieldWS Input

Definition at line 4011 of file m_atmosphere.cc.

Referenced by nlte_fieldLteExternalPartitionFunction_g().

◆ nlte_fieldLteInternalPartitionFunction()

void nlte_fieldLteInternalPartitionFunction ( Index &  nlte_do,
EnergyLevelMap nlte_field,
ArrayOfArrayOfAbsorptionLines abs_lines_per_species,
const ArrayOfQuantumIdentifier nlte_level_identifiers,
const Tensor3 &  t_field,
const Verbosity verbosity 
)

WORKSPACE METHOD: nlte_fieldLteInternalPartitionFunction.

Turns on NTLE calculations.

Sets NLTE ratios to those expected for LTE calculations with estimation of the partition function as the sum of all states of a species

Author
Richard Larsson
Parameters
[out]nlte_doWS Output
[out]nlte_fieldWS Output
[in,out]abs_lines_per_speciesWS Input/Output
[in]nlte_level_identifiersWS Input
[in]t_fieldWS Input

Definition at line 4089 of file m_atmosphere.cc.

Referenced by nlte_fieldLteInternalPartitionFunction_g().

◆ p_gridDensify()

void p_gridDensify ( Vector &  p_grid,
Index &  atmfields_checked,
Index &  atmgeom_checked,
Index &  cloudbox_checked,
const Vector &  p_grid_old,
const Index &  nfill,
const Verbosity verbosity 
)

WORKSPACE METHOD: p_gridDensify.

A simple way to make p_grid more dense.

The method includes new values in p_grid. For each intermediate pressure range, nfill points are added. That is, setting nfill to zero returns an unmodified copy of p_grid_old. The number of elements of the new p_grid is (n0-1)*(1+nfill)+1, where n0 is the length of p_grid_old.

The new points are distributed equidistant in log(p).

For safety, new grid and old grid Vectors are not allowed to be the same variable (both will be needed later on for regridding of the atmospheric fields), and atmospheric field related .._checked WSV are reset to 0 (unchecked).

Author
Patrick Eriksson, Jana Mendrok
Parameters
[out]p_gridWS Output
[out]atmfields_checkedWS Output
[out]atmgeom_checkedWS Output
[out]cloudbox_checkedWS Output
[in]p_grid_oldGeneric Input
[in]nfillGeneric Input (Default: "-1")

Definition at line 3502 of file m_atmosphere.cc.

References ARTS_USER_ERROR_IF.

Referenced by p_gridDensify_g().

◆ p_gridFromZRaw()

void p_gridFromZRaw ( Vector &  p_grid,
const GriddedField3 z_field_raw,
const Index &  no_negZ,
const Verbosity verbosity 
)

WORKSPACE METHOD: p_gridFromZRaw.

Sets p_grid according to input atmosphere's raw z_field, derived e.g. from AtmRawRead.

Attention: as default only pressure values for altitudes >= 0 are extracted. If negative altitudes shall also be selected, set no_neg=0.

Author
Claudia Emde, Jana Mendrok
Parameters
[out]p_gridWS Output
[in]z_field_rawWS Input
[in]no_negZGeneric Input (Default: "1")

Definition at line 3639 of file m_atmosphere.cc.

Referenced by p_gridFromZRaw_g().

◆ p_gridRefine()

void p_gridRefine ( Vector &  p_grid,
Index &  atmfields_checked,
Index &  atmgeom_checked,
Index &  cloudbox_checked,
const Vector &  p_grid_old,
const Numeric &  p_step,
const Verbosity verbosity 
)

WORKSPACE METHOD: p_gridRefine.

Provides refined pressure grid.

Created new pressure grid has (log10) spacings below a given threshold.

For safety, new grid and old grid Vectors are not allowed to be the same variable (both will be needed later on for regridding of the atmospheric fields), and atmospheric field related ..._checked WSV are reset to 0 (unchecked).

Author
Stefan Buehler, Jana Mendrok
Parameters
[out]p_gridWS Output
[out]atmfields_checkedWS Output
[out]atmgeom_checkedWS Output
[out]cloudbox_checkedWS Output
[in]p_grid_oldGeneric Input
[in]p_stepGeneric Input

Definition at line 3552 of file m_atmosphere.cc.

Referenced by AtmFieldsRefinePgrid(), and p_gridRefine_g().

◆ vmr_fieldSetAllConstant()

void vmr_fieldSetAllConstant ( Tensor4 &  vmr_field,
const ArrayOfArrayOfSpeciesTag abs_species,
const Vector &  vmr_values,
const Verbosity verbosity 
)

WORKSPACE METHOD: vmr_fieldSetAllConstant.

Sets the VMR of all species to a select constant value.

The vmr_field WSM must have a correct size before calling this method. The length of vmr_values and of abs_species must match.

Author
Richard Larsson
Parameters
[in,out]vmr_fieldWS Input/Output
[in]abs_speciesWS Input
[in]vmr_valuesGeneric Input

Definition at line 3956 of file m_atmosphere.cc.

Referenced by vmr_fieldSetAllConstant_g().

◆ vmr_fieldSetConstant()

void vmr_fieldSetConstant ( Tensor4 &  vmr_field,
const ArrayOfArrayOfSpeciesTag abs_species,
const String species,
const Numeric &  vmr_value,
const Verbosity verbosity 
)

WORKSPACE METHOD: vmr_fieldSetConstant.

Sets the VMR of a species to a constant value.

The vmr_field WSM must have a correct size before calling this method.

Author
Patrick Eriksson
Parameters
[in,out]vmr_fieldWS Input/Output
[in]abs_speciesWS Input
[in]speciesGeneric Input
[in]vmr_valueGeneric Input

Definition at line 3936 of file m_atmosphere.cc.

Referenced by vmr_fieldSetConstant_g().

◆ vmr_fieldSetRh()

void vmr_fieldSetRh ( Workspace ws,
Tensor4 &  vmr_field,
const ArrayOfArrayOfSpeciesTag abs_species,
const Tensor3 &  t_field,
const Vector &  p_grid,
const Agenda water_p_eq_agenda,
const Numeric &  rh,
const Numeric &  vmr_threshold,
const Verbosity verbosity 
)

WORKSPACE METHOD: vmr_fieldSetRh.

Sets the first H2O species to have a constant relative humidity (RH).

The water vapour saturation pressure is obtained by water_p_eq_agenda and the setytings in this agenda determines if the RH is e.g. defined with respect to liquid, or a combination of liquid and ice.

Only the first H2O species is modified.

The default value of vmr_threshold aims at avoiding changing VMRs above the tropopause.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]vmr_fieldWS Input/Output
[in]abs_speciesWS Input
[in]t_fieldWS Input
[in]p_gridWS Input
[in]water_p_eq_agendaWS Input
[in]rhGeneric Input (Default: "1.0")
[in]vmr_thresholdGeneric Input (Default: "15.0e-6")

Definition at line 3979 of file m_atmosphere.cc.

Referenced by vmr_fieldSetRh_g().

◆ wind_u_fieldIncludePlanetRotation()

void wind_u_fieldIncludePlanetRotation ( Tensor3 &  wind_u_field,
const Index &  atmosphere_dim,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const Vector &  refellipsoid,
const Tensor3 &  z_field,
const Numeric &  planet_rotation_period,
const Verbosity verbosity 
)

WORKSPACE METHOD: wind_u_fieldIncludePlanetRotation.

Maps the planet's rotation to an imaginary wind.

This method is of relevance if the observation platform is not following the planet's rotation, and Doppler effects must be considered. Examples include full disk observations from another planet or a satellite not in orbit of the observed planet.

The rotation of the planet is not causing any Doppler shift for 1D and 2D simulations, and the method can only be used for 3D.

Author
Patrick Eriksson
Parameters
[in,out]wind_u_fieldWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]refellipsoidWS Input
[in]z_fieldWS Input
[in]planet_rotation_periodWS Input

Definition at line 3720 of file m_atmosphere.cc.

Referenced by wind_u_fieldIncludePlanetRotation_g().

◆ WindFieldsCalc()

void WindFieldsCalc ( Tensor3 &  wind_u_field,
Tensor3 &  wind_v_field,
Tensor3 &  wind_w_field,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const GriddedField3 wind_u_field_raw,
const GriddedField3 wind_v_field_raw,
const GriddedField3 wind_w_field_raw,
const Index &  atmosphere_dim,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: WindFieldsCalc.

Interpolation of raw wind fields to calculation grids. Heritage from AtmFieldsCalc

Internally, WindFieldsCalc applies GriddedFieldPRegrid and GriddedFieldLatLonRegrid*. Generally, 'half-grid-step' extrapolation is allowed and applied.

Author
Richard Larsson
Parameters
[out]wind_u_fieldWS Output
[out]wind_v_fieldWS Output
[out]wind_w_fieldWS Output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]wind_u_field_rawWS Input
[in]wind_v_field_rawWS Input
[in]wind_w_field_rawWS Input
[in]atmosphere_dimWS Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 2620 of file m_atmosphere.cc.

References ARTS_ASSERT, ARTS_USER_ERROR_IF, chk_atm_grids(), chk_if_in_range(), chk_interpolation_grids(), chk_interpolation_pgrids(), CREATE_OUT2, GriddedField3::data, GriddedField::get_numeric_grid(), GriddedFieldLatLonRegrid(), GriddedFieldPRegrid(), and interpweights().

Referenced by WindFieldsCalc_g().

◆ WindFieldsCalcExpand1D()

void WindFieldsCalcExpand1D ( Tensor3 &  wind_u_field,
Tensor3 &  wind_v_field,
Tensor3 &  wind_w_field,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const GriddedField3 wind_u_field_raw,
const GriddedField3 wind_v_field_raw,
const GriddedField3 wind_w_field_raw,
const Index &  atmosphere_dim,
const Index &  interp_order,
const Verbosity verbosity 
)

WORKSPACE METHOD: WindFieldsCalcExpand1D.

Interpolation of 1D raw atmospheric fields to create 2D or 3D homogeneous wind fields. Derived from AtmFieldsCalcExpand1D

The method works as WindFieldsCalc, but accepts only raw 1D wind fields. The raw data is interpolated to p_grid and the obtained values are applied for all latitudes, and also longitudes for 3D, to create a homogeneous atmosphere.

Author
Richard Larsson
Parameters
[out]wind_u_fieldWS Output
[out]wind_v_fieldWS Output
[out]wind_w_fieldWS Output
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]wind_u_field_rawWS Input
[in]wind_v_field_rawWS Input
[in]wind_w_field_rawWS Input
[in]atmosphere_dimWS Input
[in]interp_orderGeneric Input (Default: "1")

Definition at line 2981 of file m_atmosphere.cc.

References ARTS_ASSERT, ARTS_USER_ERROR_IF, chk_atm_grids(), chk_if_in_range(), and MagFieldsCalc().

Referenced by WindFieldsCalcExpand1D_g().

◆ WindRawRead()

void WindRawRead ( GriddedField3 wind_u_field_raw,
GriddedField3 wind_v_field_raw,
GriddedField3 wind_w_field_raw,
const String basename,
const Verbosity verbosity 
)

WORKSPACE METHOD: WindRawRead.

Reads wind field data from a scenario.

A full set of field components is read (NOTE: fails if scenario only contains selected field components). The files can be anywhere, but must all be in the same directory specified by 'basename'. Naming convention for the field component files is basename.wind_u.xml for the u-component, v- and w-components accordingly.

Author
Richard Larsson
Parameters
[out]wind_u_field_rawWS Output
[out]wind_v_field_rawWS Output
[out]wind_w_field_rawWS Output
[in]basenameGeneric Input

Definition at line 3305 of file m_atmosphere.cc.

References CREATE_OUT3, and xml_read_from_file().

Referenced by WindRawRead_g().

◆ z2g()

void z2g ( Numeric &  g,
const Numeric &  r,
const Numeric &  g0,
const Numeric &  z 
)

Definition at line 3764 of file m_atmosphere.cc.

◆ z_fieldFromHSE()

void z_fieldFromHSE ( Workspace ws,
Tensor3 &  z_field,
const Index &  atmosphere_dim,
const Vector &  p_grid,
const Vector &  lat_grid,
const Vector &  lon_grid,
const Vector &  lat_true,
const Vector &  lon_true,
const ArrayOfArrayOfSpeciesTag abs_species,
const Tensor3 &  t_field,
const Tensor4 &  vmr_field,
const Vector &  refellipsoid,
const Matrix &  z_surface,
const Index &  atmfields_checked,
const Agenda g0_agenda,
const Numeric &  molarmass_dry_air,
const Numeric &  p_hse,
const Numeric &  z_hse_accuracy,
const Verbosity verbosity 
)

WORKSPACE METHOD: z_fieldFromHSE.

Force altitudes to fulfil hydrostatic equilibrium.

The method applies hydrostatic equilibrium. A mixture of "dry air" and water vapour (if present as abs_species tag) is assumed. That is, the air is assumed to be well mixed and its weight, apart from the water vapour, is constant (molarmass_dry_air). In addition, the effect of any particles (including liquid and ice particles) is neglected.

The output is an update of z_field. This variable is expected to contain approximative altitudes when calling the function. The altitude matching p_hse is kept constant. Other input altitudes can basically be arbitrary, but good estimates give quicker calculations.

The calculations are repeated until the change in altitude is below z_hse_accuracy*. An iterative process is needed as gravity varies with altitude.

For 1D and 2D, the geographical position is taken from lat_true and lon_true.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[in,out]z_fieldWS Input/Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]abs_speciesWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]refellipsoidWS Input
[in]z_surfaceWS Input
[in]atmfields_checkedWS Input
[in]g0_agendaWS Input
[in]molarmass_dry_airWS Input
[in]p_hseWS Input
[in]z_hse_accuracyWS Input

Definition at line 3770 of file m_atmosphere.cc.

Referenced by z_fieldFromHSE_g().

◆ z_surfaceConstantAltitude()

void z_surfaceConstantAltitude ( Matrix &  z_surface,
const Vector &  lat_grid,
const Vector &  lon_grid,
const Numeric &  altitude,
const Verbosity verbosity 
)

WORKSPACE METHOD: z_surfaceConstantAltitude.

Sets the surface altitude to a constant. Defaults to zero.

Author
Richard Larsson
Parameters
[out]z_surfaceWS Output
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]altitudeGeneric Input (Default: "0")

Definition at line 3452 of file m_atmosphere.cc.

References CREATE_OUT3.

Referenced by z_surfaceConstantAltitude_g().

◆ z_surfaceFromFileAndGrid()

void z_surfaceFromFileAndGrid ( Matrix &  z_surface,
const Vector &  lat_grid,
const Vector &  lon_grid,
const String filename,
const Index &  interp_order,
const Index &  set_lowest_altitude_to_zero,
const Verbosity verbosity 
)

WORKSPACE METHOD: z_surfaceFromFileAndGrid.

Sets the surface altitude for a given latitude and longitude grid.

Author
Richard Larsson
Parameters
[out]z_surfaceWS Output
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]filenameGeneric Input
[in]interp_orderGeneric Input (Default: "1")
[in]set_lowest_altitude_to_zeroGeneric Input (Default: "0")

Definition at line 3425 of file m_atmosphere.cc.

References CREATE_OUT3, GriddedField2::data, GriddedFieldLatLonRegrid(), min(), and xml_read_from_file().

Referenced by z_surfaceFromFileAndGrid_g().

Variable Documentation

◆ EPSILON_LON_CYCLIC

constexpr Numeric EPSILON_LON_CYCLIC = 2 * DBL_EPSILON
inlineconstexpr

Data value accuracy requirement for values at 0 and 360 deg if longitudes are cyclic.

Definition at line 60 of file m_atmosphere.cc.

Referenced by GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid(), and GriddedFieldLatLonRegrid().

◆ GAS_CONSTANT

constexpr Numeric GAS_CONSTANT =Constant::ideal_gas_constant
inlineconstexpr

Definition at line 55 of file m_atmosphere.cc.