Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Geometry.hh
Go to the documentation of this file.
1/* Copyright (C) 2016, 2017, 2018, 2019, 2020, 2021, 2022 PISM Authors
2 *
3 * This file is part of PISM.
4 *
5 * PISM is free software; you can redistribute it and/or modify it under the
6 * terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * PISM is distributed in the hope that it will be useful, but WITHOUT ANY
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with PISM; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef GEOMETRY_H
21#define GEOMETRY_H
22
23#include "pism/util/array/CellType.hh"
24
25namespace pism {
26
27class Grid;
28
29class Geometry {
30public:
31 Geometry(const std::shared_ptr<const Grid> &grid);
32
33 /*!
34 * Ensures consistency of ice geometry by re-computing cell type, cell grounded fraction, and ice
35 * surface elevation.
36 */
37 void ensure_consistency(double ice_free_thickness_threshold);
38
39 // This is grid information, which is not (strictly speaking) ice geometry, but it should be
40 // available everywhere we use ice geometry.
43
44 // Part of ice geometry, but managed by the bed model and the ocean model. From the point of view
45 // of the code updating ice geometry, these are inputs. These fields should be filled in before
46 // passing a Geometry instance to the code that uses it.
49
50 // the minimal "state"
53
54 // redundant fields (can be computed using the ones above)
58
59 void dump(const char *filename) const;
60};
61
62void ice_bottom_surface(const Geometry &geometry, array::Scalar &result);
63
64double ice_volume(const Geometry &geometry, double thickness_threshold);
65double ice_area_floating(const Geometry &geometry, double thickness_threshold);
66double ice_area_grounded(const Geometry &geometry, double thickness_threshold);
67double ice_area(const Geometry &geometry, double thickness_threshold);
68double ice_volume_not_displacing_seawater(const Geometry &geometry,
69 double thickness_threshold);
70double sea_level_rise_potential(const Geometry &geometry, double thickness_threshold);
71
72void set_no_model_strip(const Grid &grid, double width, array::Scalar &result);
73
74} // end of namespace pism
75
76#endif /* GEOMETRY_H */
array::Scalar1 sea_level_elevation
Definition Geometry.hh:48
array::Scalar cell_grounded_fraction
Definition Geometry.hh:56
void ensure_consistency(double ice_free_thickness_threshold)
Definition Geometry.cc:114
array::Scalar2 ice_surface_elevation
Definition Geometry.hh:57
array::Scalar1 ice_area_specific_volume
Definition Geometry.hh:52
array::CellType2 cell_type
Definition Geometry.hh:55
void dump(const char *filename) const
Definition Geometry.cc:195
array::Scalar2 ice_thickness
Definition Geometry.hh:51
array::Scalar longitude
Definition Geometry.hh:42
array::Scalar2 bed_elevation
Definition Geometry.hh:47
array::Scalar latitude
Definition Geometry.hh:41
Describes the PISM grid and the distribution of data across processors.
Definition Grid.hh:290
double ice_volume_not_displacing_seawater(const Geometry &geometry, double thickness_threshold)
Definition Geometry.cc:287
double ice_area(const Geometry &geometry, double thickness_threshold)
Computes ice area, in m^2.
Definition Geometry.cc:336
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 d...
Definition Geometry.cc:384
double ice_area_floating(const Geometry &geometry, double thickness_threshold)
Computes floating ice area, in m^2.
Definition Geometry.cc:353
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.
Definition Geometry.cc:362
double ice_volume(const Geometry &geometry, double thickness_threshold)
Computes the ice volume, in m^3.
Definition Geometry.cc:254
void ice_bottom_surface(const Geometry &geometry, array::Scalar &result)
Definition Geometry.cc:218
double ice_area_grounded(const Geometry &geometry, double thickness_threshold)
Computes grounded ice area, in m^2.
Definition Geometry.cc:344