PISM, A Parallel Ice Sheet Model  stable v1.2 committed by Constantine Khrulev on 2020-02-11 20:24:05 -0900
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.
 
 FD
 
 fem
 FEM (Finite Element Method) utilities.
 
 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.
 
 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
 

Classes

class  AccessList
 Makes sure that we call begin_access() and end_access() for all accessed IceModelVecs. More...
 
class  AgeColumnSystem
 Tridiagonal linear system for vertical column of age (pure advection) problem. More...
 
class  AgeModel
 
class  AgeModelInputs
 
struct  BoxStencil
 
struct  CFLData
 
class  CHHeatFlux
 Report rate of cryo-hydrologic warming. More...
 
class  CHLiquidWaterFraction
 Report liquid water fraction in the cryo-hydrologic system. More...
 
class  CHTemperature
 Report temperature of the cryo-hydrologic system. More...
 
class  ColdEnthalpyConverter
 An EnthalpyConverter for use in verification tests. More...
 
class  ColumnInterpolation
 
class  columnSystemCtx
 Base class for tridiagonal systems in the ice. More...
 
class  Component
 A class defining a common interface for most PISM sub-models. More...
 
class  Config
 A class for storing and accessing PISM configuration flags and parameters. More...
 
class  ConfigJSON
 The JSON-based Config implementation. More...
 
class  ConfigWithPrefix
 
class  ConstantYieldStress
 
class  Context
 
class  DefaultConfig
 Default PISM configuration database: uses NetCDF files; can be initialized from a file specified using a command-line option. More...
 
class  Diag
 A template derived from Diagnostic, adding a "Model". More...
 
class  DiagAverageRate
 
class  Diagnostic
 Class representing diagnostic computations in PISM. More...
 
class  DiagWithDedicatedStorage
 
class  EnthalpyConverter
 Converts between specific enthalpy and temperature or liquid content. More...
 
class  ErrorLocation
 
class  FFTWArray
 
class  Field
 
class  File
 High-level PISM I/O class. More...
 
struct  ForcingOptions
 
class  FractureDensity
 
class  FrontalMeltInputs
 
class  FrontRetreat
 
class  GenericTerminationReason
 
class  Geometry
 
class  GeometryCalculator
 
class  GeometryEvolution
 
class  GhostedField
 
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  IceBasalResistancePlasticLaw
 Class containing physical constants and the constitutive relation describing till for SSA. More...
 
class  IceBasalResistancePseudoPlasticLaw
 
class  IceCompModel
 
class  IceEISModel
 Derived class for doing EISMINT II simplified geometry experiments.
More...
 
class  IceGrid
 Describes the PISM grid and the distribution of data across processors. More...
 
class  IceModel
 
class  IceModelVec
 Abstract class for reading, writing, allocating, and accessing a DA-based PETSc Vec (2D and 3D fields) from within IceModel. More...
 
class  IceModelVec2
 
class  IceModelVec2CellType
 "Cell type" mask. Adds convenience methods to IceModelVec2Int. More...
 
class  IceModelVec2Fat
 A "fat" storage vector for combining related fields (such as SSAFEM coefficients). More...
 
class  IceModelVec2Int
 A simple class "hiding" the fact that the mask is stored as floating-point scalars (instead of integers). More...
 
class  IceModelVec2S
 
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  IceModelVec2T
 A class for storing and accessing 2D time-series (for climate forcing) More...
 
class  IceModelVec2V
 
class  IceModelVec3
 Class for a 3d DA-based Vec for ice scalar quantities. More...
 
class  IceModelVec3Custom
 
class  IceModelVec3D
 A virtual class collecting methods common to ice and bedrock 3D fields. More...
 
class  IceRegionalModel
 A version of the PISM core class (IceModel) which knows about the no_model_mask and its semantics. More...
 
struct  InputOptions
 
class  Interpolation
 
class  KSPTerminationReason
 
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  MappingInfo
 
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  MohrCoulombPointwise
 
class  MohrCoulombYieldStress
 PISM's default basal yield stress model which applies the Mohr-Coulomb model of deformable, pressurized till. More...
 
class  NetCDFConfig
 A class for reading, writing and accessing PISM configuration flags and parameters. More...
 
struct  OwnershipRanges
 
class  ParallelSection
 
class  PCFactory
 
class  PetscAccessible
 
struct  Point
 
class  Points
 
class  PointsWithGhosts
 
class  Poisson
 
class  PrescribedRetreat
 
class  Profiling
 
class  Proj
 A wrapper for PJ that makes sure pj_destroy is called. More...
 
struct  Range
 
class  RegionalGeometryEvolution
 
class  RegionalYieldStress
 
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  RuntimeError
 
class  Scalar2DField
 
class  Scalar3DField
 
class  ScalarField
 
class  ScalarForcing
 
class  SNESProblem
 
class  SNESTerminationReason
 
class  SpatialVariableMetadata
 Spatial NetCDF variable (corresponding to a 2D or 3D scalar field). More...
 
struct  StarStencil
 Star stencil points (in the map-plane). More...
 
class  StringLogger
 A logger that accumulates messages and reports them as a string. More...
 
