BISICLES AMR ice sheet model  0.9
AmrIce.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3 * _______ __
4 * / ___/ / ___ __ _ / / ___
5 * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6 * \___/_//_/\___/_/_/_/_.__/\___/
7 * Please refer to Copyright.txt, in Chombo's root directory.
8 */
9 #endif
10 
11 #ifndef AMR_ICE_H
12 #define AMR_ICE_H
13 
14 #include "LevelData.H"
15 #include "FArrayBox.H"
16 #include "LevelSigmaCS.H"
17 #include "IceVelocitySolver.H"
18 #include "RealVect.H"
19 #include "PatchGodunov.H"
20 #include "AdvectPhysics.H"
21 #include "SurfaceFlux.H"
22 #include "BasalFriction.H"
23 #include "IceThicknessIBC.H"
24 #include "IceInternalEnergyIBC.H"
25 #include "CalvingModel.H"
26 #include "MuCoefficient.H"
27 #include "CH_HDF5.H"
28 #include "DomainDiagnosticData.H"
29 #include "AmrIceBase.H"
30 #include "ParmParse.H"
31 #include <sstream>
32 #ifdef HAVE_PYTHON
33 #include "PythonInterface.H"
34 #endif
35 #include "NamespaceHeader.H"
36 
38 
40 class AmrIce : public AmrIceBase
41 {
42 
43 public:
45 
48  AmrIce();
49 
51 
53  virtual ~AmrIce();
54 
56  void setDefaults();
57 
59 
63  void initialize();
64 
66  void setDomainSize(const RealVect& a_domainSize)
67  { m_domainSize = a_domainSize;}
68 
69 
71 
75 
76  //const ConstitutiveRelation* constitutiveRelation() const
77  //{return m_constitutiveRelation;}
78 
80 
82  void setRateFactor(RateFactor* a_rateFactorPtr)
83  {m_rateFactor = a_rateFactorPtr->getNewRateFactor(); }
84 
85 
87 
89  void setBasalRateFactor(RateFactor* a_rateFactorPtr)
90  {m_basalRateFactor = a_rateFactorPtr->getNewRateFactor(); }
91 
92 
94 
96  void setBasalFrictionRelation(BasalFrictionRelation* a_basalFrictionRelPtr)
97  {m_basalFrictionRelation = a_basalFrictionRelPtr->getNewBasalFrictionRelation(); }
98 
99 
101  void setThicknessBC( IceThicknessIBC* a_thicknessIBC);
102 
104  void setInternalEnergyBC( IceInternalEnergyIBC* a_internalEnergyIBC);
105 
107  void setSurfaceFlux(SurfaceFlux* a_surfaceFluxPtr)
108  {
109  if (m_surfaceFluxPtr != NULL)
110  {
111  delete(m_surfaceFluxPtr);
112  m_surfaceFluxPtr = NULL;
113  }
114  m_surfaceFluxPtr = a_surfaceFluxPtr->new_surfaceFlux();
115  }
116 
118  void setBasalFlux(SurfaceFlux* a_basalFluxPtr)
119  {
120  if (m_basalFluxPtr != NULL)
121  {
122  delete(m_basalFluxPtr);
123  m_basalFluxPtr = NULL;
124  }
125  m_basalFluxPtr = a_basalFluxPtr->new_surfaceFlux();
126  }
127 
129  void setSurfaceHeatBoundaryData(SurfaceFlux* a_surfaceHeatBoundaryDataPtr, bool a_dirichlett, bool a_temperature)
130  {
131  if (m_surfaceHeatBoundaryDataPtr != NULL)
132  {
135  }
136 
138  m_surfaceBoundaryHeatDataTemperature = a_temperature;
139 
140  if (a_surfaceHeatBoundaryDataPtr != NULL)
141  {
142  m_surfaceHeatBoundaryDataPtr = a_surfaceHeatBoundaryDataPtr->new_surfaceFlux();
143  }
144  }
145 
146 
147 
149  void setBasalHeatBoundaryData(SurfaceFlux* a_basalHeatBoundaryDataPtr)
150  {
151  if (m_basalHeatBoundaryDataPtr != NULL)
152  {
155  }
156  if (a_basalHeatBoundaryDataPtr != NULL)
157  {
158  m_basalHeatBoundaryDataPtr = a_basalHeatBoundaryDataPtr->new_surfaceFlux();
159  }
160  }
161 
162 
163 
164 
166  void setTopographyFlux(SurfaceFlux* a_topographyFluxPtr)
167  {
168  if (m_topographyFluxPtr != NULL)
169  {
170  delete(m_topographyFluxPtr);
171  m_topographyFluxPtr = NULL;
172  }
173  m_topographyFluxPtr = a_topographyFluxPtr->new_surfaceFlux();
174  }
175 
177  void setBasalFriction(const BasalFriction* a_basalFrictionPtr)
178  {m_basalFrictionPtr = a_basalFrictionPtr->new_basalFriction();}
179 
180  void setMuCoefficient(const MuCoefficient* a_muCoefficientPtr)
181  {m_muCoefficientPtr = a_muCoefficientPtr->new_muCoefficient();}
182 
183  void setCalvingModel(CalvingModel* a_calvingModelPtr)
184  {
186  m_calvingModelPtr = a_calvingModelPtr->new_CalvingModel();
187  }
188 
189 
191  void run(Real a_max_time, int a_max_step);
192 
194  void timeStep(Real a_dt);
195 
196  // compute face-centered half-time ice thickness using ppm
197  void computeH_half(Vector<LevelData<FluxBox>* >& a_H_half, Real a_dt);
198 
199  // compute thickness fluxes
200  void computeThicknessFluxes(Vector<LevelData<FluxBox>* >& a_vectFluxes,
201  const Vector<LevelData<FluxBox>* >& a_H_half,
202  const Vector<LevelData<FluxBox>* >& a_faceVelAdvection);
203 
204  // update ice thickness *and* bedrock elevation
205  void updateGeometry(Vector<RefCountedPtr<LevelSigmaCS> >& a_vect_coordSys_new,
206  Vector<RefCountedPtr<LevelSigmaCS> >& a_vectCoords_old,
207  const Vector<LevelData<FluxBox>* >& a_vectFluxes,
208  Real a_dt);
209 
210 
211 
213  void regrid();
214 
216  Real computeTotalIce() const;
217 
218 
220  void getIceThickness(Real* a_data_ptr, int* a_dim_info,
221  Real* a_dew, Real* a_dns) const;
222 
224 
226  bool isDefined() const;
227 
228 
229 
230 private:
231 #ifdef CH_USE_HDF5
232 
237  HDF5HeaderData m_headerData;
238 
240  void writeMetaDataHDF5(HDF5Handle& a_handle) const;
241 #endif
242 
243 public:
244 #ifdef CH_USE_HDF5
245  void setHeader(const std::string& a_key, const std::string& a_val)
246  {
247  m_headerData.m_string[a_key] = a_val;
248  }
249  void getHeader(const std::string& a_key, std::string& a_val)
250  {
251  a_val = m_headerData.m_string[a_key];
252  }
253  void setHeader(const std::string& a_key, const int& a_val)
254  {
255  m_headerData.m_int[a_key] = a_val;
256  }
257  void getHeader(const std::string& a_key, int& a_val)
258  {
259  a_val = m_headerData.m_int[a_key];
260  }
261  void setHeader(const std::string& a_key, const Real& a_val)
262  {
263  m_headerData.m_real[a_key] = a_val;
264  }
265 
266  void getHeader(const std::string& a_key, Real& a_val)
267  {
268  a_val = m_headerData.m_real[a_key];
269  }
270 
271  void writeAMRHierarchyHDF5(HDF5Handle& a_handle,
272  const Vector<DisjointBoxLayout>& a_grids,
273  const Vector<LevelData<FArrayBox>* > & a_data,
274  const Vector<string>& a_name,
275  const Box& a_domain,
276  const Real& a_dx,
277  const Real& a_dt,
278  const Real& a_time,
279  const Vector<int>& a_ratio,
280  const int& a_numLevels) const;
281 
282  void writeAMRHierarchyHDF5(const string& filename,
283  const Vector<DisjointBoxLayout>& a_grids,
284  const Vector<LevelData<FArrayBox>* > & a_data,
285  const Vector<string>& a_name,
286  const Box& a_domain,
287  const Real& a_dx,
288  const Real& a_dt,
289  const Real& a_time,
290  const Vector<int>& a_ratio,
291  const int& a_numLevels) const;
292 
294 
297  void writePlotFile();
298  void writeAMRPlotFile();
300 
303  void writeCheckpointFile() ;
304 
306 
308  void writeCheckpointFile(const string& a_file) ;
309 
311 
313  void readCheckpointFile(HDF5Handle& a_handle);
314 
316  void restart(const string& a_restart_file);
317 
318 #endif
319 
320 
321 
322 
323 private:
324 #ifdef CH_USE_HDF5
325  LevelData<FArrayBox> m_uniform_cf_data;
328  int m_cf_level;
330  Vector<std::string> m_uniform_cf_data_name;
332  Vector<std::string> m_uniform_cf_standard_name;
334  Vector<std::string> m_uniform_cf_long_name;
336  Vector<std::string> m_uniform_cf_units;
338  Vector<std::function<const LevelData<FArrayBox>*(int, LevelData<FArrayBox>&) > >m_cf_field_function;
339  // the function prototype include a LevelData<FArrayBox>& that can be used for storage by the implementation
340 
341  LevelData<FArrayBox> m_cf_tmp_data;
342  Vector<Interval> m_cf_field_interval;
343  Real m_cf_dt;
344  Real m_cf_start_time;
345  bool m_plot_style_cf, m_plot_style_amr;
346  enum OutputFileNumbering { time_step = 0, time_seconds = 1, time_years = 2, time_yyyymmdd_360 = 3, NUM_PLOT_NUMBERING};
347  OutputFileNumbering m_output_file_numbering;
348 
350  long outputNumbering();
351 #endif
352 
353  friend class DomainDiagnosticData;
354  DomainDiagnosticData m_cf_domain_diagnostic_data;
355 
356 #ifdef CH_USE_HDF5
357 
359  void setOutputOptions(ParmParse& a_pp);
361 
368  void flushCFData();
370 
380  void accumulateCFData(Real a_dt, bool a_reset = false);
381 
383  void initCFData();
384 #endif
385 
386 public:
387 
388 
389 
391  //Real computeTotalGroundedIce() const;
392 
394  //Real computeVolumeAboveFlotation() const;
395 
396 
398 
402  void computeAreaFraction(LevelData<FArrayBox>& a_area,
403  int a_maskVal, int a_level) const;
404 
406  // Real computeArea(int a_maskVal) const;
407 
409  //Real computeGroundedArea() const;
410 
412  //Real computeFloatingArea() const;
413 
415  //Real computeFluxOverIce(const Vector<LevelData<FArrayBox>*> a_flux);
416 
418  //Real computeDeltaVolumeOverIce() const;
419 
421  //Real computeTotalFlux(const Vector<LevelData<FArrayBox>*> a_flux);
422 
423 
424  enum velSolverTypes { Picard = 0,
425  JFNK = 1,
428  FASMGAMR = 4,
429  Python = 5,
432 
433  void setTime(Real a_time)
434  {
435  m_time = a_time - m_offsetTime;
436  }
437 
439  Real time() const
440  {
441  return m_time + m_offsetTime;
442  };
443 
444  Real dt() const
445  {
446  return m_dt;
447  }
448 
449  int finestLevel() const
450  {
451  return m_finest_level;
452  }
453 
454  const RealVect dx(int a_level) const
455  {
456  return m_vect_coordSys[a_level]->dx();
457  };
458 
459  const RefCountedPtr<LevelSigmaCS> geometry(int a_level) const
460  {
461  return m_vect_coordSys[a_level];
462  };
463  const DisjointBoxLayout& grids(int a_level) const
464  {
465  return m_amrGrids[a_level];
466  }
467  const Vector<DisjointBoxLayout>& grids() const
468  {
469  return m_amrGrids;
470  }
471  const Vector<RefCountedPtr<LevelSigmaCS> >& amrGeometry() const
472  {
473  return m_vect_coordSys;
474  }
475 
477  void incrementIceThickness(Vector<LevelData<FArrayBox>*> a_thk);
478 
479  const Vector<int>& refRatios() const { return m_refinement_ratios;}
480 
481  const Vector<Real>& amrDx() const {return m_amrDx;}
482 
483  const LevelData<FArrayBox>* velocity(int a_level) const
484  {
485  return m_velocity[a_level];
486  };
487 
488  const Vector<LevelData<FArrayBox>* >& amrVelocity()
489  {
490  return m_velocity;
491  }
492 
494  {
495  if (m_surfaceHeatBoundaryDataPtr == NULL)
496  {
497  CH_assert(m_surfaceHeatBoundaryDataPtr != NULL);
498  MayDay::Error("no surface heat boundary data");
499  }
501  }
502 
504  {
506  }
507 
509 
511  LevelData<FArrayBox>* iceFrac(int a_level)
512  {
513  return m_iceFrac[a_level];
514  };
515 
517  {
519  }
520 
522  {
523  if (m_basalHeatBoundaryDataPtr == NULL)
524  {
525  CH_assert(m_basalHeatBoundaryDataPtr != NULL);
526  MayDay::Error("no surface heat boundary data");
527  }
529  }
530 
532 
534  const LevelData<FArrayBox>* iceFrac(int a_level) const
535  {
536  return m_iceFrac[a_level];
537  };
539  //** useful for calving models **/
540  const LevelData<FArrayBox>& muCoef(int a_level) const
541  {
542  return *m_cellMuCoef[a_level];
543  }
544 
546  Vector<LevelData<FArrayBox>* >& amrIceFrac()
547  {
548  return m_iceFrac;
549  }
550 
552  const Vector<LevelData<FArrayBox>* >& amrIceFrac() const
553  {
554  return m_iceFrac;
555  }
556 
557  const LevelData<FArrayBox>* groundingLineProximity(int a_level) const;
558 
560  {
562  }
563 
564 
565  const LevelData<FArrayBox>* surfaceThicknessSource(int a_level) const;
566  const LevelData<FArrayBox>* basalThicknessSource(int a_level) const;
567  const LevelData<FArrayBox>* viscousTensor(int a_level) const;
568  const LevelData<FArrayBox>* dragCoefficient(int a_level) const;
569  const LevelData<FArrayBox>* viscosityCoefficient(int a_level) const;
570 
572  const Vector<LevelData<FluxBox>* >& faceVelocities() {return m_faceVelTotal;}
573 
575  const Vector<LevelData<FluxBox>* >& faceVelocitiesLayered() const {return m_layerXYFaceXYVel;}
576 
578  const Vector<LevelData<FArrayBox>* >& calvedIceThickness() const {return m_calvedIceThickness; }
579  const Vector<LevelData<FArrayBox>* >& removedIceThickness() const {return m_removedIceThickness; }
580  const Vector<LevelData<FArrayBox>* >& addedIceThickness() const {return m_addedIceThickness; }
581 
583  const Vector<LevelData<FArrayBox>* >& surfaceInternalEnergy() const {return m_sInternalEnergy; }
584 
586  const Vector<LevelData<FArrayBox>* >& surfaceHeatFlux() const {return m_sHeatFlux; }
587 
588 protected:
589 
590 
591 
592 
593 
595  void tagCells(Vector<IntVectSet>& a_tags);
596 
598  void tagCellsLevel(IntVectSet& a_tags, int a_level);
599 
601  void tagCellsInit(Vector<IntVectSet>& a_tags);
602 
604  void initGrids(int a_finest_level);
605 
607  void setupFixedGrids(const std::string& a_gridFile);
608 
610  void levelSetup(int a_level, const DisjointBoxLayout& a_grids);
611 
613  void initData(Vector<RefCountedPtr<LevelSigmaCS > >& a_vectCoordSys,
614  Vector<LevelData<FArrayBox>* >& a_initialVelocity);
615 
617  //void initDiagnostics();
618 
620  virtual void defineSolver();
621 
623  virtual void solveVelocityField(bool a_forceSolve = false, Real a_convergenceMetric = -1.0);
624 
626  virtual void defineVelRHS(Vector<LevelData<FArrayBox>* >& a_vectRhs);
627 
629  virtual void setBasalFriction(Vector<LevelData<FArrayBox>* >& a_C, Vector<LevelData<FArrayBox>* >& a_C0);
630 
632  virtual void setMuCoefficient(Vector<LevelData<FArrayBox>* >& a_cellMuCoef);
633 
635  void computeFaceVelocity(Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
636  Vector<LevelData<FluxBox>* >& a_faceVelTotal,
637  Vector<LevelData<FluxBox>* >& a_diffusivity,
638  Vector<LevelData<FluxBox>* >& a_layerXYFaceXYVel,
639  Vector<LevelData<FArrayBox>* >& a_layerSFaceXYVel);
640 
641 
642  // /// compute div(vel*H) at a given time
643  // void computeDivThicknessFlux(Vector<LevelData<FArrayBox>* >& a_divFlux,
644  // Vector<LevelData<FluxBox>* >& a_flux,
645  // Vector<LevelData<FArrayBox>* >& a_thickness,
646  // Real a_time, Real a_dt);
647 
648  // increment phi := phi + dt*dphi
649  void incrementWithDivFlux(Vector<LevelData<FArrayBox>* >& a_phi,
650  const Vector<LevelData<FArrayBox>* >& a_dphi,
651  Real a_dt);
652 
653  // incremente coordSys with new thickness
654  void updateCoordSysWithNewThickness(const Vector<LevelData<FArrayBox>* >& a_thickness);
655 
657 
660  void setIceFrac(const LevelData<FArrayBox>& a_thickness, int a_level);
661 
662 
664 
669  void updateIceFrac(LevelData<FArrayBox>& a_thickness, int a_level);
670 
671  void setIceFracBC(LevelData<FArrayBox>& a_iceFrac, const ProblemDomain& a_domain);
672 
674  void advectIceFrac(Vector<LevelData<FArrayBox>* >& a_iceFrac,
675  const Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
676  Real a_dt);
677 
678 
679  // /// update real-valued ice fraction through advection from neighboring cells
680  // /**
681  // Also increment a_thicknessSource based on the calving rate
682  // */
683  // // void advectIceFrac(Vector<LevelData<FArrayBox>* >& a_iceFrac,
684  // // Vector<LevelData<FArrayBox>* >& a_thicknessSource,
685  // // const Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
686  // // const Vector<LevelData<FluxBox>* >& a_thicknessFlux,
687  // // Real a_dt);
688 
689  // /// update real-valued ice fraction through application of the calving rate
690  // /**
691  // Also increment a_thicknessSource based on the calving rate
692  // */
693  // // void advectIceFracUpstream(Vector<LevelData<FArrayBox>* >& a_iceFrac,
694  // // Vector<LevelData<FArrayBox>* >& a_thicknessSource,
695  // // const Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
696  // // const Vector<LevelData<FArrayBox> *>& a_calvingRate,
697  // // Real a_subDt, Real a_dt);
698 
699  // // /// update real-valued ice fraction through advection from neighboring cell
700  // // void advectIceFracDownstream(Vector<LevelData<FArrayBox>* >& a_iceFrac,
701  // // Vector<LevelData<FArrayBox>* >& a_thicknessSource,
702  // // const Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
703  // // const Vector<LevelData<FluxBox>* >& a_thicknessFlux,
704  // // const Vector<LevelData<FArrayBox> *>& a_calvingRate,
705  // // Real a_subDt, Real a_dt);
706 
708  void updateInvalidIceFrac(Vector<LevelData<FArrayBox> *> a_iceFrac);
709 
711  Real computeDt();
712 
714  Real computeInitialDt();
715 
716  //set an entire amr hierarchy to zero
717  void setToZero(Vector<LevelData<FArrayBox>*>& a_data);
718 
720  void implicitThicknessCorrection(Real a_dt,
721  const Vector<LevelData<FArrayBox>* >& a_sts,
722  const Vector<LevelData<FArrayBox>* >& a_bts,
723  const Vector<LevelData<FArrayBox>* >& a_vts
724  );
725 
727 
728  void eliminateRemoteIce();
729 
732  void helmholtzSolve(Vector<LevelData<FArrayBox>* >& a_phi,
733  const Vector<LevelData<FArrayBox>* >& a_rhs,
734  Real a_alpha, Real a_beta) const;
735 
738  void helmholtzSolve(Vector<LevelData<FArrayBox>* >& a_phi,
739  Real a_alpha, Real a_beta) const;
740 
741 
742 #if BISICLES_Z == BISICLES_LAYERED
743 
744 
746  void computeA(Vector<LevelData<FArrayBox>* >& a_A,
747  Vector<LevelData<FArrayBox>* >& a_sA,
748  Vector<LevelData<FArrayBox>* >& a_bA,
749  const Vector<LevelData<FArrayBox>* >& a_internalEnergy,
750  const Vector<LevelData<FArrayBox>* >& a_sInternalEnergy,
751  const Vector<LevelData<FArrayBox>* >& a_bInternalEnergy,
752  const Vector<RefCountedPtr<LevelSigmaCS> >& a_coordSys) const;
753 
754  //compute the face- and layer- centered internal energy (a_layerEH_half)
755  //and thickness (a_layerH_half) at time a_time + 1/2 * a_dt
756  void computeInternalEnergyHalf(Vector<LevelData<FluxBox>* >& a_layerEH_half,
757  Vector<LevelData<FluxBox>* >& a_layerH_half,
758  const Vector<LevelData<FluxBox>* >& a_layerXYFaceXYVel,
759  const Real a_dt, const Real a_time);
760 
761 
762 
764  void updateInternalEnergy(Vector<LevelData<FluxBox>* >& a_layerTH_half,
765  Vector<LevelData<FluxBox>* >& a_layerH_half,
766  const Vector<LevelData<FluxBox>* >& a_layerXYFaceXYVel,
767  const Vector<LevelData<FArrayBox>* >& a_layerSFaceXYVel,
768  const Real a_dt, const Real a_time,
769  Vector<RefCountedPtr<LevelSigmaCS> >& a_coordSysNew,
770  Vector<RefCountedPtr<LevelSigmaCS> >& a_coordSysOld,
771  const Vector<LevelData<FArrayBox>*>& a_surfaceThicknessSource,
772  const Vector<LevelData<FArrayBox>*>& a_basalThicknessSource,
773  const Vector<LevelData<FArrayBox>*>& a_volumeThicknessSource);
775  void updateTemperature();
776 #endif
777 
778 
779  static void postInterpolationReFloat(LevelData<FArrayBox>& a_H,
780  const LevelData<FArrayBox>& a_coarseH,
781  const LevelData<FArrayBox>& a_coarseBed,
782  const DisjointBoxLayout a_newDBL,
783  const ProblemDomain& a_domain,
784  int a_refRatio,
785  Real a_seaLevel,
786  Real a_waterDensity,
787  Real a_iceDensity);
788 
789  // diagnostic routine -- compute discharge
790  void computeDischarge(const Vector<LevelData<FluxBox>* >& a_vectFluxes);
791 
792  // diagnostic routine
793  //void endTimestepDiagnostics();
794 
795 
797 
803 
805 
810 
813 
816 
819 
822 
828 
829 
838 
840 
844 
846  GodunovPhysics* m_thicknessPhysPtr;
847 
849  Vector<PatchGodunov*> m_thicknessPatchGodVect;
850 
853 
856 
859 
864 
869 
875  Vector<LevelData<FArrayBox>*> m_deltaTopography;
876 
879 
882 
885 
888 
895  {
896  return (0 <= m_finest_timestep_level)?
897  std::min(m_finest_timestep_level,m_finest_level):m_finest_level;
898  }
899 
900 
903 
906 
908  IntVectSet m_tag_subset;
909 
910  Vector<IntVectSet> m_vectTagSubset;
911 
914 
917 
920 
922 
927 
931 
935 
937 
942  // types of initial guess
943  enum initialGuessTypes {SlidingLaw=0, // sliding law with the form Cu = rhs
944  ConstMu=1, // solve the elliptic equations with a supplied mu
945  Function=2, //use a RealFunction<RealVect>
948 
949  //paramamters which specify the linear solver in the case m_initialGuessType = ConstMu
950  Real m_initialGuessConstMu; // domain wide viscosity
951  int m_initialGuessSolverType; // solver type, defaults to the Picard solver
952  RealVect m_initialGuessConstVel; // initial velocity, useful when the basal friction relation is nonlinear
953 
955 
960 
961  // if > 0, then the coefficient of friction at the base
962  // of the ice and the RHS will be smoothed.
964 
966  Vector<IntVectSet> m_vectTags;
967 
970 
973 
976 
979 
986 
988 
991 
994 
997 
1000 
1003 
1010 
1016 
1017  // tag thin ice shelf cavities. Refinining thin cavities
1018  // sometimes reveals pinning points
1021 
1025 
1028 
1030 
1033 
1036 
1037 
1038  //attempt to eliminate floating ice that is unconnected to grounded ice
1042 
1043  //attempt to eliminate unconnected floating ice after regridding
1045 
1046 #ifdef HAVE_PYTHON
1047  bool m_tagPython;
1051 #endif
1052  // grow tags in all directions by m_tags_grow
1055  //grow tags in all direction dir by max(0,m_tags_grow_dir[dir] - m_tags_grow)
1057 
1059  Vector<int> m_refinement_ratios;
1060 
1062  Vector<Real> m_amrDx;
1063 
1065  Vector<ProblemDomain> m_amrDomains;
1066 
1067  // problem domain size
1068  RealVect m_domainSize;
1069 
1071  Vector<DisjointBoxLayout> m_amrGrids;
1072 
1074  Vector<int> m_covered_level;
1075 
1077  Vector<int> m_num_cells;
1078 
1080  Real m_time; Real m_offsetTime;
1081 
1083  Real m_dt;
1084 
1087 
1089  Real m_cfl;
1090 
1093 
1096 
1099 
1100  // current step
1102 
1103  // isothermal model ?
1105 
1106  //depth of water in surface crevasses
1108 
1113 
1114  //ice density
1116 
1117  //sea water density
1119 
1120  // acceleration due to gravity
1122 
1123  // size of unit time (for velocity & time step *only*, other quantities are SI) in seconds
1125 
1127  Vector<LevelData<FArrayBox>*> m_old_thickness;
1128 
1129 
1130 
1132  Vector<LevelData<FArrayBox>*> m_velocity;
1133 
1135  Vector<LevelData<FArrayBox>* > m_velRHS;
1136 
1137  // coeffient of |u|^m-1 u in the basal traction
1138  Vector<LevelData<FArrayBox>* > m_velBasalC;
1139 
1140  //coefficient of mu in the stress tensor
1141  Vector<LevelData<FArrayBox>* > m_cellMuCoef;
1142  //Vector<LevelData<FluxBox>* > m_faceMuCoef;
1143 
1144  // thickness diffusion coefficient
1145  Vector<LevelData<FluxBox>* > m_diffusivity;
1147 
1148  //face velocities
1149  Vector<LevelData<FluxBox>* > m_faceVelAdvection;
1150  Vector<LevelData<FluxBox>* > m_faceVelTotal; // m_faceVelTotal = m_faceVelAdvection - m_diffusivity * grad(H)
1151 #if BISICLES_Z == BISICLES_LAYERED
1152  Vector<LevelData<FArrayBox>* > m_layerSFaceXYVel;
1153  Vector<LevelData<FArrayBox>* > m_layerSFaceSVel;
1154  Vector<LevelData<FluxBox>* > m_layerXYFaceXYVel;
1155 #endif
1156 
1157 
1158 
1159  // SigmaCS mapping
1160  Vector<RefCountedPtr<LevelSigmaCS > > m_vect_coordSys;
1161 
1164 
1166  Vector<LevelData<FArrayBox>* > m_iceFrac;
1167 
1168  // Cell-centered internalEnergy field
1169  Vector<LevelData<FArrayBox>* > m_internalEnergy, m_temperature;
1170  //cell-centered till water depth (accompanies the internal energy)
1171  Vector<LevelData<FArrayBox>* > m_tillWaterDepth;
1172  // Cell-centered A field
1173  Vector<LevelData<FArrayBox>* > m_A;
1174  // used to decide whether A needs updating (after a regrid, or a internalEnergy update)
1175  mutable bool m_A_valid;
1176 #if BISICLES_Z == BISICLES_LAYERED
1177  // InternalEnergy and A at the top and bottom surfaces of
1178  // the ice, horizontally cell centred (but at vertical faces)
1179  Vector<LevelData<FArrayBox>* > m_sInternalEnergy, m_sTemperature ;
1180  Vector<LevelData<FArrayBox>* > m_bInternalEnergy, m_bTemperature;
1181  Vector<LevelData<FArrayBox>* > m_sHeatFlux;
1182  Vector<LevelData<FArrayBox>* > m_bHeatFlux;
1183  Vector<LevelData<FArrayBox>* > m_sA;
1184  Vector<LevelData<FArrayBox>* > m_bA;
1185 #elif BISICLES_Z == BISICLES_FULL
1186  // possibly won't even need surface and basal temperature
1187  // field, but if we do they will need to be 2D
1188 #endif
1189  //the thickness source will have three components, from the surface and base
1190  //and distributed throught the volume.
1191  //Although they are combined for thickness evolution, they must
1192  //be kept seperate for the internalEnergy calculation.
1193  mutable Vector<LevelData<FArrayBox>* > m_surfaceThicknessSource;
1194  mutable Vector<LevelData<FArrayBox>* > m_basalThicknessSource;
1195  mutable Vector<LevelData<FArrayBox>* > m_volumeThicknessSource;
1196 
1198  void setStableSources(FArrayBox& a_sts,FArrayBox& a_bts, FArrayBox& a_vts,
1199  const FArrayBox& a_divuh, const BaseFab<int>& a_mask,
1200  const Box& a_box) const;
1201 
1202  Vector<LevelData<FArrayBox>* > m_divThicknessFlux; // set to -dH/dt
1203  //thickness of calved ice
1204  Vector<LevelData<FArrayBox>* > m_calvedIceThickness;
1205  Vector<LevelData<FArrayBox>* > m_removedIceThickness;
1206  Vector<LevelData<FArrayBox>* > m_addedIceThickness;
1207  Vector<LevelData<FArrayBox>* > m_calvedThicknessSource;
1208 
1209 
1210  //cell centered storage for the stress-balance equation coefficients
1211  mutable Vector<LevelData<FArrayBox>* > m_dragCoef;
1212  mutable Vector<LevelData<FArrayBox>* > m_viscosityCoefCell;
1213 
1214  //cell centered storage for the viscous tensor components
1215  mutable Vector<LevelData<FArrayBox>* > m_viscousTensorCell;
1216  //face centered storage for the viscous tensor components
1217  mutable Vector<LevelData<FluxBox>* > m_viscousTensorFace;
1218  // cache validity flag
1220  void updateViscousTensor() const;
1221 
1222 
1223 
1224 
1225  //Scalar field that varies in the ice shelf from 0 at the grounding line
1226  mutable Vector<LevelData<FArrayBox>* > m_groundingLineProximity;
1227  // cache validity flag;
1229  // scale length for grounding line proximity
1232  void updateGroundingLineProximity() const;
1233 
1236 
1240 
1243 
1246 
1249 
1251 
1262  RealVect m_basalSlope;
1263 
1264 
1266  static int s_verbosity;
1267 
1270 
1273 
1276 
1279 
1282 
1283  bool m_check_overwrite; // overwrite check point files
1284  bool m_check_exit; // exit immediately after writing checkpoint?
1285 
1286 
1291 
1294 
1297 
1300 
1303 
1304  // if true, include (cell-averaged) flux velocity in plotfiles
1306 
1307  // if true, include (cell-averaged) viscous tensor components in plotfiles
1309 
1310  // if true, include base velocity in plotfiles
1312 
1315 
1316  //if true, include internalEnergy in plot files
1318 
1319  //if true, include thickness source terms in plot files
1321 
1322  //if true, include fields required for ISMIP6 in plot files
1324 
1327 
1329 
1332 
1335 
1336  // if true, allow thickness to change in time
1338 
1339  // if true, allow ice frac to change in time
1341 
1342  //if true, allow velocity field to change in time
1344 
1345  // if true, bedrock topogography evolves rather than surface in grounded ice
1347 
1348  //if true, keep floating or grounded ice stable;
1351  //if true, use the basal flux to set dhdt
1355 
1360 
1361 
1364 
1365  // if true, time step are always an integer power of two
1367 
1368  //ised to store a fixed time step > 0 , if desired
1370 
1371  // if true, report sum of grounded ice (volume) -- default is false
1373 
1374 
1375 
1376 
1377 #if BISICLES_Z == BISICLES_LAYERED
1378  //additional members used in poor-mans multidim mode
1379 public:
1380  const Vector<Real>& getFaceSigma() const
1381  {
1382  return m_faceSigma;
1383  }
1384 protected:
1385  void setLayers(const Vector<Real>& a_sigma);
1386 
1387 
1389 
1390  // Number layers within the ice sheet
1391  unsigned int m_nLayers;
1392 
1393  //arrangment of layers within the bedrock
1394  Vector<Real> m_faceSigma;
1395 
1396  //if true, include layer velocities in plot files
1399 
1400 #endif
1401 private:
1402  template <class T>
1403  void levelAllocate(LevelData<T>** a_ptrPtr, const DisjointBoxLayout& a_grids,
1404  int a_nComp, const IntVect& a_ghost)
1405  {
1406  CH_assert(a_ptrPtr != NULL);
1407  if (*a_ptrPtr != NULL)
1408  delete *a_ptrPtr;
1409  *a_ptrPtr = new LevelData<T>(a_grids, a_nComp, a_ghost);
1410  }
1411 
1412 
1413 public:
1415 
1418  class Observer {
1419 
1420  friend class AmrIce;
1421 
1422  AmrIce* m_observee;
1423 
1424  // setObservee is private so that only friends (AmrIce) can access
1425  void setObservee(AmrIce* a_amrIce)
1426  {
1427  m_observee = a_amrIce;
1428  }
1429 
1430  // clearObservee is private so that only friends (AmrIce) can access
1431  void clearObservee()
1432  {
1433  m_observee = NULL;
1434  }
1435 
1436  public:
1437 
1439 
1440  virtual ~Observer()
1441  {
1442  if (m_observee != NULL)
1443  {
1444  m_observee->removeObserver(this);
1445  }
1446  }
1447 
1449  virtual void notify(const Notification, AmrIce&)=0;
1450 
1451 
1453 
1458 #ifdef CH_USE_HDF5
1459  virtual void addPlotVars(Vector<std::string>& a_vars){;}
1461 
1463  virtual void writePlotData(LevelData<FArrayBox>& a_data, int a_level){;}
1464 
1466  virtual void addCheckVars(Vector<std::string>& a_vars){;}
1467 
1469  virtual void writeCheckData(HDF5Handle& a_handle, int a_level){;}
1470 
1472  virtual void readCheckData(HDF5Handle& a_handle, HDF5HeaderData& a_header, int a_level, const DisjointBoxLayout& a_grids){;}
1473 #endif
1474  };
1475 
1476  void addObserver(Observer* a_observer)
1477  {
1478  // add a_observer to the list so long as it isn't there already
1479  if (std::find(m_observers.begin(), m_observers.end(), a_observer) == m_observers.end())
1480  {
1481  m_observers.push_back(a_observer);
1482  a_observer->setObservee(this);
1483  }
1484  }
1485 
1486  void removeObserver(Observer* a_observer)
1487  {
1488  // remove observer from the list
1489  std::vector<Observer*>::iterator it = std::find(m_observers.begin(), m_observers.end(), a_observer);
1490  if ( it != m_observers.end())
1491  {
1492  a_observer->clearObservee();
1493  m_observers.erase(it);
1494  }
1495  }
1496 
1497 
1498 private:
1499 
1500  std::vector<Observer*> m_observers; //needs to be a std::vector for begin(), end()
1501 
1503  void notifyObservers(const Observer::Notification a_n)
1504  {
1505  for (int i = 0; i < m_observers.size(); i++)
1506  m_observers[i]->notify(a_n, *this);
1507  }
1508 
1509 };
1510 
1511 #include "NamespaceFooter.H"
1512 
1513 #endif
1514 
1515 
bool m_tagOnGradVel
tag on grad(velocity)?
Definition: AmrIce.H:969
const Vector< DisjointBoxLayout > & grids() const
Definition: AmrIce.H:467
Definition: AmrIce.H:426
void setThicknessBC(IceThicknessIBC *a_thicknessIBC)
set BC for thickness advection
Definition: AmrIce.cpp:1517
static void postInterpolationReFloat(LevelData< FArrayBox > &a_H, const LevelData< FArrayBox > &a_coarseH, const LevelData< FArrayBox > &a_coarseBed, const DisjointBoxLayout a_newDBL, const ProblemDomain &a_domain, int a_refRatio, Real a_seaLevel, Real a_waterDensity, Real a_iceDensity)
Definition: AmrIce.H:1438
Real m_additionalDiffusivity
Definition: AmrIce.H:1146
virtual void notify(const Notification, AmrIce &)=0
General purpose notify method.
Vector< DisjointBoxLayout > m_amrGrids
current grids
Definition: AmrIce.H:1071
Vector< int > m_num_cells
book-keeping; keeps track of number of cells per level
Definition: AmrIce.H:1077
virtual void addPlotVars(Vector< std::string > &a_vars)
Fat interface members.
Definition: AmrIce.H:1460
Real m_eliminate_remote_ice_tol
Definition: AmrIce.H:1041
Vector< LevelData< FArrayBox > *> m_dragCoef
Definition: AmrIce.H:1211
void restart(const string &a_restart_file)
set up for restart
Definition: AmrIceIO.cpp:2187
bool m_tagOnEpsSqr
tag on strain rate invariant?
Definition: AmrIce.H:985
void implicitThicknessCorrection(Real a_dt, const Vector< LevelData< FArrayBox > * > &a_sts, const Vector< LevelData< FArrayBox > * > &a_bts, const Vector< LevelData< FArrayBox > * > &a_vts)
implicit solve for diffusive fluxes
Definition: AmrIce.cpp:4769
string m_plot_prefix
Definition: AmrIce.H:1278
void eliminateRemoteIce()
Definition: AmrIce.cpp:4746
void addObserver(Observer *a_observer)
Definition: AmrIce.H:1476
Vector< LevelData< FArrayBox > *> m_volumeThicknessSource
Definition: AmrIce.H:1195
void setLayers(const Vector< Real > &a_sigma)
Definition: AmrIce.cpp:5125
MuCoefficient * m_muCoefficientPtr
sets mu coefficient (phi)
Definition: AmrIce.H:881
bool m_doInitialVelGuess
if true, use nonzero initial guess for velocity field (default is false)
Definition: AmrIce.H:941
bool m_tagAllIceOnLevel0
tag any cell with ice in it on level 0
Definition: AmrIce.H:1032
void getHeader(const std::string &a_key, int &a_val)
Definition: AmrIce.H:257
int m_block_factor
blocking factor
Definition: AmrIce.H:905
Vector< LevelData< FArrayBox > *> m_addedIceThickness
Definition: AmrIce.H:1206
Definition: MuCoefficient.H:25
bool m_check_exit
Definition: AmrIce.H:1284
virtual BasalFriction * new_basalFriction() const =0
factory method
ConstitutiveRelation * m_constitutiveRelation
constitutive relation
Definition: AmrIce.H:831
int finestTimestepLevel() const
Definition: AmrIce.H:894
bool m_write_baseVel
Definition: AmrIce.H:1311
part of Observer-Observee implementation
Definition: AmrIce.H:1418
void setHeader(const std::string &a_key, const std::string &a_val)
Definition: AmrIce.H:245
int m_tags_grow
amount to buffer tags used in regridding
Definition: AmrIce.H:1054
bool m_write_map_file
if true, write out .map.hdf5 file
Definition: AmrIce.H:1326
Vector< LevelData< FArrayBox > *> m_bTemperature
Definition: AmrIce.H:1180
Vector< LevelData< FArrayBox > *> m_divThicknessFlux
Definition: AmrIce.H:1202
bool isDefined() const
is this object defined and initialized?
Definition: AmrIce.cpp:165
int m_beta_type
type of basal friction distribution
Definition: AmrIce.H:1242
void setDomainSize(const RealVect &a_domainSize)
set domain size (in meters)
Definition: AmrIce.H:66
void setTopographyFlux(SurfaceFlux *a_topographyFluxPtr)
set bedrock flux for ice sheet
Definition: AmrIce.H:166
void applyCalvingCriterion(CalvingModel::Stage a_stage)
Definition: AmrIce.cpp:4712
void updateViscousTensor() const
Definition: AmrIce.cpp:4496
Vector< LevelData< FArrayBox > *> m_viscousTensorCell
Definition: AmrIce.H:1215
Real m_laplacian_tagging_val
tagging threshold value for undivided lap(vel)
Definition: AmrIce.H:981
RealVect m_initialGuessConstVel
Definition: AmrIce.H:952
Abstract class to manage the nonlinear solve for the ice-sheet momentum.
Definition: IceVelocitySolver.H:32
Definition: AmrIce.H:427
SurfaceFlux * m_topographyFluxPtr
sets topography flux (which raises/lowers bedrock)
Definition: AmrIce.H:871
bool m_write_dHDt
if true, include dH/dt in plotfiles
Definition: AmrIce.H:1302
bool m_interpolate_zb
if true, interpolate things like base topography at regrid time
Definition: AmrIce.H:957
virtual void readCheckData(HDF5Handle &a_handle, HDF5HeaderData &a_header, int a_level, const DisjointBoxLayout &a_grids)
read level a_level checkpoint data from LevelData<FArrayBox>& a_data
Definition: AmrIce.H:1472
Abstract class around the englacial constitutive relations for ice.
Definition: ConstitutiveRelation.H:34
bool m_timeStepTicks
Definition: AmrIce.H:1366
bool m_write_fluxVel
Definition: AmrIce.H:1305
Vector< LevelData< FArrayBox > *> m_sTemperature
Definition: AmrIce.H:1179
Real m_waterDepth
Definition: AmrIce.H:1107
void updateTemperature()
update the temperature (a derived field)
Definition: AmrIceThermodynamics.cpp:464
void tagCells(Vector< IntVectSet > &a_tags)
compute tags for regridding
Definition: AmrIceMesh.cpp:607
Definition: AmrIce.H:429
void writeAMRHierarchyHDF5(HDF5Handle &a_handle, const Vector< DisjointBoxLayout > &a_grids, const Vector< LevelData< FArrayBox > * > &a_data, const Vector< string > &a_name, const Box &a_domain, const Real &a_dx, const Real &a_dt, const Real &a_time, const Vector< int > &a_ratio, const int &a_numLevels) const
Definition: AmrIceIO.cpp:2143
bool m_reportGroundedIce
Definition: AmrIce.H:1372
Real m_tagging_val
tagging value (undivided gradient(vel) threshold for regridding)
Definition: AmrIce.H:972
DiffusionTreatment
Definition: AmrIce.H:1362
void writeAMRPlotFile()
write hdf5 plotfile to the standard location
Definition: AmrIceIO.cpp:202
int m_regrid_thickness_interpolation_method
thickness interpolation method to use on regrid, see LevelSigmaCS::ThicknessInterpolationMethod ...
Definition: AmrIce.H:959
int m_finest_level
current finest level
Definition: AmrIce.H:887
IceVelocitySolver * m_velSolver
nonlinear elliptic solver for velocity field
Definition: AmrIce.H:827
rate factor A(T) in (e.g) Glen&#39;s law
Definition: ConstitutiveRelation.H:156
Vector< LevelData< FArrayBox > *> m_velBasalC
Definition: AmrIce.H:1138
const Vector< Real > & getFaceSigma() const
Definition: AmrIce.H:1380
const Vector< LevelData< FArrayBox > *> & surfaceHeatFlux() const
access function for surface heat flux
Definition: AmrIce.H:586
bool m_floating_ice_basal_flux_is_min_dhdt
Definition: AmrIce.H:1353
Real m_epsSqr_tagVal
tagging value for strain rate invariant
Definition: AmrIce.H:990
int m_initialGuessType
Definition: AmrIce.H:947
Real computeInitialDt()
compute timestep at initial time
Definition: AmrIce.cpp:4182
int m_regrid_interval
regrid interval
Definition: AmrIce.H:929
bool m_isothermal
Definition: AmrIce.H:1104
int m_groundingLineProximityCalcType
Definition: AmrIce.H:1231
Definition: AmrIce.H:1438
Vector< ProblemDomain > m_amrDomains
problem domains at each level
Definition: AmrIce.H:1065
bool m_additionalVelocity
Definition: AmrIce.H:1398
void updateGroundingLineProximity() const
Definition: AmrIce.cpp:4208
const Vector< LevelData< FArrayBox > *> & removedIceThickness() const
Definition: AmrIce.H:579
class to manage non-subcycled AMR ice-sheet model
Definition: AmrIce.H:40
bool m_evolve_velocity
Definition: AmrIce.H:1343
Vector< LevelData< FArrayBox > * > m_velocity
horizontal velocity field (found by an IceVelocitySolver)
Definition: AmrIce.H:1132
Vector< LevelData< FArrayBox > *> & amrIceFrac()
return reference to full AMR ice fraction
Definition: AmrIce.H:546
Vector< IntVectSet > m_vectTags
stores tags from previous regrids
Definition: AmrIce.H:966
Definition: AmrIce.H:943
LevelData< FArrayBox > * iceFrac(int a_level)
return pointer to real-valued ice fraction on level a_level
Definition: AmrIce.H:511
RealVect m_domainSize
Definition: AmrIce.H:1068
virtual RateFactor * getNewRateFactor() const =0
Vector< LevelData< FArrayBox > *> m_calvedIceThickness
Definition: AmrIce.H:1204
Vector< LevelData< FluxBox > *> m_faceVelAdvection
Definition: AmrIce.H:1149
Physical/domain initial and boundary conditions for ice-sheet problems.
Definition: IceThicknessIBC.H:84
RealVect m_basalSlope
background slope of bottom topography
Definition: AmrIce.H:1262
IceInternalEnergyIBC * m_internalEnergyIBCPtr
IBC for internalEnergy advection.
Definition: AmrIce.H:855
unsigned int m_nLayers
Definition: AmrIce.H:1391
bool m_tagOnLapVel
tag on laplacian(velocity)
Definition: AmrIce.H:975
void incrementIceThickness(Vector< LevelData< FArrayBox > *> a_thk)
nearly direct access to the ice thickness
Definition: AmrIce.cpp:5139
void writeCheckpointFile()
write checkpoint file out for later restarting
Definition: AmrIceIO.cpp:1071
Real m_velocity_exit
maximum acceptable velocity: if max(u) > m_vel_exit , then dump a plot file and exit ...
Definition: AmrIce.H:1098
int m_initialGuessSolverType
Definition: AmrIce.H:951
Vector< LevelData< FluxBox > *> m_viscousTensorFace
Definition: AmrIce.H:1217
Vector< LevelData< FArrayBox > *> m_cellMuCoef
Definition: AmrIce.H:1141
bool m_floating_ice_basal_flux_is_dhdt
Definition: AmrIce.H:1352
Real m_laplacian_tagging_max_basal_friction_coef
when tagging on undivided lap(vel), ignore cells where the basal friction coeffcient exceeds ...
Definition: AmrIce.H:983
Vector< LevelData< FArrayBox > *> m_internalEnergy
Definition: AmrIce.H:1169
bool m_sigmaSet
Definition: AmrIce.H:1388
Vector< LevelData< FArrayBox > *> m_groundingLineProximity
Definition: AmrIce.H:1226
Vector< IntVectSet > m_vectTagSubset
Definition: AmrIce.H:910
bool m_write_mask
if true, include mask in plotfiles
Definition: AmrIce.H:1299
void setIceFrac(const LevelData< FArrayBox > &a_thickness, int a_level)
initialize real-valued ice fraction
Definition: AmrIce.cpp:3581
bool m_write_ismip6
Definition: AmrIce.H:1323
void computeAreaFraction(LevelData< FArrayBox > &a_area, int a_maskVal, int a_level) const
compute total ice and total grounded ice (volume, at this point)
Definition: AmrIce.cpp:5098
void setRateFactor(RateFactor *a_rateFactorPtr)
set rate factor
Definition: AmrIce.H:82
void updateGeometry(Vector< RefCountedPtr< LevelSigmaCS > > &a_vect_coordSys_new, Vector< RefCountedPtr< LevelSigmaCS > > &a_vectCoords_old, const Vector< LevelData< FluxBox > * > &a_vectFluxes, Real a_dt)
Definition: AmrIce.cpp:2364
Real m_groundingLineProximityScale
Definition: AmrIce.H:1230
void setBasalFriction(const BasalFriction *a_basalFrictionPtr)
set basal friction
Definition: AmrIce.H:177
void setBasalHeatBoundaryData(SurfaceFlux *a_basalHeatBoundaryDataPtr)
set basal Heat flux for ice sheet. Does not include the heat flux due to sliding friction ...
Definition: AmrIce.H:149
const Vector< LevelData< FluxBox > *> & faceVelocitiesLayered() const
access function for layered face-centered velocities
Definition: AmrIce.H:575
PyObject * m_tagPythonModule
Definition: AmrIce.H:1049
virtual CalvingModel * new_CalvingModel()=0
factory method
velSolverTypes
compute area of ice with grounded/floating status given by a_maskval
Definition: AmrIce.H:424
void setBasalRateFactor(RateFactor *a_rateFactorPtr)
set rate factor at base
Definition: AmrIce.H:89
bool m_frac_sources
Definition: AmrIce.H:1359
const RefCountedPtr< LevelSigmaCS > geometry(int a_level) const
Definition: AmrIce.H:459
Vector< LevelData< FArrayBox > *> m_bInternalEnergy
Definition: AmrIce.H:1180
virtual ConstitutiveRelation * getNewConstitutiveRelation() const =0
creates a new copy of this ConstitutiveRelation object.
const Vector< LevelData< FArrayBox > *> & amrVelocity()
Definition: AmrIce.H:488
bool m_grounded_ice_stable
Definition: AmrIce.H:1349
bool m_evolve_ice_frac
Definition: AmrIce.H:1340
bool m_tag_thin_cavity
Definition: AmrIce.H:1019
Vector< LevelData< FArrayBox > *> m_removedIceThickness
Definition: AmrIce.H:1205
const LevelData< FArrayBox > * groundingLineProximity(int a_level) const
Definition: AmrIce.cpp:4685
Vector< LevelData< FArrayBox > * > m_old_thickness
current old-time data
Definition: AmrIce.H:1127
bool m_tagAllIce
tag any cell with ice in it
Definition: AmrIce.H:1027
DiffusionTreatment m_diffusionTreatment
Definition: AmrIce.H:1363
bool m_surfaceBoundaryHeatDataDirichlett
should a Dirichlett internal energy condition be imposed at the upper surface?
Definition: AmrIce.H:1110
SurfaceFlux & surfaceHeatBoundaryData() const
Definition: AmrIce.H:493
Vector< LevelData< FluxBox > *> m_diffusivity
Definition: AmrIce.H:1145
Real m_tag_thin_cavity_thickness
Definition: AmrIce.H:1020
void incrementWithDivFlux(Vector< LevelData< FArrayBox > * > &a_phi, const Vector< LevelData< FArrayBox > * > &a_dphi, Real a_dt)
Definition: AmrIce.cpp:3537
void run(Real a_max_time, int a_max_step)
advance solution until either max_time or max_step are reached
Definition: AmrIce.cpp:1742
bool m_tagOndivHgradVel
tag on div(H grad (vel))
Definition: AmrIce.H:999
void initGrids(int a_finest_level)
initialize grids at initial time
Definition: AmrIceMesh.cpp:1088
bool m_write_thickness_sources
Definition: AmrIce.H:1320
Vector< LevelData< FArrayBox > *> m_tillWaterDepth
Definition: AmrIce.H:1171
void computeThicknessFluxes(Vector< LevelData< FluxBox > * > &a_vectFluxes, const Vector< LevelData< FluxBox > * > &a_H_half, const Vector< LevelData< FluxBox > * > &a_faceVelAdvection)
Definition: AmrIce.cpp:2249
Vector< LevelData< FArrayBox > *> m_iceFrac
Definition: AmrIce.H:1166
BasalFrictionRelation * m_basalFrictionRelation
basal Friction relation
Definition: AmrIce.H:835
Vector< Real > m_amrDx
cell spacing at each level
Definition: AmrIce.H:1062
int m_tag_cap
maximum level at which refinement tags are computed
Definition: AmrIce.H:902
Vector< LevelData< FArrayBox > *> m_A
Definition: AmrIce.H:1173
Definition: AmrIce.H:1438
Real computeDt()
compute timestep
Definition: AmrIce.cpp:4071
IntVect m_tags_grow_dir
Definition: AmrIce.H:1056
int m_max_level
max number ofSflux levels
Definition: AmrIce.H:884
AmrIce()
Default constructor.
Definition: AmrIce.cpp:171
IceThicknessIBC * m_thicknessIBCPtr
IBC for thickness advection.
Definition: AmrIce.H:852
void computeInternalEnergyHalf(Vector< LevelData< FluxBox > * > &a_layerEH_half, Vector< LevelData< FluxBox > * > &a_layerH_half, const Vector< LevelData< FluxBox > * > &a_layerXYFaceXYVel, const Real a_dt, const Real a_time)
Definition: AmrIceThermodynamics.cpp:535
virtual void writePlotData(LevelData< FArrayBox > &a_data, int a_level)
copy level a_level plot data to LevelData<FArrayBox>& a_data
Definition: AmrIce.H:1463
Real groundingLineProximityScale() const
Definition: AmrIce.H:559
void regrid()
do regridding
Definition: AmrIceMesh.cpp:119
virtual ~Observer()
Definition: AmrIce.H:1440
Vector< LevelData< FArrayBox > *> m_velRHS
velocity solve RHS (in case we want to save it)
Definition: AmrIce.H:1135
const LevelData< FArrayBox > * viscosityCoefficient(int a_level) const
Definition: AmrIce.cpp:4398
Definition: AmrIce.H:1362
Vector< LevelData< FArrayBox > *> m_basalThicknessSource
Definition: AmrIce.H:1194
bool m_surfaceBoundaryHeatDataTemperature
is the Dirichlett data a temperature (rather than an internal energy)?
Definition: AmrIce.H:1112
void setSurfaceFlux(SurfaceFlux *a_surfaceFluxPtr)
set surfact flux for ice sheet
Definition: AmrIce.H:107
bool m_tagOnGroundedLapVel
tag on laplacian(velocity) in grounded regions only
Definition: AmrIce.H:978
void setStableSources(FArrayBox &a_sts, FArrayBox &a_bts, FArrayBox &a_vts, const FArrayBox &a_divuh, const BaseFab< int > &a_mask, const Box &a_box) const
modify the source terms (surface,basal,volume) to keep all or part of the ice sheet/shelf steady ...
Definition: AmrIce.cpp:2291
void writePlotFile()
write hdf5 plotfile to the standard location
Definition: AmrIceIO.cpp:194
BasalFriction * m_basalFrictionPtr
sets basal friction coefficient (beta^2)
Definition: AmrIce.H:878
int m_n_regrids
Definition: AmrIce.H:930
Real m_basalLengthScale
Definition: AmrIce.H:963
Vector< LevelData< FArrayBox > *> m_calvedThicknessSource
Definition: AmrIce.H:1207
void tagCellsLevel(IntVectSet &a_tags, int a_level)
compute tags for the level a_level
Definition: AmrIceMesh.cpp:650
int m_margin_tagVal_finestLevel
Definition: AmrIce.H:1024
void setTime(Real a_time)
Definition: AmrIce.H:433
const Vector< LevelData< FArrayBox > *> & addedIceThickness() const
Definition: AmrIce.H:580
bool m_reset_floating_friction_to_zero
if false, don&#39;t reset basal friction for floating ice to zero (default is true)
Definition: AmrIce.H:843
bool m_tagOnVelRHS
tag on velocity solve RHS
Definition: AmrIce.H:993
void advectIceFrac(Vector< LevelData< FArrayBox > * > &a_iceFrac, const Vector< LevelData< FluxBox > * > &a_faceVelAdvection, Real a_dt)
update real-valued ice fraction through advection from neighboring cells
Definition: AmrIce.cpp:3871
void setHeader(const std::string &a_key, const int &a_val)
Definition: AmrIce.H:253
void setHeader(const std::string &a_key, const Real &a_val)
Definition: AmrIce.H:261
void setupFixedGrids(const std::string &a_gridFile)
set up grids from grids file
Definition: AmrIceMesh.cpp:1251
Definition: AmrIce.H:1438
const LevelData< FArrayBox > * velocity(int a_level) const
Definition: AmrIce.H:483
Common virtual base class for internal energy transport IBC.
Definition: IceInternalEnergyIBC.H:29
Real dt() const
Definition: AmrIce.H:444
GodunovPhysics * m_thicknessPhysPtr
pointer to a GodunovPhysics for thickness advection
Definition: AmrIce.H:846
bool m_tagEntireDomain
tag all cells for refinement (refine entire domain)
Definition: AmrIce.H:1035
Real time() const
read only access members implementing AMRIceBase
Definition: AmrIce.H:439
const Vector< LevelData< FArrayBox > *> & calvedIceThickness() const
access function for calved ice data
Definition: AmrIce.H:578
Real m_max_dt_grow
maximum amount cfl number may grow in one timestep
Definition: AmrIce.H:1095
Vector< LevelData< FArrayBox > *> m_surfaceThicknessSource
Definition: AmrIce.H:1193
int m_solverType
what type of nonlinear solver to use for velocity field
Definition: AmrIce.H:812
Vector< LevelData< FArrayBox > *> m_sInternalEnergy
Definition: AmrIce.H:1179
Vector< LevelData< FArrayBox > *> m_temperature
Definition: AmrIce.H:1169
int m_plot_interval
Definition: AmrIce.H:1288
bool surfaceHeatBoundaryTemperature() const
Definition: AmrIce.H:516
Definition: AmrIce.H:431
int m_velDx_tagVal_finestLevelGrounded
Definition: AmrIce.H:1014
Real m_stable_dt
most recent stable timestep (> m_dt if we took a step just to hit a plot interval) ...
Definition: AmrIce.H:1086
Real m_seconds_per_unit_time
Definition: AmrIce.H:1124
void setToZero(Vector< LevelData< FArrayBox > *> &a_data)
Definition: AmrIce.cpp:1728
void setSurfaceHeatBoundaryData(SurfaceFlux *a_surfaceHeatBoundaryDataPtr, bool a_dirichlett, bool a_temperature)
set surface Heat flux for ice sheet
Definition: AmrIce.H:129
const Vector< LevelData< FArrayBox > *> & surfaceInternalEnergy() const
access function for surface temperature
Definition: AmrIce.H:583
abstract class defining the surface flux interface
Definition: SurfaceFlux.H:39
bool m_write_internal_energy
Definition: AmrIce.H:1317
void initialize()
initializes object based on inputs data passed in through parmParse
Definition: AmrIce.cpp:780
Real m_betaEps
small parameter for use in computing beta, if needed
Definition: AmrIce.H:1248
Definition: DomainDiagnosticData.H:88
CalvingModel * m_calvingModelPtr
Calving model.
Definition: AmrIce.H:858
const Vector< RefCountedPtr< LevelSigmaCS > > & amrGeometry() const
Definition: AmrIce.H:471
const LevelData< FArrayBox > * basalThicknessSource(int a_level) const
Definition: AmrIce.cpp:4445
bool m_tagPython
tag cells according to a python function
Definition: AmrIce.H:1048
Real m_fill_ratio
grid efficiency
Definition: AmrIce.H:913
Vector< LevelData< FArrayBox > *> m_sHeatFlux
Definition: AmrIce.H:1181
Vector< RefCountedPtr< LevelSigmaCS > > m_vect_coordSys
Definition: AmrIce.H:1160
const LevelData< FArrayBox > * dragCoefficient(int a_level) const
Definition: AmrIce.cpp:4469
bool m_write_layer_velocities
Definition: AmrIce.H:1397
bool m_evolve_topography_fix_surface
Definition: AmrIce.H:1346
Definition: AmrIce.H:424
void timeStep(Real a_dt)
compute one timestep
Definition: AmrIce.cpp:1869
void setBasalFlux(SurfaceFlux *a_basalFluxPtr)
set basal flux for ice sheet
Definition: AmrIce.H:118
initialGuessTypes
Definition: AmrIce.H:943
Real m_velocity_solver_tolerance
solver tolerance for velSolver.
Definition: AmrIce.H:818
void initData(Vector< RefCountedPtr< LevelSigmaCS > > &a_vectCoordSys, Vector< LevelData< FArrayBox > * > &a_initialVelocity)
initialize data on hierarchy
Definition: AmrIce.cpp:2795
SurfaceFlux * m_surfaceFluxPtr
sets surface flux for ice sheet
Definition: AmrIce.H:861
void setIceFracBC(LevelData< FArrayBox > &a_iceFrac, const ProblemDomain &a_domain)
void setDefaults()
set default values before initialization
Definition: AmrIce.cpp:191
void setCalvingModel(CalvingModel *a_calvingModelPtr)
Definition: AmrIce.H:183
void setMuCoefficient(const MuCoefficient *a_muCoefficientPtr)
Definition: AmrIce.H:180
IntVectSet m_tag_subset
only allow tagging within a subset of the coarse domain
Definition: AmrIce.H:908
Real m_seaWaterDensity
Definition: AmrIce.H:1118
bool m_grounded_ice_basal_flux_is_dhdt
Definition: AmrIce.H:1354
Vector< int > m_refinement_ratios
refinement ratios
Definition: AmrIce.H:1059
Vector< LevelData< FArrayBox > *> m_bHeatFlux
Definition: AmrIce.H:1182
bool m_write_solver_rhs
if true, include velocity solver RHS in plotfiles
Definition: AmrIce.H:1314
Definition: AmrIce.H:1438
Definition: AmrIce.H:945
const RealVect dx(int a_level) const
Definition: AmrIce.H:454
void updateInternalEnergy(Vector< LevelData< FluxBox > * > &a_layerTH_half, Vector< LevelData< FluxBox > * > &a_layerH_half, const Vector< LevelData< FluxBox > * > &a_layerXYFaceXYVel, const Vector< LevelData< FArrayBox > * > &a_layerSFaceXYVel, const Real a_dt, const Real a_time, Vector< RefCountedPtr< LevelSigmaCS > > &a_coordSysNew, Vector< RefCountedPtr< LevelSigmaCS > > &a_coordSysOld, const Vector< LevelData< FArrayBox > *> &a_surfaceThicknessSource, const Vector< LevelData< FArrayBox > *> &a_basalThicknessSource, const Vector< LevelData< FArrayBox > *> &a_volumeThicknessSource)
Update the internalEnergy and tillWaterDepth fields.
Definition: AmrIceThermodynamics.cpp:77
Vector< Real > m_faceSigma
Definition: AmrIce.H:1394
Real m_initial_cfl
cfl number for initial timestep (useful if initial data needs small cfl)
Definition: AmrIce.H:1092
Real m_initialGuessConstMu
Definition: AmrIce.H:950
Real computeTotalIce() const
diagnostic function – integrates thickness over domain
Definition: AmrIce.cpp:5078
virtual MuCoefficient * new_muCoefficient() const =0
factory method
Real m_dt
most recent timestep
Definition: AmrIce.H:1083
void computeA(Vector< LevelData< FArrayBox > * > &a_A, Vector< LevelData< FArrayBox > * > &a_sA, Vector< LevelData< FArrayBox > * > &a_bA, const Vector< LevelData< FArrayBox > * > &a_internalEnergy, const Vector< LevelData< FArrayBox > * > &a_sInternalEnergy, const Vector< LevelData< FArrayBox > * > &a_bInternalEnergy, const Vector< RefCountedPtr< LevelSigmaCS > > &a_coordSys) const
compute the flow rate coefficient A given bulk internal energy & geometry
Definition: AmrIce.cpp:5010
Real m_offsetTime
Definition: AmrIce.H:1080
virtual void defineVelRHS(Vector< LevelData< FArrayBox > * > &a_vectRhs)
compute RHS for velocity field solve
Definition: AmrIce.cpp:3261
const LevelData< FArrayBox > * iceFrac(int a_level) const
return pointer to real-valued ice fraction on level a_level
Definition: AmrIce.H:534
virtual BasalFrictionRelation * getNewBasalFrictionRelation() const =0
creates a new copy of subclass objects.
bool m_is_defined
is this object initialized?
Definition: AmrIce.H:1269
bool m_tagGroundingLine
tag the grounding line
Definition: AmrIce.H:1005
SurfaceFlux & basalHeatBoundaryData() const
Definition: AmrIce.H:521
int m_finest_timestep_level
Definition: AmrIce.H:893
bool m_reduced_plot
if true, reduce the number of fields written to plot files
Definition: AmrIce.H:1293
bool m_report_discharge
if true, report discharge of solid ice from the ice edge
Definition: AmrIce.H:1235
bool m_floating_ice_stable
Definition: AmrIce.H:1350
Vector< LevelData< FArrayBox > *> m_layerSFaceXYVel
Definition: AmrIce.H:1152
virtual SurfaceFlux * new_surfaceFlux()=0
factory method: return a pointer to a new SurfaceFlux object
bool m_evolve_thickness
Definition: AmrIce.H:1337
virtual void solveVelocityField(bool a_forceSolve=false, Real a_convergenceMetric=-1.0)
solve for velocity field (or just set up some auxilliary quantities)
Definition: AmrIce.cpp:2890
Virtual base class for basal friction relations.
Definition: BasalFrictionRelation.H:27
Real m_betaVal
background value for beta
Definition: AmrIce.H:1245
Notification
Definition: AmrIce.H:1438
void getHeader(const std::string &a_key, Real &a_val)
Definition: AmrIce.H:266
Vector< LevelData< FArrayBox > *> m_bA
Definition: AmrIce.H:1184
bool m_A_valid
Definition: AmrIce.H:1175
const Vector< Real > & amrDx() const
Definition: AmrIce.H:481
Vector< LevelData< FArrayBox > *> m_sA
Definition: AmrIce.H:1183
int m_check_interval
Definition: AmrIce.H:1334
Vector< LevelData< FArrayBox > * > m_deltaTopography
Definition: AmrIce.H:875
Definition: AmrIce.H:1362
void getIceThickness(Real *a_data_ptr, int *a_dim_info, Real *a_dew, Real *a_dns) const
fill flattened Fortran array of data with ice thickness
Definition: AmrIce.cpp:82
void getHeader(const std::string &a_key, std::string &a_val)
Definition: AmrIce.H:249
virtual void writeCheckData(HDF5Handle &a_handle, int a_level)
copy level a_level checkpoint data to LevelData<FArrayBox>& a_data
Definition: AmrIce.H:1469
void setInternalEnergyBC(IceInternalEnergyIBC *a_internalEnergyIBC)
set BC for internalEnergy advection
Definition: AmrIce.cpp:1524
Stage
Definition: CalvingModel.H:28
int m_restart_step
if starting from a restart, timestep of restart
Definition: AmrIce.H:1275
Real m_fixed_dt
Definition: AmrIce.H:1369
Real m_next_report_time
Definition: AmrIce.H:1239
Real m_velocitySolveFinalResidualNorm
Definition: AmrIce.H:825
bool m_write_muCoeff
if true, include viscosity multiplier (muCoefficient) in plotfiles
Definition: AmrIce.H:1296
bool m_doInitialVelSolve
Definition: AmrIce.H:934
Real m_time
current time
Definition: AmrIce.H:1080
Definition: AmrIce.H:1438
Real m_velocitySolveInitialResidualNorm
Residual norms at the start and end of the last velocity solve.
Definition: AmrIce.H:824
bool surfaceHeatBoundaryDirichlett() const
Definition: AmrIce.H:503
void removeObserver(Observer *a_observer)
Definition: AmrIce.H:1486
void computeFaceVelocity(Vector< LevelData< FluxBox > * > &a_faceVelAdvection, Vector< LevelData< FluxBox > * > &a_faceVelTotal, Vector< LevelData< FluxBox > * > &a_diffusivity, Vector< LevelData< FluxBox > * > &a_layerXYFaceXYVel, Vector< LevelData< FArrayBox > * > &a_layerSFaceXYVel)
given the current cell centred velocity field, compute a face centred velocity field ...
Definition: AmrIce.cpp:3361
const Vector< LevelData< FluxBox > *> & faceVelocities()
access function for face-centered velocities
Definition: AmrIce.H:572
Definition: AmrIce.H:946
const LevelData< FArrayBox > * surfaceThicknessSource(int a_level) const
Definition: AmrIce.cpp:4423
bool m_write_presolve_plotfiles
if true, write out plotfile before doing velocity solves
Definition: AmrIce.H:1331
bool m_tagVelDx
tag where |vel| * dx > m_maxVelDxVal
Definition: AmrIce.H:1012
int m_cur_step
Definition: AmrIce.H:1101
Definition: AmrIce.H:1362
int m_num_thickness_ghost
number of ghost cells we need for m_old_thickness
Definition: AmrIce.H:809
int m_max_base_grid_size
max box size for level 0 (defaults to max_box_size)
Definition: AmrIce.H:926
const DisjointBoxLayout & grids(int a_level) const
Definition: AmrIce.H:463
bool m_do_restart
Definition: AmrIce.H:1272
Vector< LevelData< FArrayBox > *> m_viscosityCoefCell
Definition: AmrIce.H:1212
int m_velDx_tagVal_finestLevelFloating
Definition: AmrIce.H:1015
bool m_tagMargin
tag at the ice margin
Definition: AmrIce.H:1023
Vector< PatchGodunov * > m_thicknessPatchGodVect
PatchGodunov used for thickness advection – one for each level.
Definition: AmrIce.H:849
static int s_verbosity
how verbose should we be?
Definition: AmrIce.H:1266
int m_eliminate_remote_ice_max_iter
Definition: AmrIce.H:1040
void setBasalFrictionRelation(BasalFrictionRelation *a_basalFrictionRelPtr)
set basal Friction relation
Definition: AmrIce.H:96
Definition: BasalFriction.H:28
void computeH_half(Vector< LevelData< FluxBox > * > &a_H_half, Real a_dt)
Definition: AmrIce.cpp:2136
int m_temporalAccuracy
temporal accuracy
Definition: AmrIce.H:802
Real m_velRHS_tagVal
tagging value for velocity RHS
Definition: AmrIce.H:996
void updateInvalidIceFrac(Vector< LevelData< FArrayBox > *> a_iceFrac)
update covered cells, ghost cells etc, of a_iceFrac
Definition: AmrIce.cpp:3627
RateFactor * m_basalRateFactor
rate factor at base
Definition: AmrIce.H:837
Vector< int > m_covered_level
keeps track of which levels are completely covered
Definition: AmrIce.H:1074
int m_nesting_radius
proper nesting radius
Definition: AmrIce.H:916
Definition: AmrIce.H:430
void helmholtzSolve(Vector< LevelData< FArrayBox > * > &a_phi, const Vector< LevelData< FArrayBox > * > &a_rhs, Real a_alpha, Real a_beta) const
Definition: AmrIce.cpp:4906
Vector< LevelData< FluxBox > *> m_faceVelTotal
Definition: AmrIce.H:1150
Definition: AmrIce.H:428
RateFactor * m_rateFactor
rate factor
Definition: AmrIce.H:833
virtual base for calving models
Definition: CalvingModel.H:23
const LevelData< FArrayBox > & muCoef(int a_level) const
return const ref to real-valued &#39;mu coefficient&#39; on level a_level
Definition: AmrIce.H:540
abstract base class for amr ice sheet models (AmrIce, AMRIceControl)
Definition: AmrIceBase.H:21
Vector< LevelData< FArrayBox > *> m_layerSFaceSVel
Definition: AmrIce.H:1153
bool m_viscousTensor_valid
Definition: AmrIce.H:1219
bool m_eliminate_remote_ice
Definition: AmrIce.H:1039
Real m_groundingLineTaggingMaxBasalFrictionCoef
threshold Basal friction coefficient at the grounding line : tag if C < value
Definition: AmrIce.H:1009
virtual ~AmrIce()
destructor
Definition: AmrIce.cpp:330
Real m_plot_time_interval
write a plot file every m_plot_time_interval years (rather than steps)
Definition: AmrIce.H:1290
void setConstitutiveRelation(ConstitutiveRelation *a_constRelPtr)
set constitutive relation
Definition: AmrIce.H:73
int m_maxSolverIterations
max number of iterations for velocity solver
Definition: AmrIce.H:815
Real m_velDx_tagVal
Definition: AmrIce.H:1013
SurfaceFlux * m_basalHeatBoundaryDataPtr
sets basal heat flux or temperature for ice sheet
Definition: AmrIce.H:868
Real m_cfl
timestep scaling
Definition: AmrIce.H:1089
const Vector< int > & refRatios() const
Definition: AmrIce.H:479
void updateCoordSysWithNewThickness(const Vector< LevelData< FArrayBox > * > &a_thickness)
Definition: AmrIce.cpp:3557
virtual void defineSolver()
initialize diagnostics
Definition: AmrIce.cpp:1530
Real m_report_time_interval
report diagnostic every m_report_time_interval years (rather than every time step) ...
Definition: AmrIce.H:1238
Vector< LevelData< FluxBox > *> m_layerXYFaceXYVel
Definition: AmrIce.H:1154
void levelSetup(int a_level, const DisjointBoxLayout &a_grids)
set up storage, etc on an AMR level
Definition: AmrIce.cpp:2693
virtual void addCheckVars(Vector< std::string > &a_vars)
fill a_var with the names of variables to add to the checkpoint file
Definition: AmrIce.H:1466
Real m_gravity
Definition: AmrIce.H:1121
Definition: AmrIce.H:944
Real m_iceDensity
Definition: AmrIce.H:1115
bool m_eliminate_remote_ice_after_regrid
Definition: AmrIce.H:1044
bool m_groundingLineProximity_valid
Definition: AmrIce.H:1228
Real m_divHGradVel_tagVal
tagging threshold value for undivided div(H grad(vel))
Definition: AmrIce.H:1002
Real m_groundingLineTaggingMinVel
threshold velocity at the grounding line : tag if |u| > value
Definition: AmrIce.H:1007
PyObject * m_tagPythonFunction
Definition: AmrIce.H:1050
void computeDischarge(const Vector< LevelData< FluxBox > * > &a_vectFluxes)
int m_velocity_solve_interval
solve the velocity problem every m_velocitySolveInterval timesteps
Definition: AmrIce.H:821
int finestLevel() const
Definition: AmrIce.H:449
bool m_check_overwrite
Definition: AmrIce.H:1283
int m_max_box_size
max box size
Definition: AmrIce.H:919
void updateIceFrac(LevelData< FArrayBox > &a_thickness, int a_level)
update real-valued ice fraction after thickness update
Definition: AmrIce.cpp:3600
SurfaceFlux * m_basalFluxPtr
sets basal flux for ice sheet
Definition: AmrIce.H:863
SurfaceFlux * m_surfaceHeatBoundaryDataPtr
sets surface heat flux or internalEnergy for ice sheet
Definition: AmrIce.H:866
const LevelData< FArrayBox > * viscousTensor(int a_level) const
Definition: AmrIce.cpp:4371
bool m_write_viscousTensor
Definition: AmrIce.H:1308
void tagCellsInit(Vector< IntVectSet > &a_tags)
compute tags at initial time
Definition: AmrIceMesh.cpp:1072
const Vector< LevelData< FArrayBox > *> & amrIceFrac() const
return const reference to full AMR ice fraction
Definition: AmrIce.H:552
void readCheckpointFile(HDF5Handle &a_handle)
read checkpoint file for restart
Definition: AmrIceIO.cpp:1415
Definition: AmrIce.H:425
string m_check_prefix
Definition: AmrIce.H:1281