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 #ifdef CH_USE_HDF5
229 
230 private:
232 
236  HDF5HeaderData m_headerData;
237 
239  void writeMetaDataHDF5(HDF5Handle& a_handle) const;
240 
241 public:
242  void setHeader(const std::string& a_key, const std::string& a_val)
243  {
244  m_headerData.m_string[a_key] = a_val;
245  }
246  void getHeader(const std::string& a_key, std::string& a_val)
247  {
248  a_val = m_headerData.m_string[a_key];
249  }
250  void setHeader(const std::string& a_key, const int& a_val)
251  {
252  m_headerData.m_int[a_key] = a_val;
253  }
254  void getHeader(const std::string& a_key, int& a_val)
255  {
256  a_val = m_headerData.m_int[a_key];
257  }
258  void setHeader(const std::string& a_key, const Real& a_val)
259  {
260  m_headerData.m_real[a_key] = a_val;
261  }
262 
263  void getHeader(const std::string& a_key, Real& a_val)
264  {
265  a_val = m_headerData.m_real[a_key];
266  }
267 
268  void writeAMRHierarchyHDF5(HDF5Handle& a_handle,
269  const Vector<DisjointBoxLayout>& a_grids,
270  const Vector<LevelData<FArrayBox>* > & a_data,
271  const Vector<string>& a_name,
272  const Box& a_domain,
273  const Real& a_dx,
274  const Real& a_dt,
275  const Real& a_time,
276  const Vector<int>& a_ratio,
277  const int& a_numLevels) const;
278 
279  void writeAMRHierarchyHDF5(const string& filename,
280  const Vector<DisjointBoxLayout>& a_grids,
281  const Vector<LevelData<FArrayBox>* > & a_data,
282  const Vector<string>& a_name,
283  const Box& a_domain,
284  const Real& a_dx,
285  const Real& a_dt,
286  const Real& a_time,
287  const Vector<int>& a_ratio,
288  const int& a_numLevels) const;
289 
291 
294  void writePlotFile();
295  void writeAMRPlotFile();
297 
300  void writeCheckpointFile() ;
301 
303 
305  void writeCheckpointFile(const string& a_file) ;
306 
308 
310  void readCheckpointFile(HDF5Handle& a_handle);
311 
313  void restart(const string& a_restart_file);
314 
315 
316 
317 
318 
319 private:
320 
322  LevelData<FArrayBox> m_uniform_cf_data;
324  int m_cf_level;
326  Vector<std::string> m_uniform_cf_data_name;
328  Vector<std::string> m_uniform_cf_standard_name;
330  Vector<std::string> m_uniform_cf_long_name;
332  Vector<std::string> m_uniform_cf_units;
334  Vector<std::function<const LevelData<FArrayBox>*(int, LevelData<FArrayBox>&) > >m_cf_field_function;
335  // the function prototype include a LevelData<FArrayBox>& that can be used for storage by the implementation
336 
337  LevelData<FArrayBox> m_cf_tmp_data;
338  Vector<Interval> m_cf_field_interval;
339  Real m_cf_dt;
340  Real m_cf_start_time;
341  bool m_plot_style_cf, m_plot_style_amr;
342  enum OutputFileNumbering { time_step = 0, time_seconds = 1, time_years = 2, time_yyyymmdd_360 = 3, NUM_PLOT_NUMBERING};
343  OutputFileNumbering m_output_file_numbering;
344 
346  long outputNumbering();
347 
348  friend class DomainDiagnosticData;
349  DomainDiagnosticData m_cf_domain_diagnostic_data;
350 
352 
353  void setOutputOptions(ParmParse& a_pp);
355 
362  void flushCFData();
364 
374  void accumulateCFData(Real a_dt, bool a_reset = false);
375 
377  void initCFData();
378 public:
379 
380 #endif
381 
383  //Real computeTotalGroundedIce() const;
384 
386  //Real computeVolumeAboveFlotation() const;
387 
388 
390 
394  void computeAreaFraction(LevelData<FArrayBox>& a_area,
395  int a_maskVal, int a_level) const;
396 
398  // Real computeArea(int a_maskVal) const;
399 
401  //Real computeGroundedArea() const;
402 
404  //Real computeFloatingArea() const;
405 
407  //Real computeFluxOverIce(const Vector<LevelData<FArrayBox>*> a_flux);
408 
410  //Real computeDeltaVolumeOverIce() const;
411 
413  //Real computeTotalFlux(const Vector<LevelData<FArrayBox>*> a_flux);
414 
415 
416  enum velSolverTypes { Picard = 0,
417  JFNK = 1,
420  FASMGAMR = 4,
421  Python = 5,
424 
425  void setTime(Real a_time)
426  {
427  m_time = a_time - m_offsetTime;
428  }
429 
431  Real time() const
432  {
433  return m_time + m_offsetTime;
434  };
435 
436  Real dt() const
437  {
438  return m_dt;
439  }
440 
441  int finestLevel() const
442  {
443  return m_finest_level;
444  }
445 
446  const RealVect dx(int a_level) const
447  {
448  return m_vect_coordSys[a_level]->dx();
449  };
450 
451  const RefCountedPtr<LevelSigmaCS> geometry(int a_level) const
452  {
453  return m_vect_coordSys[a_level];
454  };
455  const DisjointBoxLayout& grids(int a_level) const
456  {
457  return m_amrGrids[a_level];
458  }
459  const Vector<DisjointBoxLayout>& grids() const
460  {
461  return m_amrGrids;
462  }
463  const Vector<RefCountedPtr<LevelSigmaCS> >& amrGeometry() const
464  {
465  return m_vect_coordSys;
466  }
467 
469  void incrementIceThickness(Vector<LevelData<FArrayBox>*> a_thk);
470 
471  const Vector<int>& refRatios() const { return m_refinement_ratios;}
472 
473  const Vector<Real>& amrDx() const {return m_amrDx;}
474 
475  const LevelData<FArrayBox>* velocity(int a_level) const
476  {
477  return m_velocity[a_level];
478  };
479 
480  const Vector<LevelData<FArrayBox>* >& amrVelocity()
481  {
482  return m_velocity;
483  }
484 
486  {
487  if (m_surfaceHeatBoundaryDataPtr == NULL)
488  {
489  CH_assert(m_surfaceHeatBoundaryDataPtr != NULL);
490  MayDay::Error("no surface heat boundary data");
491  }
493  }
494 
496  {
498  }
499 
501 
503  LevelData<FArrayBox>* iceFrac(int a_level)
504  {
505  return m_iceFrac[a_level];
506  };
507 
509  {
511  }
512 
514  {
515  if (m_basalHeatBoundaryDataPtr == NULL)
516  {
517  CH_assert(m_basalHeatBoundaryDataPtr != NULL);
518  MayDay::Error("no surface heat boundary data");
519  }
521  }
522 
524 
526  const LevelData<FArrayBox>* iceFrac(int a_level) const
527  {
528  return m_iceFrac[a_level];
529  };
531  //** useful for calving models **/
532  const LevelData<FArrayBox>& muCoef(int a_level) const
533  {
534  return *m_cellMuCoef[a_level];
535  }
536 
538  Vector<LevelData<FArrayBox>* >& amrIceFrac()
539  {
540  return m_iceFrac;
541  }
542 
544  const Vector<LevelData<FArrayBox>* >& amrIceFrac() const
545  {
546  return m_iceFrac;
547  }
548 
549  const LevelData<FArrayBox>* groundingLineProximity(int a_level) const;
550 
552  {
554  }
555 
556 
557  const LevelData<FArrayBox>* surfaceThicknessSource(int a_level) const;
558  const LevelData<FArrayBox>* basalThicknessSource(int a_level) const;
559  const LevelData<FArrayBox>* viscousTensor(int a_level) const;
560  const LevelData<FArrayBox>* dragCoefficient(int a_level) const;
561  const LevelData<FArrayBox>* viscosityCoefficient(int a_level) const;
562 
564  const Vector<LevelData<FluxBox>* >& faceVelocities() {return m_faceVelTotal;}
565 
567  const Vector<LevelData<FluxBox>* >& faceVelocitiesLayered() const {return m_layerXYFaceXYVel;}
568 
570  const Vector<LevelData<FArrayBox>* >& calvedIceThickness() const {return m_calvedIceThickness; }
571  const Vector<LevelData<FArrayBox>* >& removedIceThickness() const {return m_removedIceThickness; }
572  const Vector<LevelData<FArrayBox>* >& addedIceThickness() const {return m_addedIceThickness; }
573 
575  const Vector<LevelData<FArrayBox>* >& surfaceInternalEnergy() const {return m_sInternalEnergy; }
576 
578  const Vector<LevelData<FArrayBox>* >& surfaceHeatFlux() const {return m_sHeatFlux; }
579 
580 protected:
581 
582 
583 
584 
585 
587  void tagCells(Vector<IntVectSet>& a_tags);
588 
590  void tagCellsLevel(IntVectSet& a_tags, int a_level);
591 
593  void tagCellsInit(Vector<IntVectSet>& a_tags);
594 
596  void initGrids(int a_finest_level);
597 
599  void setupFixedGrids(const std::string& a_gridFile);
600 
602  void levelSetup(int a_level, const DisjointBoxLayout& a_grids);
603 
605  void initData(Vector<RefCountedPtr<LevelSigmaCS > >& a_vectCoordSys,
606  Vector<LevelData<FArrayBox>* >& a_initialVelocity);
607 
609  //void initDiagnostics();
610 
612  virtual void defineSolver();
613 
615  virtual void solveVelocityField(bool a_forceSolve = false, Real a_convergenceMetric = -1.0);
616 
618  virtual void defineVelRHS(Vector<LevelData<FArrayBox>* >& a_vectRhs);
619 
621  virtual void setBasalFriction(Vector<LevelData<FArrayBox>* >& a_C, Vector<LevelData<FArrayBox>* >& a_C0);
622 
624  virtual void setMuCoefficient(Vector<LevelData<FArrayBox>* >& a_cellMuCoef);
625 
627  void computeFaceVelocity(Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
628  Vector<LevelData<FluxBox>* >& a_faceVelTotal,
629  Vector<LevelData<FluxBox>* >& a_diffusivity,
630  Vector<LevelData<FluxBox>* >& a_layerXYFaceXYVel,
631  Vector<LevelData<FArrayBox>* >& a_layerSFaceXYVel);
632 
633 
634  // /// compute div(vel*H) at a given time
635  // void computeDivThicknessFlux(Vector<LevelData<FArrayBox>* >& a_divFlux,
636  // Vector<LevelData<FluxBox>* >& a_flux,
637  // Vector<LevelData<FArrayBox>* >& a_thickness,
638  // Real a_time, Real a_dt);
639 
640  // increment phi := phi + dt*dphi
641  void incrementWithDivFlux(Vector<LevelData<FArrayBox>* >& a_phi,
642  const Vector<LevelData<FArrayBox>* >& a_dphi,
643  Real a_dt);
644 
645  // incremente coordSys with new thickness
646  void updateCoordSysWithNewThickness(const Vector<LevelData<FArrayBox>* >& a_thickness);
647 
649 
652  void setIceFrac(const LevelData<FArrayBox>& a_thickness, int a_level);
653 
654 
656 
661  void updateIceFrac(LevelData<FArrayBox>& a_thickness, int a_level);
662 
663  void setIceFracBC(LevelData<FArrayBox>& a_iceFrac, const ProblemDomain& a_domain);
664 
666  void advectIceFrac(Vector<LevelData<FArrayBox>* >& a_iceFrac,
667  const Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
668  Real a_dt);
669 
670 
671  // /// update real-valued ice fraction through advection from neighboring cells
672  // /**
673  // Also increment a_thicknessSource based on the calving rate
674  // */
675  // // void advectIceFrac(Vector<LevelData<FArrayBox>* >& a_iceFrac,
676  // // Vector<LevelData<FArrayBox>* >& a_thicknessSource,
677  // // const Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
678  // // const Vector<LevelData<FluxBox>* >& a_thicknessFlux,
679  // // Real a_dt);
680 
681  // /// update real-valued ice fraction through application of the calving rate
682  // /**
683  // Also increment a_thicknessSource based on the calving rate
684  // */
685  // // void advectIceFracUpstream(Vector<LevelData<FArrayBox>* >& a_iceFrac,
686  // // Vector<LevelData<FArrayBox>* >& a_thicknessSource,
687  // // const Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
688  // // const Vector<LevelData<FArrayBox> *>& a_calvingRate,
689  // // Real a_subDt, Real a_dt);
690 
691  // // /// update real-valued ice fraction through advection from neighboring cell
692  // // void advectIceFracDownstream(Vector<LevelData<FArrayBox>* >& a_iceFrac,
693  // // Vector<LevelData<FArrayBox>* >& a_thicknessSource,
694  // // const Vector<LevelData<FluxBox>* >& a_faceVelAdvection,
695  // // const Vector<LevelData<FluxBox>* >& a_thicknessFlux,
696  // // const Vector<LevelData<FArrayBox> *>& a_calvingRate,
697  // // Real a_subDt, Real a_dt);
698 
700  void updateInvalidIceFrac(Vector<LevelData<FArrayBox> *> a_iceFrac);
701 
703  Real computeDt();
704 
706  Real computeInitialDt();
707 
708  //set an entire amr hierarchy to zero
709  void setToZero(Vector<LevelData<FArrayBox>*>& a_data);
710 
712  void implicitThicknessCorrection(Real a_dt,
713  const Vector<LevelData<FArrayBox>* >& a_sts,
714  const Vector<LevelData<FArrayBox>* >& a_bts,
715  const Vector<LevelData<FArrayBox>* >& a_vts
716  );
717 
719 
720  void eliminateRemoteIce();
721 
724  void helmholtzSolve(Vector<LevelData<FArrayBox>* >& a_phi,
725  const Vector<LevelData<FArrayBox>* >& a_rhs,
726  Real a_alpha, Real a_beta) const;
727 
730  void helmholtzSolve(Vector<LevelData<FArrayBox>* >& a_phi,
731  Real a_alpha, Real a_beta) const;
732 
733 
734 #if BISICLES_Z == BISICLES_LAYERED
735 
736 
738  void computeA(Vector<LevelData<FArrayBox>* >& a_A,
739  Vector<LevelData<FArrayBox>* >& a_sA,
740  Vector<LevelData<FArrayBox>* >& a_bA,
741  const Vector<LevelData<FArrayBox>* >& a_internalEnergy,
742  const Vector<LevelData<FArrayBox>* >& a_sInternalEnergy,
743  const Vector<LevelData<FArrayBox>* >& a_bInternalEnergy,
744  const Vector<RefCountedPtr<LevelSigmaCS> >& a_coordSys) const;
745 
746  //compute the face- and layer- centered internal energy (a_layerEH_half)
747  //and thickness (a_layerH_half) at time a_time + 1/2 * a_dt
748  void computeInternalEnergyHalf(Vector<LevelData<FluxBox>* >& a_layerEH_half,
749  Vector<LevelData<FluxBox>* >& a_layerH_half,
750  const Vector<LevelData<FluxBox>* >& a_layerXYFaceXYVel,
751  const Real a_dt, const Real a_time);
752 
753 
754 
756  void updateInternalEnergy(Vector<LevelData<FluxBox>* >& a_layerTH_half,
757  Vector<LevelData<FluxBox>* >& a_layerH_half,
758  const Vector<LevelData<FluxBox>* >& a_layerXYFaceXYVel,
759  const Vector<LevelData<FArrayBox>* >& a_layerSFaceXYVel,
760  const Real a_dt, const Real a_time,
761  Vector<RefCountedPtr<LevelSigmaCS> >& a_coordSysNew,
762  Vector<RefCountedPtr<LevelSigmaCS> >& a_coordSysOld,
763  const Vector<LevelData<FArrayBox>*>& a_surfaceThicknessSource,
764  const Vector<LevelData<FArrayBox>*>& a_basalThicknessSource,
765  const Vector<LevelData<FArrayBox>*>& a_volumeThicknessSource);
767  void updateTemperature();
768 #endif
769 
770 
771  static void postInterpolationReFloat(LevelData<FArrayBox>& a_H,
772  const LevelData<FArrayBox>& a_coarseH,
773  const LevelData<FArrayBox>& a_coarseBed,
774  const DisjointBoxLayout a_newDBL,
775  const ProblemDomain& a_domain,
776  int a_refRatio,
777  Real a_seaLevel,
778  Real a_waterDensity,
779  Real a_iceDensity);
780 
781  // diagnostic routine -- compute discharge
782  void computeDischarge(const Vector<LevelData<FluxBox>* >& a_vectFluxes);
783 
784  // diagnostic routine
785  //void endTimestepDiagnostics();
786 
787 
789 
795 
797 
802 
805 
808 
811 
814 
820 
821 
830 
832 
836 
838  GodunovPhysics* m_thicknessPhysPtr;
839 
841  Vector<PatchGodunov*> m_thicknessPatchGodVect;
842 
845 
848 
851 
856 
861 
867  Vector<LevelData<FArrayBox>*> m_deltaTopography;
868 
871 
874 
877 
880 
887  {
888  return (0 <= m_finest_timestep_level)?
889  std::min(m_finest_timestep_level,m_finest_level):m_finest_level;
890  }
891 
892 
895 
898 
900  IntVectSet m_tag_subset;
901 
902  Vector<IntVectSet> m_vectTagSubset;
903 
906 
909 
912 
914 
919 
923 
927 
929 
934  // types of initial guess
935  enum initialGuessTypes {SlidingLaw=0, // sliding law with the form Cu = rhs
936  ConstMu=1, // solve the elliptic equations with a supplied mu
937  Function=2, //use a RealFunction<RealVect>
940 
941  //paramamters which specify the linear solver in the case m_initialGuessType = ConstMu
942  Real m_initialGuessConstMu; // domain wide viscosity
943  int m_initialGuessSolverType; // solver type, defaults to the Picard solver
944  RealVect m_initialGuessConstVel; // initial velocity, useful when the basal friction relation is nonlinear
945 
947 
952 
953  // if > 0, then the coefficient of friction at the base
954  // of the ice and the RHS will be smoothed.
956 
958  Vector<IntVectSet> m_vectTags;
959 
962 
965 
968 
971 
978 
980 
983 
986 
989 
992 
995 
1002 
1008 
1009  // tag thin ice shelf cavities. Refinining thin cavities
1010  // sometimes reveals pinning points
1013 
1017 
1020 
1022 
1025 
1028 
1029 
1030  //attempt to eliminate floating ice that is unconnected to grounded ice
1034 
1035  //attempt to eliminate unconnected floating ice after regridding
1037 
1038 #ifdef HAVE_PYTHON
1039  bool m_tagPython;
1043 #endif
1044  // grow tags in all directions by m_tags_grow
1047  //grow tags in all direction dir by max(0,m_tags_grow_dir[dir] - m_tags_grow)
1049 
1051  Vector<int> m_refinement_ratios;
1052 
1054  Vector<Real> m_amrDx;
1055 
1057  Vector<ProblemDomain> m_amrDomains;
1058 
1059  // problem domain size
1060  RealVect m_domainSize;
1061 
1063  Vector<DisjointBoxLayout> m_amrGrids;
1064 
1066  Vector<int> m_covered_level;
1067 
1069  Vector<int> m_num_cells;
1070 
1072  Real m_time; Real m_offsetTime;
1073 
1075  Real m_dt;
1076 
1079 
1081  Real m_cfl;
1082 
1085 
1088 
1091 
1092  // current step
1094 
1095  // isothermal model ?
1097 
1098  //depth of water in surface crevasses
1100 
1105 
1106  //ice density
1108 
1109  //sea water density
1111 
1112  // acceleration due to gravity
1114 
1115  // size of unit time (for velocity & time step *only*, other quantities are SI) in seconds
1117 
1119  Vector<LevelData<FArrayBox>*> m_old_thickness;
1120 
1121 
1122 
1124  Vector<LevelData<FArrayBox>*> m_velocity;
1125 
1127  Vector<LevelData<FArrayBox>* > m_velRHS;
1128 
1129  // coeffient of |u|^m-1 u in the basal traction
1130  Vector<LevelData<FArrayBox>* > m_velBasalC;
1131 
1132  //coefficient of mu in the stress tensor
1133  Vector<LevelData<FArrayBox>* > m_cellMuCoef;
1134  //Vector<LevelData<FluxBox>* > m_faceMuCoef;
1135 
1136  // thickness diffusion coefficient
1137  Vector<LevelData<FluxBox>* > m_diffusivity;
1139 
1140  //face velocities
1141  Vector<LevelData<FluxBox>* > m_faceVelAdvection;
1142  Vector<LevelData<FluxBox>* > m_faceVelTotal; // m_faceVelTotal = m_faceVelAdvection - m_diffusivity * grad(H)
1143 #if BISICLES_Z == BISICLES_LAYERED
1144  Vector<LevelData<FArrayBox>* > m_layerSFaceXYVel;
1145  Vector<LevelData<FArrayBox>* > m_layerSFaceSVel;
1146  Vector<LevelData<FluxBox>* > m_layerXYFaceXYVel;
1147 #endif
1148 
1149 
1150 
1151  // SigmaCS mapping
1152  Vector<RefCountedPtr<LevelSigmaCS > > m_vect_coordSys;
1153 
1156 
1158  Vector<LevelData<FArrayBox>* > m_iceFrac;
1159 
1160  // Cell-centered internalEnergy field
1161  Vector<LevelData<FArrayBox>* > m_internalEnergy, m_temperature;
1162  //cell-centered till water depth (accompanies the internal energy)
1163  Vector<LevelData<FArrayBox>* > m_tillWaterDepth;
1164  // Cell-centered A field
1165  Vector<LevelData<FArrayBox>* > m_A;
1166  // used to decide whether A needs updating (after a regrid, or a internalEnergy update)
1167  mutable bool m_A_valid;
1168 #if BISICLES_Z == BISICLES_LAYERED
1169  // InternalEnergy and A at the top and bottom surfaces of
1170  // the ice, horizontally cell centred (but at vertical faces)
1171  Vector<LevelData<FArrayBox>* > m_sInternalEnergy, m_sTemperature ;
1172  Vector<LevelData<FArrayBox>* > m_bInternalEnergy, m_bTemperature;
1173  Vector<LevelData<FArrayBox>* > m_sHeatFlux;
1174  Vector<LevelData<FArrayBox>* > m_bHeatFlux;
1175  Vector<LevelData<FArrayBox>* > m_sA;
1176  Vector<LevelData<FArrayBox>* > m_bA;
1177 #elif BISICLES_Z == BISICLES_FULL
1178  // possibly won't even need surface and basal temperature
1179  // field, but if we do they will need to be 2D
1180 #endif
1181  //the thickness source will have three components, from the surface and base
1182  //and distributed throught the volume.
1183  //Although they are combined for thickness evolution, they must
1184  //be kept seperate for the internalEnergy calculation.
1185  mutable Vector<LevelData<FArrayBox>* > m_surfaceThicknessSource;
1186  mutable Vector<LevelData<FArrayBox>* > m_basalThicknessSource;
1187  mutable Vector<LevelData<FArrayBox>* > m_volumeThicknessSource;
1188 
1190  void setStableSources(FArrayBox& a_sts,FArrayBox& a_bts, FArrayBox& a_vts,
1191  const FArrayBox& a_divuh, const BaseFab<int>& a_mask,
1192  const Box& a_box) const;
1193 
1194  Vector<LevelData<FArrayBox>* > m_divThicknessFlux; // set to -dH/dt
1195  //thickness of calved ice
1196  Vector<LevelData<FArrayBox>* > m_calvedIceThickness;
1197  Vector<LevelData<FArrayBox>* > m_removedIceThickness;
1198  Vector<LevelData<FArrayBox>* > m_addedIceThickness;
1199  Vector<LevelData<FArrayBox>* > m_calvedThicknessSource;
1200 
1201 
1202  //cell centered storage for the stress-balance equation coefficients
1203  mutable Vector<LevelData<FArrayBox>* > m_dragCoef;
1204  mutable Vector<LevelData<FArrayBox>* > m_viscosityCoefCell;
1205 
1206  //cell centered storage for the viscous tensor components
1207  mutable Vector<LevelData<FArrayBox>* > m_viscousTensorCell;
1208  //face centered storage for the viscous tensor components
1209  mutable Vector<LevelData<FluxBox>* > m_viscousTensorFace;
1210  // cache validity flag
1212  void updateViscousTensor() const;
1213 
1214 
1215 
1216 
1217  //Scalar field that varies in the ice shelf from 0 at the grounding line
1218  mutable Vector<LevelData<FArrayBox>* > m_groundingLineProximity;
1219  // cache validity flag;
1221  // scale length for grounding line proximity
1224  void updateGroundingLineProximity() const;
1225 
1228 
1232 
1235 
1238 
1241 
1243 
1254  RealVect m_basalSlope;
1255 
1256 
1258  static int s_verbosity;
1259 
1262 
1265 
1268 
1271 
1274 
1275  bool m_check_overwrite; // overwrite check point files
1276  bool m_check_exit; // exit immediately after writing checkpoint?
1277 
1278 
1283 
1286 
1289 
1292 
1293  // if true, include (cell-averaged) flux velocity in plotfiles
1295 
1296  // if true, include (cell-averaged) viscous tensor components in plotfiles
1298 
1299  // if true, include base velocity in plotfiles
1301 
1304 
1305  //if true, include internalEnergy in plot files
1307 
1308  //if true, include thickness source terms in plot files
1310 
1311  //if true, include fields required for ISMIP6 in plot files
1313 
1316 
1318 
1321 
1324 
1325  // if true, allow thickness to change in time
1327 
1328  // if true, allow ice frac to change in time
1330 
1331  //if true, allow velocity field to change in time
1333 
1334  // if true, bedrock topogography evolves rather than surface in grounded ice
1336 
1337  //if true, keep floating or grounded ice stable;
1340  //if true, use the basal flux to set dhdt
1344 
1349 
1350 
1353 
1354  // if true, time step are always an integer power of two
1356 
1357  //ised to store a fixed time step > 0 , if desired
1359 
1360  // if true, report sum of grounded ice (volume) -- default is false
1362 
1363 
1364 
1365 
1366 #if BISICLES_Z == BISICLES_LAYERED
1367  //additional members used in poor-mans multidim mode
1368 public:
1369  const Vector<Real>& getFaceSigma() const
1370  {
1371  return m_faceSigma;
1372  }
1373 protected:
1374  void setLayers(const Vector<Real>& a_sigma);
1375 
1376 
1378 
1379  // Number layers within the ice sheet
1380  unsigned int m_nLayers;
1381 
1382  //arrangment of layers within the bedrock
1383  Vector<Real> m_faceSigma;
1384 
1385  //if true, include layer velocities in plot files
1388 
1389 #endif
1390 private:
1391  template <class T>
1392  void levelAllocate(LevelData<T>** a_ptrPtr, const DisjointBoxLayout& a_grids,
1393  int a_nComp, const IntVect& a_ghost)
1394  {
1395  CH_assert(a_ptrPtr != NULL);
1396  if (*a_ptrPtr != NULL)
1397  delete *a_ptrPtr;
1398  *a_ptrPtr = new LevelData<T>(a_grids, a_nComp, a_ghost);
1399  }
1400 
1401 
1402 public:
1404 
1407  class Observer {
1408 
1409  friend class AmrIce;
1410 
1411  AmrIce* m_observee;
1412 
1413  // setObservee is private so that only friends (AmrIce) can access
1414  void setObservee(AmrIce* a_amrIce)
1415  {
1416  m_observee = a_amrIce;
1417  }
1418 
1419  // clearObservee is private so that only friends (AmrIce) can access
1420  void clearObservee()
1421  {
1422  m_observee = NULL;
1423  }
1424 
1425  public:
1426 
1428 
1429  virtual ~Observer()
1430  {
1431  if (m_observee != NULL)
1432  {
1433  m_observee->removeObserver(this);
1434  }
1435  }
1436 
1438  virtual void notify(const Notification, AmrIce&)=0;
1439 
1440 
1442 
1447 #ifdef CH_USE_HDF5
1448  virtual void addPlotVars(Vector<std::string>& a_vars){;}
1450 
1452  virtual void writePlotData(LevelData<FArrayBox>& a_data, int a_level){;}
1453 
1455  virtual void addCheckVars(Vector<std::string>& a_vars){;}
1456 
1458  virtual void writeCheckData(HDF5Handle& a_handle, int a_level){;}
1459 
1461  virtual void readCheckData(HDF5Handle& a_handle, HDF5HeaderData& a_header, int a_level, const DisjointBoxLayout& a_grids){;}
1462 #endif
1463  };
1464 
1465  void addObserver(Observer* a_observer)
1466  {
1467  // add a_observer to the list so long as it isn't there already
1468  if (std::find(m_observers.begin(), m_observers.end(), a_observer) == m_observers.end())
1469  {
1470  m_observers.push_back(a_observer);
1471  a_observer->setObservee(this);
1472  }
1473  }
1474 
1475  void removeObserver(Observer* a_observer)
1476  {
1477  // remove observer from the list
1478  std::vector<Observer*>::iterator it = std::find(m_observers.begin(), m_observers.end(), a_observer);
1479  if ( it != m_observers.end())
1480  {
1481  a_observer->clearObservee();
1482  m_observers.erase(it);
1483  }
1484  }
1485 
1486 
1487 private:
1488 
1489  std::vector<Observer*> m_observers; //needs to be a std::vector for begin(), end()
1490 
1492  void notifyObservers(const Observer::Notification a_n)
1493  {
1494  for (int i = 0; i < m_observers.size(); i++)
1495  m_observers[i]->notify(a_n, *this);
1496  }
1497 
1498 };
1499 
1500 #include "NamespaceFooter.H"
1501 
1502 #endif
1503 
1504 
bool m_tagOnGradVel
tag on grad(velocity)?
Definition: AmrIce.H:961
const Vector< DisjointBoxLayout > & grids() const
Definition: AmrIce.H:459
Definition: AmrIce.H:418
void setThicknessBC(IceThicknessIBC *a_thicknessIBC)
set BC for thickness advection
Definition: AmrIce.cpp:1516
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:1427
Real m_additionalDiffusivity
Definition: AmrIce.H:1138
virtual void notify(const Notification, AmrIce &)=0
General purpose notify method.
Vector< DisjointBoxLayout > m_amrGrids
current grids
Definition: AmrIce.H:1063
Vector< int > m_num_cells
book-keeping; keeps track of number of cells per level
Definition: AmrIce.H:1069
virtual void addPlotVars(Vector< std::string > &a_vars)
Fat interface members.
Definition: AmrIce.H:1449
Real m_eliminate_remote_ice_tol
Definition: AmrIce.H:1033
Vector< LevelData< FArrayBox > *> m_dragCoef
Definition: AmrIce.H:1203
void restart(const string &a_restart_file)
set up for restart
Definition: AmrIceIO.cpp:2164
bool m_tagOnEpsSqr
tag on strain rate invariant?
Definition: AmrIce.H:977
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:4764
string m_plot_prefix
Definition: AmrIce.H:1270
void eliminateRemoteIce()
Definition: AmrIce.cpp:4741
void addObserver(Observer *a_observer)
Definition: AmrIce.H:1465
Vector< LevelData< FArrayBox > *> m_volumeThicknessSource
Definition: AmrIce.H:1187
void setLayers(const Vector< Real > &a_sigma)
Definition: AmrIce.cpp:5120
MuCoefficient * m_muCoefficientPtr
sets mu coefficient (phi)
Definition: AmrIce.H:873
bool m_doInitialVelGuess
if true, use nonzero initial guess for velocity field (default is false)
Definition: AmrIce.H:933
bool m_tagAllIceOnLevel0
tag any cell with ice in it on level 0
Definition: AmrIce.H:1024
void getHeader(const std::string &a_key, int &a_val)
Definition: AmrIce.H:254
int m_block_factor
blocking factor
Definition: AmrIce.H:897
Vector< LevelData< FArrayBox > *> m_addedIceThickness
Definition: AmrIce.H:1198
Definition: MuCoefficient.H:25
bool m_check_exit
Definition: AmrIce.H:1276
virtual BasalFriction * new_basalFriction() const =0
factory method
ConstitutiveRelation * m_constitutiveRelation
constitutive relation
Definition: AmrIce.H:823
int finestTimestepLevel() const
Definition: AmrIce.H:886
bool m_write_baseVel
Definition: AmrIce.H:1300
part of Observer-Observee implementation
Definition: AmrIce.H:1407
void setHeader(const std::string &a_key, const std::string &a_val)
Definition: AmrIce.H:242
int m_tags_grow
amount to buffer tags used in regridding
Definition: AmrIce.H:1046
bool m_write_map_file
if true, write out .map.hdf5 file
Definition: AmrIce.H:1315
Vector< LevelData< FArrayBox > *> m_bTemperature
Definition: AmrIce.H:1172
Vector< LevelData< FArrayBox > *> m_divThicknessFlux
Definition: AmrIce.H:1194
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:1234
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:4707
void updateViscousTensor() const
Definition: AmrIce.cpp:4491
Vector< LevelData< FArrayBox > *> m_viscousTensorCell
Definition: AmrIce.H:1207
Real m_laplacian_tagging_val
tagging threshold value for undivided lap(vel)
Definition: AmrIce.H:973
RealVect m_initialGuessConstVel
Definition: AmrIce.H:944
Abstract class to manage the nonlinear solve for the ice-sheet momentum.
Definition: IceVelocitySolver.H:32
Definition: AmrIce.H:419
SurfaceFlux * m_topographyFluxPtr
sets topography flux (which raises/lowers bedrock)
Definition: AmrIce.H:863
bool m_write_dHDt
if true, include dH/dt in plotfiles
Definition: AmrIce.H:1291
bool m_interpolate_zb
if true, interpolate things like base topography at regrid time
Definition: AmrIce.H:949
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:1461
Abstract class around the englacial constitutive relations for ice.
Definition: ConstitutiveRelation.H:34
bool m_timeStepTicks
Definition: AmrIce.H:1355
bool m_write_fluxVel
Definition: AmrIce.H:1294
Vector< LevelData< FArrayBox > *> m_sTemperature
Definition: AmrIce.H:1171
Real m_waterDepth
Definition: AmrIce.H:1099
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:421
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:2120
bool m_reportGroundedIce
Definition: AmrIce.H:1361
Real m_tagging_val
tagging value (undivided gradient(vel) threshold for regridding)
Definition: AmrIce.H:964
DiffusionTreatment
Definition: AmrIce.H:1351
void writeAMRPlotFile()
write hdf5 plotfile to the standard location
Definition: AmrIceIO.cpp:199
int m_regrid_thickness_interpolation_method
thickness interpolation method to use on regrid, see LevelSigmaCS::ThicknessInterpolationMethod ...
Definition: AmrIce.H:951
int m_finest_level
current finest level
Definition: AmrIce.H:879
IceVelocitySolver * m_velSolver
nonlinear elliptic solver for velocity field
Definition: AmrIce.H:819
rate factor A(T) in (e.g) Glen&#39;s law
Definition: ConstitutiveRelation.H:156
Vector< LevelData< FArrayBox > *> m_velBasalC
Definition: AmrIce.H:1130
const Vector< Real > & getFaceSigma() const
Definition: AmrIce.H:1369
const Vector< LevelData< FArrayBox > *> & surfaceHeatFlux() const
access function for surface heat flux
Definition: AmrIce.H:578
bool m_floating_ice_basal_flux_is_min_dhdt
Definition: AmrIce.H:1342
Real m_epsSqr_tagVal
tagging value for strain rate invariant
Definition: AmrIce.H:982
int m_initialGuessType
Definition: AmrIce.H:939
Real computeInitialDt()
compute timestep at initial time
Definition: AmrIce.cpp:4177
int m_regrid_interval
regrid interval
Definition: AmrIce.H:921
bool m_isothermal
Definition: AmrIce.H:1096
int m_groundingLineProximityCalcType
Definition: AmrIce.H:1223
Definition: AmrIce.H:1427
Vector< ProblemDomain > m_amrDomains
problem domains at each level
Definition: AmrIce.H:1057
bool m_additionalVelocity
Definition: AmrIce.H:1387
void updateGroundingLineProximity() const
Definition: AmrIce.cpp:4203
const Vector< LevelData< FArrayBox > *> & removedIceThickness() const
Definition: AmrIce.H:571
class to manage non-subcycled AMR ice-sheet model
Definition: AmrIce.H:40
bool m_evolve_velocity
Definition: AmrIce.H:1332
Vector< LevelData< FArrayBox > * > m_velocity
horizontal velocity field (found by an IceVelocitySolver)
Definition: AmrIce.H:1124
Vector< LevelData< FArrayBox > *> & amrIceFrac()
return reference to full AMR ice fraction
Definition: AmrIce.H:538
Vector< IntVectSet > m_vectTags
stores tags from previous regrids
Definition: AmrIce.H:958
Definition: AmrIce.H:935
LevelData< FArrayBox > * iceFrac(int a_level)
return pointer to real-valued ice fraction on level a_level
Definition: AmrIce.H:503
RealVect m_domainSize
Definition: AmrIce.H:1060
virtual RateFactor * getNewRateFactor() const =0
Vector< LevelData< FArrayBox > *> m_calvedIceThickness
Definition: AmrIce.H:1196
Vector< LevelData< FluxBox > *> m_faceVelAdvection
Definition: AmrIce.H:1141
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:1254
IceInternalEnergyIBC * m_internalEnergyIBCPtr
IBC for internalEnergy advection.
Definition: AmrIce.H:847
unsigned int m_nLayers
Definition: AmrIce.H:1380
bool m_tagOnLapVel
tag on laplacian(velocity)
Definition: AmrIce.H:967
void incrementIceThickness(Vector< LevelData< FArrayBox > *> a_thk)
nearly direct access to the ice thickness
Definition: AmrIce.cpp:5134
void writeCheckpointFile()
write checkpoint file out for later restarting
Definition: AmrIceIO.cpp:1051
Real m_velocity_exit
maximum acceptable velocity: if max(u) > m_vel_exit , then dump a plot file and exit ...
Definition: AmrIce.H:1090
int m_initialGuessSolverType
Definition: AmrIce.H:943
Vector< LevelData< FluxBox > *> m_viscousTensorFace
Definition: AmrIce.H:1209
Vector< LevelData< FArrayBox > *> m_cellMuCoef
Definition: AmrIce.H:1133
bool m_floating_ice_basal_flux_is_dhdt
Definition: AmrIce.H:1341
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:975
Vector< LevelData< FArrayBox > *> m_internalEnergy
Definition: AmrIce.H:1161
bool m_sigmaSet
Definition: AmrIce.H:1377
Vector< LevelData< FArrayBox > *> m_groundingLineProximity
Definition: AmrIce.H:1218
Vector< IntVectSet > m_vectTagSubset
Definition: AmrIce.H:902
bool m_write_mask
if true, include mask in plotfiles
Definition: AmrIce.H:1288
void setIceFrac(const LevelData< FArrayBox > &a_thickness, int a_level)
initialize real-valued ice fraction
Definition: AmrIce.cpp:3578
bool m_write_ismip6
Definition: AmrIce.H:1312
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:5093
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:2361
Real m_groundingLineProximityScale
Definition: AmrIce.H:1222
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:567
PyObject * m_tagPythonModule
Definition: AmrIce.H:1041
virtual CalvingModel * new_CalvingModel()=0
factory method
velSolverTypes
compute area of ice with grounded/floating status given by a_maskval
Definition: AmrIce.H:416
void setBasalRateFactor(RateFactor *a_rateFactorPtr)
set rate factor at base
Definition: AmrIce.H:89
bool m_frac_sources
Definition: AmrIce.H:1348
const RefCountedPtr< LevelSigmaCS > geometry(int a_level) const
Definition: AmrIce.H:451
Vector< LevelData< FArrayBox > *> m_bInternalEnergy
Definition: AmrIce.H:1172
virtual ConstitutiveRelation * getNewConstitutiveRelation() const =0
creates a new copy of this ConstitutiveRelation object.
const Vector< LevelData< FArrayBox > *> & amrVelocity()
Definition: AmrIce.H:480
bool m_grounded_ice_stable
Definition: AmrIce.H:1338
bool m_evolve_ice_frac
Definition: AmrIce.H:1329
bool m_tag_thin_cavity
Definition: AmrIce.H:1011
Vector< LevelData< FArrayBox > *> m_removedIceThickness
Definition: AmrIce.H:1197
const LevelData< FArrayBox > * groundingLineProximity(int a_level) const
Definition: AmrIce.cpp:4680
Vector< LevelData< FArrayBox > * > m_old_thickness
current old-time data
Definition: AmrIce.H:1119
bool m_tagAllIce
tag any cell with ice in it
Definition: AmrIce.H:1019
DiffusionTreatment m_diffusionTreatment
Definition: AmrIce.H:1352
bool m_surfaceBoundaryHeatDataDirichlett
should a Dirichlett internal energy condition be imposed at the upper surface?
Definition: AmrIce.H:1102
SurfaceFlux & surfaceHeatBoundaryData() const
Definition: AmrIce.H:485
Vector< LevelData< FluxBox > *> m_diffusivity
Definition: AmrIce.H:1137
Real m_tag_thin_cavity_thickness
Definition: AmrIce.H:1012
void incrementWithDivFlux(Vector< LevelData< FArrayBox > * > &a_phi, const Vector< LevelData< FArrayBox > * > &a_dphi, Real a_dt)
Definition: AmrIce.cpp:3534
void run(Real a_max_time, int a_max_step)
advance solution until either max_time or max_step are reached
Definition: AmrIce.cpp:1741
bool m_tagOndivHgradVel
tag on div(H grad (vel))
Definition: AmrIce.H:991
void initGrids(int a_finest_level)
initialize grids at initial time
Definition: AmrIceMesh.cpp:1088
bool m_write_thickness_sources
Definition: AmrIce.H:1309
Vector< LevelData< FArrayBox > *> m_tillWaterDepth
Definition: AmrIce.H:1163
void computeThicknessFluxes(Vector< LevelData< FluxBox > * > &a_vectFluxes, const Vector< LevelData< FluxBox > * > &a_H_half, const Vector< LevelData< FluxBox > * > &a_faceVelAdvection)
Definition: AmrIce.cpp:2246
Vector< LevelData< FArrayBox > *> m_iceFrac
Definition: AmrIce.H:1158
BasalFrictionRelation * m_basalFrictionRelation
basal Friction relation
Definition: AmrIce.H:827
Vector< Real > m_amrDx
cell spacing at each level
Definition: AmrIce.H:1054
int m_tag_cap
maximum level at which refinement tags are computed
Definition: AmrIce.H:894
Vector< LevelData< FArrayBox > *> m_A
Definition: AmrIce.H:1165
Definition: AmrIce.H:1427
Real computeDt()
compute timestep
Definition: AmrIce.cpp:4068
IntVect m_tags_grow_dir
Definition: AmrIce.H:1048
int m_max_level
max number ofSflux levels
Definition: AmrIce.H:876
AmrIce()
Default constructor.
Definition: AmrIce.cpp:171
IceThicknessIBC * m_thicknessIBCPtr
IBC for thickness advection.
Definition: AmrIce.H:844
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:1452
Real groundingLineProximityScale() const
Definition: AmrIce.H:551
void regrid()
do regridding
Definition: AmrIceMesh.cpp:119
virtual ~Observer()
Definition: AmrIce.H:1429
Vector< LevelData< FArrayBox > *> m_velRHS
velocity solve RHS (in case we want to save it)
Definition: AmrIce.H:1127
const LevelData< FArrayBox > * viscosityCoefficient(int a_level) const
Definition: AmrIce.cpp:4393
Definition: AmrIce.H:1351
Vector< LevelData< FArrayBox > *> m_basalThicknessSource
Definition: AmrIce.H:1186
bool m_surfaceBoundaryHeatDataTemperature
is the Dirichlett data a temperature (rather than an internal energy)?
Definition: AmrIce.H:1104
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:970
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:2288
void writePlotFile()
write hdf5 plotfile to the standard location
Definition: AmrIceIO.cpp:191
BasalFriction * m_basalFrictionPtr
sets basal friction coefficient (beta^2)
Definition: AmrIce.H:870
int m_n_regrids
Definition: AmrIce.H:922
Real m_basalLengthScale
Definition: AmrIce.H:955
Vector< LevelData< FArrayBox > *> m_calvedThicknessSource
Definition: AmrIce.H:1199
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:1016
void setTime(Real a_time)
Definition: AmrIce.H:425
const Vector< LevelData< FArrayBox > *> & addedIceThickness() const
Definition: AmrIce.H:572
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:835
bool m_tagOnVelRHS
tag on velocity solve RHS
Definition: AmrIce.H:985
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:3868
void setHeader(const std::string &a_key, const int &a_val)
Definition: AmrIce.H:250
void setHeader(const std::string &a_key, const Real &a_val)
Definition: AmrIce.H:258
void setupFixedGrids(const std::string &a_gridFile)
set up grids from grids file
Definition: AmrIceMesh.cpp:1251
Definition: AmrIce.H:1427
const LevelData< FArrayBox > * velocity(int a_level) const
Definition: AmrIce.H:475
Common virtual base class for internal energy transport IBC.
Definition: IceInternalEnergyIBC.H:29
Real dt() const
Definition: AmrIce.H:436
GodunovPhysics * m_thicknessPhysPtr
pointer to a GodunovPhysics for thickness advection
Definition: AmrIce.H:838
bool m_tagEntireDomain
tag all cells for refinement (refine entire domain)
Definition: AmrIce.H:1027
Real time() const
read only access members implementing AMRIceBase
Definition: AmrIce.H:431
const Vector< LevelData< FArrayBox > *> & calvedIceThickness() const
access function for calved ice data
Definition: AmrIce.H:570
Real m_max_dt_grow
maximum amount cfl number may grow in one timestep
Definition: AmrIce.H:1087
Vector< LevelData< FArrayBox > *> m_surfaceThicknessSource
Definition: AmrIce.H:1185
int m_solverType
what type of nonlinear solver to use for velocity field
Definition: AmrIce.H:804
Vector< LevelData< FArrayBox > *> m_sInternalEnergy
Definition: AmrIce.H:1171
Vector< LevelData< FArrayBox > *> m_temperature
Definition: AmrIce.H:1161
int m_plot_interval
Definition: AmrIce.H:1280
bool surfaceHeatBoundaryTemperature() const
Definition: AmrIce.H:508
Definition: AmrIce.H:423
int m_velDx_tagVal_finestLevelGrounded
Definition: AmrIce.H:1006
Real m_stable_dt
most recent stable timestep (> m_dt if we took a step just to hit a plot interval) ...
Definition: AmrIce.H:1078
Real m_seconds_per_unit_time
Definition: AmrIce.H:1116
void setToZero(Vector< LevelData< FArrayBox > *> &a_data)
Definition: AmrIce.cpp:1727
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:575
abstract class defining the surface flux interface
Definition: SurfaceFlux.H:39
bool m_write_internal_energy
Definition: AmrIce.H:1306
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:1240
Definition: DomainDiagnosticData.H:88
CalvingModel * m_calvingModelPtr
Calving model.
Definition: AmrIce.H:850
const Vector< RefCountedPtr< LevelSigmaCS > > & amrGeometry() const
Definition: AmrIce.H:463
const LevelData< FArrayBox > * basalThicknessSource(int a_level) const
Definition: AmrIce.cpp:4440
bool m_tagPython
tag cells according to a python function
Definition: AmrIce.H:1040
Real m_fill_ratio
grid efficiency
Definition: AmrIce.H:905
Vector< LevelData< FArrayBox > *> m_sHeatFlux
Definition: AmrIce.H:1173
Vector< RefCountedPtr< LevelSigmaCS > > m_vect_coordSys
Definition: AmrIce.H:1152
const LevelData< FArrayBox > * dragCoefficient(int a_level) const
Definition: AmrIce.cpp:4464
bool m_write_layer_velocities
Definition: AmrIce.H:1386
bool m_evolve_topography_fix_surface
Definition: AmrIce.H:1335
Definition: AmrIce.H:416
void timeStep(Real a_dt)
compute one timestep
Definition: AmrIce.cpp:1866
void setBasalFlux(SurfaceFlux *a_basalFluxPtr)
set basal flux for ice sheet
Definition: AmrIce.H:118
initialGuessTypes
Definition: AmrIce.H:935
Real m_velocity_solver_tolerance
solver tolerance for velSolver.
Definition: AmrIce.H:810
void initData(Vector< RefCountedPtr< LevelSigmaCS > > &a_vectCoordSys, Vector< LevelData< FArrayBox > * > &a_initialVelocity)
initialize data on hierarchy
Definition: AmrIce.cpp:2792
SurfaceFlux * m_surfaceFluxPtr
sets surface flux for ice sheet
Definition: AmrIce.H:853
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:900
Real m_seaWaterDensity
Definition: AmrIce.H:1110
bool m_grounded_ice_basal_flux_is_dhdt
Definition: AmrIce.H:1343
Vector< int > m_refinement_ratios
refinement ratios
Definition: AmrIce.H:1051
Vector< LevelData< FArrayBox > *> m_bHeatFlux
Definition: AmrIce.H:1174
bool m_write_solver_rhs
if true, include velocity solver RHS in plotfiles
Definition: AmrIce.H:1303
Definition: AmrIce.H:1427
Definition: AmrIce.H:937
const RealVect dx(int a_level) const
Definition: AmrIce.H:446
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:1383
Real m_initial_cfl
cfl number for initial timestep (useful if initial data needs small cfl)
Definition: AmrIce.H:1084
Real m_initialGuessConstMu
Definition: AmrIce.H:942
Real computeTotalIce() const
diagnostic function – integrates thickness over domain
Definition: AmrIce.cpp:5073
virtual MuCoefficient * new_muCoefficient() const =0
factory method
Real m_dt
most recent timestep
Definition: AmrIce.H:1075
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:5005
Real m_offsetTime
Definition: AmrIce.H:1072
virtual void defineVelRHS(Vector< LevelData< FArrayBox > * > &a_vectRhs)
compute RHS for velocity field solve
Definition: AmrIce.cpp:3258
const LevelData< FArrayBox > * iceFrac(int a_level) const
return pointer to real-valued ice fraction on level a_level
Definition: AmrIce.H:526
virtual BasalFrictionRelation * getNewBasalFrictionRelation() const =0
creates a new copy of subclass objects.
bool m_is_defined
is this object initialized?
Definition: AmrIce.H:1261
bool m_tagGroundingLine
tag the grounding line
Definition: AmrIce.H:997
SurfaceFlux & basalHeatBoundaryData() const
Definition: AmrIce.H:513
int m_finest_timestep_level
Definition: AmrIce.H:885
bool m_reduced_plot
if true, reduce the number of fields written to plot files
Definition: AmrIce.H:1285
bool m_report_discharge
if true, report discharge of solid ice from the ice edge
Definition: AmrIce.H:1227
bool m_floating_ice_stable
Definition: AmrIce.H:1339
Vector< LevelData< FArrayBox > *> m_layerSFaceXYVel
Definition: AmrIce.H:1144
virtual SurfaceFlux * new_surfaceFlux()=0
factory method: return a pointer to a new SurfaceFlux object
bool m_evolve_thickness
Definition: AmrIce.H:1326
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:2887
Virtual base class for basal friction relations.
Definition: BasalFrictionRelation.H:27
Real m_betaVal
background value for beta
Definition: AmrIce.H:1237
Notification
Definition: AmrIce.H:1427
void getHeader(const std::string &a_key, Real &a_val)
Definition: AmrIce.H:263
Vector< LevelData< FArrayBox > *> m_bA
Definition: AmrIce.H:1176
bool m_A_valid
Definition: AmrIce.H:1167
const Vector< Real > & amrDx() const
Definition: AmrIce.H:473
Vector< LevelData< FArrayBox > *> m_sA
Definition: AmrIce.H:1175
int m_check_interval
Definition: AmrIce.H:1323
Vector< LevelData< FArrayBox > * > m_deltaTopography
Definition: AmrIce.H:867
Definition: AmrIce.H:1351
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:246
virtual void writeCheckData(HDF5Handle &a_handle, int a_level)
copy level a_level checkpoint data to LevelData<FArrayBox>& a_data
Definition: AmrIce.H:1458
void setInternalEnergyBC(IceInternalEnergyIBC *a_internalEnergyIBC)
set BC for internalEnergy advection
Definition: AmrIce.cpp:1523
Stage
Definition: CalvingModel.H:28
int m_restart_step
if starting from a restart, timestep of restart
Definition: AmrIce.H:1267
Real m_fixed_dt
Definition: AmrIce.H:1358
Real m_next_report_time
Definition: AmrIce.H:1231
Real m_velocitySolveFinalResidualNorm
Definition: AmrIce.H:817
bool m_doInitialVelSolve
Definition: AmrIce.H:926
Real m_time
current time
Definition: AmrIce.H:1072
Definition: AmrIce.H:1427
Real m_velocitySolveInitialResidualNorm
Residual norms at the start and end of the last velocity solve.
Definition: AmrIce.H:816
bool surfaceHeatBoundaryDirichlett() const
Definition: AmrIce.H:495
void removeObserver(Observer *a_observer)
Definition: AmrIce.H:1475
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:3358
const Vector< LevelData< FluxBox > *> & faceVelocities()
access function for face-centered velocities
Definition: AmrIce.H:564
Definition: AmrIce.H:938
const LevelData< FArrayBox > * surfaceThicknessSource(int a_level) const
Definition: AmrIce.cpp:4418
bool m_write_presolve_plotfiles
if true, write out plotfile before doing velocity solves
Definition: AmrIce.H:1320
bool m_tagVelDx
tag where |vel| * dx > m_maxVelDxVal
Definition: AmrIce.H:1004
int m_cur_step
Definition: AmrIce.H:1093
Definition: AmrIce.H:1351
int m_num_thickness_ghost
number of ghost cells we need for m_old_thickness
Definition: AmrIce.H:801
int m_max_base_grid_size
max box size for level 0 (defaults to max_box_size)
Definition: AmrIce.H:918
const DisjointBoxLayout & grids(int a_level) const
Definition: AmrIce.H:455
bool m_do_restart
Definition: AmrIce.H:1264
Vector< LevelData< FArrayBox > *> m_viscosityCoefCell
Definition: AmrIce.H:1204
int m_velDx_tagVal_finestLevelFloating
Definition: AmrIce.H:1007
bool m_tagMargin
tag at the ice margin
Definition: AmrIce.H:1015
Vector< PatchGodunov * > m_thicknessPatchGodVect
PatchGodunov used for thickness advection – one for each level.
Definition: AmrIce.H:841
static int s_verbosity
how verbose should we be?
Definition: AmrIce.H:1258
int m_eliminate_remote_ice_max_iter
Definition: AmrIce.H:1032
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:2133
int m_temporalAccuracy
temporal accuracy
Definition: AmrIce.H:794
Real m_velRHS_tagVal
tagging value for velocity RHS
Definition: AmrIce.H:988
void updateInvalidIceFrac(Vector< LevelData< FArrayBox > *> a_iceFrac)
update covered cells, ghost cells etc, of a_iceFrac
Definition: AmrIce.cpp:3624
RateFactor * m_basalRateFactor
rate factor at base
Definition: AmrIce.H:829
Vector< int > m_covered_level
keeps track of which levels are completely covered
Definition: AmrIce.H:1066
int m_nesting_radius
proper nesting radius
Definition: AmrIce.H:908
Definition: AmrIce.H:422
void helmholtzSolve(Vector< LevelData< FArrayBox > * > &a_phi, const Vector< LevelData< FArrayBox > * > &a_rhs, Real a_alpha, Real a_beta) const
Definition: AmrIce.cpp:4901
Vector< LevelData< FluxBox > *> m_faceVelTotal
Definition: AmrIce.H:1142
Definition: AmrIce.H:420
RateFactor * m_rateFactor
rate factor
Definition: AmrIce.H:825
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:532
abstract base class for amr ice sheet models (AmrIce, AMRIceControl)
Definition: AmrIceBase.H:21
Vector< LevelData< FArrayBox > *> m_layerSFaceSVel
Definition: AmrIce.H:1145
bool m_viscousTensor_valid
Definition: AmrIce.H:1211
bool m_eliminate_remote_ice
Definition: AmrIce.H:1031
Real m_groundingLineTaggingMaxBasalFrictionCoef
threshold Basal friction coefficient at the grounding line : tag if C < value
Definition: AmrIce.H:1001
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:1282
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:807
Real m_velDx_tagVal
Definition: AmrIce.H:1005
SurfaceFlux * m_basalHeatBoundaryDataPtr
sets basal heat flux or temperature for ice sheet
Definition: AmrIce.H:860
Real m_cfl
timestep scaling
Definition: AmrIce.H:1081
const Vector< int > & refRatios() const
Definition: AmrIce.H:471
void updateCoordSysWithNewThickness(const Vector< LevelData< FArrayBox > * > &a_thickness)
Definition: AmrIce.cpp:3554
virtual void defineSolver()
initialize diagnostics
Definition: AmrIce.cpp:1529
Real m_report_time_interval
report diagnostic every m_report_time_interval years (rather than every time step) ...
Definition: AmrIce.H:1230
Vector< LevelData< FluxBox > *> m_layerXYFaceXYVel
Definition: AmrIce.H:1146
void levelSetup(int a_level, const DisjointBoxLayout &a_grids)
set up storage, etc on an AMR level
Definition: AmrIce.cpp:2690
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:1455
Real m_gravity
Definition: AmrIce.H:1113
Definition: AmrIce.H:936
Real m_iceDensity
Definition: AmrIce.H:1107
bool m_eliminate_remote_ice_after_regrid
Definition: AmrIce.H:1036
bool m_groundingLineProximity_valid
Definition: AmrIce.H:1220
Real m_divHGradVel_tagVal
tagging threshold value for undivided div(H grad(vel))
Definition: AmrIce.H:994
Real m_groundingLineTaggingMinVel
threshold velocity at the grounding line : tag if |u| > value
Definition: AmrIce.H:999
PyObject * m_tagPythonFunction
Definition: AmrIce.H:1042
void computeDischarge(const Vector< LevelData< FluxBox > * > &a_vectFluxes)
int m_velocity_solve_interval
solve the velocity problem every m_velocitySolveInterval timesteps
Definition: AmrIce.H:813
int finestLevel() const
Definition: AmrIce.H:441
bool m_check_overwrite
Definition: AmrIce.H:1275
int m_max_box_size
max box size
Definition: AmrIce.H:911
void updateIceFrac(LevelData< FArrayBox > &a_thickness, int a_level)
update real-valued ice fraction after thickness update
Definition: AmrIce.cpp:3597
SurfaceFlux * m_basalFluxPtr
sets basal flux for ice sheet
Definition: AmrIce.H:855
SurfaceFlux * m_surfaceHeatBoundaryDataPtr
sets surface heat flux or internalEnergy for ice sheet
Definition: AmrIce.H:858
const LevelData< FArrayBox > * viscousTensor(int a_level) const
Definition: AmrIce.cpp:4366
bool m_write_viscousTensor
Definition: AmrIce.H:1297
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:544
void readCheckpointFile(HDF5Handle &a_handle)
read checkpoint file for restart
Definition: AmrIceIO.cpp:1393
Definition: AmrIce.H:417
string m_check_prefix
Definition: AmrIce.H:1273