ARTS 2.5.9 (git: 825fa5f2)
m_surface.cc File Reference

Workspace functions associated wih the surface and its properties. More...

#include <cmath>
#include "array.h"
#include "arts.h"
#include "arts_constants.h"
#include "auto_md.h"
#include "check_input.h"
#include "matpack_complex.h"
#include "fastem.h"
#include "geodetic.h"
#include "interpolation.h"
#include "interpolation_lagrange.h"
#include "math_funcs.h"
#include "messages.h"
#include "physics_funcs.h"
#include "ppath.h"
#include "rte.h"
#include "special_interp.h"
#include "surface.h"
#include "tessem.h"
#include "arts_conversions.h"
#include "gas_scattering.h"

Go to the source code of this file.

Functions

void FastemStandAlone (Matrix &emissivity, Matrix &reflectivity, const Vector &f_grid, const Numeric &surface_skin_t, const Numeric &za, const Numeric &salinity, const Numeric &wind_speed, const Numeric &rel_aa, const Vector &transmittance, const Index &fastem_version, const Verbosity &)
 WORKSPACE METHOD: FastemStandAlone. More...
 
void InterpGriddedField2ToPosition (Numeric &outvalue, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lat_true, const Vector &lon_true, const Vector &rtp_pos, const GriddedField2 &gfield2, const Verbosity &)
 WORKSPACE METHOD: InterpGriddedField2ToPosition. More...
 
void InterpSurfaceFieldToPosition (Numeric &outvalue, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &rtp_pos, const Matrix &z_surface, const Matrix &field, const Verbosity &verbosity)
 WORKSPACE METHOD: InterpSurfaceFieldToPosition. More...
 
void iySurfaceCallAgendaX (Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, const String &iy_unit, const Tensor3 &iy_transmittance, const Index &iy_id, const Index &cloudbox_on, const Index &jacobian_do, const Vector &f_grid, const Agenda &iy_main_agenda, const Vector &rtp_pos, const Vector &rtp_los, const Vector &rte_pos2, const ArrayOfAgenda &iy_surface_agenda_array, const ArrayOfIndex &surface_types, const Vector &surface_types_aux, const Vector &surface_types_weights, const Verbosity &)
 WORKSPACE METHOD: iySurfaceCallAgendaX. More...
 
void iySurfaceFastem (Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, const Tensor3 &iy_transmittance, const Index &iy_id, const Index &jacobian_do, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Vector &rte_pos2, const String &iy_unit, const Agenda &iy_main_agenda, const Numeric &surface_skin_t, const Numeric &salinity, const Numeric &wind_speed, const Numeric &wind_direction, const Index &fastem_version, const Verbosity &verbosity)
 WORKSPACE METHOD: iySurfaceFastem. More...
 
void iySurfaceFlatReflectivity (Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, ArrayOfTensor4 &dsurface_rmatrix_dx, ArrayOfMatrix &dsurface_emission_dx, const Tensor3 &iy_transmittance, const Index &iy_id, const Index &jacobian_do, const Index &stars_do, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Vector &lat_grid, const Vector &lon_grid, const Matrix &z_surface, const Vector &refellipsoid, const Vector &rtp_pos, const Vector &rtp_los, const Vector &rte_pos2, const String &iy_unit, const Tensor3 &surface_reflectivity, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names, const ArrayOfString &dsurface_names, const ArrayOfRetrievalQuantity &jacobian_quantities, const Agenda &iy_main_agenda, const Verbosity &verbosity)
 WORKSPACE METHOD: iySurfaceFlatReflectivity. More...
 
void iySurfaceFlatReflectivityDirect (Workspace &ws, Matrix &iy, const Vector &rtp_pos, const Vector &rtp_los, const Index &stokes_dim, const Vector &f_grid, 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 EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const Matrix &z_surface, const Tensor3 &surface_reflectivity, const Vector &refellipsoid, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx, const ArrayOfString &scat_species, const ArrayOfArrayOfSingleScatteringData &scat_data, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Index &ppath_inside_cloudbox_do, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &stars_do, const Index &gas_scattering_do, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfStar &stars, const Numeric &rte_alonglos_v, const String &iy_unit, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, const Agenda &gas_scattering_agenda, const Agenda &ppath_step_agenda, const Verbosity &verbosity)
 WORKSPACE METHOD: iySurfaceFlatReflectivityDirect. More...
 
void iySurfaceFlatRefractiveIndex (Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, ArrayOfTensor4 &dsurface_rmatrix_dx, ArrayOfMatrix &dsurface_emission_dx, const Tensor3 &iy_transmittance, const Index &iy_id, const Index &jacobian_do, const Index &stars_do, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Vector &lat_grid, const Vector &lon_grid, const Matrix &z_surface, const Vector &refellipsoid, const Vector &rtp_pos, const Vector &rtp_los, const Vector &rte_pos2, const String &iy_unit, const GriddedField3 &surface_complex_refr_index, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names, const ArrayOfString &dsurface_names, const ArrayOfRetrievalQuantity &jacobian_quantities, const Agenda &iy_main_agenda, const Verbosity &verbosity)
 WORKSPACE METHOD: iySurfaceFlatRefractiveIndex. More...
 
void iySurfaceFlatRefractiveIndexDirect (Workspace &ws, Matrix &iy, const Vector &rtp_pos, const Vector &rtp_los, const Index &stokes_dim, const Vector &f_grid, 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 EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const Matrix &z_surface, const GriddedField3 &surface_complex_refr_index, const Vector &refellipsoid, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx, const ArrayOfString &scat_species, const ArrayOfArrayOfSingleScatteringData &scat_data, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Index &ppath_inside_cloudbox_do, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &stars_do, const Index &gas_scattering_do, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfStar &stars, const Numeric &rte_alonglos_v, const String &iy_unit, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, const Agenda &gas_scattering_agenda, const Agenda &ppath_step_agenda, const Verbosity &verbosity)
 WORKSPACE METHOD: iySurfaceFlatRefractiveIndexDirect. More...
 
void iySurfaceInit (Matrix &iy, const Vector &f_grid, const Index &stokes_dim, const Verbosity &)
 WORKSPACE METHOD: iySurfaceInit. More...
 
void iySurfaceLambertian (Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, const Tensor3 &iy_transmittance, const Index &iy_id, const Index &jacobian_do, const Index &stars_do, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Vector &lat_grid, const Vector &lon_grid, const Matrix &z_surface, const Vector &refellipsoid, const Vector &rtp_pos, const Vector &rtp_los, const Vector &rte_pos2, const String &iy_unit, const Vector &surface_scalar_reflectivity, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names, const ArrayOfString &dsurface_names, const ArrayOfRetrievalQuantity &jacobian_quantities, const Agenda &iy_main_agenda, const Index &N_za, const Index &N_aa, const Verbosity &verbosity)
 WORKSPACE METHOD: iySurfaceLambertian. More...
 
void iySurfaceLambertianDirect (Workspace &ws, Matrix &iy, const Vector &rtp_pos, const Index &stokes_dim, const Vector &f_grid, 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 EnergyLevelMap &nlte_field, const Tensor4 &vmr_field, const ArrayOfArrayOfSpeciesTag &abs_species, const Tensor3 &wind_u_field, const Tensor3 &wind_v_field, const Tensor3 &wind_w_field, const Tensor3 &mag_u_field, const Tensor3 &mag_v_field, const Tensor3 &mag_w_field, const Matrix &z_surface, const Vector &surface_scalar_reflectivity, const Vector &refellipsoid, const Tensor4 &pnd_field, const ArrayOfTensor4 &dpnd_field_dx, const ArrayOfString &scat_species, const ArrayOfArrayOfSingleScatteringData &scat_data, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &stars_do, const Index &gas_scattering_do, const Index &jacobian_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfStar &stars, const Numeric &rte_alonglos_v, const String &iy_unit, const Agenda &propmat_clearsky_agenda, const Agenda &water_p_eq_agenda, const Agenda &gas_scattering_agenda, const Agenda &ppath_step_agenda, const Verbosity &verbosity)
 WORKSPACE METHOD: iySurfaceLambertianDirect. More...
 
void iySurfaceRtpropAgenda (Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, Numeric &surface_skin_t, Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Tensor3 &iy_transmittance, const Index &iy_id, const Index &jacobian_do, const Index &stars_do, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Vector &rte_pos2, const String &iy_unit, const Agenda &iy_main_agenda, const Agenda &surface_rtprop_agenda, const Verbosity &)
 WORKSPACE METHOD: iySurfaceRtpropAgenda. More...
 
void iySurfaceRtpropCalc (Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, const Matrix &surface_los, const Tensor4 &surface_rmatrix, const Matrix &surface_emission, const ArrayOfString &dsurface_names, const ArrayOfTensor4 &dsurface_rmatrix_dx, const ArrayOfMatrix &dsurface_emission_dx, const Tensor3 &iy_transmittance, const Index &iy_id, const Index &jacobian_do, const Index &stars_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const Index &atmosphere_dim, const EnergyLevelMap &nlte_field, const Index &cloudbox_on, const Index &stokes_dim, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Vector &rte_pos2, const String &iy_unit, const Agenda &iy_main_agenda, const Verbosity &)
 WORKSPACE METHOD: iySurfaceRtpropCalc. More...
 
void specular_losCalcNoTopography (Vector &specular_los, Vector &surface_normal, const Vector &rtp_pos, const Vector &rtp_los, const Index &atmosphere_dim, const Verbosity &)
 WORKSPACE METHOD: specular_losCalcNoTopography. More...
 
void specular_losCalc (Vector &specular_los, Vector &surface_normal, const Vector &rtp_pos, const Vector &rtp_los, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &refellipsoid, const Matrix &z_surface, const Index &ignore_surface_slope, const Verbosity &verbosity)
 WORKSPACE METHOD: specular_losCalc. More...
 