class  TerminationReason
 
struct  TestFGParameters
 
struct  TestPParameters
 
class  Time
 Time management class. More...
 
class  Time_Calendar
 
class  TimeBoundsMetadata
 
class  Timeseries
 A general class for reading and accessing time-series. More...
 
class  TimeseriesMetadata
 An internal class for reading, writing and converting time-series. More...
 
class  TridiagonalSystem
 Virtual base class. Abstracts a tridiagonal system to solve in a column of ice and/or bedrock. More...
 
class  TSDiag
 
class  TSDiagnostic
 PISM's scalar time-series diagnostics. More...
 
class  TSFluxDiagnostic
 Scalar diagnostic reporting a "flux". More...
 
class  TSRateDiagnostic
 Scalar diagnostic reporting the rate of change of a quantity modeled by PISM. More...
 
class  TSSnapshotDiagnostic
 Scalar diagnostic reporting a snapshot of a quantity modeled by PISM. More...
 
struct  VariableLookupData
 
class  VariableMetadata
 A class for handling variable metadata, reading, writing and converting from input units and to output units. More...
 
class  Vars
 A class for passing PISM variables from the core to other parts of the code (such as climate couplers). More...
 
struct  VecAndScatter
 
class  Vector2
 This class represents a 2D vector field (such as ice velocity) at a certain grid point. More...
 
class  YieldStress
 The PISM basal yield stress model interface (virtual base class) More...
 
class  YieldStressInputs
 

Typedefs

typedef BoxStencil< doubleBox
 
typedef std::map< std::string, std::vector< VariableMetadata > > Metadata
 
typedef SNESProblem< 1, doubleSNESScalarProblem
 
typedef SNESProblem< 2, Vector2SNESVectorProblem
 
typedef std::map< std::string, Diagnostic::PtrDiagnosticList
 
typedef std::map< std::string, TSDiagnostic::PtrTSDiagnosticList
 

Enumerations

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, LINEAR_PERIODIC }
 
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_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_velocity (int current, int neighbor, double velocity)
 
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, InsertMode flag, 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 (StarStencil< int > M, StarStencil< double > H, StarStencil< 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, 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 (Context::Ptr 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)
 
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 intinit_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 (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 (Config &config, const std::string &name)
 Set one parameter using command-line options. More...
 
void set_config_from_options (Config &config)
 Set configuration parameters using command-line options. More...
 
Config::Ptr config_from_options (MPI_Comm com, const Logger &log, units::System::Ptr sys)
 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< doubleunpack_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)
 
Context::Ptr context_from_options (MPI_Comm com, const std::string &prefix)
 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< doublefftfreq (int M, double d)
 
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 (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, 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 intownership_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< doublecompute_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)
 
void compute_params (const IceModelVec *const x, const IceModelVec *const y, const IceModelVec *const z, int &ghosts, bool &scatter)
 Compute parameters for 2D loop computations involving 3 IceModelVecs. More...
 
VecAndScatter scatter_part (Vec v_in, int start, int length, int target_rank)
 
Vec get_natural_work (DM dm)
 
Vec proc0_copy (DM dm, int start, int length)
 
void convert_vec (Vec v, units::System::Ptr system, const std::string &spec1, const std::string &spec2)
 
bool set_contains (const std::set< std::string > &S, const IceModelVec &field)
 
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)
 
template<class V >
void add_2d (const IceModelVec *const x_in, double alpha, const IceModelVec *const y_in, IceModelVec *const result)
 Computes result = x + alpha * y, where x, y, and z are 2D IceModelVecs (scalar or vector). More...
 
template<class V >
void copy_2d (const IceModelVec *const source, IceModelVec *const destination)
 
IO_Backend string_to_backend (const std::string &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...
 
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::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 GlobalMin (MPI_Comm comm, double *local, double *result, int count)
 
void GlobalMax (MPI_Comm comm, double *local, double *result, int count)
 
void GlobalSum (MPI_Comm comm, double *local, double *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)
 
template<typename T >
combine (const T &a, const T &b)
 
double clip (double x, double a, double 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...
 
static double triangle_area (double *A, double *B, double *C)
 Computes the area of a triangle using vector cross product. 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, IceModelVec3D &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, IceModelVec3D &result)
 
void compute_lat_bounds (const std::string &projection, IceModelVec3D &result)
 
std::string calendar_from_options (MPI_Comm com, const Config &config)
 
Time::Ptr time_from_options (MPI_Comm com, Config::ConstPtr config, units::System::Ptr system)
 Create a Time instance by processing command-line options. More...
 
void initialize_time (MPI_Comm com, const std::string &dimension_name, const Logger &log, Time &time)
 Initialize model time using command-line options and (possibly) files. More...
 
std::string reference_date_from_file (const File &file, const std::string &time_name)
 Get the reference date from a file. More...
 
bool pism_is_valid_calendar_name (const std::string &name)
 
static std::string string_strip (std::string input)
 
bool set_contains (const std::set< std::string > &S, const VariableMetadata &variable)
 
Vector2 operator* (const double &a, const Vector2 &v)
 
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.