tGeometry.hh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
HTML git clone git://src.adamsgaard.dk/pism
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
tGeometry.hh (2836B)
---
1 /* Copyright (C) 2016, 2017, 2018, 2019 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/IceGrid.hh"
24 #include "pism/util/iceModelVec.hh"
25 #include "pism/util/IceModelVec2CellType.hh"
26
27 namespace pism {
28
29 class Geometry {
30 private:
31 const unsigned int m_stencil_width;
32 public:
33 Geometry(IceGrid::ConstPtr grid);
34
35 /*!
36 * Ensures consistency of ice geometry by re-computing cell type, cell grounded fraction, and ice
37 * surface elevation.
38 */
39 void ensure_consistency(double ice_free_thickness_threshold);
40
41 // This is grid information, which is not (strictly speaking) ice geometry, but it should be
42 // available everywhere we use ice geometry.
43 IceModelVec2S latitude;
44 IceModelVec2S longitude;
45
46 // Part of ice geometry, but managed by the bed model and the ocean model. From the point of view
47 // of the code updating ice geometry, these are inputs. These fields should be filled in before
48 // passing a Geometry instance to the code that uses it.
49 IceModelVec2S bed_elevation;
50 IceModelVec2S sea_level_elevation;
51
52 // the minimal "state"
53 IceModelVec2S ice_thickness;
54 IceModelVec2S ice_area_specific_volume; // previously known as Href
55
56 // redundant fields (can be computed using the ones above)
57 IceModelVec2CellType cell_type;
58 IceModelVec2S cell_grounded_fraction;
59 IceModelVec2S ice_surface_elevation;
60 };
61
62 void ice_bottom_surface(const Geometry &geometry, IceModelVec2S &result);
63
64 double ice_volume(const Geometry &geometry, double thickness_threshold);
65 double ice_area_floating(const Geometry &geometry, double thickness_threshold);
66 double ice_area_grounded(const Geometry &geometry, double thickness_threshold);
67 double ice_area(const Geometry &geometry, double thickness_threshold);
68 double ice_volume_not_displacing_seawater(const Geometry &geometry,
69 double thickness_threshold);
70 double sea_level_rise_potential(const Geometry &geometry, double thickness_threshold);
71
72 void set_no_model_strip(const IceGrid &grid, double width, IceModelVec2Int &result);
73
74 } // end of namespace pism
75
76 #endif /* GEOMETRY_H */