PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
pism Namespace Reference

Namespaces

 array
 
 atmosphere
 Atmosphere models and modifiers: provide precipitation and temperature to a surface::SurfaceModel below.
 
 bed
 Bed-related models: bed deformation (provide bed elevation and uplift) and (soon) bed erosion.
 
 calving
 Calving and iceberg removal code.
 
 details
 
 diagnostics
 
 energy
 Energy balance models and utilities.
 
 fct
 
 fem
 
 frontalmelt
 Frontal melt models and modifiers.
 
 grid
 
 hydrology
 Sub-glacial hydrology models and related diagnostics.
 
 icebin
 
 inverse
 Inverse modeling code.
 
 io
 Input and output code (NetCDF wrappers, etc)
 
 mask
 
 ocean
 Ocean models and modifiers: provide sea level elevation, melange back pressure, shelf base mass flux and shelf base temperature.
 
 options
 Utilities for processing command-line options.
 
 petsc
 Wrappers for some PETSc objects (these wrappers simplify memory management).
 
 python
 Code added for use in Python wrappers.
 
 rheology
 Ice flow laws.
 
 stencils
 
 stressbalance
 Stress balance models and related diagnostics.
 
 surface
 Surface models and modifiers: provide top-surface temperature, mass flux, liquid water fraction, mass and thickness of the surface layer.
 
 taoutil
 TAO (inverse modeling) utilities.
 
 units
 
 uno
 

Classes

class  AgeColumnSystem
 Tridiagonal linear system for vertical column of age (pure advection) problem. More...
 
class  AgeModelInputs
 
class  AgeModel
 
class  Isochrones
 
class  IceBasalResistancePlasticLaw
 Class containing physical constants and the constitutive relation describing till for SSA. More...
 
class  IceBasalResistancePseudoPlasticLaw
 
class  IceBasalResistanceRegularizedLaw
 
class  ConstantYieldStress
 
class  MohrCoulombPointwise
 
class  MohrCoulombYieldStress
 PISM's default basal yield stress model which applies the Mohr-Coulomb model of deformable, pressurized till. More...
 
class  OptTillphiYieldStress
 Iterative optimization of the till friction angle. More...
 
class  YieldStressInputs
 
class  YieldStress
 The PISM basal yield stress model interface (virtual base class) More...
 
class  FrontalMeltInputs
 
struct  ForcingOptions
 
class  PCFactory
 
class  FractureDensity
 
class  FrontRetreat
 
class  PrescribedRetreat
 
class  Geometry
 
class  GeometryEvolution
 
class  RegionalGeometryEvolution
 
struct  Point
 
class  MPDATA2
 
class  UNO
 
class  IceEISModel
 Derived class for doing EISMINT II simplified geometry experiments.
More...
 
class  IceModel
 
class  CHTemperature
 Report temperature of the cryo-hydrologic system. More...
 
class  CHLiquidWaterFraction
 Report liquid water fraction in the cryo-hydrologic system. More...
 
class  CHHeatFlux
 Report rate of cryo-hydrologic warming. More...
 
class  IceRegionalModel
 A version of the PISM core class (IceModel) which knows about the no_model_mask and its semantics. More...
 
class  RegionalYieldStress
 
class  DataAccess
 
class  SNESProblem
 
struct  CFLData
 
class  PetscAccessible
 
class  ColumnInterpolation
 
class  TridiagonalSystem
 Virtual base class. Abstracts a tridiagonal system to solve in a column of ice and/or bedrock. More...
 
class  columnSystemCtx
 Base class for tridiagonal systems in the ice. More...
 
struct  InputOptions
 
class  Component
 A class defining a common interface for most PISM sub-models. More...
 
class  NetCDFConfig
 A class for reading, writing and accessing PISM configuration flags and parameters. More...
 
class  DefaultConfig
 Default PISM configuration database: uses NetCDF files; can be initialized from a file specified using a command-line option. More...
 
class  Config
 A class for storing and accessing PISM configuration flags and parameters. More...
 
class  ConfigWithPrefix
 
class  ConfigJSON
 The JSON-based Config implementation. More...
 
class  Context
 
class  Diagnostic
 Class representing diagnostic computations in PISM. More...
 
class  DiagWithDedicatedStorage
 
class  Diag
 A template derived from Diagnostic, adding a "Model". More...
 
class  DiagAverageRate
 
class  TSDiagnostic
 PISM's scalar time-series diagnostics. More...
 
