PISM, A Parallel Ice Sheet Model  stable v2.0.4 committed by Constantine Khrulev on 2022-05-25 12:02:27 -0800
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
pism Namespace Reference

Namespaces

 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.
 
 diagnostics
 
 energy
 Energy balance models and utilities.
 
 fem
 
 frontalmelt
 Frontal melt models and modifiers.
 
 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
 
 vec
 

Classes

class  AgeColumnSystem
 Tridiagonal linear system for vertical column of age (pure advection) problem. More...
 
class  AgeModelInputs
 
class  AgeModel
 
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  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  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  grid_info
 Contains parameters of an input file grid. More...
 
class  GridParameters
 Grid parameters; used to collect defaults before an IceGrid is allocated. More...
 
class  IceGrid
 Describes the PISM grid and the distribution of data across processors. More...
 
class  PointsWithGhosts
 
class  Points
 
class  PetscAccessible
 
class  AccessList
 Makes sure that we call begin_access() and end_access() for all accessed IceModelVecs. More...
 
class  IceModelVec
 Abstract class for reading, writing, allocating, and accessing a DA-based PETSc Vec (2D and 3D fields) from within IceModel. More...
 
class  IceModelVec2S
 
class  IceModelVec2Int
 A simple class "hiding" the fact that the mask is stored as floating-point scalars (instead of integers). More...
 
class  IceModelVec3
 A virtual class collecting methods common to ice and bedrock 3D fields. More...
 
class  IceModelVec2Stag
 A class for storing and accessing internal staggered-grid 2D fields. Uses dof=2 storage. This class is identical to IceModelVec2V, except that components are not called u and v (to avoid confusion). More...
 
class  IceModelVec2
 A storage vector combining related fields in a struct. More...
 
class  IceModelVec2CellType
 "Cell type" mask. Adds convenience methods to IceModelVec2Int. More...
 
class  IceModelVec2T
 A class for storing and accessing 2D time-series (for climate forcing) More...
 
class  IceModelVec2V
 
class  Interpolation
 
struct  VariableLookupData
 
class  File
 High-level PISM I/O class. More...
 
class  LocalInterpCtx
 The "local interpolation context" describes the processor's part of the source NetCDF file (for regridding). More...
 
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  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  Vector2
 This class represents a 2D vector field (such as ice velocity) at a certain grid point. More...
 
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, Vector2SNESVectorProblem
 
typedef std::map< std::string, Diagnostic::PtrDiagnosticList
 
typedef std::map< std::string, TSDiagnostic::PtrTSDiagnosticList
 

Enumerations

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  SpacingType { UNKNOWN = 0 , EQUAL , QUADRATIC }
 
enum  Periodicity { NOT_PERIODIC = 0 , X_PERIODIC = 1 , Y_PERIODIC = 2 , XY_PERIODIC = 3 }
 
enum  GridRegistration { CELL_CENTER , CELL_CORNER }
 
enum  IceModelVecKind { WITHOUT_GHOSTS =0 , WITH_GHOSTS =1 }
 What "kind" of a vector to create: with or without ghosts. More...
 
enum  InterpolationType { LINEAR , NEAREST , PIECEWISE_CONSTANT }
 
enum  AxisType {
  X_AXIS , Y_AXIS , Z_AXIS , T_AXIS ,
  UNKNOWN_AXIS
}
 
enum  IO_Type {
  PISM_NAT = 0 , PISM_BYTE = 1 , PISM_CHAR = 2 , PISM_SHORT = 3 ,
  PISM_INT = 4 , PISM_FLOAT = 5 , PISM_DOUBLE = 6
}
 
enum  IO_Backend {
  PISM_GUESS , PISM_NETCDF3 , PISM_NETCDF4_SERIAL , PISM_NETCDF4_PARALLEL ,
  PISM_PNETCDF , PISM_PIO_PNETCDF , PISM_PIO_NETCDF , PISM_PIO_NETCDF4C ,
  PISM_PIO_NETCDF4P
}
 
