11 #ifndef DOMAIN_DIAGNOSTIC_DATA_H 12 #define DOMAIN_DIAGNOSTIC_DATA_H 17 #include "ParmParse.H" 19 #include "NamespaceHeader.H" 46 #define HDF5_SUBGROUP_NAME "bisicles_domain_diagnostic_data" 47 #define CFIO_DIAGNOSTIC_TIME_NAME "time" 49 #define CFIO_DIAGNOSTIC_ICE_VOLUME_SHORT_NAME "lim" 50 #define CFIO_DIAGNOSTIC_ICE_VAF_SHORT_NAME "limnsw" 51 #define CFIO_DIAGNOSTIC_GROUNDED_ICE_AREA_SHORT_NAME "iareagr" 52 #define CFIO_DIAGNOSTIC_FLOATING_ICE_AREA_SHORT_NAME "iareafl" 53 #define CFIO_DIAGNOSTIC_UPPER_SURFACE_FLUX_SHORT_NAME "tendacabf" 54 #define CFIO_DIAGNOSTIC_LOWER_SURFACE_FLUX_SHORT_NAME "tendlibmassbf" 55 #define CFIO_DIAGNOSTIC_LOWER_SURFACE_FLOATING_ICE_FLUX_SHORT_NAME "tendlibmassbffl" 56 #define CFIO_DIAGNOSTIC_CALVING_FLUX_SHORT_NAME "tendlicalvf" 57 #define CFIO_DIAGNOSTIC_ICE_FRONT_CALVING_AND_MELTING_SHORT_NAME "tendlifmassbf" 59 #define CFIO_DIAGNOSTIC_ICE_VOLUME_CF_NAME "land_ice_mass" 60 #define CFIO_DIAGNOSTIC_ICE_VAF_CF_NAME "land_ice_mass_not_displacing_sea_water" 61 #define CFIO_DIAGNOSTIC_GROUNDED_ICE_AREA_CF_NAME "grounded_ice_sheet_area" 62 #define CFIO_DIAGNOSTIC_FLOATING_ICE_AREA_CF_NAME "floating_ice_sheet_area" 63 #define CFIO_DIAGNOSTIC_UPPER_SURFACE_FLUX_CF_NAME "tendency_of_land_ice_mass_due_to_surface_mass_balance" 64 #define CFIO_DIAGNOSTIC_LOWER_SURFACE_FLUX_CF_NAME "tendency_of_land_ice_mass_due_to_basal_mass_balance" 65 #define CFIO_DIAGNOSTIC_LOWER_SURFACE_FLOATING_ICE_FLUX_CF_NAME "tendency_of_land_ice_mass_due_to_basal_mass_balance" 66 #define CFIO_DIAGNOSTIC_CALVING_FLUX_CF_NAME "tendency_of_land_ice_mass_due_to_calving" 67 #define CFIO_DIAGNOSTIC_ICE_FRONT_CALVING_AND_MELTING_CF_NAME "tendency_of_land_ice_mass_due_to_calving_and_ice_front_melting" 69 #define CFIO_DIAGNOSTIC_ICE_VOLUME_LONG_NAME "Ice mass" 70 #define CFIO_DIAGNOSTIC_ICE_VAF_LONG_NAME "Ice mass not displaced by seawater" 71 #define CFIO_DIAGNOSTIC_GROUNDED_ICE_AREA_LONG_NAME "Area covered by grounded ice" 72 #define CFIO_DIAGNOSTIC_FLOATING_ICE_AREA_LONG_NAME "Area covered by floating ice" 73 #define CFIO_DIAGNOSTIC_UPPER_SURFACE_FLUX_LONG_NAME "Total SMB flux" 74 #define CFIO_DIAGNOSTIC_LOWER_SURFACE_FLUX_LONG_NAME "Total BMB flux" 75 #define CFIO_DIAGNOSTIC_LOWER_SURFACE_FLOATING_ICE_FLUX_LONG_NAME "Total BMB flux beneath floating ice" 76 #define CFIO_DIAGNOSTIC_CALVING_FLUX_LONG_NAME "Total calving flux" 77 #define CFIO_DIAGNOSTIC_ICE_FRONT_CALVING_AND_MELTING_LONG_NAME "Total calving and ice front melting flux" 91 Vector<Real> m_ice_vaf;
92 Vector<Real> m_ice_volume;
93 Vector<Real> m_ice_grounded_area;
94 Vector<Real> m_ice_floating_area;
95 Vector<Real> m_ice_total_smb;
96 Vector<Real> m_ice_total_bmb;
97 Vector<Real> m_ice_floating_total_bmb;
98 Vector<Real> m_ice_total_calving_flux;
99 Vector<Real> m_ice_total_calving_and_ice_front_melting_flux;
101 Real m_previous_time, m_previous_volume;
118 (
const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
119 const Vector<int>& a_refRatio, Real a_crseDx,
120 int a_finestLevel)
const;
122 Real computeVolumeAboveFlotation
123 (
const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
124 const Vector<int>& a_refRatio, Real a_crseDx,
125 int a_finestLevel)
const;
127 Real computeTotalGroundedIce
128 (
const Vector<DisjointBoxLayout>& a_grids,
129 const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
130 const Vector<int>& a_refRatio, Real a_crseDx,
131 int a_finestLevel)
const;
133 void computeAreaFraction(LevelData<FArrayBox>& a_area,
134 const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
137 int a_finestLevel)
const;
141 const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
142 const Vector<DisjointBoxLayout>& a_grids,
143 const Vector<int>& a_refRatio, Real a_crseDx,
144 int a_finestLevel)
const;
146 Real computeGroundedArea
147 (
const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
148 const Vector<DisjointBoxLayout>& a_grids,
149 const Vector<int>& a_refRatio, Real a_crseDx,
150 int a_finestLevel)
const;
152 Real computeFloatingArea
153 (
const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
154 const Vector<DisjointBoxLayout>& a_grids,
155 const Vector<int>& a_refRatio, Real a_crseDx,
156 int a_finestLevel)
const;
158 Real computeFluxOverIce
159 (
const Vector<LevelData<FArrayBox>* > a_flux,
160 const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
161 const Vector<DisjointBoxLayout>& a_grids,
162 const Vector<int>& a_refRatio, Real a_crseDx,
163 int a_finestLevel)
const;
165 Real computeFluxOverMaskedIce
167 const Vector<LevelData<FArrayBox>* > a_flux,
168 const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
169 const Vector<DisjointBoxLayout>& a_grids,
170 const Vector<int>& a_refRatio, Real a_crseDx,
171 int a_finestLevel)
const;
173 Real computeDeltaVolumeOverIce
174 (
const Vector<LevelData<FArrayBox>* >& a_old_thickness,
175 const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
176 const Vector<DisjointBoxLayout>& a_grids,
177 const Vector<int>& a_refRatio, Real a_crseDx,
178 int a_finestLevel)
const;
180 Real computeTotalFlux
181 (
const Vector<LevelData<FArrayBox>* > a_flux,
182 const Vector<int>& a_refRatio, Real a_crseDx)
const;
184 void initDiagnostics(
AmrIce& a_amrIce,
185 const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
186 const Vector<DisjointBoxLayout>& a_grids,
187 const Vector<int>& a_refRatio, Real a_crseDx,
188 Real a_time,
int a_finestLevel);
191 (
const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
192 const Vector<LevelData<FluxBox>* >& a_vectFluxes,
193 const Vector<DisjointBoxLayout>& a_grids,
194 const Vector<Real>& a_dx,
195 const Vector<int>& a_refRatio,
196 Real a_time, Real a_offsetTime,
197 int a_cur_step,
int a_finestLevel,
int a_verbosity);
199 void endTimestepDiagnostics
200 (
const Vector<RefCountedPtr<LevelSigmaCS > >& a_coordSys,
201 const Vector<LevelData<FArrayBox>* > a_old_thickness,
202 const Vector<LevelData<FArrayBox>* > a_divThicknessFlux,
203 const Vector<LevelData<FArrayBox>* > a_basalThicknessSource,
204 const Vector<LevelData<FArrayBox>* > a_surfaceThicknessSource,
205 const Vector<LevelData<FArrayBox>* > a_volumeThicknessSource,
206 const Vector<LevelData<FArrayBox>* > a_calvedIceThickness,
207 const Vector<LevelData<FArrayBox>* > a_addedIceThickness,
208 const Vector<LevelData<FArrayBox>* > a_removedIceThickness,
209 const Vector<DisjointBoxLayout>& a_grids,
210 const Vector<int>& a_refRatio, Real a_crseDx,
211 Real a_time, Real a_offsetTime, Real a_dt,
212 int a_cur_step,
int a_finestLevel,
int a_verbosity);
215 void record(
AmrIce& a_amrIce);
220 void write(HDF5Handle& a_handle);
223 void read(HDF5Handle& a_handle);
234 Real m_diagnostic_values[10]={0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
274 #include "NamespaceFooter.H" bool m_report_total_flux
if true, report sum(basal flux) and sum(surface flux)
Definition: DomainDiagnosticData.H:245
std::string long_name
Definition: DomainDiagnosticData.H:82
Real m_lastSumCalvedIce
diagnostic quantity – sum(calved ice) at last timestep
Definition: DomainDiagnosticData.H:257
Real m_lastVolumeAboveFlotation
diagnostic quantity – sum(ice over flotation) at last timestepa
Definition: DomainDiagnosticData.H:269
Real m_lastSumIce
diagnostic quantity – sum(ice) at last timestepa
Definition: DomainDiagnosticData.H:254
bool m_report_calving
if true, report sum(melt from calving model) and sum(calved ice)
Definition: DomainDiagnosticData.H:248
Vector< Real > * data
Definition: DomainDiagnosticData.H:85
class to manage non-subcycled AMR ice-sheet model
Definition: AmrIce.H:40
Real m_initialVolumeAboveFlotation
diagnostic quantity – sum(ice over flotation) at initial time
Definition: DomainDiagnosticData.H:266
std::string short_name
Definition: DomainDiagnosticData.H:81
std::string cf_name
Definition: DomainDiagnosticData.H:83
Definition: DomainDiagnosticData.H:79
vector< cfDiagnostic > m_cf_stuff
Definition: DomainDiagnosticData.H:236
Definition: DomainDiagnosticData.H:88
Real m_initialSumIce
diagnostic quantity – sum(ice) at initial time
Definition: DomainDiagnosticData.H:251
std::string units
Definition: DomainDiagnosticData.H:84
bool m_report_area
if true, report area of grounded ice and area of floating ice
Definition: DomainDiagnosticData.H:242
Real m_initialSumGroundedIce
diagnostic quantity – sum(grounded ice) at initial time
Definition: DomainDiagnosticData.H:260
bool m_report_grounded_ice
if true, report sum(grounded ice) as well as sum(total ice)
Definition: DomainDiagnosticData.H:239
void computeDischarge(Vector< LevelData< FArrayBox > * > &topography, Vector< LevelData< FArrayBox > * > &thickness, Vector< Real > &dx, Vector< int > &ratio, Vector< std::string > &name, Vector< LevelData< FArrayBox > * > &data, Vector< LevelData< FArrayBox > * > §orMask, Real a_iceDensity, Real a_waterDensity, Real a_gravity, Real mcrseDx, int maskNo)
Definition: discharge.cpp:106
Real m_lastSumGroundedIce
diagnostic quantity – sum(grounded ice) at last timestep
Definition: DomainDiagnosticData.H:263