m_cloudbox.cc File Reference

Workspace functions related to the definintion of the cloud box. More...

#include <stdexcept>
#include <cstdlib>
#include <cmath>
#include "arts.h"
#include "array.h"
#include "check_input.h"
#include "xml_io.h"
#include "messages.h"
#include "gridded_fields.h"
#include "logic.h"
#include "rte.h"
#include "interpolation.h"
#include "special_interp.h"
#include "cloudbox.h"
#include "optproperties.h"
#include "math_funcs.h"
#include "physics_funcs.h"

Include dependency graph for m_cloudbox.cc:

Go to the source code of this file.

Functions

void cloudboxOff (Index &cloudbox_on, ArrayOfIndex &cloudbox_limits, Agenda &iy_cloudbox_agenda)
 WORKSPACE METHOD: cloudboxOff.
void cloudboxSetEmpty (Tensor4 &pnd_field, ArrayOfSingleScatteringData &scat_data_raw, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid)
 WORKSPACE METHOD: cloudboxSetEmpty.
void cloudboxSetManually (Index &cloudbox_on, ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Numeric &p1, const Numeric &p2, const Numeric &lat1, const Numeric &lat2, const Numeric &lon1, const Numeric &lon2)
 WORKSPACE METHOD: cloudboxSetManually.
void cloudboxSetManuallyAltitude (Index &cloudbox_on, ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Tensor3 &z_field, const Vector &lat_grid, const Vector &lon_grid, const Numeric &z1, const Numeric &z2, const Numeric &lat1, const Numeric &lat2, const Numeric &lon1, const Numeric &lon2)
 WORKSPACE METHOD: cloudboxSetManuallyAltitude.
void doit_i_fieldSetClearsky (Tensor6 &doit_i_field, const Tensor7 &scat_i_p, const Tensor7 &scat_i_lat, const Tensor7 &scat_i_lon, const Vector &f_grid, const Index &f_index, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Index &all_frequencies)
 WORKSPACE METHOD: doit_i_fieldSetClearsky.
void doit_i_fieldSetConst (Tensor6 &doit_i_field, const Tensor7 &scat_i_p, const Tensor7 &scat_i_lat, const Tensor7 &scat_i_lon, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Index &stokes_dim, const Vector &doit_i_field_values)
 WORKSPACE METHOD: doit_i_fieldSetConst.
void ParticleTypeInit (ArrayOfSingleScatteringData &scat_data_raw, ArrayOfGField3 &pnd_field_raw)
 WORKSPACE METHOD: ParticleTypeInit.
void ParticleTypeAddAll (ArrayOfSingleScatteringData &scat_data_raw, ArrayOfGField3 &pnd_field_raw, const Index &atmosphere_dim, const Vector &f_grid, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfIndex &cloudbox_limits, const String &filename_scat_data, const String &pnd_field_file)
 WORKSPACE METHOD: ParticleTypeAddAll.
void ParticleTypeAdd (ArrayOfSingleScatteringData &scat_data_raw, ArrayOfGField3 &pnd_field_raw, const Index &atmosphere_dim, const Vector &f_grid, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfIndex &cloudbox_limits, const String &scat_data_file, const String &pnd_field_file)
 WORKSPACE METHOD: ParticleTypeAdd.
void pnd_fieldCalc (Tensor4 &pnd_field, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const ArrayOfGField3 &pnd_field_raw, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits)
 WORKSPACE METHOD: pnd_fieldCalc.
void DoitCloudboxFieldPut (Tensor7 &scat_i_p, Tensor7 &scat_i_lat, Tensor7 &scat_i_lon, Tensor4 &doit_i_field1D_spectrum, const Tensor6 &doit_i_field, const Vector &f_grid, const Index &f_index, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &stokes_dim, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Matrix &sensor_pos, const Tensor3 &z_field)
 WORKSPACE METHOD: DoitCloudboxFieldPut.
void CloudboxGetIncoming (Workspace &ws, Tensor7 &scat_i_p, Tensor7 &scat_i_lat, Tensor7 &scat_i_lon, Index &cloudbox_on, const Agenda &ppath_step_agenda, const Agenda &rte_agenda, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &iy_cloudbox_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const Matrix &r_geoid, const Matrix &z_surface, const ArrayOfIndex &cloudbox_limits, const Vector &f_grid, const Index &stokes_dim, const Vector &scat_za_grid, const Vector &scat_aa_grid)
 WORKSPACE METHOD: CloudboxGetIncoming.