void surfaceBlackbody (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Index &atmosphere_dim, const Vector &f_grid, const Index &stokes_dim, const Vector &rtp_pos, const Vector &rtp_los, const Numeric &surface_skin_t, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceBlackbody. More...
 
void surfaceFastem (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Index &atmosphere_dim, const Index &stokes_dim, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Numeric &surface_skin_t, const Numeric &salinity, const Numeric &wind_speed, const Numeric &wind_direction, const Vector &transmittance, const Index &fastem_version, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceFastem. More...
 
void surfaceMapToLinearPolarisation (Matrix &surface_emission, Tensor4 &surface_rmatrix, const Index &stokes_dim, const Numeric &pol_angle, const Verbosity &)
 WORKSPACE METHOD: surfaceMapToLinearPolarisation. More...
 
void surfaceTelsem (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Index &atmosphere_dim, const Index &stokes_dim, const Vector &f_grid, const Vector &lat_grid, const Vector &lat_true, const Vector &lon_true, const Vector &rtp_pos, const Vector &rtp_los, const Vector &specular_los, const Numeric &surface_skin_t, const TelsemAtlas &atlas, const Numeric &r_min, const Numeric &r_max, const Numeric &d_max, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceTelsem. More...
 
void surfaceTessem (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Index &atmosphere_dim, const Index &stokes_dim, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Numeric &surface_skin_t, const TessemNN &net_h, const TessemNN &net_v, const Numeric &salinity, const Numeric &wind_speed, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceTessem. More...
 
void surfaceFlatRefractiveIndex (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rtp_pos, const Vector &rtp_los, const Vector &specular_los, const Numeric &surface_skin_t, const GriddedField3 &surface_complex_refr_index, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceFlatRefractiveIndex. More...
 
void surfaceFlatReflectivity (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rtp_pos, const Vector &rtp_los, const Vector &specular_los, const Numeric &surface_skin_t, const Tensor3 &surface_reflectivity, const Verbosity &verbosity)
 WORKSPACE METHOD: surfaceFlatReflectivity. More...
 
void surfaceFlatRvRh (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rtp_pos, const Vector &rtp_los, const Vector &specular_los, const Numeric &surface_skin_t, const Matrix &surface_rv_rh, const Verbosity &)
 WORKSPACE METHOD: surfaceFlatRvRh. More...
 
void surfaceFlatScalarReflectivity (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rtp_pos, const Vector &rtp_los, const Vector &specular_los, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Verbosity &)
 WORKSPACE METHOD: surfaceFlatScalarReflectivity. More...
 
void surfaceLambertianSimple (Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &rtp_pos, const Vector &rtp_los, const Vector &surface_normal, const Numeric &surface_skin_t, const Vector &surface_scalar_reflectivity, const Index &lambertian_nza, const Numeric &za_pos, const Verbosity &)
 WORKSPACE METHOD: surfaceLambertianSimple. More...
 
void surfaceSemiSpecularBy3beams (Workspace &ws, Numeric &surface_skin_t, Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Index &atmosphere_dim, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Agenda &surface_rtprop_sub_agenda, const Numeric &specular_factor, const Numeric &dza, const Verbosity &)
 WORKSPACE METHOD: surfaceSemiSpecularBy3beams. More...
 
void surfaceSplitSpecularTo3beams (Matrix &surface_los, Tensor4 &surface_rmatrix, const Index &atmosphere_dim, const Vector &rtp_pos, const Vector &rtp_los, const Numeric &specular_factor, const Numeric &dza, const Verbosity &)
 WORKSPACE METHOD: surfaceSplitSpecularTo3beams. More...
 
void surface_complex_refr_indexFromGriddedField5 (GriddedField3 &surface_complex_refr_index, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lat_true, const Vector &lon_true, const Vector &rtp_pos, const GriddedField5 &complex_n_field, const Verbosity &)
 WORKSPACE METHOD: surface_complex_refr_indexFromGriddedField5. More...
 
void surface_reflectivityFromGriddedField6 (Tensor3 &surface_reflectivity, const Index &stokes_dim, const Vector &f_grid, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lat_true, const Vector &lon_true, const Vector &rtp_pos, const Vector &rtp_los, const GriddedField6 &r_field, const Verbosity &)
 WORKSPACE METHOD: surface_reflectivityFromGriddedField6. More...
 
void surface_scalar_reflectivityFromGriddedField4 (Vector &surface_scalar_reflectivity, const Index &stokes_dim, const Vector &f_grid, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lat_true, const Vector &lon_true, const Vector &rtp_pos, const Vector &rtp_los, const GriddedField4 &r_field, const Verbosity &)
 WORKSPACE METHOD: surface_scalar_reflectivityFromGriddedField4. More...
 
void surface_scalar_reflectivityFromSurface_rmatrix (Vector &surface_scalar_reflectivity, const Tensor4 &surface_rmatrix, const Verbosity &)
 WORKSPACE METHOD: surface_scalar_reflectivityFromSurface_rmatrix. More...
 
void surface_typeInterpTypeMask (ArrayOfIndex &surface_types, Vector &surface_types_aux, Vector &surface_types_weights, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lat_true, const Vector &lon_true, const Vector &rtp_pos, const GriddedField2 &surface_type_mask, const String &method, const Verbosity &)
 WORKSPACE METHOD: surface_typeInterpTypeMask. More...
 
void surface_rtpropCallAgendaX (Workspace &ws, Numeric &surface_skin_t, Matrix &surface_los, Tensor4 &surface_rmatrix, Matrix &surface_emission, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const ArrayOfAgenda &surface_rtprop_agenda_array, const ArrayOfIndex &surface_types, const Vector &surface_types_aux, const Vector &surface_types_weights, const Verbosity &)
 WORKSPACE METHOD: surface_rtpropCallAgendaX. More...
 
void SurfaceBlackbody (Matrix &surface_los, Tensor4 &surface_rmatrix, ArrayOfTensor4 &dsurface_rmatrix_dx, Matrix &surface_emission, ArrayOfMatrix &dsurface_emission_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names, const ArrayOfString &dsurface_names, const Index &jacobian_do, const Verbosity &verbosity)
 WORKSPACE METHOD: SurfaceBlackbody. More...
 
void SurfaceDummy (ArrayOfTensor4 &dsurface_rmatrix_dx, ArrayOfMatrix &dsurface_emission_dx, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names, const ArrayOfString &dsurface_names, const Index &jacobian_do, const Verbosity &)
 WORKSPACE METHOD: SurfaceDummy. More...
 
void SurfaceFastem (Matrix &surface_los, Tensor4 &surface_rmatrix, ArrayOfTensor4 &dsurface_rmatrix_dx, Matrix &surface_emission, ArrayOfMatrix &dsurface_emission_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names, const ArrayOfString &dsurface_names, const Index &jacobian_do, const Vector &transmittance, const Index &fastem_version, const Verbosity &verbosity)
 WORKSPACE METHOD: SurfaceFastem. More...
 
void SurfaceFlatScalarReflectivity (Matrix &surface_los, Tensor4 &surface_rmatrix, ArrayOfTensor4 &dsurface_rmatrix_dx, Matrix &surface_emission, ArrayOfMatrix &dsurface_emission_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const Vector &specular_los, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names, const ArrayOfString &dsurface_names, const Index &jacobian_do, const Vector &f_reflectivities, const Verbosity &verbosity)
 WORKSPACE METHOD: SurfaceFlatScalarReflectivity. More...
 
void SurfaceTessem (Matrix &surface_los, Tensor4 &surface_rmatrix, ArrayOfTensor4 &dsurface_rmatrix_dx, Matrix &surface_emission, ArrayOfMatrix &dsurface_emission_dx, const Index &stokes_dim, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &f_grid, const Vector &rtp_pos, const Vector &rtp_los, const TessemNN &net_h, const TessemNN &net_v, const Tensor3 &surface_props_data, const ArrayOfString &surface_props_names, const ArrayOfString &dsurface_names, const Index &jacobian_do, const Verbosity &verbosity)
 WORKSPACE METHOD: SurfaceTessem. More...
 
void transmittanceFromIy_aux (Vector &transmittance, const ArrayOfString &iy_aux_vars, const ArrayOfMatrix &iy_aux, const Verbosity &)
 WORKSPACE METHOD: transmittanceFromIy_aux. More...
 

Variables

constexpr Numeric EARTH_RADIUS =Constant::earth_radius
 
constexpr Numeric DEG2RAD = Conversion::deg2rad(1)
 

Detailed Description

Workspace functions associated wih the surface and its properties.

Author
Patrick Eriksson Patri.nosp@m.ck.E.nosp@m.rikss.nosp@m.on@c.nosp@m.halme.nosp@m.rs.s.nosp@m.e
Date
2008-09-17

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

Definition in file m_surface.cc.

Function Documentation

◆ FastemStandAlone()

void FastemStandAlone ( Matrix emissivity,
Matrix reflectivity,
const Vector f_grid,
const Numeric surface_skin_t,
const Numeric za,
const Numeric salinity,
const Numeric wind_speed,
const Numeric rel_aa,
const Vector transmittance,
const Index fastem_version,
const Verbosity verbosity 
)

WORKSPACE METHOD: FastemStandAlone.

Stand-alone usage of FASTEM.

FASTEM is a parameterisation of the emissivity of water surfaces including the impact of waves, salinity and non-specular effects. This is more or less direct interface to FASTEM, but slightly adopted to fit with ARTS. The unit of frequency and salinity differ, and this version is "vectorised" in frequency.

The output is four emissivity and reflectivity values for each frequency. These values are defined in Eq. 13 of "An Improved Fast Microwave Water Emissivity Model" by Liu, Weng and English, I3TRGS, 2011. Note that emissivity and reflectivity do not add up to 1, which is the way FASTEM compensates for non-specular effects.

There is an error if any frequency is above 250 GHz, or if the skin temperature is below 260 K. If the skin temperature is below 270 K, it is adjusted to 270 K.

FASTEM returns unphysical values for propagation close to the horizon, here emissivity and reflectivity can be outside [0,1]. If either emissivity or reflectivity is below/above 0/1, it is set to 0/1, and the other value is set to 1/0. That is, e+r=1 is enforced. These problems start about 15 degrees from the horizon.

Author
Oliver Lemke, Patrick Eriksson
Parameters
[out]emissivityGeneric output
[out]reflectivityGeneric output
[in]f_gridWS Input
[in]surface_skin_tWS Input
[in]zaGeneric Input
[in]salinityGeneric Input (Default: "0.035")
[in]wind_speedGeneric Input
[in]rel_aaGeneric Input
[in]transmittanceGeneric Input
[in]fastem_versionGeneric Input (Default: "6")

Definition at line 72 of file m_surface.cc.

References chk_if_in_range(), chk_if_in_range_exclude(), chk_if_in_range_exclude_high(), chk_vector_length(), fastem(), joker, max(), ConstVectorView::nelem(), and Matrix::resize().

Referenced by FastemStandAlone_g(), and surfaceFastem().

◆ InterpGriddedField2ToPosition()

void InterpGriddedField2ToPosition ( Numeric out,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lat_true,
const Vector lon_true,
const Vector rtp_pos,
const GriddedField2 gfield2,
const Verbosity verbosity 
)

WORKSPACE METHOD: InterpGriddedField2ToPosition.

Latitude and longitude interpolation of a GriddedField2.

The default way to specify the position is by rtp_pos.

The interpolation is done for the latitude and longitude in rtp_pos*. The altitude in rtp_pos is completely ignored. Linear interpolation is applied.

The input field (gfield2) is expected to have latitude and longitude as first and second dimension.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]rtp_posWS Input
[in]gfield2Generic Input

Definition at line 147 of file m_surface.cc.

References GriddedField2::checksize_strict(), chk_griddedfield_gridname(), chk_if_in_range(), chk_latlon_true(), chk_rte_pos(), GriddedField2::data, GriddedField::get_numeric_grid(), gridpos(), interp(), interpweights(), lon_shiftgrid(), ConstMatrixView::ncols(), ConstMatrixView::nrows(), and pos2true_latlon().

Referenced by InterpGriddedField2ToPosition_g().

◆ InterpSurfaceFieldToPosition()

void InterpSurfaceFieldToPosition ( Numeric out,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Vector rtp_pos,
const Matrix z_surface,
const Matrix field,
const Verbosity verbosity 
)

WORKSPACE METHOD: InterpSurfaceFieldToPosition.

Point interpolation of surface fields.

The default way to specify the position is by rtp_pos.

Linear interpolation is applied.

The interpolation is done for the latitude and longitude in rtp_pos*, while the altitude in rtp_pos is not part of the calculations. However, it is checked that the altitude of rtp_pos is inside the range covered by z_surface with a 1 m margin, to give a warning when the specified position is not consistent with the surface altitudes.

Author
Patrick Eriksson
Parameters
[out]outGeneric output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]rtp_posWS Input
[in]z_surfaceWS Input
[in]fieldGeneric Input

Definition at line 206 of file m_surface.cc.

References chk_atm_grids(), chk_atm_surface(), chk_interpolation_grids(), chk_rte_pos(), CREATE_OUT3, gridpos(), interp_atmsurface_by_gp(), max(), and min().

Referenced by InterpSurfaceFieldToPosition_g().

◆ iySurfaceCallAgendaX()

void iySurfaceCallAgendaX ( Workspace ws,
Matrix iy,
ArrayOfTensor3 diy_dx,
const String iy_unit,
const Tensor3 iy_transmittance,
const Index iy_id,
const Index cloudbox_on,
const Index jacobian_do,
const Vector f_grid,
const Agenda iy_main_agenda,
const Vector rtp_pos,
const Vector rtp_los,
const Vector rte_pos2,
const ArrayOfAgenda iy_surface_agenda_array,
const ArrayOfIndex surface_types,
const Vector surface_types_aux,
const Vector surface_types_weights,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceCallAgendaX.

Switch between the elements of iy_surface_agenda_array.

This method calls the agendas matching surface_types and sums up the iy-data of each type.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]iyWS Output
[in,out]diy_dxWS Input/Output
[in]iy_unitWS Input
[in]iy_transmittanceWS Input
[in]iy_idWS Input
[in]cloudbox_onWS Input
[in]jacobian_doWS Input
[in]f_gridWS Input
[in]iy_main_agendaWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]rte_pos2WS Input
[in]iy_surface_agenda_arrayWS Input
[in]surface_typesWS Input
[in]surface_types_auxWS Input
[in]surface_types_weightsWS Input

Definition at line 253 of file m_surface.cc.

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

Referenced by iySurfaceCallAgendaX_g().

◆ iySurfaceFastem()

void iySurfaceFastem ( Workspace ws,
Matrix iy,
ArrayOfTensor3 diy_dx,
const Tensor3 iy_transmittance,
const Index iy_id,
const Index jacobian_do,
const Index atmosphere_dim,
const EnergyLevelMap nlte_field,
const Index cloudbox_on,
const Index stokes_dim,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const Vector rte_pos2,
const String iy_unit,
const Agenda iy_main_agenda,
const Numeric surface_skin_t,
const Numeric salinity,
const Numeric wind_speed,
const Numeric wind_direction,
const Index fastem_version,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceFastem.

Usage of FASTEM for emissivity and reflectivity of water surfaces.

This method allows usage of the FASTEM model inside iy_surface_agenda*. The aim is to use FASTEM in the exact same way as done in RTTOV. For example, the transmittance for down- welling radiation is considered. RTTOV os just 1D. Here 2D and 3D are handled as the 1D case, the down-welling radiation is just calculated for the directuon matching specular reflection.

The wind direction is given as the azimuth angle, counted clockwise from north (i.e. an easterly wind is at 90 deg). This matches the general definition of azimuth inside ARTS. For 1D and 2D, the wind direction must be adjusted to match the fact that the line-of-sight is locked to be at 0 deg (180 for 2D in the case of a negative zenith angle). For 3D, the true wind direction shall be used.

FASTEM is called by FastemStandAlone. See that WSM for further comments on variables and limitations.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]iyWS Output
[in,out]diy_dxWS Input/Output
[in]iy_transmittanceWS Input
[in]iy_idWS Input
[in]jacobian_doWS Input
[in]atmosphere_dimWS Input
[in]nlte_fieldWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]rte_pos2WS Input
[in]iy_unitWS Input
[in]iy_main_agendaWS Input
[in]surface_skin_tWS Input
[in]salinityGeneric Input (Default: "0.035")
[in]wind_speedGeneric Input
[in]wind_directionGeneric Input (Default: "0")
[in]fastem_versionGeneric Input (Default: "6")

Definition at line 332 of file m_surface.cc.

References iy_main_agendaExecute(), joker, mult(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), specular_losCalcNoTopography(), surface_calc(), and surfaceFastem().

Referenced by iySurfaceFastem_g().

◆ iySurfaceFlatReflectivity()

void iySurfaceFlatReflectivity ( Workspace ws,
Matrix iy,
ArrayOfTensor3 diy_dx,
ArrayOfTensor4 dsurface_rmatrix_dx,
ArrayOfMatrix dsurface_emission_dx,
const Tensor3 iy_transmittance,
const Index iy_id,
const Index jacobian_do,
const Index stars_do,
const Index atmosphere_dim,
const EnergyLevelMap nlte_field,
const Index cloudbox_on,
const Index stokes_dim,
const Vector f_grid,
const Vector lat_grid,
const Vector lon_grid,
const Matrix z_surface,
const Vector refellipsoid,
const Vector rtp_pos,
const Vector rtp_los,
const Vector rte_pos2,
const String iy_unit,
const Tensor3 surface_reflectivity,
const Tensor3 surface_props_data,
const ArrayOfString surface_props_names,
const ArrayOfString dsurface_names,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Agenda iy_main_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceFlatReflectivity.

This method calculates upwelling radiation for a specular flat surface due to the reflection of the downgoing diffuse radiation and emission from the surface using a predefined reflectivity matrix.

This method is designed to be part of iy_surface_agenda

Important this method calculates only the reflection of the diffuse downward radiation. No direct incoming radiation is considered

Jacobian is supported only for Skin temperature

Author
Manfred Brath
Parameters
[in,out]wsWorkspace
[in,out]iyWS Input/Output
[in,out]diy_dxWS Input/Output
[in,out]dsurface_rmatrix_dxWS Input/Output
[in,out]dsurface_emission_dxWS Input/Output
[in]iy_transmittanceWS Input
[in]iy_idWS Input
[in]jacobian_doWS Input
[in]stars_doWS Input
[in]atmosphere_dimWS Input
[in]nlte_fieldWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_surfaceWS Input
[in]refellipsoidWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]rte_pos2WS Input
[in]iy_unitWS Input
[in]surface_reflectivityWS Input
[in]surface_props_dataWS Input
[in]surface_props_namesWS Input
[in]dsurface_namesWS Input
[in]jacobian_quantitiesWS Input
[in]iy_main_agendaWS Input

Definition at line 451 of file m_surface.cc.

References ARTS_USER_ERROR_IF, chk_if_in_range(), chk_not_negative(), chk_rte_los(), chk_rte_pos(), chk_size(), dsurface_check(), find_first(), interp_atmsurface_gp2itw(), iySurfaceRtpropCalc(), ConstVectorView::nelem(), ConstTensor3View::npages(), rte_pos2gridpos(), specular_losCalc(), surface_props_check(), surface_props_interp(), and surfaceFlatReflectivity().

Referenced by iySurfaceFlatReflectivity_g().

◆ iySurfaceFlatReflectivityDirect()

void iySurfaceFlatReflectivityDirect ( Workspace ws,
Matrix iy,
const Vector rtp_pos,
const Vector rtp_los,
const Index stokes_dim,
const Vector f_grid,
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 EnergyLevelMap nlte_field,
const Tensor4 vmr_field,
const ArrayOfArrayOfSpeciesTag abs_species,
const Tensor3 wind_u_field,
const Tensor3 wind_v_field,
const Tensor3 wind_w_field,
const Tensor3 mag_u_field,
const Tensor3 mag_v_field,
const Tensor3 mag_w_field,
const Matrix z_surface,
const Tensor3 surface_reflectivity,
const Vector refellipsoid,
const Tensor4 pnd_field,
const ArrayOfTensor4 dpnd_field_dx,
const ArrayOfString scat_species,
const ArrayOfArrayOfSingleScatteringData scat_data,
const Numeric ppath_lmax,
const Numeric ppath_lraytrace,
const Index ppath_inside_cloudbox_do,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index stars_do,
const Index gas_scattering_do,
const Index jacobian_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfStar stars,
const Numeric rte_alonglos_v,
const String iy_unit,
const Agenda propmat_clearsky_agenda,
const Agenda water_p_eq_agenda,
const Agenda gas_scattering_agenda,
const Agenda ppath_step_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceFlatReflectivityDirect.

This method calculates the specular reflection at a flat surface of the direct radiation with a predefined reflectivity matrix.

This method is designed to be part of iy_surface_agenda

Important this method calculates only the scattering of the direct (star) radiation. No diffuse incoming radiation is considered

This method has no jacobian capability

Author
Manfred Brath
Parameters
[in,out]wsWorkspace
[in,out]iyWS Input/Output
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]nlte_fieldWS Input
[in]vmr_fieldWS Input
[in]abs_speciesWS Input
[in]wind_u_fieldWS Input
[in]wind_v_fieldWS Input
[in]wind_w_fieldWS Input
[in]mag_u_fieldWS Input
[in]mag_v_fieldWS Input
[in]mag_w_fieldWS Input
[in]z_surfaceWS Input
[in]surface_reflectivityWS Input
[in]refellipsoidWS Input
[in]pnd_fieldWS Input
[in]dpnd_field_dxWS Input
[in]scat_speciesWS Input
[in]scat_dataWS Input
[in]ppath_lmaxWS Input
[in]ppath_lraytraceWS Input
[in]ppath_inside_cloudbox_doWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]stars_doWS Input
[in]gas_scattering_doWS Input
[in]jacobian_doWS Input
[in]jacobian_quantitiesWS Input
[in]starsWS Input
[in]rte_alonglos_vWS Input
[in]iy_unitWS Input
[in]propmat_clearsky_agendaWS Input
[in]water_p_eq_agendaWS Input
[in]gas_scattering_agendaWS Input
[in]ppath_step_agendaWS Input

