ARTS
2.3.1285(git:92a29ea9-dirty)
|
Workspace functions to set variables defining the atmosphere (excluding the surface). More...
#include <cfloat>
#include <cmath>
#include "abs_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 "interpolation.h"
#include "interpolation_poly.h"
#include "linescaling.h"
#include "matpackIII.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 More... | |
void | AtmFieldPRegridHelper (Index &ing_min, Index &ing_max, ArrayOfGridPosPoly &gp_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. More... | |
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. More... | |
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. More... | |
void | FieldFromGriddedFieldCheckLatLonHelper (const Vector &lat_grid, const Vector &lon_grid, const Index ilat, const Index ilon, const GriddedField &gfield) |
Check for correct grid dimensions. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | GriddedFieldLatLonExpand (GriddedField2 &gfraw_out, const GriddedField2 &gfraw_in_orig, const Verbosity &) |
WORKSPACE METHOD: GriddedFieldLatLonExpand. More... | |
void | GriddedFieldLatLonExpand (GriddedField3 &gfraw_out, const GriddedField3 &gfraw_in_orig, const Verbosity &) |
WORKSPACE METHOD: GriddedFieldLatLonExpand. More... | |
void | GriddedFieldLatLonExpand (GriddedField4 &gfraw_out, const GriddedField4 &gfraw_in_orig, const Verbosity &) |
WORKSPACE METHOD: GriddedFieldLatLonExpand. More... | |
void | GriddedFieldLatLonExpand (ArrayOfGriddedField3 &gfraw_out, const ArrayOfGriddedField3 &gfraw_in, const Verbosity &verbosity) |
WORKSPACE METHOD: GriddedFieldLatLonExpand. More... | |
void | GriddedFieldPRegridHelper (Index &ing_min, Index &ing_max, ArrayOfGridPosPoly &gp_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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | GriddedFieldLatLonRegridHelper (ArrayOfGridPosPoly &gp_lat, ArrayOfGridPosPoly &gp_lon, Tensor3 &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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | GriddedFieldZToPRegridHelper (Index &ing_min, Index &ing_max, ArrayOfGridPosPoly &gp_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. More... | |
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. More... | |
void | atm_fields_compactFromMatrix (GriddedField4 &af, const Index &atmosphere_dim, const Matrix &im, const ArrayOfString &field_names, const Verbosity &) |
WORKSPACE METHOD: atm_fields_compactFromMatrix. More... | |
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. More... | |
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. More... | |
void | atm_fields_compactCleanup (GriddedField4 &atm_fields_compact, const Numeric &threshold, const Verbosity &) |
WORKSPACE METHOD: atm_fields_compactCleanup. More... | |
void | atm_fields_compactCreateFromField (GriddedField4 &atm_fields_compact, const String &name, const GriddedField3 &field, const Verbosity &) |
WORKSPACE METHOD: atm_fields_compactCreateFromField. More... | |
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. More... | |
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. More... | |
void | batch_atm_fields_compactCleanup (ArrayOfGriddedField4 &batch_atm_fields_compact, const Numeric &threshold, const Verbosity &verbosity) |
WORKSPACE METHOD: batch_atm_fields_compactCleanup. More... | |
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. More... | |
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. More... | |
void | AtmosphereSet1D (Index &atmosphere_dim, Vector &lat_grid, Vector &lon_grid, const Verbosity &verbosity) |
WORKSPACE METHOD: AtmosphereSet1D. More... | |
void | AtmosphereSet2D (Index &atmosphere_dim, Vector &lon_grid, const Verbosity &verbosity) |
WORKSPACE METHOD: AtmosphereSet2D. More... | |
void | AtmosphereSet3D (Index &atmosphere_dim, Vector &lat_true, Vector &lon_true, const Verbosity &verbosity) |
WORKSPACE METHOD: AtmosphereSet3D. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | z_surfaceConstantAltitude (Matrix &z_surface, const Vector &lat_grid, const Vector &lon_grid, const Numeric &altitude, const Verbosity &verbosity) |
WORKSPACE METHOD: z_surfaceConstantAltitude. More... | |
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. More... | |
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. More... | |
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. More... | |
void | p_gridFromZRaw (Vector &p_grid, const GriddedField3 &z_field_raw, const Index &no_negZ, const Verbosity &) |
WORKSPACE METHOD: p_gridFromZRaw. More... | |
void | lat_gridFromZRaw (Vector &lat_grid, const GriddedField3 &z_field_raw, const Verbosity &) |
WORKSPACE METHOD: lat_gridFromZRaw. More... | |
void | lon_gridFromZRaw (Vector &lon_grid, const GriddedField3 &z_field_raw, const Verbosity &) |
WORKSPACE METHOD: lon_gridFromZRaw. More... | |
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. More... | |
void | lat_gridFromRawField (Vector &lat_grid, const GriddedField3 &field_raw, const Verbosity &) |
WORKSPACE METHOD: lat_gridFromRawField. More... | |
void | lon_gridFromRawField (Vector &lon_grid, const GriddedField3 &field_raw, const Verbosity &) |
WORKSPACE METHOD: lon_gridFromRawField. More... | |
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. More... | |
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. More... | |
void | vmr_fieldSetConstant (Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const String &species, const Numeric &vmr_value, const Verbosity &) |
WORKSPACE METHOD: vmr_fieldSetConstant. More... | |
void | vmr_fieldSetAllConstant (Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Vector &vmr_values, const Verbosity &verbosity) |
WORKSPACE METHOD: vmr_fieldSetAllConstant. More... | |
void | nlte_fieldSetLteExternalPartitionFunction (Index &nlte_do, EnergyLevelMap &nlte_field, ArrayOfArrayOfAbsorptionLines &abs_lines_per_species, const ArrayOfQuantumIdentifier &nlte_quantum_identifiers, const SpeciesAuxData &partition_functions, const Tensor3 &t_field, const Verbosity &verbosity) |
WORKSPACE METHOD: nlte_fieldSetLteExternalPartitionFunction. More... | |
void | nlte_fieldSetLteInternalPartitionFunction (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_fieldSetLteInternalPartitionFunction. More... | |
Variables | |
const Index | GFIELD3_P_GRID |
const Index | GFIELD3_LAT_GRID |
const Index | GFIELD3_LON_GRID |
const Index | GFIELD4_FIELD_NAMES |
const Index | GFIELD4_P_GRID |
const Index | GFIELD4_LAT_GRID |
const Index | GFIELD4_LON_GRID |
const Numeric | DEG2RAD |
const Numeric | PI |
const Numeric | GAS_CONSTANT |
const Numeric | EPSILON_LON_CYCLIC = 2 * DBL_EPSILON |
Data value accuracy requirement for values at 0 and 360 deg if longitudes are cyclic. More... | |
Workspace functions to set variables defining the atmosphere (excluding the surface).
These functions are listed in the doxygen documentation as entries of the file auto_md.h.
Definition in file m_atmosphere.cc.
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: VMR * (1 - VMR_sum_of_condensibles). For Earth this should be set to ["abs_species-H2O"]
[in,out] | atm_fields_compact | WS Input/Output |
[in] | name | Generic Input |
[in] | value | Generic Input |
[in] | prepend | Generic Input (Default: "0") |
[in] | condensibles | Generic Input (Default: "[]") |
Definition at line 1511 of file m_atmosphere.cc.
References atm_fields_compactExpand(), GriddedField4::data, GriddedField::get_string_grid(), GFIELD4_FIELD_NAMES, ConstTensor4View::ncols(), Array< base >::nelem(), ConstTensor4View::npages(), ConstTensor4View::nrows(), and LineShape::vmrs().
Referenced by atm_fields_compactAddConstant_g(), and batch_atm_fields_compactAddConstant().
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.
[in,out] | atm_fields_compact | WS Input/Output |
[in] | name | Generic Input |
[in] | value | Generic Input |
[in] | prepend | Generic Input (Default: "0") |
Definition at line 1560 of file m_atmosphere.cc.
References atm_fields_compactExpand(), GriddedField3::checksize(), GriddedField4::checksize(), chk_interpolation_grids(), GriddedField3::data, GriddedField4::data, GriddedField::get_numeric_grid(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, GFIELD4_LAT_GRID, GFIELD4_LON_GRID, GFIELD4_P_GRID, gridpos(), interp(), interpweights(), joker, ConstVectorView::nelem(), and p2gridpos().
Referenced by atm_fields_compactAddSpecies_g(), and batch_atm_fields_compactAddSpecies().
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.)
[in,out] | atm_fields_compact | WS Input/Output |
[in] | threshold | Generic Input |
Definition at line 1643 of file m_atmosphere.cc.
References GriddedField4::checksize(), GriddedField4::data, GriddedField::get_string_grid(), GFIELD4_FIELD_NAMES, and i.
Referenced by atm_fields_compactCleanup_g(), and batch_atm_fields_compactCleanup().
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.
[out] | atm_fields_compact | WS Output |
[in] | name | Generic Input |
[in] | field | Generic Input |
Definition at line 1664 of file m_atmosphere.cc.
References GriddedField3::checksize(), GriddedField3::data, GriddedField4::data, GriddedField::get_numeric_grid(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, joker, ConstVectorView::nelem(), Tensor4::resize(), and GriddedField::set_grid().
Referenced by atm_fields_compactCreateFromField_g().
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.
af | The new atm_fields_compact |
nf | The new number of fields |
name | Name of new field |
prepend | 0 = append, otherwise prepend |
Definition at line 99 of file m_atmosphere.cc.
References GriddedField4::data, GriddedField::get_string_grid(), GFIELD4_FIELD_NAMES, joker, ConstTensor4View::ncols(), Array< base >::nelem(), ConstTensor4View::npages(), ConstTensor4View::nrows(), and GriddedField4::resize().
Referenced by atm_fields_compactAddConstant(), and atm_fields_compactAddSpecies().
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.
[out] | atm_fields_compact | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | gin1 | Generic Input |
[in] | field_names | Generic Input |
Definition at line 1443 of file m_atmosphere.cc.
References GriddedField4::data, GFIELD4_FIELD_NAMES, GFIELD4_LAT_GRID, GFIELD4_LON_GRID, GFIELD4_P_GRID, joker, ConstMatrixView::ncols(), Array< base >::nelem(), ConstMatrixView::nrows(), GriddedField4::resize(), GriddedField::set_grid(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and my_basic_string< charT >::toupper().
Referenced by atm_fields_compactFromMatrix_g(), and batch_atm_fields_compactFromArrayOfMatrix().
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
[out] | p_grid | WS Output |
[out] | lat_grid | WS Output |
[out] | lon_grid | WS Output |
[in] | z_field_raw | WS Input |
[in] | no_negZ | Generic Input (Default: "1") |
Definition at line 3959 of file m_atmosphere.cc.
References lat_gridFromZRaw(), lon_gridFromZRaw(), and p_gridFromZRaw().
Referenced by atm_gridsFromZRaw_g().
void AtmFieldPRegrid | ( | Tensor3 & | out, |
const Tensor3 & | in, | ||
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.
[out] | out | Supergeneric output |
[in] | in | Generic Input |
[in] | p_grid_new | Generic Input |
[in] | p_grid_old | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 184 of file m_atmosphere.cc.
References AtmFieldPRegridHelper(), i, interp(), joker, ConstTensor3View::ncols(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstTensor3View::nrows(), Tensor3::resize(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by AtmFieldPRegrid_sg_Tensor3Tensor3_g(), AtmFieldPRegrid_sg_Tensor4Tensor4_g(), and AtmFieldsRefinePgrid().
void AtmFieldPRegrid | ( | Tensor4 & | out, |
const Tensor4 & | in, | ||
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.
[out] | out | Supergeneric output |
[in] | in | Generic Input |
[in] | p_grid_new | Generic Input |
[in] | p_grid_old | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 245 of file m_atmosphere.cc.
References AtmFieldPRegridHelper(), i, interp(), joker, ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstVectorView::nelem(), ConstTensor4View::nrows(), Tensor4::resize(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
void AtmFieldPRegridHelper | ( | Index & | ing_min, |
Index & | ing_max, | ||
ArrayOfGridPosPoly & | gp_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 150 of file m_atmosphere.cc.
References chk_interpolation_pgrids(), CREATE_OUT2, interpweights(), ConstVectorView::nelem(), p2gridpos_poly(), and Matrix::resize().
Referenced by AtmFieldPRegrid().
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: <br> 1. temperature field <br> 2. the corresponding altitude field <br> 3. vmr fields for the gaseous species <br> 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.
[out] | p_grid | WS Output |
[out] | lat_grid | WS Output |
[out] | lon_grid | WS Output |
[out] | t_field | WS Output |
[out] | z_field | WS Output |
[out] | vmr_field | WS Output |
[out] | particle_bulkprop_field | WS Output |
[out] | particle_bulkprop_names | WS Output |
[in] | abs_species | WS Input |
[in] | atm_fields_compact | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | delim | Generic Input (Default: "-") |
[in] | p_min | Generic Input (Default: "0") |
[in] | check_gridnames | Generic Input (Default: "0") |
Definition at line 1817 of file m_atmosphere.cc.
Referenced by abs_lookupSetupBatch(), and AtmFieldsAndParticleBulkPropFieldFromCompact_g().
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: <br> 1. temperature field <br> 2. the corresponding altitude field <br> 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.
[out] | t_field | WS Output |
[out] | z_field | WS Output |
[out] | vmr_field | WS Output |
[out] | nlte_field | WS Output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | t_field_raw | WS Input |
[in] | z_field_raw | WS Input |
[in] | vmr_field_raw | WS Input |
[in] | nlte_field_raw | WS Input |
[in] | nlte_level_identifiers | WS Input |
[in] | nlte_vibrational_energies | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | interp_order | Generic Input (Default: "1") |
[in] | vmr_zeropadding | Generic Input (Default: "0") |
[in] | vmr_nonegative | Generic Input (Default: "0") |
[in] | nlte_when_negative | Generic Input (Default: "0") |
Definition at line 2079 of file m_atmosphere.cc.
References chk_atm_grids(), chk_if_in_range(), CREATE_OUT2, GriddedField3::data, EnergyLevelMap::Energies(), GriddedField::get_numeric_grid(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, GriddedFieldPRegrid(), EnergyLevelMap::Levels(), Array< base >::nelem(), ConstVectorView::nelem(), None_t, Tensor3_t, and EnergyLevelMap::Type().
Referenced by AtmFieldsCalc_g(), and 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.
[out] | t_field | WS Output |
[out] | z_field | WS Output |
[out] | vmr_field | WS Output |
[out] | nlte_field | WS Output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | t_field_raw | WS Input |
[in] | z_field_raw | WS Input |
[in] | vmr_field_raw | WS Input |
[in] | nlte_field_raw | WS Input |
[in] | nlte_level_identifiers | WS Input |
[in] | nlte_vibrational_energies | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | interp_order | Generic Input (Default: "1") |
[in] | vmr_zeropadding | Generic Input (Default: "0") |
[in] | vmr_nonegative | Generic Input (Default: "0") |
[in] | nlte_when_negative | Generic Input (Default: "0") |
Definition at line 3070 of file m_atmosphere.cc.
References AtmFieldsCalc(), chk_atm_grids(), chk_if_in_range(), EnergyLevelMap::Data(), EnergyLevelMap::Energies(), EnergyLevelMap::Levels(), ConstTensor4View::nbooks(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), Tensor3::resize(), Tensor4::resize(), Tensor3_t, EnergyLevelMap::ThrowIfNotOK(), and EnergyLevelMap::Type().
Referenced by AtmFieldsCalcExpand1D_g().
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.
[in,out] | t_field | WS Input/Output |
[in,out] | z_field | WS Input/Output |
[in,out] | vmr_field | WS Input/Output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | chk_vmr_nan | Generic Input (Default: "1") |
Definition at line 3289 of file m_atmosphere.cc.
References chk_atm_field(), chk_atm_grids(), chk_if_in_range(), max, ConstTensor4View::nbooks(), ConstVectorView::nelem(), Tensor3::resize(), and Tensor4::resize().
Referenced by AtmFieldsExpand1D_g().
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 alöready is 1.
[in,out] | atmosphere_dim | WS Input/Output |
[in,out] | lat_grid | WS Input/Output |
[in,out] | lon_grid | WS Input/Output |
[in,out] | t_field | WS Input/Output |
[in,out] | z_field | WS Input/Output |
[in,out] | vmr_field | WS Input/Output |
[in] | ilat | Generic Input (Default: "0") |
[in] | ilon | Generic Input (Default: "0") |
Definition at line 3347 of file m_atmosphere.cc.
References AtmosphereSet1D(), joker, ConstTensor4View::nbooks(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstTensor4View::npages(), Tensor3::resize(), and Tensor4::resize().
Referenced by AtmFieldsExtract1D_g().
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.
[in,out] | p_grid | WS Input/Output |
[in,out] | t_field | WS Input/Output |
[in,out] | z_field | WS Input/Output |
[in,out] | vmr_field | WS Input/Output |
[out] | atmfields_checked | WS Output |
[out] | atmgeom_checked | WS Output |
[out] | cloudbox_checked | WS Output |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | p_step | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 3403 of file m_atmosphere.cc.
References AtmFieldPRegrid(), chk_atm_field(), chk_atm_grids(), ConstTensor4View::nbooks(), and p_gridRefine().
Referenced by AtmFieldsRefinePgrid_g().
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.
[out] | atmosphere_dim | WS Output |
[out] | lat_grid | WS Output |
[out] | lon_grid | WS Output |
Definition at line 2027 of file m_atmosphere.cc.
References CREATE_OUT2, CREATE_OUT3, and Vector::resize().
Referenced by AtmFieldsExtract1D(), and AtmosphereSet1D_g().
WORKSPACE METHOD: AtmosphereSet2D.
Sets the atmospheric dimension to be 2D.
Sets atmosphere_dim to 2 and the longitude grid to be empty.
[out] | atmosphere_dim | WS Output |
[out] | lon_grid | WS Output |
Definition at line 2046 of file m_atmosphere.cc.
References CREATE_OUT2, CREATE_OUT3, and Vector::resize().
Referenced by AtmosphereSet2D_g().
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.
[out] | atmosphere_dim | WS Output |
[out] | lat_true | WS Output |
[out] | lon_true | WS Output |
Definition at line 2062 of file m_atmosphere.cc.
References CREATE_OUT2, CREATE_OUT3, and Vector::resize().
Referenced by AtmosphereSet3D_g().
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: <br> 1. temperature field <br> 2. the corresponding altitude field <br> 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 <br> (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.
[out] | t_field_raw | WS Output |
[out] | z_field_raw | WS Output |
[out] | vmr_field_raw | WS Output |
[out] | nlte_field_raw | WS Output |
[out] | nlte_level_identifiers | WS Output |
[out] | nlte_vibrational_energies | WS Output |
[in] | abs_species | WS Input |
[in] | basename | Generic Input |
Definition at line 3462 of file m_atmosphere.cc.
References CREATE_OUT3, i, Array< base >::nelem(), Vector::resize(), global_data::species_data, and xml_read_from_file().
Referenced by AtmRawRead_g().
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: <br> 1. temperature field <br> 2. the corresponding altitude field <br> 3. vmr fields for the gaseous species <br> 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.
[out] | t_field_raw | WS Output |
[out] | z_field_raw | WS Output |
[out] | vmr_field_raw | WS Output |
[out] | nlte_field_raw | WS Output |
[out] | nlte_level_identifiers | WS Output |
[out] | nlte_vibrational_energies | WS Output |
[in] | abs_species | WS Input |
[in] | basename | Generic Input |
[in] | expect_vibrational_energies | Generic Input (Default: "0") |
Definition at line 3590 of file m_atmosphere.cc.
References CREATE_OUT3, i, Array< base >::nelem(), ConstVectorView::nelem(), Vector::resize(), global_data::species_data, _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and xml_read_from_file().
Referenced by AtmWithNLTERawRead_g().
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.
[in,out] | batch_atm_fields_compact | WS Input/Output |
[in] | name | Generic Input |
[in] | value | Generic Input |
[in] | prepend | Generic Input (Default: "0") |
[in] | condensibles | Generic Input (Default: "[]") |
Definition at line 1691 of file m_atmosphere.cc.
References atm_fields_compactAddConstant(), i, and Array< base >::nelem().
Referenced by batch_atm_fields_compactAddConstant_g().
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.
[in,out] | batch_atm_fields_compact | WS Input/Output |
[in] | name | Generic Input |
[in] | value | Generic Input |
[in] | prepend | Generic Input (Default: "0") |
Definition at line 1711 of file m_atmosphere.cc.
References atm_fields_compactAddSpecies(), i, Array< base >::nelem(), and Absorption::nelem().
Referenced by batch_atm_fields_compactAddSpecies_g().
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.)
[in,out] | batch_atm_fields_compact | WS Input/Output |
[in] | threshold | Generic Input |
Definition at line 1745 of file m_atmosphere.cc.
References atm_fields_compactCleanup(), i, and Array< base >::nelem().
Referenced by batch_atm_fields_compactCleanup_g().
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.
[out] | batch_atm_fields_compact | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | atmospheres_fields | Generic Input |
[in] | field_names | Generic Input |
Definition at line 1757 of file m_atmosphere.cc.
References atm_fields_compactFromMatrix(), i, Array< base >::nelem(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by batch_atm_fields_compactFromArrayOfMatrix_g().
void FieldFromGriddedField | ( | Matrix & | out, |
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const GriddedField2 & | in, | ||
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.
[out] | out | Supergeneric output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | in | Generic Input |
Definition at line 339 of file m_atmosphere.cc.
References GriddedField2::data, and FieldFromGriddedFieldCheckLatLonHelper().
Referenced by FieldFromGriddedField_sg_MatrixGriddedField2_g(), FieldFromGriddedField_sg_Tensor3GriddedField3_g(), FieldFromGriddedField_sg_Tensor4ArrayOfGriddedField3_g(), FieldFromGriddedField_sg_Tensor4GriddedField4_g(), and pnd_fieldCalcFrompnd_field_raw().
void FieldFromGriddedField | ( | Tensor3 & | out, |
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const GriddedField3 & | in, | ||
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.
[out] | out | Supergeneric output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | in | Generic Input |
Definition at line 354 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), chk_if_equal(), GriddedField3::data, FieldFromGriddedFieldCheckLatLonHelper(), and GriddedField::get_numeric_grid().
void FieldFromGriddedField | ( | Tensor4 & | out, |
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const GriddedField4 & | in, | ||
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.
[out] | out | Supergeneric output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | in | Generic Input |
Definition at line 372 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), chk_if_equal(), GriddedField4::data, FieldFromGriddedFieldCheckLatLonHelper(), and GriddedField::get_numeric_grid().
void FieldFromGriddedField | ( | Tensor4 & | out, |
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const ArrayOfGriddedField3 & | in, | ||
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.
[out] | out | Supergeneric output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | in | Generic Input |
Definition at line 390 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), chk_if_equal(), CREATE_OUT1, FieldFromGriddedFieldCheckLatLonHelper(), i, joker, Array< base >::nelem(), ConstVectorView::nelem(), and Tensor4::resize().
void FieldFromGriddedFieldCheckLatLonHelper | ( | const Vector & | lat_grid, |
const Vector & | lon_grid, | ||
const Index | ilat, | ||
const Index | ilon, | ||
const GriddedField & | gfield | ||
) |
Check for correct grid dimensions.
Definition at line 312 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), chk_if_equal(), chk_size(), ConstVectorView::empty(), and GriddedField::get_numeric_grid().
Referenced by FieldFromGriddedField().
void GriddedFieldLatLonExpand | ( | GriddedField2 & | out, |
const GriddedField2 & | in, | ||
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. gfield_raw_out and gfield_raw_in can be the same variable.
[out] | out | Supergeneric output |
[in] | in | Generic Input |
Definition at line 423 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), GriddedField2::data, joker, ConstMatrixView::ncols(), ConstMatrixView::nrows(), GriddedField2::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().
Referenced by GriddedFieldLatLonExpand(), GriddedFieldLatLonExpand_sg_ArrayOfGriddedField3ArrayOfGriddedField3_g(), GriddedFieldLatLonExpand_sg_GriddedField2GriddedField2_g(), GriddedFieldLatLonExpand_sg_GriddedField3GriddedField3_g(), and GriddedFieldLatLonExpand_sg_GriddedField4GriddedField4_g().
void GriddedFieldLatLonExpand | ( | GriddedField3 & | out, |
const GriddedField3 & | in, | ||
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. gfield_raw_out and gfield_raw_in can be the same variable.
[out] | out | Supergeneric output |
[in] | in | Generic Input |
Definition at line 480 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), GriddedField3::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), i, joker, ConstTensor3View::ncols(), ConstTensor3View::npages(), ConstTensor3View::nrows(), GriddedField3::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().
void GriddedFieldLatLonExpand | ( | GriddedField4 & | out, |
const GriddedField4 & | in, | ||
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. gfield_raw_out and gfield_raw_in can be the same variable.
[out] | out | Supergeneric output |
[in] | in | Generic Input |
Definition at line 542 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), GriddedField4::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstTensor4View::npages(), ConstTensor4View::nrows(), GriddedField4::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().
void GriddedFieldLatLonExpand | ( | ArrayOfGriddedField3 & | out, |
const ArrayOfGriddedField3 & | in, | ||
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. gfield_raw_out and gfield_raw_in can be the same variable.
[out] | out | Supergeneric output |
[in] | in | Generic Input |
Definition at line 617 of file m_atmosphere.cc.
References GriddedFieldLatLonExpand(), i, and Array< base >::nelem().
void GriddedFieldLatLonRegrid | ( | GriddedField2 & | out, |
const Vector & | lat_true, | ||
const Vector & | lon_true, | ||
const GriddedField2 & | in, | ||
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. in and out fields can be the same variable.
[out] | out | Supergeneric output |
[in] | lat_true | WS Input |
[in] | lon_true | WS Input |
[in] | in | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 950 of file m_atmosphere.cc.
References GriddedField2::data, EPSILON_LON_CYCLIC, GriddedField::get_grid_size(), GriddedField::get_numeric_grid(), GriddedFieldLatLonRegridHelper(), interp(), is_lon_cyclic(), is_same_within_epsilon(), ConstVectorView::nelem(), GriddedField2::resize(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by GriddedFieldLatLonRegrid(), GriddedFieldLatLonRegrid_sg_ArrayOfGriddedField3ArrayOfGriddedField3_g(), GriddedFieldLatLonRegrid_sg_GriddedField2GriddedField2_g(), GriddedFieldLatLonRegrid_sg_GriddedField3GriddedField3_g(), GriddedFieldLatLonRegrid_sg_GriddedField4GriddedField4_g(), MagFieldsCalc(), MagFieldsFromAltitudeRawCalc(), WindFieldsCalc(), and z_surfaceFromFileAndGrid().
void GriddedFieldLatLonRegrid | ( | GriddedField3 & | out, |
const Vector & | lat_true, | ||
const Vector & | lon_true, | ||
const GriddedField3 & | in, | ||
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. in and out fields can be the same variable.
[out] | out | Supergeneric output |
[in] | lat_true | WS Input |
[in] | lon_true | WS Input |
[in] | in | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 1039 of file m_atmosphere.cc.
References GriddedField3::data, EPSILON_LON_CYCLIC, GriddedField::get_grid_name(), GriddedField::get_grid_size(), GriddedField::get_numeric_grid(), GriddedFieldLatLonRegridHelper(), i, interp(), is_lon_cyclic(), is_same_within_epsilon(), joker, ConstVectorView::nelem(), ConstTensor3View::npages(), GriddedField3::resize(), GriddedField::set_grid(), GriddedField::set_grid_name(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
void GriddedFieldLatLonRegrid | ( | GriddedField4 & | out, |
const Vector & | lat_true, | ||
const Vector & | lon_true, | ||
const GriddedField4 & | in, | ||
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. in and out fields can be the same variable.
[out] | out | Supergeneric output |
[in] | lat_true | WS Input |
[in] | lon_true | WS Input |
[in] | in | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 1140 of file m_atmosphere.cc.
References GriddedField4::data, EPSILON_LON_CYCLIC, GriddedField::get_grid_name(), GriddedField::get_grid_size(), GriddedField::get_numeric_grid(), GriddedFieldLatLonRegridHelper(), i, interp(), is_lon_cyclic(), is_same_within_epsilon(), joker, ConstTensor4View::nbooks(), ConstVectorView::nelem(), ConstTensor4View::npages(), GriddedField4::resize(), GriddedField::set_grid(), GriddedField::set_grid_name(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
void GriddedFieldLatLonRegrid | ( | ArrayOfGriddedField3 & | out, |
const Vector & | lat_true, | ||
const Vector & | lon_true, | ||
const ArrayOfGriddedField3 & | in, | ||
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. in and out fields can be the same variable.
[out] | out | Supergeneric output |
[in] | lat_true | WS Input |
[in] | lon_true | WS Input |
[in] | in | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 1251 of file m_atmosphere.cc.
References GriddedFieldLatLonRegrid(), i, and Array< base >::nelem().
void GriddedFieldLatLonRegridHelper | ( | ArrayOfGridPosPoly & | gp_lat, |
ArrayOfGridPosPoly & | gp_lon, | ||
Tensor3 & | 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.
Definition at line 891 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), chk_interpolation_grids(), CREATE_OUT2, GriddedField::get_grid_name(), GriddedField::get_grid_size(), GriddedField::get_numeric_grid(), gridpos_poly(), gridpos_poly_longitudinal(), interpweights(), ConstVectorView::nelem(), Tensor3::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().
Referenced by GriddedFieldLatLonRegrid().
void GriddedFieldPRegrid | ( | GriddedField3 & | out, |
const Vector & | p_grid, | ||
const GriddedField3 & | in, | ||
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. in and out fields can be the same variable.
[out] | out | Supergeneric output |
[in] | p_grid | WS Input |
[in] | in | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
[in] | zeropadding | Generic Input (Default: "0") |
Definition at line 703 of file m_atmosphere.cc.
References GriddedField3::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), GriddedFieldPRegridHelper(), i, interp(), joker, ConstTensor3View::ncols(), ConstVectorView::nelem(), ConstTensor3View::nrows(), 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().
void GriddedFieldPRegrid | ( | GriddedField4 & | out, |
const Vector & | p_grid, | ||
const GriddedField4 & | in, | ||
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. in and out fields can be the same variable.
[out] | out | Supergeneric output |
[in] | p_grid | WS Input |
[in] | in | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
[in] | zeropadding | Generic Input (Default: "0") |
Definition at line 774 of file m_atmosphere.cc.
References GriddedField4::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), GriddedFieldPRegridHelper(), i, interp(), joker, ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstVectorView::nelem(), ConstTensor4View::nrows(), GriddedField4::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().
void GriddedFieldPRegrid | ( | ArrayOfGriddedField3 & | out, |
const Vector & | p_grid, | ||
const ArrayOfGriddedField3 & | in, | ||
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. in and out fields can be the same variable.
[out] | out | Supergeneric output |
[in] | p_grid | WS Input |
[in] | in | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
[in] | zeropadding | Generic Input (Default: "0") |
Definition at line 853 of file m_atmosphere.cc.
References GriddedFieldPRegrid(), i, and Array< base >::nelem().
void GriddedFieldPRegridHelper | ( | Index & | ing_min, |
Index & | ing_max, | ||
ArrayOfGridPosPoly & | gp_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.
Definition at line 647 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), chk_interpolation_pgrids(), chk_interpolation_pgrids_loose_no_data_check(), CREATE_OUT2, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), interpweights(), ConstVectorView::nelem(), p2gridpos_poly(), Matrix::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().
Referenced by GriddedFieldPRegrid().
void GriddedFieldZToPRegrid | ( | GriddedField3 & | out, |
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Tensor3 & | z_field, | ||
const GriddedField3 & | in, | ||
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.
[out] | out | Generic output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | z_field | WS Input |
[in] | in | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
[in] | zeropadding | Generic Input (Default: "0") |
Definition at line 1342 of file m_atmosphere.cc.
References chk_griddedfield_gridname(), GriddedField3::data, GriddedField::get_grid_name(), GriddedField::get_numeric_grid(), GriddedFieldZToPRegridHelper(), interp(), joker, ConstTensor3View::ncols(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstTensor3View::nrows(), r, GriddedField3::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().
Referenced by GriddedFieldZToPRegrid_g().
void GriddedFieldZToPRegridHelper | ( | Index & | ing_min, |
Index & | ing_max, | ||
ArrayOfGridPosPoly & | gp_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 1290 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(), gridpos_poly(), interpweights(), ConstVectorView::nelem(), and Matrix::resize().
Referenced by GriddedFieldZToPRegrid().
void InterpAtmFieldToPosition | ( | Numeric & | out, |
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.
[out] | out | Generic output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | z_field | WS Input |
[in] | rtp_pos | WS Input |
[in] | field | Generic Input |
Definition at line 3721 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(), and ARTS::Agenda::surface_rtprop_agenda_blackbody_from_atmosphere().
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).
[out] | lat_grid | WS Output |
[in] | field_raw | Generic Input |
Definition at line 3973 of file m_atmosphere.cc.
References GriddedField::get_numeric_grid(), and GFIELD3_LAT_GRID.
Referenced by lat_gridFromRawField_g().
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
[out] | lat_grid | WS Output |
[in] | z_field_raw | WS Input |
Definition at line 3941 of file m_atmosphere.cc.
References GriddedField::get_numeric_grid(), and GFIELD3_LAT_GRID.
Referenced by atm_gridsFromZRaw(), and lat_gridFromZRaw_g().
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).
[out] | lon_grid | WS Output |
[in] | field_raw | Generic Input |
Definition at line 3982 of file m_atmosphere.cc.
References GriddedField::get_numeric_grid(), and GFIELD3_LON_GRID.
Referenced by lon_gridFromRawField_g().
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
[out] | lon_grid | WS Output |
[in] | z_field_raw | WS Input |
Definition at line 3950 of file m_atmosphere.cc.
References GriddedField::get_numeric_grid(), and GFIELD3_LON_GRID.
Referenced by atm_gridsFromZRaw(), and lon_gridFromZRaw_g().
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.
[out] | mag_u_field | WS Output |
[out] | mag_v_field | WS Output |
[out] | mag_w_field | WS Output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | mag_u_field_raw | WS Input |
[in] | mag_v_field_raw | WS Input |
[in] | mag_w_field_raw | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 2480 of file m_atmosphere.cc.
References chk_atm_grids(), chk_if_in_range(), chk_interpolation_grids(), chk_interpolation_pgrids(), CREATE_OUT2, GriddedField3::data, GriddedField::get_numeric_grid(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, GriddedFieldLatLonRegrid(), GriddedFieldPRegrid(), gridpos_poly(), interp(), interpweights(), joker, ConstVectorView::nelem(), p2gridpos_poly(), and Tensor3::resize().
Referenced by MagFieldsCalc_g(), MagFieldsCalcExpand1D(), and WindFieldsCalcExpand1D().
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.
[out] | mag_u_field | WS Output |
[out] | mag_v_field | WS Output |
[out] | mag_w_field | WS Output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | mag_u_field_raw | WS Input |
[in] | mag_v_field_raw | WS Input |
[in] | mag_w_field_raw | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 3163 of file m_atmosphere.cc.
References chk_atm_grids(), chk_if_in_range(), MagFieldsCalc(), ConstVectorView::nelem(), ConstTensor3View::npages(), and Tensor3::resize().
Referenced by MagFieldsCalcExpand1D_g().
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.
[out] | mag_u_field | WS Output |
[out] | mag_v_field | WS Output |
[out] | mag_w_field | WS Output |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | z_field | WS Input |
[in] | mag_u_field_raw | WS Input |
[in] | mag_v_field_raw | WS Input |
[in] | mag_w_field_raw | WS Input |
[in] | interp_order | Generic Input (Default: "1") |
[in] | extrapolating | Generic Input (Default: "1e99") |
Definition at line 2722 of file m_atmosphere.cc.
References chk_interpolation_grids(), GriddedFieldLatLonRegrid(), gridpos_poly(), interp(), interpweights(), joker, ConstTensor3View::ncols(), ConstTensor3View::npages(), ConstTensor3View::nrows(), Tensor3::resize(), and w().
Referenced by MagFieldsFromAltitudeRawCalc_g().
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.
[out] | mag_u_field_raw | WS Output |
[out] | mag_v_field_raw | WS Output |
[out] | mag_w_field_raw | WS Output |
[in] | basename | Generic Input |
Definition at line 3524 of file m_atmosphere.cc.
References CREATE_OUT3, and xml_read_from_file().
Referenced by MagRawRead_g().
void nlte_fieldSetLteExternalPartitionFunction | ( | Index & | nlte_do, |
EnergyLevelMap & | nlte_field, | ||
ArrayOfArrayOfAbsorptionLines & | abs_lines_per_species, | ||
const ArrayOfQuantumIdentifier & | nlte_level_identifiers, | ||
const SpeciesAuxData & | partition_functions, | ||
const Tensor3 & | t_field, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: nlte_fieldSetLteExternalPartitionFunction.
Turns on NTLE calculations.
Sets NLTE ratios to those expected for LTE calculations with a known partition function
[out] | nlte_do | WS Output |
[out] | nlte_field | WS Output |
[in,out] | abs_lines_per_species | WS Input/Output |
[in] | nlte_level_identifiers | WS Input |
[in] | partition_functions | WS Input |
[in] | t_field | WS Input |
Definition at line 4263 of file m_atmosphere.cc.
References CREATE_OUT2, joker, ConstTensor3View::ncols(), Array< base >::nelem(), ConstTensor3View::npages(), and ConstTensor3View::nrows().
Referenced by nlte_fieldSetLteExternalPartitionFunction_g().
void nlte_fieldSetLteInternalPartitionFunction | ( | 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_fieldSetLteInternalPartitionFunction.
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
[out] | nlte_do | WS Output |
[out] | nlte_field | WS Output |
[in,out] | abs_lines_per_species | WS Input/Output |
[in] | nlte_level_identifiers | WS Input |
[in] | t_field | WS Input |
Definition at line 4347 of file m_atmosphere.cc.
References CREATE_OUT2, Isotopologue, joker, ConstTensor3View::ncols(), Array< base >::nelem(), ConstTensor3View::npages(), ConstTensor3View::nrows(), and Species.
Referenced by nlte_fieldSetLteInternalPartitionFunction_g().
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).
[out] | p_grid | WS Output |
[out] | atmfields_checked | WS Output |
[out] | atmgeom_checked | WS Output |
[out] | cloudbox_checked | WS Output |
[in] | p_grid_old | Generic Input |
[in] | nfill | Generic Input (Default: "-1") |
Definition at line 3760 of file m_atmosphere.cc.
References i, ConstVectorView::nelem(), Vector::resize(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and VectorNLogSpace().
Referenced by p_gridDensify_g().
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.
[out] | p_grid | WS Output |
[in] | z_field_raw | WS Input |
[in] | no_negZ | Generic Input (Default: "1") |
Definition at line 3908 of file m_atmosphere.cc.
References GriddedField3::data, GriddedField::get_numeric_grid(), GFIELD3_P_GRID, i, is_decreasing(), is_increasing(), joker, ConstTensor3View::npages(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by atm_gridsFromZRaw(), and p_gridFromZRaw_g().
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).
[out] | p_grid | WS Output |
[out] | atmfields_checked | WS Output |
[out] | atmgeom_checked | WS Output |
[out] | cloudbox_checked | WS Output |
[in] | p_grid_old | Generic Input |
[in] | p_step | Generic Input |
Definition at line 3815 of file m_atmosphere.cc.
References i, n, Array< base >::nelem(), ConstVectorView::nelem(), pow(), Vector::resize(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and transform().
Referenced by AtmFieldsRefinePgrid(), and p_gridRefine_g().
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.
[in,out] | vmr_field | WS Input/Output |
[in] | abs_species | WS Input |
[in] | vmr_values | Generic Input |
Definition at line 4241 of file m_atmosphere.cc.
References CREATE_OUT3, get_tag_group_name(), i, Array< base >::nelem(), ConstVectorView::nelem(), and vmr_fieldSetConstant().
Referenced by vmr_fieldSetAllConstant_g().
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.
[in,out] | vmr_field | WS Input/Output |
[in] | abs_species | WS Input |
[in] | species | Generic Input |
[in] | vmr_value | Generic Input |
Definition at line 4219 of file m_atmosphere.cc.
References array_species_tag_from_string(), chk_contains(), chk_if_in_range(), joker, ConstTensor4View::nbooks(), and Array< base >::nelem().
Referenced by vmr_fieldSetAllConstant(), and vmr_fieldSetConstant_g().
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.
[in,out] | wind_u_field | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | refellipsoid | WS Input |
[in] | z_field | WS Input |
[in] | planet_rotation_period | WS Input |
Definition at line 3991 of file m_atmosphere.cc.
References chk_atm_field(), DEG2RAD, ConstVectorView::nelem(), ConstTensor3View::npages(), PI, refell2r(), and Tensor3::resize().
Referenced by wind_u_fieldIncludePlanetRotation_g().
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.
[out] | wind_u_field | WS Output |
[out] | wind_v_field | WS Output |
[out] | wind_w_field | WS Output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | wind_u_field_raw | WS Input |
[in] | wind_v_field_raw | WS Input |
[in] | wind_w_field_raw | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 2828 of file m_atmosphere.cc.
References chk_atm_grids(), chk_if_in_range(), chk_interpolation_grids(), chk_interpolation_pgrids(), CREATE_OUT2, GriddedField3::data, GriddedField::get_numeric_grid(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, GriddedFieldLatLonRegrid(), GriddedFieldPRegrid(), gridpos_poly(), interp(), interpweights(), joker, ConstVectorView::nelem(), p2gridpos_poly(), and Tensor3::resize().
Referenced by WindFieldsCalc_g().
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.
[out] | wind_u_field | WS Output |
[out] | wind_v_field | WS Output |
[out] | wind_w_field | WS Output |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | wind_u_field_raw | WS Input |
[in] | wind_v_field_raw | WS Input |
[in] | wind_w_field_raw | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 3226 of file m_atmosphere.cc.
References chk_atm_grids(), chk_if_in_range(), MagFieldsCalc(), ConstVectorView::nelem(), ConstTensor3View::npages(), and Tensor3::resize().
Referenced by WindFieldsCalcExpand1D_g().
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.
[out] | wind_u_field_raw | WS Output |
[out] | wind_v_field_raw | WS Output |
[out] | wind_w_field_raw | WS Output |
[in] | basename | Generic Input |
Definition at line 3557 of file m_atmosphere.cc.
References CREATE_OUT3, and xml_read_from_file().
Referenced by WindRawRead_g().
Definition at line 4035 of file m_atmosphere.cc.
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.
[in,out] | ws | Workspace |
[in,out] | z_field | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | lat_true | WS Input |
[in] | lon_true | WS Input |
[in] | abs_species | WS Input |
[in] | t_field | WS Input |
[in] | vmr_field | WS Input |
[in] | refellipsoid | WS Input |
[in] | z_surface | WS Input |
[in] | atmfields_checked | WS Input |
[in] | g0_agenda | WS Input |
[in] | molarmass_dry_air | WS Input |
[in] | p_hse | WS Input |
[in] | z_hse_accuracy | WS Input |
Definition at line 4041 of file m_atmosphere.cc.
References chk_latlon_true(), CREATE_OUT1, find_first_species_tg(), interpweights(), ConstTensor3View::ncols(), ConstVectorView::nelem(), ConstTensor3View::nrows(), p2gridpos(), species_index_from_species_name(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by z_fieldFromHSE_g().
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.
[out] | z_surface | WS Output |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | altitude | Generic Input (Default: "0") |
Definition at line 3710 of file m_atmosphere.cc.
References CREATE_OUT3, and ConstVectorView::nelem().
Referenced by z_surfaceConstantAltitude_g().
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.
[out] | z_surface | WS Output |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | filename | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
[in] | set_lowest_altitude_to_zero | Generic Input (Default: "0") |
Definition at line 3683 of file m_atmosphere.cc.
References CREATE_OUT3, GriddedField2::data, GriddedFieldLatLonRegrid(), min, and xml_read_from_file().
Referenced by z_surfaceFromFileAndGrid_g().
const Numeric DEG2RAD |
Referenced by wind_u_fieldIncludePlanetRotation().
const Numeric EPSILON_LON_CYCLIC = 2 * DBL_EPSILON |
Data value accuracy requirement for values at 0 and 360 deg if longitudes are cyclic.
Referenced by GriddedFieldLatLonRegrid().
const Numeric GAS_CONSTANT |
const Index GFIELD3_LAT_GRID |
const Index GFIELD3_LON_GRID |
const Index GFIELD3_P_GRID |
const Index GFIELD4_FIELD_NAMES |
const Index GFIELD4_LAT_GRID |
Referenced by atm_fields_compactAddSpecies(), and atm_fields_compactFromMatrix().
const Index GFIELD4_LON_GRID |
Referenced by atm_fields_compactAddSpecies(), and atm_fields_compactFromMatrix().
const Index GFIELD4_P_GRID |
Referenced by atm_fields_compactAddSpecies(), and atm_fields_compactFromMatrix().
const Numeric PI |
Referenced by wind_u_fieldIncludePlanetRotation().