void CloudboxGetIncoming1DAtm (Workspace &ws, Tensor7 &scat_i_p, Tensor7 &scat_i_lat, Tensor7 &scat_i_lon, Index &cloudbox_on, const Agenda &ppath_step_agenda, const Agenda &rte_agenda, const Agenda &iy_space_agenda, const Agenda &surface_prop_agenda, const Agenda &iy_cloudbox_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const Matrix &r_geoid, const Matrix &z_surface, const ArrayOfIndex &cloudbox_limits, const Vector &f_grid, const Index &stokes_dim, const Vector &scat_za_grid, const Vector &scat_aa_grid)
 WORKSPACE METHOD: CloudboxGetIncoming1DAtm.
void iyInterpCloudboxField (Matrix &iy, const Tensor7 &scat_i_p, const Tensor7 &scat_i_lat, const Tensor7 &scat_i_lon, const Tensor4 &doit_i_field1D_spectrum, const GridPos &rte_gp_p, const GridPos &rte_gp_lat, const GridPos &rte_gp_lon, const Vector &rte_los, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Index &stokes_dim, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Vector &f_grid)
 WORKSPACE METHOD: iyInterpCloudboxField.
void iyInterpPolyCloudboxField (Matrix &iy, const Tensor7 &scat_i_p, const Tensor7 &scat_i_lat, const Tensor7 &scat_i_lon, const Tensor4 &doit_i_field1D_spectrum, const GridPos &rte_gp_p, const GridPos &rte_gp_lat, const GridPos &rte_gp_lon, const Vector &rte_los, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &atmosphere_dim, const Index &stokes_dim, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Vector &f_grid)
 WORKSPACE METHOD: iyInterpPolyCloudboxField.

Variables

const Index GFIELD3_P_GRID
const Index GFIELD3_LAT_GRID
const Index GFIELD3_LON_GRID


Detailed Description

Workspace functions related to the definintion of the cloud box.

Author:
Patrick Eriksson, Claudia Emde and Sreerekha T. R.
Date:
2002-05-08
These functions are listed in the doxygen documentation as entries of the file auto_md.h.

Definition in file m_cloudbox.cc.


Function Documentation

void CloudboxGetIncoming ( Workspace ws,
Tensor7 scat_i_p,
Tensor7 scat_i_lat,
Tensor7 scat_i_lon,
Index cloudbox_on,
const Agenda ppath_step_agenda,
const Agenda rte_agenda,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda iy_cloudbox_agenda,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const Matrix r_geoid,
const Matrix z_surface,
const ArrayOfIndex cloudbox_limits,
const Vector f_grid,
const Index stokes_dim,
const Vector scat_za_grid,
const Vector scat_aa_grid 
)

WORKSPACE METHOD: CloudboxGetIncoming.

Calculates incoming radiation field of cloudbox by repeated radiative transfer calculations.

The method performs monochromatic pencil beam calculations for all grid positions on the cloudbox boundary, and all directions given by scattering angle grids (*scat_za/aa_grid*). Found radiances are stored in *scat_i_p/lat/lon* which can be used as boundary conditions when scattering inside the cloud box is solved by the DOIT method.

Author:
Sreerekha T.R.

Claudia Emde

Parameters:
[in,out] ws Workspace
[out] scat_i_p WS Output
[out] scat_i_lat WS Output
[out] scat_i_lon WS Output
[out] cloudbox_on WS Output
[in] ppath_step_agenda WS Input
[in] rte_agenda WS Input
[in] iy_space_agenda WS Input
[in] surface_prop_agenda WS Input
[in] iy_cloudbox_agenda WS Input
[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] t_field WS Input
[in] vmr_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] cloudbox_limits WS Input
[in] f_grid WS Input
[in] stokes_dim WS Input
[in] scat_za_grid WS Input
[in] scat_aa_grid WS Input

Definition at line 1401 of file m_cloudbox.cc.