Definition at line 625 of file m_surface.cc.

References ARTS_USER_ERROR_IF, chk_size(), joker, ConstVectorView::nelem(), surface_calc(), surface_get_incoming_direct(), and surfaceFlatReflectivity().

Referenced by iySurfaceFlatReflectivityDirect_g().

◆ iySurfaceFlatRefractiveIndex()

void iySurfaceFlatRefractiveIndex ( Workspace ws,
Matrix iy,
ArrayOfTensor3 diy_dx,
ArrayOfTensor4 dsurface_rmatrix_dx,
ArrayOfMatrix dsurface_emission_dx,
const Tensor3 iy_transmittance,
const Index iy_id,
const Index jacobian_do,
const Index stars_do,
const Index atmosphere_dim,
const EnergyLevelMap nlte_field,
const Index cloudbox_on,
const Index stokes_dim,
const Vector f_grid,
const Vector lat_grid,
const Vector lon_grid,
const Matrix z_surface,
const Vector refellipsoid,
const Vector rtp_pos,
const Vector rtp_los,
const Vector rte_pos2,
const String iy_unit,
const GriddedField3 surface_complex_refr_index,
const Tensor3 surface_props_data,
const ArrayOfString surface_props_names,
const ArrayOfString dsurface_names,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Agenda iy_main_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceFlatRefractiveIndex.

This method calculates upwelling radiation for a specular flat surface due to the reflection of the downgoing diffuse radiation and emission from the surface using a predefined reflectivity matrix.

This method is designed to be part of iy_surface_agenda

Important this method calculates only the reflection of the diffuse downward radiation. No direct incoming radiation is considered

Jacobian is supported only for Skin temperature

Author
Manfred Brath
Parameters
[in,out]wsWorkspace
[in,out]iyWS Input/Output
[in,out]diy_dxWS Input/Output
[in,out]dsurface_rmatrix_dxWS Input/Output
[in,out]dsurface_emission_dxWS Input/Output
[in]iy_transmittanceWS Input
[in]iy_idWS Input
[in]jacobian_doWS Input
[in]stars_doWS Input
[in]atmosphere_dimWS Input
[in]nlte_fieldWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_surfaceWS Input
[in]refellipsoidWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]rte_pos2WS Input
[in]iy_unitWS Input
[in]surface_complex_refr_indexWS Input
[in]surface_props_dataWS Input
[in]surface_props_namesWS Input
[in]dsurface_namesWS Input
[in]jacobian_quantitiesWS Input
[in]iy_main_agendaWS Input

Definition at line 764 of file m_surface.cc.

References ARTS_USER_ERROR_IF, chk_if_in_range(), chk_not_negative(), chk_rte_los(), chk_rte_pos(), chk_size(), dsurface_check(), find_first(), interp_atmsurface_gp2itw(), iySurfaceRtpropCalc(), ConstVectorView::nelem(), ConstTensor3View::npages(), rte_pos2gridpos(), specular_losCalc(), surface_props_check(), surface_props_interp(), and surfaceFlatRefractiveIndex().

Referenced by iySurfaceFlatRefractiveIndex_g().

◆ iySurfaceFlatRefractiveIndexDirect()