class  TSSnapshotDiagnostic
 Scalar diagnostic reporting a snapshot of a quantity modeled by PISM. More...
 
class  TSRateDiagnostic
 Scalar diagnostic reporting the rate of change of a quantity modeled by PISM. More...
 
class  TSFluxDiagnostic
 Scalar diagnostic reporting a "flux". More...
 
class  TSDiag
 
class  EnthalpyConverter
 Converts between specific enthalpy and temperature or liquid content. More...
 
class  ColdEnthalpyConverter
 An EnthalpyConverter for use in verification tests. More...
 
class  ErrorLocation
 
class  RuntimeError
 
class  ParallelSection
 
struct  Vector3
 
class  FFTWArray
 
struct  OwnershipRanges
 
class  PointsWithGhosts
 
class  Points
 
class  Grid
 Describes the PISM grid and the distribution of data across processors. More...
 
class  Interpolation
 
struct  VariableLookupData
 
class  File
 High-level PISM I/O class. More...
 
class  LocalInterpCtx
 
class  Logger
 A basic logging class. More...
 
class  StringLogger
 A logger that accumulates messages and reports them as a string. More...
 
class  GeometryCalculator
 
class  MaxTimestep
 Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to use the less-than operator (and std::min, etc) to choose the stricter of two restrictions. More...
 
class  Poisson
 
class  Profiling
 
class  Proj
 A wrapper for PJ that makes sure pj_destroy is called. More...
 
class  MappingInfo
 
class  LonLatCalculator
 
class  ScalarForcing
 
class  TerminationReason
 
class  KSPTerminationReason
 
class  SNESTerminationReason
 
class  GenericTerminationReason
 
class  Time
 Time management class. More...
 
class  ConstAttribute
 
class  Attribute
 
class  VariableMetadata
 
class  SpatialVariableMetadata
 Spatial NetCDF variable (corresponding to a 2D or 3D scalar field). More...
 
class  Vars
 A class for passing PISM variables from the core to other parts of the code (such as climate couplers). More...
 
class  Vector2d
 This class represents a 2D vector field (such as ice velocity) at a certain grid point. More...
 
class  Wrapper
 
class  rgrid
 Class used initTestL() in generating sorted list for ODE solver. More...
 
struct  rgridReverseSort
 Comparison used initTestL() in generating sorted list for ODE solver. More...
 
class  IceCompModel
 
struct  TestPParameters
 
struct  TestFGParameters
 

Typedefs

typedef stencils::Box< double > Box
 
typedef std::map< std::string, std::vector< VariableMetadata > > Metadata
 
typedef SNESProblem< 1, double > SNESScalarProblem
 
typedef SNESProblem< 2, Vector2dSNESVectorProblem
 
typedef std::map< std::string, Diagnostic::PtrDiagnosticList
 
typedef std::map< std::string, TSDiagnostic::PtrTSDiagnosticList
 

Enumerations

enum  UNOType {
  PISM_UNO_UPWIND1 , PISM_UNO_LAX_WENDROFF , PISM_UNO_FROMM , PISM_UNO_2 ,
  PISM_UNO_3
}
 
enum  IceModelTerminationReason { PISM_DONE , PISM_CHEKPOINT , PISM_SIGNAL }
 
enum  AccessType { GHOSTED , NOT_GHOSTED }
 
enum  InitializationType { INIT_RESTART , INIT_BOOTSTRAP , INIT_OTHER }
 
enum  ConfigSettingFlag { CONFIG_DEFAULT = 0 , CONFIG_FORCE = 1 , CONFIG_USER = 2 }
 Flag used by set_...() methods. More...
 
enum  InterpolationType : int { LINEAR , NEAREST , PIECEWISE_CONSTANT }
 
enum  AxisType : int {
  T_AXIS = 0 , X_AXIS = 1 , Y_AXIS = 2 , Z_AXIS = 3 ,
  UNKNOWN_AXIS = 4
}
 
enum  LoggerLevel { WARNING =1 , DEBUG2 =2 , DEBUG3 =3 , TRACE =4 }
 
enum  MaskValue {
  MASK_UNKNOWN = -1 , MASK_ICE_FREE_BEDROCK = 0 , MASK_GROUNDED = 2 , MASK_FLOATING = 3 ,
  MASK_ICE_FREE_OCEAN = 4
}
 
enum  NodeType { NODE_INTERIOR = -1 , NODE_BOUNDARY = 0 , NODE_EXTERIOR = 1 }
 