References iy_calc_no_jacobian(), joker, ConstVectorView::nelem(), and Tensor7::resize().

Referenced by CloudboxGetIncoming_g().

void CloudboxGetIncoming1DAtm ( Workspace ws,
Tensor7 scat_i_p,
Tensor7 scat_i_lat,
Tensor7 scat_i_lon,
Index cloudbox_on,
const Agenda ppath_step_agenda,
const Agenda rte_agenda,
const Agenda iy_space_agenda,
const Agenda surface_prop_agenda,
const Agenda iy_cloudbox_agenda,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const Matrix r_geoid,
const Matrix z_surface,
const ArrayOfIndex cloudbox_limits,
const Vector f_grid,
const Index stokes_dim,
const Vector scat_za_grid,
const Vector scat_aa_grid 
)

WORKSPACE METHOD: CloudboxGetIncoming1DAtm.

As *CloudboxGetIncoming* but assumes clear sky part to be 1D. The incoming field is calculated only for one position and azimuth angle for each cloud box boundary, and obtained values are used for all other postions and azimuth angles. This works if a 3D cloud box is put into an 1D background atmosphere.

This method can only be used for 3D cases.

Author:
Sreerekha T.R.

Claudia Emde

Parameters:
[in,out] ws Workspace
[out] scat_i_p WS Output
[out] scat_i_lat WS Output
[out] scat_i_lon WS Output
[out] cloudbox_on WS Output
[in] ppath_step_agenda WS Input
[in] rte_agenda WS Input
[in] iy_space_agenda WS Input
[in] surface_prop_agenda WS Input
[in] iy_cloudbox_agenda WS Input
[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] t_field WS Input
[in] vmr_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] cloudbox_limits WS Input
[in] f_grid WS Input
[in] stokes_dim WS Input
[in] scat_za_grid WS Input
[in] scat_aa_grid WS Input

Definition at line 1678 of file m_cloudbox.cc.

References iy_calc_no_jacobian(), joker, ConstVectorView::nelem(), and Tensor7::resize().

Referenced by CloudboxGetIncoming1DAtm_g().

void cloudboxOff ( Index cloudbox_on,
ArrayOfIndex cloudbox_limits,
Agenda iy_cloudbox_agenda 
)

WORKSPACE METHOD: cloudboxOff.

Deactivates the cloud box.

The function sets *cloudbox_on* to 0, *cloudbox_limits* to be an empty vector and *iy_cloudbox_agenda* to an empty agenda.

Author:
Patrick Eriksson
Parameters:
[out] cloudbox_on WS Output
[out] cloudbox_limits WS Output
[out] iy_cloudbox_agenda WS Output

Definition at line 73 of file m_cloudbox.cc.

References Agenda::set_name().

Referenced by cloudboxOff_g().

void cloudboxSetEmpty ( Tensor4 pnd_field,
ArrayOfSingleScatteringData scat_data_raw,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid 
)

WORKSPACE METHOD: cloudboxSetEmpty.

Sets the cloudbox empty for clearsky DOIT calculations.

Scattering calculations using the DOIT method include interpolation errors. If one is interested in the cloud effect, should compare the DOIT result with a clearsky calculation using an empty cloudbox. That means that the iterative method is performed for a cloudbox including no particles. This method sets the particle number density field to zero and creates a dummy *scat_data_raw* structure. For a cleasky calculation, the methods *ParticleTypeAdd(All)* and *pnd_fieldCalc* can be replaced by this method.

Author:
Claudia Emde
Parameters:
[out] pnd_field WS Output
[out] scat_data_raw WS Output
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input

Definition at line 87 of file m_cloudbox.cc.

References ConstVectorView::nelem(), nlinspace(), PTYPE_MACROS_ISO, and Tensor4::resize().

Referenced by cloudboxSetEmpty_g().

void cloudboxSetManually ( Index cloudbox_on,
ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Numeric p1,
const Numeric p2,
const Numeric lat1,
const Numeric lat2,
const Numeric lon1,
const Numeric lon2 
)

WORKSPACE METHOD: cloudboxSetManually.

Sets the cloud box to encompass the given positions.