void iySurfaceFlatRefractiveIndexDirect ( Workspace ws,
Matrix iy,
const Vector rtp_pos,
const Vector rtp_los,
const Index stokes_dim,
const Vector f_grid,
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 EnergyLevelMap nlte_field,
const Tensor4 vmr_field,
const ArrayOfArrayOfSpeciesTag abs_species,
const Tensor3 wind_u_field,
const Tensor3 wind_v_field,
const Tensor3 wind_w_field,
const Tensor3 mag_u_field,
const Tensor3 mag_v_field,
const Tensor3 mag_w_field,
const Matrix z_surface,
const GriddedField3 surface_complex_refr_index,
const Vector refellipsoid,
const Tensor4 pnd_field,
const ArrayOfTensor4 dpnd_field_dx,
const ArrayOfString scat_species,
const ArrayOfArrayOfSingleScatteringData scat_data,
const Numeric ppath_lmax,
const Numeric ppath_lraytrace,
const Index ppath_inside_cloudbox_do,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index stars_do,
const Index gas_scattering_do,
const Index jacobian_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfStar stars,
const Numeric rte_alonglos_v,
const String iy_unit,
const Agenda propmat_clearsky_agenda,
const Agenda water_p_eq_agenda,
const Agenda gas_scattering_agenda,
const Agenda ppath_step_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceFlatRefractiveIndexDirect.

This method calculates the specular reflection at a flat surface of the direct radiation.

This method is designed to be part of iy_surface_agenda

Important this method calculates only the scattering of the direct (star) radiation. No diffuse incoming radiation is considered

This method has no jacobian capability

Author
Manfred Brath
Parameters
[in,out]wsWorkspace
[in,out]iyWS Input/Output
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]nlte_fieldWS Input
[in]vmr_fieldWS Input
[in]abs_speciesWS Input
[in]wind_u_fieldWS Input
[in]wind_v_fieldWS Input
[in]wind_w_fieldWS Input
[in]mag_u_fieldWS Input
[in]mag_v_fieldWS Input
[in]mag_w_fieldWS Input
[in]z_surfaceWS Input
[in]surface_complex_refr_indexWS Input
[in]refellipsoidWS Input
[in]pnd_fieldWS Input
[in]dpnd_field_dxWS Input
[in]scat_speciesWS Input
[in]scat_dataWS Input
[in]ppath_lmaxWS Input
[in]ppath_lraytraceWS Input
[in]ppath_inside_cloudbox_doWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]stars_doWS Input
[in]gas_scattering_doWS Input
[in]jacobian_doWS Input
[in]jacobian_quantitiesWS Input
[in]starsWS Input
[in]rte_alonglos_vWS Input
[in]iy_unitWS Input
[in]propmat_clearsky_agendaWS Input
[in]water_p_eq_agendaWS Input
[in]gas_scattering_agendaWS Input
[in]ppath_step_agendaWS Input

Definition at line 937 of file m_surface.cc.

References ARTS_USER_ERROR_IF, chk_size(), joker, ConstVectorView::nelem(), surface_calc(), surface_get_incoming_direct(), and surfaceFlatRefractiveIndex().

Referenced by iySurfaceFlatRefractiveIndexDirect_g().

◆ iySurfaceInit()

void iySurfaceInit ( Matrix iy,
const Vector f_grid,
const Index stokes_dim,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceInit.

This method initialize iy.

This method is designed to be part of iy_surface_agenda. Its only prpose is to initialize iy properly within the iy_surface_agenda*

Author
Manfred Brath
Parameters
[out]iyWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input

Definition at line 1076 of file m_surface.cc.

References ConstVectorView::nelem(), and Matrix::resize().

Referenced by iySurfaceInit_g().

◆ iySurfaceLambertian()

void iySurfaceLambertian ( Workspace ws,
Matrix iy,
ArrayOfTensor3 diy_dx,
const Tensor3 iy_transmittance,
const Index iy_id,
const Index jacobian_do,
const Index stars_do,
const Index atmosphere_dim,
const EnergyLevelMap nlte_field,
const Index cloudbox_on,
const Index stokes_dim,
const Vector f_grid,
const Vector lat_grid,
const Vector lon_grid,
const Matrix z_surface,
const Vector refellipsoid,
const Vector rtp_pos,
const Vector rtp_los,
const Vector rte_pos2,
const String iy_unit,
const Vector surface_scalar_reflectivity,
const Tensor3 surface_props_data,
const ArrayOfString surface_props_names,
const ArrayOfString dsurface_names,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Agenda iy_main_agenda,
const Index N_za,
const Index N_aa,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceLambertian.

This method calculates upwelling radiation for a lambertian surface due to the scattering of the downgoing diffuse radiation and emission from the surface. This method works only for 1D or 3D atmospheres. For the integration over the zenith angles a gaussian quadrature with N_za <br> angles is used. For 1D atmospheres N_aa is ignored. For 3D atmospheres without clouds azimuthal dependency <br> can be neglected. N_aa = 1 is sufficient. For 3D atmospheres with cloudbox on azimuthal dependency needs to be accounted. In that case the number of azimuth angles N_aa as a rule ofthumb should be set to 4*N_za. For the 1D case N_za downwelling streams and 3D case N_za*N_aa downwelling streams are calculated.

This method is designed to be part of iy_surface_agenda

Important this method calculates only the scattering of the diffuse downward radiation. No direct incoming radiation is considered

Jacobian is supported only for Skin temperature

Author
Manfred Brath
Parameters
[in,out]wsWorkspace
[in,out]iyWS Input/Output
[in,out]diy_dxWS Input/Output
[in]iy_transmittanceWS Input
[in]iy_idWS Input
[in]jacobian_doWS Input
[in]stars_doWS Input
[in]atmosphere_dimWS Input
[in]nlte_fieldWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_surfaceWS Input
[in]refellipsoidWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]rte_pos2WS Input
[in]iy_unitWS Input
[in]surface_scalar_reflectivityWS Input
[in]surface_props_dataWS Input
[in]surface_props_namesWS Input
[in]dsurface_namesWS Input
[in]jacobian_quantitiesWS Input
[in]iy_main_agendaWS Input
[in]N_zaGeneric Input (Default: "3")
[in]N_aaGeneric Input (Default: "1")

Definition at line 1085 of file m_surface.cc.

References abs(), AngularGridsSetFluxCalc(), ARTS_USER_ERROR_IF, b, calculate_int_weights_arbitrary_grid(), chk_if_in_range(), chk_not_negative(), chk_rte_los(), chk_rte_pos(), chk_size(), diy_from_pos_to_rgrids(), dplanck_dt(), find_first(), interp_atmsurface_gp2itw(), iy_main_agendaExecute(), iy_transmittance_mult(), joker, max(), min(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), planck(), Vector::resize(), Matrix::resize(), rte_pos2gridpos(), specular_losCalc(), surface_props_check(), and surface_props_interp().

Referenced by iySurfaceLambertian_g().

◆ iySurfaceLambertianDirect()

void iySurfaceLambertianDirect ( Workspace ws,
Matrix iy,
const Vector rtp_pos,
const Index stokes_dim,
const Vector f_grid,
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 EnergyLevelMap nlte_field,
const Tensor4 vmr_field,
const ArrayOfArrayOfSpeciesTag abs_species,
const Tensor3 wind_u_field,
const Tensor3 wind_v_field,
const Tensor3 wind_w_field,
const Tensor3 mag_u_field,
const Tensor3 mag_v_field,
const Tensor3 mag_w_field,
const Matrix z_surface,
const Vector surface_scalar_reflectivity,
const Vector refellipsoid,
const Tensor4 pnd_field,
const ArrayOfTensor4 dpnd_field_dx,
const ArrayOfString scat_species,
const ArrayOfArrayOfSingleScatteringData scat_data,
const Numeric ppath_lmax,
const Numeric ppath_lraytrace,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Index stars_do,
const Index gas_scattering_do,
const Index jacobian_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const ArrayOfStar stars,
const Numeric rte_alonglos_v,
const String iy_unit,
const Agenda propmat_clearsky_agenda,
const Agenda water_p_eq_agenda,
const Agenda gas_scattering_agenda,
const Agenda ppath_step_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceLambertianDirect.

This method calculates the scattering of the direct radiation for a Lambertian surface.

This method is designed to be part of iy_surface_agenda

Important this method calculates only the scattering of the direct (star) radiation. No diffuse incoming radiation is considered

This method has no jacobian capability

Author
Manfred Brath
Parameters
[in,out]wsWorkspace
[in,out]iyWS Input/Output
[in]rtp_posWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]nlte_fieldWS Input
[in]vmr_fieldWS Input
[in]abs_speciesWS Input
[in]wind_u_fieldWS Input
[in]wind_v_fieldWS Input
[in]wind_w_fieldWS Input
[in]mag_u_fieldWS Input
[in]mag_v_fieldWS Input
[in]mag_w_fieldWS Input
[in]z_surfaceWS Input
[in]surface_scalar_reflectivityWS Input
[in]refellipsoidWS Input
[in]pnd_fieldWS Input
[in]dpnd_field_dxWS Input
[in]scat_speciesWS Input
[in]scat_dataWS Input
[in]ppath_lmaxWS Input
[in]ppath_lraytraceWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]stars_doWS Input
[in]gas_scattering_doWS Input
[in]jacobian_doWS Input
[in]jacobian_quantitiesWS Input
[in]starsWS Input
[in]rte_alonglos_vWS Input
[in]iy_unitWS Input
[in]propmat_clearsky_agendaWS Input
[in]water_p_eq_agendaWS Input
[in]gas_scattering_agendaWS Input
[in]ppath_step_agendaWS Input

Definition at line 1387 of file m_surface.cc.

References ARTS_USER_ERROR_IF, chk_if_in_range(), chk_rte_pos(), chk_size(), get_direct_radiation(), get_star_ppaths(), joker, max(), min(), mirror_los(), Array< base >::nelem(), ConstVectorView::nelem(), and specular_losCalc().

Referenced by iySurfaceLambertianDirect_g().

◆ iySurfaceRtpropAgenda()

void iySurfaceRtpropAgenda ( Workspace ws,
Matrix iy,
ArrayOfTensor3 diy_dx,
Numeric surface_skin_t,
Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Tensor3 iy_transmittance,
const Index iy_id,
const Index jacobian_do,
const Index stars_do,
const Index atmosphere_dim,
const EnergyLevelMap nlte_field,
const Index cloudbox_on,
const Index stokes_dim,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const Vector rte_pos2,
const String iy_unit,
const Agenda iy_main_agenda,
const Agenda surface_rtprop_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceRtpropAgenda.

Interface to surface_rtprop_agenda for iy_surface_agenda.

This method is designed to be part of iy_surface_agenda. It determines the radiative properties of the surface by surface_rtprop_agenda* and calculates the downwelling radiation by iy_main_agenda, and sums up the terms as described in AUG. That is, this WSM uses the output from surface_rtprop_agenda in a straightforward fashion.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]iyWS Output
[in,out]diy_dxWS Input/Output
[out]surface_skin_tWS Output
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]iy_transmittanceWS Input
[in]iy_idWS Input
[in]jacobian_doWS Input
[in]stars_doWS Input
[in]atmosphere_dimWS Input
[in]nlte_fieldWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]rte_pos2WS Input
[in]iy_unitWS Input
[in]iy_main_agendaWS Input
[in]surface_rtprop_agendaWS Input

Definition at line 1572 of file m_surface.cc.