enum  LonLat { LONGITUDE , LATITUDE }
 
enum  Direction { North = 0 , East , South , West }
 

Functions

static void check_input (const array::Array *ptr, const char *name)
 
static double square (double x)
 
template<class M >
void init_step (M *model, const Geometry &geometry, const Time &time)
 
void lapse_rate_correction (const array::Scalar &surface, const array::Scalar &reference_surface, double lapse_rate, array::Scalar &result)
 
void remove_narrow_tongues (const Geometry &geometry, array::Scalar &ice_thickness)
 
void make_nonnegative_preserving (double dt, const array::Scalar1 &x, const array::Staggered1 &flux, array::Staggered &result)
 
void ice_bottom_surface (const Geometry &geometry, array::Scalar &result)
 
double ice_volume (const Geometry &geometry, double thickness_threshold)
 Computes the ice volume, in m^3. More...
 
double ice_volume_not_displacing_seawater (const Geometry &geometry, double thickness_threshold)
 
double ice_area (const Geometry &geometry, double thickness_threshold)
 Computes ice area, in m^2. More...
 
double ice_area_grounded (const Geometry &geometry, double thickness_threshold)
 Computes grounded ice area, in m^2. More...
 
double ice_area_floating (const Geometry &geometry, double thickness_threshold)
 Computes floating ice area, in m^2. More...
 
double sea_level_rise_potential (const Geometry &geometry, double thickness_threshold)
 Computes the sea level rise that would result if all the ice were melted. More...
 
void set_no_model_strip (const Grid &grid, double width, array::Scalar &result)
 Set no_model_mask variable to have value 1 in strip of width 'strip' m around edge of computational domain, and value 0 otherwise. More...
 
static double limit_advective_flux (int current, int neighbor, double input)
 
static double limit_diffusive_flux (int current, int neighbor, double flux)
 
static double effective_change (double H, double dH)
 
void grounding_line_flux (const array::CellType1 &cell_type, const array::Staggered1 &flux, double dt, bool add_values, array::Scalar &output)
 
double total_grounding_line_flux (const array::CellType1 &cell_type, const array::Staggered1 &flux, double dt)
 
static double triangle_area (const Point &a, const Point &b, const Point &c)
 
Point intersect_ab (double a, double b)
 
Point intersect_bc (double b, double c)
 
Point intersect_ac (double a, double c)
 
bool invalid (const Point &p)
 
static bool same (const Point &a, const Point &b)
 
double grounded_area_fraction (double a, double b, double c)
 
static double F (double SL, double B, double H, double alpha)
 
static Box F (const Box &SL, const Box &B, const Box &H, double alpha)
 
void compute_grounded_cell_fraction (double ice_density, double ocean_density, const array::Scalar1 &sea_level, const array::Scalar1 &ice_thickness, const array::Scalar1 &bed_topography, array::Scalar &result)
 
static void compute_interface_velocity (const array::CellType &cell_type, const array::Vector &velocity, array::Staggered &result)
 
static void compute_corrective_velocity (double dt, const array::Staggered &velocity, const array::Scalar2 &x, array::Staggered &result)
 
static double upwind (double x, double x_n, double u)
 
static void step (double dt, const array::Staggered1 &velocity, const array::Scalar1 &x_old, array::Scalar &x)
 
double part_grid_threshold_thickness (stencils::Star< int > cell_type, stencils::Star< double > ice_thickness, stencils::Star< double > surface_elevation, double bed_elevation)
 Compute threshold thickness used when deciding if a partially-filled cell should be considered 'full'. More...
 
static void step (double dt, const array::Staggered1 &flux, const array::Scalar &x_old, array::Scalar &result)
 
static void print_diagnostics (const Logger &log, const Metadata &list)
 
static void print_diagnostics_json (const Logger &log, const Metadata &list)
 
static Metadata diag_metadata (const std::map< std::string, Diagnostic::Ptr > &diags)
 
static Metadata ts_diag_metadata (const std::map< std::string, TSDiagnostic::Ptr > &ts_diags)
 
void bedrock_surface_temperature (const array::Scalar &sea_level, const array::CellType &cell_type, const array::Scalar &bed_topography, const array::Scalar &ice_thickness, const array::Scalar &basal_enthalpy, const array::Scalar &ice_surface_temperature, array::Scalar &result)
 Compute the temperature seen by the top of the bedrock thermal layer. More...
 
void generate_trough_topography (array::Scalar &result)
 