The function sets *cloudbox_on* to 1 and sets *cloudbox_limits* following the given pressure, latitude and longitude positions. The index limits in *cloudbox_limits* are selected to give the smallest possible cloud box that encompass the given points.

The points must be given in the same order as used in cloudbox_limits*. That means that the first keyword argument shall be a higher pressure than argument two, while the latitude and longitude points are given in increasing order. Positions given for dimensions not used by the selected atmospheric dimensionality are ignored.

The given pressure points can be outside the range of *p_grid*. The pressure limit is then set to the end point of *p_grid*. The given latitude and longitude points must be inside the range of the corresponding grid. In addition, the latitude and longitude points cannot be inside the outermost grid ranges as the latitude and longitude limits in *cloudbox_limits* are not allowed to be grid end points.

Keywords: <br> p1 : Upper pressure point. <br> p2 : Lower pressure point. <br> lat1 : Lower latitude point. <br> lat2 : Upper latitude point. <br> lon1 : Lower longitude point. <br> lon2 : Upper longitude point.

Author:
Patrick Eriksson
Parameters:
[out] cloudbox_on WS Output
[out] cloudbox_limits WS Output
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] p1 Generic Input
[in] p2 Generic Input
[in] lat1 Generic Input
[in] lat2 Generic Input
[in] lon1 Generic Input
[in] lon2 Generic Input

Definition at line 130 of file m_cloudbox.cc.

References chk_atm_grids(), chk_if_in_range(), and ConstVectorView::nelem().

Referenced by cloudboxSetManually_g(), and ybatchMetProfiles().

void cloudboxSetManuallyAltitude ( Index cloudbox_on,
ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Tensor3 z_field,
const Vector lat_grid,
const Vector lon_grid,
const Numeric z1,
const Numeric z2,
const Numeric lat1,
const Numeric lat2,
const Numeric lon1,
const Numeric lon2 
)

WORKSPACE METHOD: cloudboxSetManuallyAltitude.

Sets the cloud box to encompass the given positions.

The function sets *cloudbox_on* to 1 and sets *cloudbox_limits* following the given altitude, latitude and longitude positions. The index limits in *cloudbox_limits* are selected to give the smallest possible cloud box that encompass the given points.

The points must be given in the same order as used in cloudbox_limits*. That means that altitude, latitude and longitude points are given in increasing order. Positions given for dimensions not used by the selected atmospheric dimensionality are ignored.

The given altitude points can be outside the range of *z_field*. The altitude limit is then set to the end point of *p_grid*. The given latitude and longitude points must be inside the range of the corresponding grid. In addition, the latitude and longitude points cannot be inside the outermost grid ranges as the latitude and longitude limits in *cloudbox_limits* are not allowed to be grid end points.

Keywords: <br> z1 : Lower altitude point. <br> z2 : Upper altitude point. <br> lat1 : Lower latitude point. <br> lat2 : Upper latitude point. <br> lon1 : Lower longitude point. <br> lon2 : Upper longitude point.

Author:
Claudia Emde
Parameters:
[out] cloudbox_on WS Output
[out] cloudbox_limits WS Output
[in] atmosphere_dim WS Input
[in] z_field WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] z1 Generic Input
[in] z2 Generic Input
[in] lat1 Generic Input
[in] lat2 Generic Input
[in] lon1 Generic Input
[in] lon2 Generic Input

Definition at line 236 of file m_cloudbox.cc.

References chk_if_in_range(), ConstVectorView::nelem(), and ConstTensor3View::npages().

Referenced by cloudboxSetManuallyAltitude_g().

void doit_i_fieldSetClearsky ( Tensor6 doit_i_field,
const Tensor7 scat_i_p,
const Tensor7 scat_i_lat,
const Tensor7 scat_i_lon,
const Vector f_grid,
const Index f_index,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Index all_frequencies 
)

WORKSPACE METHOD: doit_i_fieldSetClearsky.

Interpolate clearsky field on all gridpoints in cloudbox.

This method uses a linear 1D/3D interpolation scheme to obtain the radiation field on all grid points inside the cloud box from the clear sky field on the cloud box boundary. This radiation field is taken as the first guess radiation field in the DOIT module.

The inputs to this method are *scat_i_p*, *scat_i_lat* scat_i_lon*. The method picks the monochromatic radiation field out of these variables. The output of the method is the first guess field stored in the workspace variable *doit_i_field*.