enum  IO_Mode { PISM_READONLY = 7 , PISM_READWRITE = 8 , PISM_READWRITE_CLOBBER = 9 , PISM_READWRITE_MOVE = 10 }
 
enum  Dim_Length { PISM_UNLIMITED = 0 }
 
enum  Fill_Mode { PISM_FILL = 0 , PISM_NOFILL = 0x100 }
 
enum  RegriddingFlag { OPTIONAL , OPTIONAL_FILL_MISSING , CRITICAL , CRITICAL_FILL_MISSING }
 
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 IceModelVec *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 IceModelVec2S &surface, const IceModelVec2S &reference_surface, double lapse_rate, IceModelVec2S &result)
 
void remove_narrow_tongues (const Geometry &geometry, IceModelVec2S &ice_thickness)
 
void check_minimum_ice_thickness (const IceModelVec2S &ice_thickness)
 
void ice_bottom_surface (const Geometry &geometry, IceModelVec2S &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 IceGrid &grid, double width, IceModelVec2Int &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 IceModelVec2CellType &cell_type, const IceModelVec2Stag &flux, double dt, bool add_values, IceModelVec2S &output)
 
double total_grounding_line_flux (const IceModelVec2CellType &cell_type, const IceModelVec2Stag &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 IceModelVec2S &sea_level, const IceModelVec2S &ice_thickness, const IceModelVec2S &bed_topography, IceModelVec2S &result)
 
double part_grid_threshold_thickness (stencils::Star< int > M, stencils::Star< double > H, stencils::Star< double > h, double bed_elevation)
 Compute threshold thickness used when deciding if a partially-filled cell should be considered 'full'. More...
 
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 IceModelVec2S &sea_level, const IceModelVec2CellType &cell_type, const IceModelVec2S &bed_topography, const IceModelVec2S &ice_thickness, const IceModelVec2S &basal_enthalpy, const IceModelVec2S &ice_surface_temperature, IceModelVec2S &result)
 Compute the temperature seen by the top of the bedrock thermal layer. More...
 
void generate_trough_topography (IceModelVec2S &result)
 
void generate_mound_topography (IceModelVec2S &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)
 
MaxTimestep reporting_max_timestep (const std::vector< double > &times, double t, double eps, const std::string &description)
 
bool check_maximum_ice_thickness (const IceModelVec2S &ice_thickness)
 Check if the thickness of the ice is too large. More...
 
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 IceModelVec3 &u3, const IceModelVec3 &v3, const IceModelVec2S &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)
 
IceGrid::Ptr regional_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 IceModelVec2Int &mask, IceModelVec2S &basal_yield_stress)
 
static double secondInvariant_2D (const Vector2 &U_x, const Vector2 &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...
 
Vector2 blatter_xy_exact (double x, double y)
 
Vector2 blatter_xy_source (double x, double y, double B)
 
Vector2 blatter_xz_exact (double x, double z, double A, double rho, double g, double s_0, double alpha, double H, double beta)
 
Vector2 blatter_xz_source (double x, double z, double A, double rho, double g, double s_0, double alpha, double H, double beta)
 
Vector2 blatter_xz_source_bed (double x, double z, double A, double rho, double g, double s_0, double alpha, double H, double beta)
 
Vector2 blatter_xz_source_surface (double x, double z, double A, double rho, double g, double s_0, double alpha, double H, double beta)
 
Vector2 blatter_xz_cfbc_exact (double x, double z, double B, double L, double rho_i, double rho_w, double g)
 
Vector2 blatter_xz_cfbc_source (double x, double z, double L, double rho_i, double rho_w, double g)
 
Vector2 blatter_xz_cfbc_surface (double x, double L, double rho_i, double rho_w, double g)
 
Vector2 blatter_xz_cfbc_base (double x, double L, double rho_i, double rho_w, double g)
 
Vector2 blatter_xz_halfar_exact (double x, double z, double H_0, double R_0, double rho_i, double g, double B)
 
Vector2 blatter_xz_halfar_source (double x, double z, double H_0, double R_0, double rho_i, double g, double B)
 
Vector2 blatter_xz_halfar_source_lateral (double x, double z, double H_0, double R_0, double rho_i, double g, double B)
 
Vector2 blatter_xz_halfar_source_surface (double x, double H_0, double R_0, double rho_i, double g, double B)
 
Vector2 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)
 