void generate_mound_topography (array::Scalar &result)
 
void warn_about_missing (const Logger &log, const std::set< std::string > &vars, const std::string &type, const std::set< std::string > &available, bool stop)
 
void write_mapping (const File &file, const pism::MappingInfo &info)
 
void write_run_stats (const File &file, const pism::VariableMetadata &stats)
 
MaxTimestep reporting_max_timestep (const std::vector< double > &times, double t, double eps, const std::string &description)
 
static std::set< std::string > process_extra_shortcuts (const Config &config, const std::set< std::string > &input)
 
static std::set< std::string > process_ts_shortcuts (const Config &config, const std::set< std::string > &input)
 
unsigned int count_CFL_violations (const array::Array3D &u3, const array::Array3D &v3, const array::Scalar &ice_thickness, double dt)
 Because of the -skip mechanism it is still possible that we can have CFL violations: count them. More...
 
static void validate_range (const std::string &axis, const std::vector< double > &x, double x_min, double x_max)
 
static void subset_extent (const std::string &axis, const std::vector< double > &x, double x_min, double x_max, double &x0, double &Lx, unsigned int &Mx)
 
std::shared_ptr< Gridregional_grid_from_options (std::shared_ptr< Context > ctx)
 Create a grid using command-line options and (possibly) an input file. More...
 
static void set_no_model_yield_stress (double tauc, const array::Scalar &mask, array::Scalar &basal_yield_stress)
 
static double secondInvariant_2D (const Vector2d &U_x, const Vector2d &U_y)
 
double grid_z (double b, double H, int Mz, int k)
 
DMDALocalInfo grid_transpose (const DMDALocalInfo &input)
 
PetscErrorCode setup_level (DM dm, int mg_levels)
 
PetscErrorCode create_restriction (DM fine, DM coarse, const char *dm_name)
 Create the restriction matrix. More...
 
PetscErrorCode restrict_data (DM fine, DM coarse, const char *dm_name)
 Restrict model parameters from the fine grid onto the coarse grid. More...
 
Vector2d blatter_xy_exact (double x, double y)
 
Vector2d blatter_xy_source (double x, double y, double B)
 
Vector2d blatter_xz_exact (double x, double z, double A, double rho, double g, double s_0, double alpha, double H, double beta)
 
Vector2d blatter_xz_source (double x, double z, double A, double rho, double g, double s_0, double alpha, double H, double beta)
 
Vector2d blatter_xz_source_bed (double x, double z, double A, double rho, double g, double s_0, double alpha, double H, double beta)
 
Vector2d blatter_xz_source_surface (double x, double z, double A, double rho, double g, double s_0, double alpha, double H, double beta)
 
Vector2d blatter_xz_cfbc_exact (double x, double z, double B, double L, double rho_i, double rho_w, double g)
 
Vector2d blatter_xz_cfbc_source (double x, double z, double L, double rho_i, double rho_w, double g)
 
Vector2d blatter_xz_cfbc_surface (double x, double L, double rho_i, double rho_w, double g)
 
Vector2d blatter_xz_cfbc_base (double x, double L, double rho_i, double rho_w, double g)
 
Vector2d blatter_xz_halfar_exact (double x, double z, double H_0, double R_0, double rho_i, double g, double B)
 
Vector2d blatter_xz_halfar_source (double x, double z, double H_0, double R_0, double rho_i, double g, double B)
 
Vector2d blatter_xz_halfar_source_lateral (double x, double z, double H_0, double R_0, double rho_i, double g, double B)
 
Vector2d blatter_xz_halfar_source_surface (double x, double H_0, double R_0, double rho_i, double g, double B)
 
Vector2d blatter_xz_halfar_source_base (double x, double H_0, double R_0, double rho_i, double g, double B)
 