References chk_if_in_range(), chk_rte_los(), chk_rte_pos(), iy_main_agendaExecute(), iy_transmittance_mult(), joker, Agenda::name(), ConstTensor4View::nbooks(), ConstMatrixView::ncols(), ConstTensor4View::ncols(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstTensor4View::npages(), ConstMatrixView::nrows(), ConstTensor4View::nrows(), surface_calc(), and surface_rtprop_agendaExecute().

Referenced by iySurfaceRtpropAgenda_g().

◆ iySurfaceRtpropCalc()

void iySurfaceRtpropCalc ( Workspace ws,
Matrix iy,
ArrayOfTensor3 diy_dx,
const Matrix surface_los,
const Tensor4 surface_rmatrix,
const Matrix surface_emission,
const ArrayOfString dsurface_names,
const ArrayOfTensor4 dsurface_rmatrix_dx,
const ArrayOfMatrix dsurface_emission_dx,
const Tensor3 iy_transmittance,
const Index iy_id,
const Index jacobian_do,
const Index stars_do,
const ArrayOfRetrievalQuantity jacobian_quantities,
const Index atmosphere_dim,
const EnergyLevelMap nlte_field,
const Index cloudbox_on,
const Index stokes_dim,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const Vector rte_pos2,
const String iy_unit,
const Agenda iy_main_agenda,
const Verbosity verbosity 
)

WORKSPACE METHOD: iySurfaceRtpropCalc.

Applies surface_los, surface_rmatrix and surface_emission.

This method is designed to be part of iy_surface_agenda and should be mandatory when using methods describing the surface radiative transfer properties by surface_los, surface_rmatrix and surface_emission. The task of this method is to apply these three WSVs to obtain the upwelling radiation from the surface. This upwelling radiation is the sum of surface emission and reflected downwelling radiation. The later part is calculated by calling iy_main_agenda. See further AUG.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]iyWS Output
[in,out]diy_dxWS Input/Output
[in]surface_losWS Input
[in]surface_rmatrixWS Input
[in]surface_emissionWS Input
[in]dsurface_namesWS Input
[in]dsurface_rmatrix_dxWS Input
[in]dsurface_emission_dxWS Input
[in]iy_transmittanceWS Input
[in]iy_idWS Input
[in]jacobian_doWS Input
[in]stars_doWS Input
[in]jacobian_quantitiesWS Input
[in]atmosphere_dimWS Input
[in]nlte_fieldWS Input
[in]cloudbox_onWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]rte_pos2WS Input
[in]iy_unitWS Input
[in]iy_main_agendaWS Input

Definition at line 1715 of file m_surface.cc.

References ARTS_ASSERT, chk_if_in_range(), chk_rte_los(), chk_rte_pos(), diy_from_pos_to_rgrids(), iy_main_agendaExecute(), iy_transmittance_mult(), joker, Agenda::name(), ConstTensor4View::nbooks(), ConstMatrixView::ncols(), ConstTensor4View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstTensor4View::npages(), ConstMatrixView::nrows(), ConstTensor4View::nrows(), and surface_calc().

Referenced by iySurfaceFlatReflectivity(), iySurfaceFlatRefractiveIndex(), and iySurfaceRtpropCalc_g().

◆ specular_losCalc()

void specular_losCalc ( Vector specular_los,
Vector surface_normal,
const Vector rtp_pos,
const Vector rtp_los,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Vector refellipsoid,
const Matrix z_surface,
const Index ignore_surface_slope,
const Verbosity verbosity 
)

WORKSPACE METHOD: specular_losCalc.

Calculates the specular direction of surface reflections.

A help method to set up the surface properties. This method calculates specular_los, that is required in several methods to convert zenith angles to incidence angles.

The method also returns the line-of-sight matching the surface normal.

The default is to consider the surface slope when calculating the specular direction. That is, the variation of z_surface (as well as the geoid radius) is considered and the specular direction is calculated including the specified topography. This part can be deactivated by setting ignore_surface_slope to 1. In this case, the zenith angle of the specular direction is simply 180-rtp_los[0]. ignore_surface_slope has only an effect for 2D and 3D, as 1D implies a constant radius of the surface (i.e. no topography).

Author
Patrick Eriksson
Parameters
[out]specular_losWS Output
[out]surface_normalWS Output
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]refellipsoidWS Input
[in]z_surfaceWS Input
[in]ignore_surface_slopeGeneric Input (Default: "0")

Definition at line 1926 of file m_surface.cc.

References abs(), cart2zaaa(), chk_if_in_range(), chk_interpolation_grids(), chk_rte_los(), chk_rte_pos(), cross3(), fac(), gridpos(), interp(), interpweights(), joker, max(), plevel_angletilt(), plevel_slope_2d(), plevel_slope_3d(), refell2d(), Vector::resize(), sign(), specular_losCalcNoTopography(), and zaaa2cart().

Referenced by iySurfaceFlatReflectivity(), iySurfaceFlatRefractiveIndex(), iySurfaceLambertian(), iySurfaceLambertianDirect(), specular_losCalc_g(), and surface_get_incoming_direct().

◆ specular_losCalcNoTopography()

void specular_losCalcNoTopography ( Vector specular_los,
Vector surface_normal,
const Vector rtp_pos,
const Vector rtp_los,
const Index atmosphere_dim,
const Verbosity verbosity 
)

WORKSPACE METHOD: specular_losCalcNoTopography.

Calculates the specular direction of surface reflections for horisontal surfaces.

In contrast to specular_losCalc, this method ignores the topography implied by z_surface. That is, any slope of the surface is ignored.

The typical application of this WSM should be water surfaces (lakes and oceans).

Author
Patrick Eriksson
Parameters
[out]specular_losWS Output
[out]surface_normalWS Output
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]atmosphere_dimWS Input

Definition at line 1889 of file m_surface.cc.

References chk_if_in_range(), chk_rte_los(), chk_rte_pos(), max(), Vector::resize(), and sign().

Referenced by iySurfaceFastem(), specular_losCalc(), specular_losCalcNoTopography_g(), surfaceFastem(), and surfaceTessem().

◆ surface_complex_refr_indexFromGriddedField5()

void surface_complex_refr_indexFromGriddedField5 ( GriddedField3 surface_complex_refr_index,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lat_true,
const Vector lon_true,
const Vector rtp_pos,
const GriddedField5 complex_refr_index_field,
const Verbosity verbosity 
)

WORKSPACE METHOD: surface_complex_refr_indexFromGriddedField5.

Extracts complex refractive index from a field of such data.

The method allows to obtain surface_complex_refr_index by interpolation of a geographical field of such data. The position for which refraction shall be extracted is given by rtp_pos. The refractive index field is expected to be stored as: <br> GriddedField5: <br> Vector f_grid[N_f] <br> Vector T_grid[N_T] <br> ArrayOfString Complex[2] <br> Vector "Latitude" [N_lat] <br> Vector "Longitude" [N_lon] <br> Tensor5 data[N_f][N_T][2][N_lat][N_lon]

Definition and treatment of the three first dimensions follows complex_refr_index*, e.g. the temperature grid is allowed to have length 1. The grids for latitude and longitude must have a length of >= 2 (ie. no automatic expansion).

Hence, this method performs an interpolation only in the lat and lon dimensions, to a single point. The remaining GriddedField3 is simply returned as surface_complex_refr_index.

Author
Patrick Eriksson
Parameters
[out]surface_complex_refr_indexWS Output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]rtp_posWS Input
[in]complex_refr_index_fieldGeneric Input

Definition at line 3088 of file m_surface.cc.

References GriddedField5::checksize_strict(), chk_griddedfield_gridname(), chk_if_in_range(), chk_latlon_true(), chk_rte_pos(), GriddedField3::data, GriddedField5::data, GriddedField::get_numeric_grid(), gridpos(), interp(), interpweights(), joker, lon_shiftgrid(), ConstTensor5View::nbooks(), ConstTensor5View::ncols(), ConstTensor5View::npages(), ConstTensor5View::nrows(), ConstTensor5View::nshelves(), pos2true_latlon(), GriddedField3::resize(), GriddedField::set_grid(), and GriddedField::set_grid_name().

Referenced by surface_complex_refr_indexFromGriddedField5_g().

◆ surface_reflectivityFromGriddedField6()

void surface_reflectivityFromGriddedField6 ( Tensor3 surface_reflectivity,
const Index stokes_dim,
const Vector f_grid,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lat_true,
const Vector lon_true,
const Vector rtp_pos,
const Vector rtp_los,
const GriddedField6 r_field,
const Verbosity verbosity 
)

WORKSPACE METHOD: surface_reflectivityFromGriddedField6.

Extracts surface reflectivities from a field of such data.

This method allows to specify a field of surface reflectivity for automatic interpolation to points of interest. The position and direction for which the reflectivity shall be extracted are given by rtp_pos and rtp_los. The reflectivity field is expected to be stored as: <br> GriddedField6: <br> Vector "Frequency" [N_f] <br> Vector "Stokes element" [N_s1] <br> Vector "Stokes_element" [N_s2] <br> Vector "Incidence angle" [N_ia] <br> Vector "Latitude" [N_lat] <br> Vector "Longitude" [N_lon] <br> Tensor6 data[N_f][N_s1][N_s2][N_ia][N_lat][N_lon]

Grids for incidence angle, latitude and longitude must have a length of >= 2 (ie. no automatic expansion). If the frequency grid has length 1, this is taken as that the reflectivity is constant, following the definition of surface_scalar_reflectivity. The data can cover higher Stokes dimensionalities than set by stokes_dim*. Data for non-used Stokes elements are just cropped. The order between the two Stokes dimensions is the same as in surface_reflectivity* and surface_rmatrix*.

The interpolation is done in steps: <br> 1: Linear interpolation for lat and lon (std. extrapolation). <br> 2: Interpolation in incidence angle (std. extrapolation). <br> If the grid has a length of >= 4, cubic interpolation is <br> applied. Otherwise linear interpolation. <br> 3. Linear interpolation in frequency (if input data have more <br> than one frequency).

Author
Patrick Eriksson
Parameters
[out]surface_reflectivityWS Output
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]r_fieldGeneric Input

Definition at line 3184 of file m_surface.cc.

References GriddedField6::checksize_strict(), chk_griddedfield_gridname(), chk_if_in_range(), chk_interpolation_grids(), chk_latlon_true(), chk_rte_los(), chk_rte_pos(), GriddedField6::data, GriddedField::get_numeric_grid(), gridpos(), interp(), interpweights(), joker, lon_shiftgrid(), ConstTensor6View::nbooks(), ConstTensor6View::ncols(), ConstVectorView::nelem(), ConstTensor6View::npages(), ConstTensor6View::nrows(), ConstTensor6View::nshelves(), ConstTensor6View::nvitrines(), pos2true_latlon(), and Tensor3::resize().

Referenced by surface_reflectivityFromGriddedField6_g().

◆ surface_rtpropCallAgendaX()

void surface_rtpropCallAgendaX ( Workspace ws,
Numeric surface_skin_t,
Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const ArrayOfAgenda surface_rtprop_agenda_array,
const ArrayOfIndex surface_types,
const Vector surface_types_aux,
const Vector surface_types_weights,
const Verbosity verbosity 
)

WORKSPACE METHOD: surface_rtpropCallAgendaX.

Switch between the elements of surface_rtprop_agenda_array.

This method requires that surface_types have length 1, in contrast to iySurfaceCallAgendaX

This method obtains the surface properties as defined by the agenda in surface_rtprop_agenda_array corresponding to surface_types*.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]surface_skin_tWS Output
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]surface_rtprop_agenda_arrayWS Input
[in]surface_typesWS Input
[in]surface_types_auxWS Input
[in]surface_types_weightsWS Input

Definition at line 3583 of file m_surface.cc.

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

Referenced by surface_rtpropCallAgendaX_g().

◆ surface_scalar_reflectivityFromGriddedField4()

void surface_scalar_reflectivityFromGriddedField4 ( Vector surface_scalar_reflectivity,
const Index stokes_dim,
const Vector f_grid,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lat_true,
const Vector lon_true,
const Vector rtp_pos,
const Vector rtp_los,
const GriddedField4 r_field,
const Verbosity verbosity 
)

