tPrescribedRetreat.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
---
tPrescribedRetreat.hh (2099B)
---
1 /* Copyright (C) 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 PRESCRIBED_RETREAT_H
21 #define PRESCRIBED_RETREAT_H
22
23 #include "pism/util/Component.hh"
24 #include "pism/util/iceModelVec.hh"
25 #include "pism/util/iceModelVec2T.hh"
26 #include "pism/util/MaxTimestep.hh"
27
28 namespace pism {
29
30 /*! Implementation of the ISMIP6 parameterized retreat.
31 *
32 * Reads a space-and-time-dependent ice extent mask from a file. This mask contains values
33 * from 0 to 1. Zero corresponds to "ice-free", one to "ice covered", values in between
34 * correspond to cells that are partially covered.
35 *
36 * Each time update() is called, this module gets the mask corresponding to the provided
37 * model time. Then, for each grid cell, if the mask is zero, ice is removed (updating ice
38 * thickness and area specific volume). If the mask is between 0 and 1, remove the
39 * corresponding fraction of ice volume in this cell. If the mask is 1 ice thickness is
40 * not modified.
41 */
42 class PrescribedRetreat : public Component {
43 public:
44 PrescribedRetreat(IceGrid::ConstPtr grid);
45 virtual ~PrescribedRetreat();
46
47 void init();
48
49 void update(double t, double dt,
50 IceModelVec2S &ice_thickness,
51 IceModelVec2S &ice_area_specific_volume);
52
53 protected:
54 MaxTimestep max_timestep_impl(double t) const;
55
56 IceModelVec2T::Ptr m_retreat_mask;
57 };
58
59 } // end of namespace pism
60
61 #endif /* PRESCRIBED_RETREAT_H */