Vector2 blatter_xz_vanderveen_exact (double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
 
Vector2 blatter_xz_vanderveen_source_lateral (double x, double alpha, double H_0, double Q_0, double rho_i, double g, double B)
 
Vector2 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 IceModelVec3 &strain_heating, const IceModelVec2S &thickness, const IceGrid &grid, double &gmax_strain_heating_err, double &gav_strain_heating_err)
 
static void computeSurfaceVelocityErrors (const IceGrid &grid, const IceModelVec2S &ice_thickness, const IceModelVec3 &u3, const IceModelVec3 &v3, const IceModelVec3 &w3, double &gmaxUerr, double &gavUerr, double &gmaxWerr, double &gavWerr)
 
static void enthalpy_from_temperature_cold (EnthalpyConverter &EC, const IceGrid &grid, const IceModelVec2S &thickness, const IceModelVec3 &temperature, IceModelVec3 &enthalpy)
 
static void setInitStateF (IceGrid &grid, EnthalpyConverter &EC, IceModelVec2S &bed, IceModelVec2Int &mask, IceModelVec2S &surface, IceModelVec2S &thickness, IceModelVec3 &enthalpy)
 Set the test F initial state. More...
 
static void reportErrors (const IceGrid &grid, units::System::Ptr unit_system, const IceModelVec2S &thickness, const IceModelVec3 &u_sia, const IceModelVec3 &v_sia, const IceModelVec3 &w_sia, const IceModelVec3 &strain_heating)
 
CFLData max_timestep_cfl_3d (const IceModelVec2S &ice_thickness, const IceModelVec2CellType &cell_type, const IceModelVec3 &u3, const IceModelVec3 &v3, const IceModelVec3 &w3)
 Compute the maximum velocities for time-stepping and reporting to user. More...
 
CFLData max_timestep_cfl_2d (const IceModelVec2S &ice_thickness, const IceModelVec2CellType &cell_type, const IceModelVec2V &velocity)
 Compute the CFL constant associated to first-order upwinding for the sliding contribution to mass continuity. More...
 
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...
 
Periodicity string_to_periodicity (const std::string &keyword)
 Convert a string to Periodicity. More...
 
std::string periodicity_to_string (Periodicity p)
 Convert Periodicity to a STL string. More...
 
SpacingType string_to_spacing (const std::string &keyword)
 Convert an STL string to SpacingType. More...
 
std::string spacing_to_string (SpacingType s)
 Convert SpacingType to an STL string. More...
 
GridRegistration string_to_registration (const std::string &keyword)
 
std::string registration_to_string (GridRegistration registration)
 
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 int dm_hash (int dm_dof, int stencil_width)
 
double radius (const IceGrid &grid, int i, int j)
 Returns the distance from the point (i,j) to the origin. More...
 
bool in_null_strip (const IceGrid &grid, int i, int j, double strip_width)
 Check if a point (i,j) is in the strip of stripwidth meters around the edge of the computational domain. More...
 
bool grid_edge (const IceGrid &grid, int i, int j)
 
static void global_to_local (petsc::DM &dm, Vec source, Vec destination)
 
static NormType int_to_normtype (int input)
 
void convert_vec (petsc::Vec &v, units::System::Ptr system, const std::string &spec1, const std::string &spec2)
 
void staggered_to_regular (const IceModelVec2CellType &cell_type, const IceModelVec2Stag &input, bool include_floating_ice, IceModelVec2S &result)
 
void staggered_to_regular (const IceModelVec2CellType &cell_type, const IceModelVec2Stag &input, bool include_floating_ice, IceModelVec2V &result)
 