WORKSPACE METHOD: surface_scalar_reflectivityFromGriddedField4.

Extracts scalar surface reflectivities from a field of such data.

This method allows to specify a field of surface reflectivity for automatic interpolation to points of interest. The position and direction for which the reflectivity shall be extracted are given by rtp_pos and rtp_los. The reflectivity field is expected to be stored as: <br> GriddedField4: <br> Vector "Frequency" [N_f] <br> Vector "Incidence angle" [N_ia] <br> Vector "Latitude" [N_lat] <br> Vector "Longitude" [N_lon] <br> Tensor4 data[N_f][N_ia][N_lat][N_lon]

Grids for incidence angle, latitude and longitude must have a length of >= 2 (ie. no automatic expansion). If the frequency grid has length 1, this is taken as the reflectivity is constant, following the definition of surface_scalar_reflectivity.

The interpolation is done in steps: <br> 1: Linear interpolation for lat and lon (std. extrapolation). <br> 2: Interpolation in incidence angle (std. extrapolation). <br> If the grid has a length of >= 4, cubic interpolation is <br> applied. Otherwise linear interpolation. <br> 3. Linear interpolation if frequency (if input data have more <br> than one frequency).

Author
Patrick Eriksson
Parameters
[out]surface_scalar_reflectivityWS Output
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]r_fieldGeneric Input

Definition at line 3318 of file m_surface.cc.

References GriddedField4::checksize_strict(), chk_griddedfield_gridname(), chk_if_in_range(), chk_interpolation_grids(), chk_latlon_true(), chk_rte_los(), chk_rte_pos(), GriddedField4::data, GriddedField::get_numeric_grid(), gridpos(), interp(), interpweights(), joker, lon_shiftgrid(), ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstVectorView::nelem(), ConstTensor4View::npages(), ConstTensor4View::nrows(), pos2true_latlon(), and Vector::resize().

Referenced by surface_scalar_reflectivityFromGriddedField4_g().

◆ surface_scalar_reflectivityFromSurface_rmatrix()

void surface_scalar_reflectivityFromSurface_rmatrix ( Vector surface_scalar_reflectivity,
const Tensor4 surface_rmatrix,
const Verbosity verbosity 
)

WORKSPACE METHOD: surface_scalar_reflectivityFromSurface_rmatrix.

Sets surface_scalar_reflectivity based on surface_rmatrix.

For each frequency f, surface_scalar_reflectivity is set to the sum of surface_rmatrix(joker,f,0,0).

Author
Patrick Eriksson
Parameters
[out]surface_scalar_reflectivityWS Output
[in]surface_rmatrixWS Input

Definition at line 3425 of file m_surface.cc.

References ConstTensor4View::nbooks(), ConstTensor4View::npages(), and Vector::resize().

Referenced by surface_scalar_reflectivityFromSurface_rmatrix_g().

◆ surface_typeInterpTypeMask()

void surface_typeInterpTypeMask ( ArrayOfIndex surface_types,
Vector surface_types_aux,
Vector surface_types_weights,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lat_true,
const Vector lon_true,
const Vector rtp_pos,
const GriddedField2 surface_type_mask,
const String method,
const Verbosity verbosity 
)

WORKSPACE METHOD: surface_typeInterpTypeMask.

Interpolation of surface type mask.

The method determines the surface type(s) at the position of concern (rtp_pos) from the provided type mask (surface_type_mask).

For the default interpolation method, "nearest", the closest point in the mask is selected. The surface type is set to the integer part of the value at the found point, while surface_types_aux is set to the reminder. For example, if the mask value at closest point is 2.23, surface_types* is set to 2 and surface_type_aux becomes 0.23. surface_types_weights* is set to 1. For this option, all output arguments have length 1.

With the interpolation set to "linear", the output arguments are set up to describe a mixture of types. The mask values at the grid cell corner points are determined, and type and aux values are extracted as above. The weight associated with each type is calculated as for a standard bi-linear interpolation. If rte_pos is exactly at the centre of the grid cell, and three corner points match type 0 and one point type 1, type 0 and 1 get weight 0.75 and 0.25 respectively.

The altitude in rtp_pos is ignored.

Author
Patrick Eriksson
Parameters
[out]surface_typesWS Output
[out]surface_types_auxWS Output
[out]surface_types_weightsWS Output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]rtp_posWS Input
[in]surface_type_maskWS Input
[in]methodGeneric Input (Default: "nearest")

Definition at line 3443 of file m_surface.cc.

References GriddedField2::checksize_strict(), chk_griddedfield_gridname(), chk_if_in_range(), chk_latlon_true(), chk_rte_pos(), GriddedField2::data, GridPos::fd, GriddedField::get_numeric_grid(), gridpos(), GridPos::idx, interpweights(), lon_shiftgrid(), ConstMatrixView::ncols(), ConstMatrixView::nrows(), pos2true_latlon(), and Vector::resize().

Referenced by surface_typeInterpTypeMask_g().

◆ SurfaceBlackbody()

void SurfaceBlackbody ( Matrix surface_los,
Tensor4 surface_rmatrix,
ArrayOfTensor4 dsurface_rmatrix_dx,
Matrix surface_emission,
ArrayOfMatrix dsurface_emission_dx,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const Tensor3 surface_props_data,
const ArrayOfString surface_props_names,
const ArrayOfString dsurface_names,
const Index jacobian_do,
const Verbosity verbosity 
)

WORKSPACE METHOD: SurfaceBlackbody.

Blackbody surface, with support for Jacobian calculations.

See surfaceBlackbody and SurfaceFastem for complementary information.

For this method, surface_props_data must contain these data: <br> "Skin temperature"

dsurface_emission_dx* is calculated analytically. surface_rmatrix* and dsurface_rmatrix_dx are set to 0.

Author
Marc Prange
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[in,out]dsurface_rmatrix_dxWS Input/Output
[out]surface_emissionWS Output
[in,out]dsurface_emission_dxWS Input/Output
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]surface_props_dataWS Input
[in]surface_props_namesWS Input
[in]dsurface_namesWS Input
[in]jacobian_doWS Input

Definition at line 3629 of file m_surface.cc.

References dplanck_dt(), dsurface_check(), find_first(), interp_atmsurface_gp2itw(), joker, ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstVectorView::nelem(), ConstTensor4View::npages(), ConstTensor4View::nrows(), Tensor4::resize(), rte_pos2gridpos(), surface_props_check(), surface_props_interp(), and surfaceBlackbody().

Referenced by SurfaceBlackbody_g().

◆ surfaceBlackbody()

void surfaceBlackbody ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Index atmosphere_dim,
const Vector f_grid,
const Index stokes_dim,
const Vector rtp_pos,
const Vector rtp_los,
const Numeric surface_skin_t,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceBlackbody.

Creates variables to mimic a blackbody surface.

This method sets up surface_los, surface_rmatrix and surface_emission* for surface_rtprop_agenda. Here, surface_los and surface_rmatrix are set to be empty, and surface_emission to hold blackbody radiation for a temperature of surface_skin_t.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]atmosphere_dimWS Input
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]surface_skin_tWS Input

Definition at line 2035 of file m_surface.cc.

References b, chk_if_in_range(), chk_not_negative(), chk_rte_los(), chk_rte_pos(), CREATE_OUT2, ConstVectorView::nelem(), planck(), Tensor4::resize(), and Matrix::resize().

Referenced by SurfaceBlackbody(), and surfaceBlackbody_g().

◆ SurfaceDummy()

void SurfaceDummy ( ArrayOfTensor4 dsurface_rmatrix_dx,
ArrayOfMatrix dsurface_emission_dx,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 surface_props_data,
const ArrayOfString surface_props_names,
const ArrayOfString dsurface_names,
const Index jacobian_do,
const Verbosity verbosity 
)

WORKSPACE METHOD: SurfaceDummy.

Dummy method for iy_surface_agenda.

If you don't make use of surface_props_data and associated variables, include this method iy_surface_agenda. The method just checks that the variables of concern are set to be empty, and you don't need to include calls of Ignore and Touch in the agenda.

If you use a method of SurfaceSomething type, you don't need this one.

Author
Patrick Eriksson
Parameters
[in,out]dsurface_rmatrix_dxWS Input/Output
[in,out]dsurface_emission_dxWS Input/Output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]surface_props_dataWS Input
[in]surface_props_namesWS Input
[in]dsurface_namesWS Input
[in]jacobian_doWS Input

Definition at line 3710 of file m_surface.cc.

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

Referenced by SurfaceDummy_g().

◆ SurfaceFastem()

void SurfaceFastem ( Matrix surface_los,
Tensor4 surface_rmatrix,
ArrayOfTensor4 dsurface_rmatrix_dx,
Matrix surface_emission,
ArrayOfMatrix dsurface_emission_dx,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const Tensor3 surface_props_data,
const ArrayOfString surface_props_names,
const ArrayOfString dsurface_names,
const Index jacobian_do,
const Vector transmittance,
const Index fastem_version,
const Verbosity verbosity 
)

WORKSPACE METHOD: SurfaceFastem.

FASTEM sea surface microwave emissivity parametrization.

This method allows to use FASTEM in retrievals requiring the Jacobian. Otherwise as surfaceFastem. See *SurfaceBlackbody for general remarks about methods of SurfaceSomething type.

This is an example on a surface method starting with a capital S, e.g. SurfaceSomething. These methods differ from the methods named as surfaceSomething in two ways: <br> 1. The surface properties to apply are taken directly from <br> surface_props_data. <br> 2. The Jacobian with respect to the surface properties can be <br> obtained. The Jacobian can be obtained for all variables in surface_props_data that the method of concern is using.

For this method, surface_props_data must contain these data: <br> "Water skin temperature" <br> "Wind speed" <br> "Wind direction" <br> "Salinity"

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[in,out]dsurface_rmatrix_dxWS Input/Output
[out]surface_emissionWS Output
[in,out]dsurface_emission_dxWS Input/Output
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]surface_props_dataWS Input
[in]surface_props_namesWS Input
[in]dsurface_namesWS Input
[in]jacobian_doWS Input
[in]transmittanceGeneric Input
[in]fastem_versionGeneric Input (Default: "6")

Definition at line 3739 of file m_surface.cc.

References dsurface_check(), find_first(), interp_atmsurface_gp2itw(), rte_pos2gridpos(), surface_props_check(), surface_props_interp(), and surfaceFastem().

Referenced by SurfaceFastem_g().

◆ surfaceFastem()

void surfaceFastem ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Index atmosphere_dim,
const Index stokes_dim,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const Numeric surface_skin_t,
const Numeric salinity,
const Numeric wind_speed,
const Numeric wind_direction,
const Vector transmittance,
const Index fastem_version,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceFastem.

Usage of FASTEM together with MC and DOIT.

The recommended way to use FASTEM is by iySurfaceFastem, but that is not always possible, such as when using MC and DOIT. This is the case as those scattering methods use surface_rtprop_agenda, while iySurfaceFastem fits with iy_surface_agenda. This WSM solves this by allowing FASTEM to be used inside surface_rtprop_agenda.

However, FASTEM is here used in an approximative way. For a correct usage of FASTEM, the atmospheric transmittance shall be calculated for the position and direction of concern, but this is not possible together with DOIT and MC. Instead, the transmittance is an input to the method, and must either be pre-calculated or set to a representative value.

See iySurfaceFastem, for further details on the special input arguments.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]atmosphere_dimWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]surface_skin_tWS Input
[in]salinityGeneric Input (Default: "0.035")
[in]wind_speedGeneric Input
[in]wind_directionGeneric Input (Default: "0")
[in]transmittanceGeneric Input
[in]fastem_versionGeneric Input (Default: "6")

