URI: 
       tGivenTH.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
       ---
       tGivenTH.hh (3846B)
       ---
            1 // Copyright (C) 2011, 2012, 2014, 2015, 2016, 2017, 2018 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 2 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 #ifndef _POGIVENTH_H_
           20 #define _POGIVENTH_H_
           21 
           22 #include "CompleteOceanModel.hh"
           23 #include "pism/util/iceModelVec2T.hh"
           24 
           25 namespace pism {
           26 namespace ocean {
           27 class GivenTH : public CompleteOceanModel
           28 {
           29 public:
           30   GivenTH(IceGrid::ConstPtr g);
           31   virtual ~GivenTH();
           32 
           33   class Constants {
           34   public:
           35     Constants(const Config &config);
           36     //! Coefficients for linearized freezing point equation for in situ
           37     //! temperature:
           38     //!
           39     //! Tb(salinity, thickness) = a[0] * salinity + a[1] + a[2] * thickness
           40     double a[3];
           41     //! Coefficients for linearized freezing point equation for potential
           42     //! temperature
           43     //!
           44     //! Theta_b(salinity, thickness) = b[0] * salinity + b[1] + b[2] * thickness
           45     double b[3];
           46 
           47     //! Turbulent heat transfer coefficient:
           48     double gamma_T;
           49     //! Turbulent salt transfer coefficient:
           50     double gamma_S;
           51 
           52     double shelf_top_surface_temperature;
           53     double water_latent_heat_fusion;
           54     double sea_water_density;
           55     double sea_water_specific_heat_capacity;
           56     double ice_density;
           57     double ice_specific_heat_capacity;
           58     double ice_thermal_diffusivity;
           59     bool limit_salinity_range;
           60   };
           61 private:
           62   void update_impl(const Geometry &geometry, double t, double dt);
           63   void init_impl(const Geometry &geometry);
           64   MaxTimestep max_timestep_impl(double t) const;
           65 
           66   IceModelVec2T::Ptr m_theta_ocean;
           67   IceModelVec2T::Ptr m_salinity_ocean;
           68 
           69   void pointwise_update(const Constants &constants,
           70                         double sea_water_salinity,
           71                         double sea_water_potential_temperature,
           72                         double ice_thickness,
           73                         double *shelf_base_temperature_out,
           74                         double *shelf_base_melt_rate_out);
           75 
           76   void subshelf_salinity(const Constants &constants,
           77                          double sea_water_salinity,
           78                          double sea_water_potential_temperature,
           79                          double ice_thickness,
           80                          double *shelf_base_salinity);
           81 
           82   void subshelf_salinity_melt(const Constants &constants,
           83                               double sea_water_salinity,
           84                               double sea_water_potential_temperature,
           85                               double ice_thickness,
           86                               double *shelf_base_salinity);
           87 
           88   void subshelf_salinity_freeze_on(const Constants &constants,
           89                                    double sea_water_salinity,
           90                                    double sea_water_potential_temperature,
           91                                    double ice_thickness,
           92                                    double *shelf_base_salinity);
           93 
           94   void subshelf_salinity_diffusion_only(const Constants &constants,
           95                                         double sea_water_salinity,
           96                                         double sea_water_potential_temperature,
           97                                         double ice_thickness,
           98                                         double *shelf_base_salinity);
           99 };
          100 
          101 } // end of namespace ocean
          102 } // end of namespace pism
          103 
          104 #endif /* _POGIVENTH_H_ */