template<class F , typename T >
interpolate (const F &field, double x, double y)
 
double diff_x (const IceModelVec2S &array, int i, int j)
 Returns the x-derivative at i,j approximated using centered finite differences. More...
 
double diff_y (const IceModelVec2S &array, int i, int j)
 Returns the y-derivative at i,j approximated using centered finite differences. More...
 
double diff_x_p (const IceModelVec2S &array, int i, int j)
 Returns the x-derivative at i,j approximated using centered finite differences. Respects grid periodicity and uses one-sided FD at grid edges if necessary. More...
 
double diff_y_p (const IceModelVec2S &array, int i, int j)
 Returns the y-derivative at i,j approximated using centered finite differences. Respects grid periodicity and uses one-sided FD at grid edges if necessary. More...
 
double sum (const IceModelVec2S &input)
 Sums up all the values in an IceModelVec2S object. Ignores ghosts. More...
 
double min (const IceModelVec2S &input)
 Finds minimum over all the values in an IceModelVec2S object. Ignores ghosts. More...
 
double max (const IceModelVec2S &input)
 Finds maximum over all the values in an IceModelVec2S object. Ignores ghosts. More...
 
double absmax (const IceModelVec2S &input)
 Finds maximum over all the absolute values in an IceModelVec2S object. Ignores ghosts. More...
 
void apply_mask (const IceModelVec2S &M, double fill, IceModelVec2S &result)
 Masks out all the areas where \( M \le 0 \) by setting them to fill. More...
 
void compute_magnitude (const IceModelVec2S &v_x, const IceModelVec2S &v_y, IceModelVec2S &result)
 Sets an IceModelVec2 to the magnitude of a 2D vector field with components v_x and v_y. More...
 
void compute_magnitude (const IceModelVec2V &input, IceModelVec2S &result)
 
std::shared_ptr< IceModelVec2Sduplicate (const IceModelVec2S &source)
 
void extract_surface (const IceModelVec3 &data, double z, IceModelVec2S &output)
 Copies a horizontal slice at level z of an IceModelVec3 into an IceModelVec2S gslice. More...
 
void extract_surface (const IceModelVec3 &data, const IceModelVec2S &z, IceModelVec2S &output)
 Copies the values of an IceModelVec3 at the ice surface (specified by the level z) to an IceModelVec2S gsurf. More...
 
void sum_columns (const IceModelVec3 &data, double A, double B, IceModelVec2S &output)
 
std::shared_ptr< IceModelVec3duplicate (const IceModelVec3 &source)
 
std::array< double, 2 > absmax (const IceModelVec2Stag &input)
 
void convert_vec (petsc::Vec &v, std::shared_ptr< units::System > system, const std::string &spec1, const std::string &spec2)
 
std::shared_ptr< IceModelVec2Vduplicate (const IceModelVec2V &source)
 
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)
 
static void subset_start_and_count (const std::vector< double > &x, double subset_x_min, double subset_x_max, unsigned int &x_start, unsigned 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 (IceModelVec2Int &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 IceModelVec2S &ice_thickness, double thickness_threshold, IceModelVec2Int &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 ()
 
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, IceModelVec2S &result)
 
static void compute_lon_lat (const std::string &projection, LonLat which, IceModelVec2S &result)
 
static void compute_lon_lat_bounds (const std::string &projection, LonLat which, IceModelVec3 &result)
 
void compute_longitude (const std::string &projection, IceModelVec2S &result)
 
void compute_latitude (const std::string &projection, IceModelVec2S &result)
 
void compute_lon_bounds (const std::string &projection, IceModelVec3 &result)
 
void compute_lat_bounds (const std::string &projection, IceModelVec3 &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)
 
Vector2 operator* (const double &a, const Vector2 &v)
 
bool operator== (const Vector2 &a, const Vector2 &b)
 
bool operator!= (const Vector2 &a, const Vector2 &b)
 
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=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 file should contain the class definition and nothing else. Implementations should go in separate files.

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.