Definition at line 2074 of file m_surface.cc.

References abs(), b, chk_if_in_range(), chk_rte_los(), chk_rte_pos(), FastemStandAlone(), joker, ConstVectorView::nelem(), planck(), Tensor4::resize(), Matrix::resize(), resolve_lon(), and specular_losCalcNoTopography().

Referenced by iySurfaceFastem(), SurfaceFastem(), and surfaceFastem_g().

◆ surfaceFlatReflectivity()

void surfaceFlatReflectivity ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Vector f_grid,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector rtp_pos,
const Vector rtp_los,
const Vector specular_los,
const Numeric surface_skin_t,
const Tensor3 surface_reflectivity,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceFlatReflectivity.

Creates variables to mimic specular reflection by a (flat) surface where surface_reflectivity is specified.

Works basically as surfaceFlatScalarReflectivity but is more general as vector radiative transfer is more properly handled. See the ARTS theory document (ATD) for details around how surface_emission* is determined. In the nomenclature of ATD, surface_reflectivity* gives R.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]specular_losWS Input
[in]surface_skin_tWS Input
[in]surface_reflectivityWS Input

Definition at line 2500 of file m_surface.cc.

References b, chk_if_in_range(), chk_not_negative(), chk_rte_los(), chk_rte_pos(), CREATE_OUT2, joker, mult(), ConstTensor3View::ncols(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstTensor3View::nrows(), planck(), Tensor4::resize(), and Matrix::resize().

Referenced by iySurfaceFlatReflectivity(), iySurfaceFlatReflectivityDirect(), and surfaceFlatReflectivity_g().

◆ surfaceFlatRefractiveIndex()

void surfaceFlatRefractiveIndex ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Vector f_grid,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector rtp_pos,
const Vector rtp_los,
const Vector specular_los,
const Numeric surface_skin_t,
const GriddedField3 surface_complex_refr_index,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceFlatRefractiveIndex.

Creates variables to mimic specular reflection by a (flat) surface where the complex refractive index is specified.

The dielectric properties of the surface are described by surface_complex_refr_index*. The Fresnel equations are used to calculate amplitude reflection coefficients. The method can thus result in that the reflection properties differ between frequencies and polarisations.

Local thermodynamic equilibrium is assumed, which corresponds to that the reflection and emission coefficients add up to 1.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]specular_losWS Input
[in]surface_skin_tWS Input
[in]surface_complex_refr_indexWS Input

Definition at line 2430 of file m_surface.cc.

References ARTS_ASSERT, calc_incang(), chk_if_in_range(), chk_not_negative(), chk_rte_los(), chk_rte_pos(), complex_n_interp(), CREATE_OUT2, CREATE_OUT3, fresnel(), joker, ConstVectorView::nelem(), Tensor4::resize(), Matrix::resize(), and surface_specular_R_and_b().

Referenced by iySurfaceFlatRefractiveIndex(), iySurfaceFlatRefractiveIndexDirect(), and surfaceFlatRefractiveIndex_g().

◆ surfaceFlatRvRh()

void surfaceFlatRvRh ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Vector f_grid,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector rtp_pos,
const Vector rtp_los,
const Vector specular_los,
const Numeric surface_skin_t,
const Matrix surface_rv_rh,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceFlatRvRh.

Creates variables to mimic specular reflection by a (flat) surface where surface_rv_rh is specified.

This method assumes that the reflection at vertical and horizontal polarisation differs. As power reflection coefficients are provided there is no information at hand on phase shifts between polarisations, and they are simply assumed to be zero. These assumptions result in that surface_emission is set to zero for positions corresponding to U and V, and that all diagonal elementsof surface_rmatrix are equal (the mean of rv and rh). Further, all off-diagonal elements of surface_rmatrix* are all zero except for (0,1) and (1,0).

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]specular_losWS Input
[in]surface_skin_tWS Input
[in]surface_rv_rhWS Input

Definition at line 2584 of file m_surface.cc.

References b, chk_if_in_range(), chk_not_negative(), chk_rte_los(), chk_rte_pos(), joker, max(), min(), ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), planck(), Tensor4::resize(), and Matrix::resize().

Referenced by surfaceFlatRvRh_g(), surfaceTelsem(), and surfaceTessem().

◆ SurfaceFlatScalarReflectivity()

void SurfaceFlatScalarReflectivity ( Matrix surface_los,
Tensor4 surface_rmatrix,
ArrayOfTensor4 dsurface_rmatrix_dx,
Matrix surface_emission,
ArrayOfMatrix dsurface_emission_dx,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const Vector specular_los,
const Tensor3 surface_props_data,
const ArrayOfString surface_props_names,
const ArrayOfString dsurface_names,
const Index jacobian_do,
const Vector f_reflectivities,
const Verbosity verbosity 
)

WORKSPACE METHOD: SurfaceFlatScalarReflectivity.

Piecewise linear scalar surface reflectivity.

This method is similar to surfaceFlatScalarReflectivity but the reflectivities are specified differently and Jacobian calculations are supported. See SurfaceFastem for general remarks about methods of SurfaceSomething type.

The method works with scalar reflectivies, i.e. it is assumed that the reflection at vertical and horizontal polarisation is identical. The scalar reflectivity is given at a number of frequencies, specified by the GIN f_reflectivities. The reflectivity at the first frequency is denoted as "Scalar reflectivity 0" etc. Between the frequencies in f_reflectivities, the reflectivity is treated to vary linearly. The reflectivity is assumed to be constant outside of f_reflectivities, and the end points in f_reflectivities can be both inside and outside of the range of f_grid. Setting f_reflectivities* to have a single value, implies that the reflectivity is constant over f_grid.

For this method, surface_props_data must contain these data: <br> "Skin temperature" <br> "Scalar reflectivity 0" <br> "Scalar reflectivity 1" <br> ... <br> "Scalar reflectivity N" where N is the length of f_reflectivities-1.

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[in,out]dsurface_rmatrix_dxWS Input/Output
[out]surface_emissionWS Output
[in,out]dsurface_emission_dxWS Input/Output
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]specular_losWS Input
[in]surface_props_dataWS Input
[in]surface_props_namesWS Input
[in]dsurface_namesWS Input
[in]jacobian_doWS Input
[in]f_reflectivitiesGeneric Input

Definition at line 3954 of file m_surface.cc.

References chk_if_increasing(), dsurface_check(), find_first(), gp4length1grid(), gridpos(), interp(), interp_atmsurface_gp2itw(), interpweights(), jacobian_type_extrapol(), ConstVectorView::nelem(), rte_pos2gridpos(), surface_props_check(), surface_props_interp(), and surfaceFlatScalarReflectivity().

Referenced by SurfaceFlatScalarReflectivity_g().

◆ surfaceFlatScalarReflectivity()

void surfaceFlatScalarReflectivity ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Vector f_grid,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector rtp_pos,
const Vector rtp_los,
const Vector specular_los,
const Numeric surface_skin_t,
const Vector surface_scalar_reflectivity,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceFlatScalarReflectivity.

Creates variables to mimic specular reflection by a (flat) surface where surface_scalar_reflectivity is specified.

This method assumes that the reflection at vertical and horizontal polarisation is identical. This assumption includes that there is no phase shift between polarisations. These assumptions result in that surface_emission* is set to zero for positions corresponding to Q, U and V, and that surface_rmatrix becomes a diagonal matrix (with all elements on the diagonal equal to the specified reflectivity).

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]specular_losWS Input
[in]surface_skin_tWS Input
[in]surface_scalar_reflectivityWS Input

Definition at line 2664 of file m_surface.cc.

References b, chk_if_in_range(), chk_not_negative(), chk_rte_los(), chk_rte_pos(), joker, max(), min(), ConstVectorView::nelem(), planck(), Tensor4::resize(), and Matrix::resize().

Referenced by SurfaceFlatScalarReflectivity(), and surfaceFlatScalarReflectivity_g().

◆ surfaceLambertianSimple()

void surfaceLambertianSimple ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Vector f_grid,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector rtp_pos,
const Vector rtp_los,
const Vector surface_normal,
const Numeric surface_skin_t,
const Vector surface_scalar_reflectivity,
const Index lambertian_nza,
const Numeric za_pos,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceLambertianSimple.

Creates variables to mimic a Lambertian surface.

A Lambertian surface can be characterised solely by its reflectivity, here taken from surface_scalar_reflectivity.

The down-welling radiation field is estimated by making calculations for lambertian_nza directions. The range of zenith angles ([0,90]) is divided in an equidistant manner for 1D. For 2D and 3D see below. The values for surface_rmatrix are assuming a constant radiance over each zenith angle range. See AUG.

Default is to select the zenith angles for sensor_los to be placed centrally in the grid ranges. For example, if lambertian_nza is set to 9, down-welling radiation will be calculated for zenith angles = 5, 15, ..., 85. The position of these angles can be shifted by za_pos*. This variable specifies the fractional distance inside the ranges. For example, a za_pos of 0.7 (np still 9) gives the angles 7, 17, ..., 87.

Only upper-left diagonal element of the surface_rmatrix is non-zero. That is, the upwelling radiation is always unpolarised.

Local thermodynamic equilibrium is assumed, which corresponds to that the reflection and emission coefficients "add up to 1".

For 2D and 3D, the down-welling directions are placed along the the viewing direction, e.g. for 3D the azimuth angle is kept constant. In 2D and 3D surface topography can exist, and to avoid getting views going directly into the surface, angels are not distributed over 90 deg, but 90-abs(surface_normal[0]).

Author
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]surface_normalWS Input
[in]surface_skin_tWS Input
[in]surface_scalar_reflectivityWS Input
[in]lambertian_nzaGeneric Input (Default: "9")
[in]za_posGeneric Input (Default: "0.5")

Definition at line 2730 of file m_surface.cc.

References abs(), b, chk_if_in_range(), chk_not_negative(), chk_rte_los(), chk_rte_pos(), DEG2RAD, max(), min(), ConstVectorView::nelem(), planck(), Tensor4::resize(), Matrix::resize(), and w.

Referenced by surfaceLambertianSimple_g().

◆ surfaceMapToLinearPolarisation()