Set keyword *all_frequencies* to 1 if for each frequency the clearsky field should be used as initial field. Set it to 0 if only for the first frequency in *f_grid* the clearsky field should be used and for the next frequencies *doit_i_field* of the previous frequency should be used. Default is 1.

Author:
Sreerekha T.R. and Claudia Emde
Parameters:
[out] doit_i_field WS Output
[in] scat_i_p WS Input
[in] scat_i_lat WS Input
[in] scat_i_lon WS Input
[in] f_grid WS Input
[in] f_index WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] cloudbox_limits WS Input
[in] atmosphere_dim WS Input
[in] all_frequencies Generic Input (Default: "1")

Definition at line 340 of file m_cloudbox.cc.

References gridpos(), interp(), interpweights(), joker, ConstTensor7View::nbooks(), ConstTensor7View::ncols(), ConstVectorView::nelem(), ConstTensor7View::nlibraries(), ConstTensor7View::npages(), ConstTensor7View::nrows(), ConstTensor7View::nshelves(), ConstTensor6View::nvitrines(), ConstTensor7View::nvitrines(), out2, p2gridpos(), and Tensor6::resize().

Referenced by doit_i_fieldSetClearsky_g().

void doit_i_fieldSetConst ( Tensor6 doit_i_field,
const Tensor7 scat_i_p,
const Tensor7 scat_i_lat,
const Tensor7 scat_i_lon,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Index stokes_dim,
const Vector value 
)

WORKSPACE METHOD: doit_i_fieldSetConst.

This method sets the initial field inside the cloudbox to a constant value. The method works only for monochromatic calculations (number of elements in f_grid=1).

The user can specify a value for each Stokes dimension in the control file by the variable doit_i_field_value, which is a vector containing 4 elements, the value of the initial field for each Stokes dimension.

Output of the method is the first guess field stored in the workspace variable *doit_i_field*.

Author:
Claudia Emde
Parameters:
[out] doit_i_field WS Output
[in] scat_i_p WS Input
[in] scat_i_lat WS Input
[in] scat_i_lon WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] cloudbox_limits WS Input
[in] atmosphere_dim WS Input
[in] stokes_dim WS Input
[in] value Generic Input

Definition at line 696 of file m_cloudbox.cc.

References chk_atm_grids(), chk_if_in_range(), is_size(), ConstTensor7View::npages(), ConstTensor7View::nrows(), out2, out3, and Tensor6::resize().

Referenced by doit_i_fieldSetConst_g().

void DoitCloudboxFieldPut ( Tensor7 scat_i_p,
Tensor7 scat_i_lat,
Tensor7 scat_i_lon,
Tensor4 doit_i_field1D_spectrum,
const Tensor6 doit_i_field,
const Vector f_grid,
const Index f_index,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Index stokes_dim,
const Index atmosphere_dim,
const ArrayOfIndex cloudbox_limits,
const Matrix sensor_pos,
const Tensor3 z_field 
)

WORKSPACE METHOD: DoitCloudboxFieldPut.

Method for the communication between cloudbox and clearsky.

This method puts the scattered radiation field into the interface variables between the cloudbox and the clearsky, which are scat_i_p*, *scat_i_lat* and *scat_i_lon*.

The best way to calculate spectra including the influence of scattering is to set up the *scat_mono_agenda* where this method can be included.

Author:
Claudia Emde
Parameters:
[out] scat_i_p WS Output
[out] scat_i_lat WS Output
[out] scat_i_lon WS Output
[out] doit_i_field1D_spectrum WS Output
[in] doit_i_field WS Input
[in] f_grid WS Input
[in] f_index WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] scat_za_grid WS Input
[in] scat_aa_grid WS Input
[in] stokes_dim WS Input
[in] atmosphere_dim WS Input
[in] cloudbox_limits WS Input
[in] sensor_pos WS Input
[in] z_field WS Input

Definition at line 1202 of file m_cloudbox.cc.

References chk_atm_grids(), chk_if_in_range(), is_size(), joker, ConstMatrixView::ncols(), ConstVectorView::nelem(), out2, Tensor7::resize(), and Tensor4::resize().