double blatter_xz_vanderveen_thickness (double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
 
Vector2d blatter_xz_vanderveen_exact (double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
 
Vector2d blatter_xz_vanderveen_source_lateral (double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
 
Vector2d blatter_xz_vanderveen_source_surface (double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
 
double blatter_xz_vanderveen_beta (double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
 
static void compute_strain_heating_errors (const array::Array3D &strain_heating, const array::Scalar &thickness, const Grid &grid, double &gmax_strain_heating_err, double &gav_strain_heating_err)
 
static void computeSurfaceVelocityErrors (const Grid &grid, const array::Scalar &ice_thickness, const array::Array3D &u3, const array::Array3D &v3, const array::Array3D &w3, double &gmaxUerr, double &gavUerr, double &gmaxWerr, double &gavWerr)
 
static void enthalpy_from_temperature_cold (EnthalpyConverter &EC, const Grid &grid, const array::Scalar &thickness, const array::Array3D &temperature, array::Array3D &enthalpy)
 
static void setInitStateF (Grid &grid, EnthalpyConverter &EC, array::Scalar &bed, array::Scalar &mask, array::Scalar &surface, array::Scalar &thickness, array::Array3D &enthalpy)
 Set the test F initial state. More...
 
static void reportErrors (const Grid &grid, units::System::Ptr unit_system, const array::Scalar &thickness, const array::Array3D &u_sia, const array::Array3D &v_sia, const array::Array3D &w_sia, const array::Array3D &strain_heating)
 
CFLData max_timestep_cfl_3d (const array::Scalar &ice_thickness, const array::CellType &cell_type, const array::Array3D &u3, const array::Array3D &v3, const array::Array3D &w3)
 Compute the maximum velocities for time-stepping and reporting to user. More...
 
CFLData max_timestep_cfl_2d (const array::Scalar &ice_thickness, const array::CellType &cell_type, const array::Vector &velocity)
 Compute the CFL constant associated to first-order upwinding for the sliding contribution to mass continuity. More...
 
MaxTimestep max_timestep_diffusivity (double D_max, double dx, double dy, double adaptive_timestepping_ratio)
 
void convert_vec (petsc::Vec &v, units::System::Ptr system, const std::string &spec1, const std::string &spec2)
 
void convert_vec (petsc::Vec &v, std::shared_ptr< units::System > system, const std::string &spec1, const std::string &spec2)
 
static std::vector< unsigned int > init_interpolation_indexes (const std::vector< double > &z_input, const std::vector< double > &z_output)
 
InputOptions process_input_options (MPI_Comm com, Config::ConstPtr config)
 
static bool string_is_false (const std::string &value)
 
static bool string_is_true (const std::string &value)
 
static bool special_parameter (const std::string &name)
 
void print_config (const Logger &log, int verbosity_threshhold, const Config &config)
 Report configuration parameters to stdout. More...
 
void print_unused_parameters (const Logger &log, int verbosity_threshhold, const Config &config)
 Report unused configuration parameters to stdout. More...
 
void set_flag_from_option (Config &config, const std::string &option, const std::string &parameter_name)
 Get a flag from a command-line option. More...
 
void set_number_from_option (units::System::Ptr unit_system, Config &config, const std::string &name, const std::string &parameter)
 Sets a configuration parameter from a command-line option. More...
 
void set_number_list_from_option (Config &config, const std::string &option, const std::string &parameter)
 
void set_integer_list_from_option (Config &config, const std::string &option, const std::string &parameter)
 
void set_integer_from_option (Config &config, const std::string &name, const std::string &parameter)
 
void set_string_from_option (Config &config, const std::string &option, const std::string &parameter)
 Set one free-form string parameter using command-line options. More...
 
void set_keyword_from_option (Config &config, const std::string &name, const std::string &parameter, const std::string &choices)
 Set a keyword parameter from a command-line option. More...
 
void set_parameter_from_options (units::System::Ptr unit_system, Config &config, const std::string &name)
 Set one parameter using command-line options. More...
 
void set_config_from_options (units::System::Ptr unit_system, Config &config)
 Set configuration parameters using command-line options. More...
 
Config::Ptr config_from_options (MPI_Comm com, const Logger &log, units::System::Ptr unit_system)
 Create a configuration database using command-line options. More...
 
static json_t * find_json_value (json_t *root, const std::string &name)
 
static json_t * pack_json_array (const std::vector< double > &data)
 
std::vector< double > unpack_json_array (const char *name, const json_t *input)
 
template<typename PISMType , typename TMPType >
static void get_all_values (json_t *root, const std::string &path, int type, const char *fmt, std::map< std::string, PISMType > &accum)
 
static void get_all_arrays (json_t *root, const std::string &path, std::map< std::string, std::vector< double > > &accum)
 
template<typename PISMType , typename TMPType >
static PISMType get_value (json_t *object, const std::string &name, const char *fmt, const char *type_name)
 
static void set_value (json_t *data, const std::string &name, json_t *value)
 
std::shared_ptr< Contextcontext_from_options (MPI_Comm com, const std::string &prefix, bool print=false)
 Create a default context using options. More...
 
void handle_fatal_errors (MPI_Comm com)
 
void check_c_call (int errcode, int success, const char *function_name, const char *file, int line)
 
void check_petsc_call (int errcode, const char *function_name, const char *file, int line)
 
std::vector< double > fftfreq (int M, double normalization)
 
void clear_fftw_array (fftw_complex *input, int Nx, int Ny)
 Fill input with zeros. More...
 
void copy_fftw_array (fftw_complex *source, fftw_complex *destination, int Nx, int Ny)
 Copy source to destination. More...
 
void set_real_part (petsc::Vec &input, double normalization, int Mx, int My, int Nx, int Ny, int i0, int j0, fftw_complex *output)
 
void get_real_part (fftw_complex *input, double normalization, int Mx, int My, int Nx, int Ny, int i0, int j0, petsc::Vec &output)
 Get the real part of input and put it in output. More...
 
static std::shared_ptr< GridGrid_FromFile (std::shared_ptr< const Context > ctx, const File &file, const std::string &var_name, grid::Registration r)
 Create a grid from a file, get information from variable var_name. More...
 
static void compute_nprocs (unsigned int Mx, unsigned int My, unsigned int size, unsigned int &Nx, unsigned int &Ny)
 Computes the number of processors in the X- and Y-directions. More...
 
static std::vector< unsigned int > ownership_ranges (unsigned int Mx, unsigned int Nx)
 Computes processor ownership ranges corresponding to equal area distribution among processors. More...
 
static OwnershipRanges compute_ownership_ranges (unsigned int Mx, unsigned int My, unsigned int size)
 
static double compute_horizontal_spacing (double half_width, unsigned int M, bool cell_centered)
 Compute horizontal grid spacing. See compute_horizontal_coordinates() for more. More...
 
static std::vector< double > compute_coordinates (unsigned int M, double delta, double v_min, double v_max, bool cell_centered)
 Compute grid coordinates for one direction (X or Y). More...
 
static std::map< size_t, double > weights_piecewise_constant (const double *x, size_t x_size, double a, double b)
 
static std::map< size_t, double > weights_piecewise_linear (const double *x, size_t x_size, double a, double b)
 
std::map< size_t, double > integration_weights (const double *x, size_t x_size, InterpolationType type, double a, double b)
 
std::map< size_t, double > integration_weights (const std::vector< double > &x, InterpolationType type, double a, double b)
 
io::Backend string_to_backend (const std::string &backend)
 
static std::string backend_to_string (io::Backend backend)
 
static io::Backend choose_backend (MPI_Comm com, const std::string &filename)
 
static io::NCFile::Ptr create_backend (MPI_Comm com, io::Backend backend, int iosysid)
 
AxisType axis_type_from_string (const std::string &input)
 
static void subset_start_and_count (const std::vector< double > &x, double subset_x_min, double subset_x_max, int &x_start, int &x_count)
 Compute start and count for getting a subset of x. More...
 
static nc_type pism_type_to_nc_type (pism::io::Type input)
 
static pism::io::Type nc_type_to_pism_type (int input)
 
void label_components (array::Scalar &mask, petsc::Vec &mask_p0, bool identify_icebergs, double mask_grounded)
 
void label_components (array::Scalar &mask, bool identify_icebergs, double mask_grounded)
 
Logger::Ptr logger_from_options (MPI_Comm com)
 
bool operator== (const MaxTimestep &a, const MaxTimestep &b)
 Equality operator for MaxTimestep. More...
 
bool operator< (const MaxTimestep &a, const MaxTimestep &b)
 Less than operator for MaxTimestep. More...
 
bool operator> (const MaxTimestep &a, const MaxTimestep &b)
 Greater than operator for MaxTimestep. More...
 
void compute_node_types (const array::Scalar1 &ice_thickness, double thickness_threshold, array::Scalar &result)
 
void show_usage (const Logger &log, const std::string &execname, const std::string &usage)
 Print a usage message. More...
 
bool show_usage_check_req_opts (const Logger &log, const std::string &execname, const std::vector< std::string > &required_options, const std::string &usage)
 In a single call a driver program can provide a usage string to the user and check if required options are given, and if not, end. More...
 
std::string string_strip (const std::string &input)
 
bool ends_with (const std::string &str, const std::string &suffix)
 Returns true if str ends with suffix and false otherwise. More...
 
template<class T >
std::string join_impl (const T &input, const std::string &separator)
 
std::string join (const std::vector< std::string > &strings, const std::string &separator)
 Concatenate strings, inserting separator between elements. More...
 
std::string set_join (const std::set< std::string > &input, const std::string &separator)
 
std::string replace_character (const std::string &input, char from, char to)
 
std::vector< std::string > split (const std::string &input, char separator)
 Transform a separator-separated list (a string) into a vector of strings. More...
 
std::set< std::string > set_split (const std::string &input, char separator)
 Transform a separator-separated list (a string) into a set of strings. More...
 
bool is_increasing (const std::vector< double > &a)
 Checks if a vector of doubles is strictly increasing. More...
 
bool member (const std::string &string, const std::set< std::string > &set)
 
void GlobalReduce (MPI_Comm comm, double *local, double *result, int count, MPI_Op op)
 
void GlobalReduce (MPI_Comm comm, int *local, int *result, int count, MPI_Op op)
 
void GlobalMin (MPI_Comm comm, double *local, double *result, int count)
 
void GlobalMax (MPI_Comm comm, double *local, double *result, int count)
 
void GlobalMax (MPI_Comm comm, int *local, int *result, int count)
 
void GlobalSum (MPI_Comm comm, double *local, double *result, int count)
 
void GlobalSum (MPI_Comm comm, int *local, int *result, int count)
 
unsigned int GlobalSum (MPI_Comm comm, unsigned int input)
 
int GlobalSum (MPI_Comm comm, int input)
 
double GlobalMin (MPI_Comm comm, double local)
 
double GlobalMax (MPI_Comm comm, double local)
 
double GlobalSum (MPI_Comm comm, double local)
 
std::string version ()
 
double wall_clock_hours (MPI_Comm com, double start_time)
 Return time since the beginning of the run, in hours. More...
 
std::string timestamp (MPI_Comm com)
 Creates a time-stamp used for the history NetCDF attribute. More...
 
std::string username_prefix (MPI_Comm com)
 Creates a string with the user name, hostname and the time-stamp (for history strings). More...
 
std::string args_string ()
 Uses argc and argv to create the string with current PISM command-line arguments. More...
 
std::string filename_add_suffix (const std::string &filename, const std::string &separator, const std::string &suffix)
 Adds a suffix to a filename. More...
 
double get_time (MPI_Comm comm)
 
std::string printf (const char *format,...)
 
void validate_format_string (const std::string &format)
 
double vector_min (const std::vector< double > &input)
 
double vector_max (const std::vector< double > &input)
 
uint64_t fletcher64 (const uint32_t *data, size_t length)
 
void print_checksum (MPI_Comm com, const std::vector< double > &data, const char *label)
 
void print_vector (MPI_Comm com, const std::vector< double > &data, const char *label)
 
void print_vector (MPI_Comm com, const std::vector< int > &data, const char *label)
 
double average_water_column_pressure (double ice_thickness, double bed, double floatation_level, double rho_ice, double rho_water, double g)
 
double parse_number (const std::string &input)
 
long int parse_integer (const std::string &input)
 
template<typename T >
combine (const T &a, const T &b)
 
template<typename T >
clip (T x, T a, T b)
 
VariableMetadata epsg_to_cf (units::System::Ptr system, const std::string &proj_string)
 Return CF-Convention "mapping" variable corresponding to an EPSG code specified in a PROJ string. More...
 
void check_consistency_epsg (const MappingInfo &info)
 Check consistency of the "mapping" variable with the EPSG code in the proj string. More...
 
MappingInfo get_projection_info (const File &input_file, const std::string &mapping_name, units::System::Ptr unit_system)
 Get projection info from a file. More...
 
void compute_cell_areas (const std::string &projection, array::Scalar &result)
 
static void compute_lon_lat (const std::string &projection, LonLat which, array::Scalar &result)
 
static void compute_lon_lat_bounds (const std::string &projection, LonLat which, array::Array3D &result)
 
void compute_longitude (const std::string &projection, array::Scalar &result)
 
void compute_latitude (const std::string &projection, array::Scalar &result)
 
void compute_lon_bounds (const std::string &projection, array::Array3D &result)
 
void compute_lat_bounds (const std::string &projection, array::Array3D &result)
 
static void report_range (const std::vector< double > &data, const units::System::Ptr &unit_system, const VariableMetadata &metadata, const Logger &log)
 Report the range of a time-series stored in data. More...
 
static std::string reference_date_from_file (const File &file, const std::string &time_name, const std::string &default_value, bool stop_on_error)
 Get the reference date from a file. More...
 
static std::string calendar_from_file (const File &file, const std::string &time_name, const std::string &default_value, bool stop_on_error)
 Get the calendar name from a file. More...
 
static std::string reference_date (const File *input_file, const Config &config, const Logger &log)
 
static std::string calendar (const File *input_file, const Config &config, const Logger &log)
 
static double increment_date (const units::Unit &time_units, const std::string &calendar, double T, double years)
 
static double parse_date (const std::string &input, const units::Unit &time_units, const std::string &calendar)
 
static double start_time (const Config &config, const Logger &log, const File *file, const std::string &reference_date, const std::string &calendar, const units::Unit &time_units)
 
static double end_time (const Config &config, double time_start, const std::string &calendar, const units::Unit &time_units)
 
void check_forcing_duration (const Time &time, double forcing_start, double forcing_end)
 
bool pism_is_valid_calendar_name (const std::string &name)
 
Vector2d operator* (const double &a, const Vector2d &v)
 
static void write (units::System::Ptr sys, const File &file, size_t start, const char *name, const char *units, const char *long_name, double value, io::Type type=io::PISM_DOUBLE)
 
int getsb (double r, double *sb, double *dsbdr)
 
double criticalW (double r)
 
int funcP (double r, const double W[], double f[], void *params)
 
double initialconditionW ()
 
double psteady (double W, double magvb, double Po)
 
int getW (const double *r, int N, double *W, double EPS_ABS, double EPS_REL, int ode_method)
 
int exactP_list (const double *r, int N, double *h, double *magvb, double *Wcrit, double *W, double *P, double EPS_ABS, double EPS_REL, int ode_method)
 
TestPParameters exactP (const std::vector< double > &r, double EPS_ABS, double EPS_REL, int ode_method)
 
static double p3 (double x)
 
static double p4 (double x)
 
TestFGParameters exactFG (double t, double r, const std::vector< double > &z, double Cp)
 

Variables

static const char * land_ice_area_fraction_name = "sftgif"
 
static const char * grounded_ice_sheet_area_fraction_name = "sftgrf"
 
static const char * floating_ice_sheet_area_fraction_name = "sftflf"
 
static const int TEMPORARY_STRING_LENGTH = 32768
 
static const double SperA = 31556926.0
 
static const double g = 9.81
 
static const double rhoi = 910.0
 
static const double rhow = 1000.0
 
static const double Aglen = 3.1689e-24
 
static const double k = (0.01 / (rhow * g))
 
static const double Wr = 1.0
 
static const double c1 = 0.500
 
static const double c2 = 0.040
 
static const double m0 = ((0.20 / SperA) * rhow)
 
static const double h0 = 500.0
 
static const double v0 = (100.0 / SperA)
 
static const double R1 = 5000.0
 

Detailed Description

This class implements dEBM-simple, the simple diurnal energy balance model described in

M. Zeitz, R. Reese, J. Beckmann, U. Krebs-Kanzow, and R. Winkelmann, “Impact of the melt–albedo feedback on the future evolution of the Greenland Ice Sheet with PISM-dEBM-simple,” The Cryosphere, vol. 15, Art. no. 12, Dec. 2021.

See also

U. Krebs-Kanzow, P. Gierz, and G. Lohmann, “Brief communication: An ice surface melt scheme including the diurnal cycle of solar radiation,” The Cryosphere, vol. 12, Art. no. 12, Dec. 2018.

and chapter 2 of

K. N. Liou, Introduction to Atmospheric Radiation. Elsevier Science & Technology Books, 2002.

This file should contain the class definition and nothing else. Implementations should go in separate files.

References:

[Smolarkiewicz1983] P. K. Smolarkiewicz, “A Simple Positive Definite Advection Scheme with Small Implicit Diffusion,” Monthly Weather Review, vol. 111, Art. no. 3, Mar. 1983.

[Smolarkiewicz1990] P. K. Smolarkiewicz and W. W. Grabowski, “The multidimensional positive definite advection transport algorithm: nonoscillatory option,” Journal of Computational Physics, vol. 86, Art. no. 2, Feb. 1990.

References:

[Li2008] J.-G. Li, “Upstream Nonoscillatory Advection Schemes,” Monthly Weather Review, vol. 136, Art. no. 12, Dec. 2008.

Convert PISM's IO types into NetCDF types and back. Note that NC_* may be macros, so you need to include the appropriate NetCDF header first.