void surfaceMapToLinearPolarisation ( Matrix surface_emission,
Tensor4 surface_rmatrix,
const Index stokes_dim,
const Numeric pol_angle,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceMapToLinearPolarisation.

Convert surface RT properties to a linear polarisation.

The properties converted are surface_emission and surface_rmatrix.

This method allows to set the surface properties to match a specific linear polarisation for scalar calculation (stokes_dim=1). If you want this, you have to call the method(s) setting up the surface RT properties with stokes_dim set to 2, 3 or 4. This Stokes dimension is below called local_stokes_dim.

The polarisation to apply is selected by pol_angle. This angle is defined as in sensor_pol (i.e. 0 and 90 equal V and H, respectively).

If local_stokes_dim was set to 2, *surface_rmatrix is assumed to have the structure: <br> [ (rv+rh)/2 (rv-rh)/2; <br> (rv-rh)/2 (rv+rh)/2 ], while if local_stokes_dim was set to 3 or 4, the mapping involves several transformation matrices. The later case covers also couplings between V/H and +-45 deg, and the mapping is described in the ARTS theory guide, in section "Rotated modified Stokes vector".

In general it should suffice to set local_stokes_dim to 2, that gives slightly faster calculations. A local_stokes_dim of 3 handles any case correctly.

Author
Patrick Eriksson
Parameters
[in,out]surface_emissionWS Input/Output
[in,out]surface_rmatrixWS Input/Output
[in]stokes_dimWS Input
[in]pol_angleGeneric Input

Definition at line 2183 of file m_surface.cc.

References ARTS_USER_ERROR_IF, DEG2RAD, joker, mueller_modif2stokes(), mueller_rotation(), mueller_stokes2modif(), mult(), ConstTensor4View::nbooks(), ConstMatrixView::ncols(), ConstMatrixView::nrows(), pow(), Tensor4::resize(), and Matrix::resize().

Referenced by surfaceMapToLinearPolarisation_g().

◆ surfaceSemiSpecularBy3beams()

void surfaceSemiSpecularBy3beams ( Workspace ws,
Numeric surface_skin_t,
Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Index atmosphere_dim,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const Agenda surface_rtprop_sub_agenda,
const Numeric specular_factor,
const Numeric dza,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceSemiSpecularBy3beams.

A simplistic treatment of semi-specular surfaces.

This method has no strong physical basis but could be used for simpler testing or as starting point for more advanced methods.

This method assumes that the surface can be treated to have three facets, all lacking surface roughness. One facet is assumed to give standard specular reflection, while the two other facets are tilted with +dza and -dza, respectively. The tilt is assumed to only affect the zenith angle of the reflected direction (azimuth same as for specular direction). The area ratio of the non-tilted facet is set by specular_factor. That is, the specular beam is given weight w, while the other two beams each get weight (1-w)/2.

If a facet tilts away from the viewing direction in such way that the surface is observed from below, the tilt of the facet is decreased in steps of 1 degree until a successful calculation is obtained. If this turns out to require a tilt of zero, this facete is merged with the specular direction.

The pure specular properties of the surface shall be described by surface_rtprop_sub_agenda*. That is, if you have specular surface described and you want to make it semi-specular by this method, you move the content of the existing surface_rtprop_agenda to surface_rtprop_sub_agenda* and instead fill surface_rtprop_agenda with this method.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]surface_skin_tWS Output
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]atmosphere_dimWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]surface_rtprop_sub_agendaWS Input
[in]specular_factorGeneric Input
[in]dzaGeneric Input

Definition at line 2832 of file m_surface.cc.

References adjust_los(), c, chk_rte_los(), chk_rte_pos(), joker, ConstMatrixView::ncols(), ConstTensor4View::ncols(), ConstTensor4View::npages(), ConstMatrixView::nrows(), ConstTensor4View::nrows(), Tensor4::resize(), Matrix::resize(), sign(), surface_rtprop_sub_agendaExecute(), and w.

Referenced by surfaceSemiSpecularBy3beams_g().

◆ surfaceSplitSpecularTo3beams()

void surfaceSplitSpecularTo3beams ( Matrix surface_los,
Tensor4 surface_rmatrix,
const Index atmosphere_dim,
const Vector rtp_pos,
const Vector rtp_los,
const Numeric specular_factor,
const Numeric dza,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceSplitSpecularTo3beams.

A very simple approximation of a semi-specular surface.

This method has no direct physical basis but could be used for simpler testing or as starting point for more advanced methods.

The method requires that the surface RT properties (e.g. surface_los) have been set up to mimic a specular surface. This method splits the down- welling radiation into three directions. The specular direction is given weight w, while the other two beams each get weight (1-w)/2. The basic polarised reflectivity from the specular calculations is maintained for each beam. The beams are just separated in zenith angle, with a separation of dza. The lowermost beam is not allowed to be closer to the surface than 1 degree. If there is no room for the lowermost beam, it is merged with the main beam.

Author
Patrick Eriksson
Parameters
[in,out]surface_losWS Input/Output
[in,out]surface_rmatrixWS Input/Output
[in]atmosphere_dimWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]specular_factorGeneric Input
[in]dzaGeneric Input

Definition at line 2979 of file m_surface.cc.

References abs(), b, c, chk_rte_los(), chk_rte_pos(), ConstTensor4View::nbooks(), ConstMatrixView::ncols(), ConstTensor4View::ncols(), ConstTensor4View::npages(), ConstMatrixView::nrows(), ConstTensor4View::nrows(), Tensor4::resize(), Matrix::resize(), and w.

Referenced by surfaceSplitSpecularTo3beams_g().

◆ surfaceTelsem()

void surfaceTelsem ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Index atmosphere_dim,
const Index stokes_dim,
const Vector f_grid,
const Vector lat_grid,
const Vector lat_true,
const Vector lon_true,
const Vector rtp_pos,
const Vector rtp_los,
const Vector specular_los,
const Numeric surface_skin_t,
const TelsemAtlas atlas,
const Numeric r_min,
const Numeric r_max,
const Numeric d_max,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceTelsem.

Compute surface emissivities using the TELSEM 2 model.

This method uses second version of the TELSEM model for calculating land surface emissivities (F. Aires et al, "A Tool to Estimate \<br\> Land‐Surface Emissivities at Microwave frequencies (TELSEM) for use \<br\> in numerical weather prediction" Quarterly Journal of the Royal Meteorological Society, vol. 137, (656), pp. 690-699, 2011.) This methods computes land surface emissivities for a given pencil beam using a given TELSEM2 atlas.

The input must satisfy the following conditions, otherwise an error is thrown: <br> - The input frequencies (f_grid) must be within the range [5 GHz, 900 GHz] <br> - The skin temperature (surface_skin_t) must be within the range <br> [180 K, 360 K]

A TELSEM atlas contains only suface emissivities for locations that are classified as land. By default this WSM will throw an error if the pencil beam hits the surface at a position that is not contained in the given atlas.

The above behavior can be avoided by setting d_max to a positive value. This enables nearest neighbor interpolation, which assigns the emissivities of the nearest found cell in the atlas to the given position. In this case, an error is only thrown if the distance of the found neighbor is higher than the provided value of *d_max.

You can limit the final reflectivity applied by setting r_min and r_max.

To extract a land-sea mask from a given telsem atlas see the WSM telsemSurfaceTypeLandSea*.

Author
Simon Pfreundschuh
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]atmosphere_dimWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]lat_gridWS Input
[in]lat_trueWS Input
[in]lon_trueWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]specular_losWS Input
[in]surface_skin_tWS Input
[in]atlasGeneric Input
[in]r_minGeneric Input (Default: "0")
[in]r_maxGeneric Input (Default: "1")
[in]d_maxGeneric Input (Default: "-1.0")

Definition at line 2244 of file m_surface.cc.

References ARTS_ASSERT, TelsemAtlas::calc_cellnum(), TelsemAtlas::calc_cellnum_nearest_neighbor(), calc_incang(), chk_if_in_range(), chk_if_in_range_exclude(), chk_rte_los(), chk_rte_pos(), TelsemAtlas::contains(), d, TelsemAtlas::emis_interp(), TelsemAtlas::get_class1(), TelsemAtlas::get_class2(), TelsemAtlas::get_coordinates(), TelsemAtlas::get_emis_h(), TelsemAtlas::get_emis_v(), max(), min(), ConstVectorView::nelem(), pos2true_latlon(), sphdist(), and surfaceFlatRvRh().

Referenced by surfaceTelsem_g().

◆ SurfaceTessem()

void SurfaceTessem ( Matrix surface_los,
Tensor4 surface_rmatrix,
ArrayOfTensor4 dsurface_rmatrix_dx,
Matrix surface_emission,
ArrayOfMatrix dsurface_emission_dx,
const Index stokes_dim,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const TessemNN tessem_neth,
const TessemNN tessem_netv,
const Tensor3 surface_props_data,
const ArrayOfString surface_props_names,
const ArrayOfString dsurface_names,
const Index jacobian_do,
const Verbosity verbosity 
)

WORKSPACE METHOD: SurfaceTessem.

TESSEM sea surface microwave emissivity parametrization.

This method allows to use TESSEM in retrievals requiring the Jacobian. Otherwise as surfaceTessem. See SurfaceFastem for general remarks about methods of SurfaceSomething type.

For this method, surface_props_data must contain these data: <br> "Water skin temperature" <br> "Wind speed" <br> "Salinity"

Author
Simon Pfreundschuh
Patrick Eriksson
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[in,out]dsurface_rmatrix_dxWS Input/Output
[out]surface_emissionWS Output
[in,out]dsurface_emission_dxWS Input/Output
[in]stokes_dimWS Input
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]tessem_nethWS Input
[in]tessem_netvWS Input
[in]surface_props_dataWS Input
[in]surface_props_namesWS Input
[in]dsurface_namesWS Input
[in]jacobian_doWS Input

Definition at line 4116 of file m_surface.cc.

References dsurface_check(), find_first(), interp_atmsurface_gp2itw(), rte_pos2gridpos(), surface_props_check(), surface_props_interp(), and surfaceTessem().

Referenced by SurfaceTessem_g().

◆ surfaceTessem()

void surfaceTessem ( Matrix surface_los,
Tensor4 surface_rmatrix,
Matrix surface_emission,
const Index atmosphere_dim,
const Index stokes_dim,
const Vector f_grid,
const Vector rtp_pos,
const Vector rtp_los,
const Numeric surface_skin_t,
const TessemNN tessem_neth,
const TessemNN tessem_netv,
const Numeric salinity,
const Numeric wind_speed,
const Verbosity verbosity 
)

WORKSPACE METHOD: surfaceTessem.

TESSEM sea surface microwave emissivity parametrization.

This method computes surface emissivity and reflectivity matrices for ocean surfaces using the TESSEM emissivity model: Prigent, C., et al. Sea‐surface emissivity parametrization from microwaves to millimetre waves, QJRMS, 2017, 143.702: 596-605.

The validity range of the parametrization of is 10 to 700 GHz, but for some extra flexibility frequencies between 5 and 900 GHz are accepted. The accepted temperaute range for surface_skin_t is [260.0 K, 373.0 K]

The model itself is represented by the neural networks in tessem_neth* and tessem_netv.

Author
Simon Pfreundschuh
Parameters
[out]surface_losWS Output
[out]surface_rmatrixWS Output
[out]surface_emissionWS Output
[in]atmosphere_dimWS Input
[in]stokes_dimWS Input
[in]f_gridWS Input
[in]rtp_posWS Input
[in]rtp_losWS Input
[in]surface_skin_tWS Input
[in]tessem_nethWS Input
[in]tessem_netvWS Input
[in]salinityGeneric Input (Default: "0.035")
[in]wind_speedGeneric Input

Definition at line 2351 of file m_surface.cc.

References abs(), chk_if_in_range(), chk_if_in_range_exclude(), chk_if_in_range_exclude_high(), chk_rte_los(), chk_rte_pos(), max(), min(), ConstVectorView::nelem(), specular_losCalcNoTopography(), surfaceFlatRvRh(), and tessem_prop_nn().

Referenced by SurfaceTessem(), and surfaceTessem_g().

◆ transmittanceFromIy_aux()

void transmittanceFromIy_aux ( Vector transmittance,
const ArrayOfString iy_aux_vars,
const ArrayOfMatrix iy_aux,
const Verbosity verbosity 
)

WORKSPACE METHOD: transmittanceFromIy_aux.

Creates a vector of transmittance values.

The transmittances are set based on optical depths in iy_aux. That is, one of the quantities in iy_aux must be "Optical depth".

The created vector has a length matching f_grid and can e.g. be used as input to some of the FASTEM methods.

Author
Patrick Eriksson
Parameters
[out]transmittanceGeneric output
[in]iy_aux_varsWS Input
[in]iy_auxWS Input

Definition at line 4288 of file m_surface.cc.

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

Referenced by transmittanceFromIy_aux_g().

Variable Documentation

◆ DEG2RAD

constexpr Numeric DEG2RAD = Conversion::deg2rad(1)
inlineconstexpr

Definition at line 65 of file m_surface.cc.

Referenced by surfaceLambertianSimple(), and surfaceMapToLinearPolarisation().

◆ EARTH_RADIUS

constexpr Numeric EARTH_RADIUS =Constant::earth_radius
inlineconstexpr

Definition at line 64 of file m_surface.cc.