Referenced by DoitCloudboxFieldPut_g().

void iyInterpCloudboxField ( Matrix iy,
const Tensor7 scat_i_p,
const Tensor7 scat_i_lat,
const Tensor7 scat_i_lon,
const Tensor4 doit_i_field1D_spectrum,
const GridPos rte_gp_p,
const GridPos rte_gp_lat,
const GridPos rte_gp_lon,
const Vector rte_los,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Index stokes_dim,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Vector f_grid 
)

WORKSPACE METHOD: iyInterpCloudboxField.

Interpolates the intensity field of the cloud box.

This is the standard method to put in *iy_cloudbox_agenda* if the the scattering inside the cloud box is handled by the DOIT method.

The intensity field is interpolated to the position and direction given (specified by *rte_XXX*). A linear interpolation is used for all dimensions.

The intensity field on the cloux box boundaries is provided by scat_i_p/lat/lon* and these variables are interpolated if the. given position is at any boundary.

Interpolation of the internal field is not yet possible.

Author:
Claudia Emde
Parameters:
[out] iy WS Output
[in] scat_i_p WS Input
[in] scat_i_lat WS Input
[in] scat_i_lon WS Input
[in] doit_i_field1D_spectrum WS Input
[in] rte_gp_p WS Input
[in] rte_gp_lat WS Input
[in] rte_gp_lon WS Input
[in] rte_los WS Input
[in] cloudbox_on WS Input
[in] cloudbox_limits WS Input
[in] atmosphere_dim WS Input
[in] stokes_dim WS Input
[in] scat_za_grid WS Input
[in] scat_aa_grid WS Input
[in] f_grid WS Input

Definition at line 1832 of file m_cloudbox.cc.

References iy_interp_cloudbox_field().

Referenced by iyInterpCloudboxField_g().

void iyInterpPolyCloudboxField ( Matrix iy,
const Tensor7 scat_i_p,
const Tensor7 scat_i_lat,
const Tensor7 scat_i_lon,
const Tensor4 doit_i_field1D_spectrum,
const GridPos rte_gp_p,
const GridPos rte_gp_lat,
const GridPos rte_gp_lon,
const Vector rte_los,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index atmosphere_dim,
const Index stokes_dim,
const Vector scat_za_grid,
const Vector scat_aa_grid,
const Vector f_grid 
)

WORKSPACE METHOD: iyInterpPolyCloudboxField.

As *iyInterpCloudboxField* but performs cubic interpolation.

Works so far only for 1D cases, and accordingly a cubic interpolation along *scat_za_grid* is performed.

Author:
Claudia Emde
Parameters:
[out] iy WS Output
[in] scat_i_p WS Input
[in] scat_i_lat WS Input
[in] scat_i_lon WS Input
[in] doit_i_field1D_spectrum WS Input
[in] rte_gp_p WS Input
[in] rte_gp_lat WS Input
[in] rte_gp_lon WS Input
[in] rte_los WS Input
[in] cloudbox_on WS Input
[in] cloudbox_limits WS Input
[in] atmosphere_dim WS Input
[in] stokes_dim WS Input
[in] scat_za_grid WS Input
[in] scat_aa_grid WS Input
[in] f_grid WS Input

Definition at line 1859 of file m_cloudbox.cc.

References iy_interp_cloudbox_field().

Referenced by iyInterpPolyCloudboxField_g().

void ParticleTypeAdd ( ArrayOfSingleScatteringData scat_data_raw,
ArrayOfGField3 pnd_field_raw,
const Index atmosphere_dim,
const Vector f_grid,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const ArrayOfIndex cloudbox_limits,
const String filename_scat_data,
const String filename_pnd_field 
)

WORKSPACE METHOD: ParticleTypeAdd.

This method reads single scattering data and the corresonding particle number density fields.

The methods reads the specified files and appends the variables *scat_data_raw* and *pnd_field_raw*.

Keywords: <br> filename_scat_data : Filename of single scattering data. <br> filename_pnd_field : Filename of the corresponding pnd_field <br> (format here is GField3).

Author:
Claudia Emde
Parameters:
[out] scat_data_raw WS Output
[out] pnd_field_raw WS Output
[in] atmosphere_dim WS Input
[in] f_grid WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] cloudbox_limits WS Input
[in] filename_scat_data Generic Input
[in] filename_pnd_field Generic Input

Definition at line 983 of file m_cloudbox.cc.

References chk_atm_grids(), chk_if_in_range(), chk_if_increasing(), chk_pnd_data(), chk_single_scattering_data(), my_basic_string< charT >::nelem(), ConstVectorView::nelem(), Array< base >::nelem(), out1, out2, and xml_read_from_file().

Referenced by ParticleTypeAdd_g().

void ParticleTypeAddAll ( ArrayOfSingleScatteringData scat_data_raw,
ArrayOfGField3 pnd_field_raw,
const Index atmosphere_dim,
const Vector f_grid,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const ArrayOfIndex cloudbox_limits,
const String filename_scat_data,
const String filename_pnd_field 
)

WORKSPACE METHOD: ParticleTypeAddAll.

Read single scattering data and particle number densities.

The WSV *pnd_field_raw* containing particle number densities for all hydrometeor species can be generated outside ARTS, for example by using PyARTS. This method needs as input a file containing filenames of single scattering data and a file containing the corresponding pnd_field_raw*.

Very important note: The order of the filenames for the scattering data files has to correspond to the order of the particle types in the file including the variable *pnd_field_raw*!

Keywords: <br> filename_scat_data : File containing an <br> ArrayOfString of filenames of single scattering data files <br> corresponding the the particle number densities in <br> *pnd_field_raw*. <br> filename_pnd_field : File including the WSV *pnd_field_raw*.

Author:
Claudia Emde
Parameters:
[out] scat_data_raw WS Output
[out] pnd_field_raw WS Output
[in] atmosphere_dim WS Input
[in] f_grid WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] cloudbox_limits WS Input
[in] filename_scat_data Generic Input
[in] filename_pnd_field Generic Input

Definition at line 923 of file m_cloudbox.cc.

References chk_atm_grids(), chk_if_in_range(), chk_if_increasing(), chk_pnd_raw_data(), chk_single_scattering_data(), ConstVectorView::nelem(), Array< base >::nelem(), out2, and xml_read_from_file().

Referenced by ParticleTypeAddAll_g().

void ParticleTypeInit ( ArrayOfSingleScatteringData scat_data_raw,
ArrayOfGField3 pnd_field_raw 
)

WORKSPACE METHOD: ParticleTypeInit.

This method initializes variables containing data about the optical properties of particles (*scat_data_raw*) and about the particle number distribution (*pnd_field_raw*)

ParticleTypeInit* has to be executed before executing ParticleTypeAdd(All)*.

Author:
Claudia Emde
Parameters:
[out] scat_data_raw WS Output
[out] pnd_field_raw WS Output

Definition at line 912 of file m_cloudbox.cc.

Referenced by ParticleTypeInit_g().

void pnd_fieldCalc ( Tensor4 pnd_field,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const ArrayOfGField3 pnd_field_raw,
const Index atmosphere_dim,
const ArrayOfIndex cloudbox_limits 
)

WORKSPACE METHOD: pnd_fieldCalc.

Interpolate the particle number density fields.

This methods interpolates the particle number density field from the raw data *pnd_field_raw* to pnd_field* which is definded on sub-grids of *p_grid*, *lat_grid*, *lon_grid*, exactly on the part of the atmosphere where the cloudbox is defined.

The method takes as input the *pnd_field_raw* which contains the particle number density for each particle type.

Author:
Sreerekha T.R.

Claudia Emde

Parameters:
[out] pnd_field WS Output
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] pnd_field_raw WS Input
[in] atmosphere_dim WS Input
[in] cloudbox_limits WS Input

Definition at line 1048 of file m_cloudbox.cc.

References chk_atm_grids(), GFIELD3_LAT_GRID, GFIELD3_LON_GRID, GFIELD3_P_GRID, gridpos(), interp(), interpweights(), joker, Array< base >::nelem(), p2gridpos(), and Tensor4::resize().

Referenced by pnd_fieldCalc_g().


Variable Documentation


Generated on Mon Mar 23 14:06:39 2009 for ARTS by  doxygen 1.5.6