ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_NOAHMP.H
Go to the documentation of this file.
1 #ifndef NOAHMP_H
2 #define NOAHMP_H
3 
4 #include <string>
5 #include <vector>
6 #include <memory>
7 #include <limits>
8 
9 #include <AMReX_ParmParse.H>
10 #include <AMReX_Interpolater.H>
11 #include <AMReX_FillPatchUtil.H>
12 #include <AMReX_FArrayBox.H>
13 #include <AMReX_Geometry.H>
14 #include <AMReX_MultiFabUtil.H>
15 #include <AMReX_Vector.H>
16 #include <AMReX_MFIter.H>
17 #include <AMReX_VisMF.H>
18 #include <AMReX_Utility.H>
19 
20 #include <ERF_NullSurf.H>
21 #include <ERF_Constants.H>
22 #include <ERF_IndexDefines.H>
23 #include <ERF_DataStruct.H>
25 
26 #include <NoahmpIO.H>
27 #include <ERF_NOAHMP_Fields.H>
28 
29 // Small POD helpers used by the Advance_With_State
30 namespace erf_noahmp {
31  // Typed precip accumulator views collected once per Advance: per slot, the
32  // borrowed native accumulator, its native->kg/m^2 factor, and whether it is filled.
33  struct PrecipSlots {
34  const amrex::MultiFab* accum [NoahmpPrecipSlot::NumSlots] = {};
37  bool have_any = false;
38  };
39 
40  // Cells the precip guard clamped this call (per rank); reported after the box loop.
41  struct ClampedPrecipCell { int i; int j; amrex::Real raw_mm; };
42 
43  // Cells where frozen components violated MP_SNOW+MP_GRAUP <= MP_RAINNC and were
44  // rescaled (per rank); reported after the loop.
46 
47  // Per-surface-box handles co-indexed by idb: the NoahmpIO block plus its
48  // pinned input/output staging buffers.
50  NoahmpIO_type* io; // &noahmpio_vect[idb]
51  amrex::Array4<amrex::Real> input; // noahmp_input_tmp[idb]->array()
52  amrex::Array4<amrex::Real> output; // noahmp_output_tmp[idb]->array()
53  };
54 }
55 
56 class NOAHMP : public NullSurf {
57 
58  using FabPtr = std::shared_ptr<amrex::MultiFab>;
59 
60 public:
61  // Constructor
62  NOAHMP () {}
63 
64  // Destructor
65  virtual ~NOAHMP () = default;
66 
67  // Set thermo and grid properties
68  void
69  Define (SolverChoice& /*sc*/) override
70  {
71  // NOTE: We should parse constants from sc here if needed,
72  }
73 
74  // Initialize data structures
75  void
76  Init (const int& lev,
77  const amrex::MultiFab& cons_in,
78  const amrex::Geometry& geom,
79  const amrex::Geometry& geom0,
80  amrex::Vector<amrex::BCRec>& domain_bcs_type,
81  amrex::IntVect& refRatio,
82  const amrex::Real& dt,
83  amrex::Vector<amrex::Vector<std::string>>& nc_init_file) override;
84 
85  // Wrapper to do all the updating
86  void
87  Advance_With_State (const int& lev,
88  amrex::MultiFab& cons_in,
89  amrex::MultiFab& xvel_in,
90  amrex::MultiFab& yvel_in,
91  amrex::MultiFab* hfx3_out,
92  amrex::MultiFab* qfx3_out,
93  const SurfacePrecipAccumulationSources& precip_sources,
94  const amrex::Real& elapsed_time,
95  const amrex::Real& dt,
96  const int& nstep,
97  const bool updated_lev0) override;
98 
99  void
100  Plot_Landfile (const int& nstep) override;
101 
102  // Get state vars from lsm class
103  amrex::MultiFab*
104  Lsm_Data_Ptr (const int& varIdx) override
105  {
106  int lsmIdx = LsmDataMap[varIdx];
107  AMREX_ALWAYS_ASSERT(lsmIdx < NOAHMP::m_lsm_data_size && lsmIdx>=0);
108  return lsm_fab_data[lsmIdx].get();
109  }
110 
111  // Get flux vars from lsm class
112  amrex::MultiFab*
113  Lsm_Flux_Ptr (const int& varIdx) override
114  {
115  int lsmIdx = LsmFluxMap[varIdx];
116  AMREX_ALWAYS_ASSERT(lsmIdx < NOAHMP::m_lsm_flux_size && lsmIdx>=0);
117  return lsm_fab_flux[lsmIdx].get();
118  }
119 
120  // Get lsm geometry
121  amrex::Geometry
122  Lsm_Geom ( ) override { return m_lsm_geom; }
123 
124  // Get number of vars. Parent queries this before Init (to size lsm_data), so
125  // resolve the soil-layer count here on first use rather than relying on Init.
126  int
128 
129  // Get number of fluxes lsm class contains
130  int
131  Lsm_Flux_Size () override { return NOAHMP::m_lsm_flux_size; }
132 
133  // Get variable names
134  std::string
135  Lsm_DataName (const int& varIdx) override
136  {
137  int lsmIdx = LsmDataMap[varIdx];
138  AMREX_ALWAYS_ASSERT(lsmIdx < NOAHMP::m_lsm_data_size && lsmIdx>=0);
139  return LsmDataName[lsmIdx];
140  }
141 
142  // Get variable index from name
143  int
144  Lsm_DataIndex (std::string varname) override
145  {
146  int varIdx = -1;
147  std::string lc_varname = amrex::toLower(varname);
148  for (int idx(0); idx<m_lsm_data_size; ++idx) {
149  if (lc_varname == amrex::toLower(LsmDataName[idx])) {
150  varIdx = idx;
151  }
152  }
153  return varIdx;
154  }
155 
156  // Get flux variable names
157  std::string
158  Lsm_FluxName (const int& varIdx) override
159  {
160  int lsmIdx = LsmFluxMap[varIdx];
161  AMREX_ALWAYS_ASSERT(lsmIdx < NOAHMP::m_lsm_flux_size && lsmIdx>=0);
162  return LsmFluxName[lsmIdx];
163  }
164 
165  // Get flux variable index from name
166  int
167  Lsm_FluxIndex (std::string varname) override
168  {
169  int varIdx = -1;
170  std::string lc_varname = amrex::toLower(varname);
171  for (int idx(0); idx<LsmFlux_NOAHMP::NumVars; ++idx) {
172  if (lc_varname == amrex::toLower(LsmFluxName[idx])) {
173  varIdx = idx;
174  }
175  }
176  return varIdx;
177  }
178 
179  void
180  Lsm_Set_Lev0_Data_Ptr (const int& varIdx,
181  amrex::MultiFab* lev0_data_ptr) override
182  {
183  lsm_lev0_data[varIdx] = lev0_data_ptr;
184  }
185 
186  void
187  Lsm_Set_Lev0_Flux_Ptr (const int& varIdx,
188  amrex::MultiFab* lev0_flux_ptr) override
189  {
190  lsm_lev0_flux[varIdx] = lev0_flux_ptr;
191  }
192 
193  bool
194  Get_Update_Status () override { return m_updated; }
195 
196  // Checkpoint/restore the NoahMP substep counter via m_itimestep (valid on every
197  // rank, unlike noahmpio_vect[0] which is absent on land-free ranks).
198  int
199  Get_LSM_Step () const override
200  {
201  return m_itimestep;
202  }
203 
204  void
205  Set_LSM_Step (int step) override
206  {
207  m_itimestep = step;
208  for (auto& noahmpio : noahmpio_vect) {
209  noahmpio.itimestep = step;
210  }
211  }
212 
213  // Write/read the full NoahMP prognostic state to/from a NetCDF restart dir so a
214  // restart reproduces a cold-start trajectory bitwise (#3255). ERF_NOAHMP_IO.cpp.
215  void
216  Write_Lsm_Restart (const std::string& dir) const override;
217 
218  void
219  Read_Lsm_Restart (const std::string& dir) override;
220 
221  // --- Advance_With_State pipeline helpers (ERF_NOAHMP_Advance.cpp) ---------
222 
223  // Fine-level (lev>0) coupling data/flux fill by interpolation from level 0,
224  // taken when there is no per-level NetCDF land file. Sets m_updated.
225  void
226  interp_from_lev0 (const int& lev,
227  amrex::MultiFab& cons_in,
228  const int& nstep);
229 
230  // Subcycling gate: true if the model fires this ERF step (advances the lockstep
231  // counter + sets m_updated). Identical on every rank -- dev/spec-noahmp-api.md ยง5.
232  bool
233  time_to_fire (const amrex::Real& elapsed_time);
234 
235  // Per surface box: stage ERF forcing into the pinned input buffer and copy into
236  // the NoahmpIO arrays (steps 1-3). blk bundles the block + its staging buffers.
237  void
238  stage_forcing (const amrex::MFIter& mfi,
239  const erf_noahmp::NoahmpBlockViews& blk,
240  const amrex::Box& bx,
241  const int& klo,
242  const int& lev,
243  const bool is_moist,
244  amrex::MultiFab& cons_in,
245  amrex::MultiFab& xvel_in,
246  amrex::MultiFab& yvel_in,
247  const erf_noahmp::PrecipSlots& precip,
248  amrex::Vector<erf_noahmp::ClampedPrecipCell>& clamped_cells,
249  amrex::Vector<erf_noahmp::InvariantPrecipCell>& invariant_cells);
250 
251  // Per surface box: read NoahmpIO results into the pinned output buffer and scatter
252  // them into the ERF coupling fields (steps 5-6), applying the -9999 fill guard.
253  void
254  read_results (const amrex::MFIter& mfi,
255  const erf_noahmp::NoahmpBlockViews& blk,
256  const amrex::Box& bx,
257  const amrex::Box& gbx,
258  amrex::MultiFab& cons_in);
259 
260  // --- Precip bookkeeping (ERF_NOAHMP_Precip.cpp) --------------------------
261 
262  // Collect the typed precip accumulator views for this Advance.
265 
266  // Lazily allocate + seed the per-level "previous cumulative accum" snapshots
267  // (cold start seeds from current; restart consumes m_precip_accum_restored).
268  void
269  prepare_precip_snapshots (const int& lev,
270  const erf_noahmp::PrecipSlots& precip);
271 
272  // Advance the snapshots to the current accumulation after the land call.
273  void
274  advance_precip_snapshots (const int& lev,
275  const erf_noahmp::PrecipSlots& precip);
276 
277  // Report (per rank, never silent) any cells clamped or rescaled by the guard.
278  void
279  report_precip_diagnostics (const int& lev,
280  const amrex::Vector<erf_noahmp::ClampedPrecipCell>& clamped_cells,
281  const amrex::Vector<erf_noahmp::InvariantPrecipCell>& invariant_cells);
282 
283  // Index of soil field (g in {0:smois,1:sh2o,2:tslb}, k in [0,nsoil)) within
284  // lsm_fab_data. Output-buffer index is NoahmpOutputComp::NumComps + g*m_nsoil + k.
285  int soil_data_idx (int g, int k) const {
286  return LsmData_NOAHMP::NumVars + g*m_nsoil + k;
287  }
288 
289  // Resolve the soil-layer count and total LSM data size exactly once, before Init
290  // (the parent queries Lsm_Data_Size() first). Init later asserts vs namelist NSOIL.
291  bool m_nsoil_resolved = false;
293  if (m_nsoil_resolved) { return; }
294  amrex::ParmParse pp_nsoil("erf");
295  pp_nsoil.query("lsm_nsoil", m_nsoil);
296  AMREX_ALWAYS_ASSERT_WITH_MESSAGE(m_nsoil >= 1, "erf.lsm_nsoil must be >= 1");
298  m_nsoil_resolved = true;
299  }
300 
301  // VisMF file prefix for the level-l, slot-s previous-accumulation snapshot.
302  static std::string
303  m_precip_snapshot_name (const std::string& dir, int l, int s) {
304  return dir + "/precip_accum_prev_Level_" + std::to_string(l)
305  + "_slot_" + std::to_string(s);
306  }
307 
308 private:
309 
310  // lsm data var count = fixed 2D fields + runtime soil profile (3 x m_nsoil).
311  // Finalized once m_nsoil is known; the fixed-field count is a safe lower bound.
313 
314  // number of lsm flux variables
316 
317  // LsmData map (state indices -> LsmVar enum)
318  amrex::Vector<int> LsmDataMap;
319 
320  // LsmFlux map (state indices -> LsmFlux enum)
321  amrex::Vector<int> LsmFluxMap;
322 
323  // Lsm data names
324  amrex::Vector<std::string> LsmDataName;
325 
326  // Lsm flux names
327  amrex::Vector<std::string> LsmFluxName;
328 
329  // geometry for atmosphere
330  amrex::Geometry m_geom;
331 
332  // geometry for atmosphere at lev==0
333  amrex::Geometry m_geom0;
334 
335  // geometry for lsm
336  amrex::Geometry m_lsm_geom;
337 
338  // refinement ratio
339  amrex::IntVect m_refRatio;
340 
341  // domain bc types
342  amrex::Vector<amrex::BCRec> m_domain_bcs_type;
343 
344  // timestep
346 
347  // Authoritative NoahMP substep counter, kept on the class so the firing decision
348  // is identical on every rank (including land-free ranks with empty noahmpio_vect).
349  int m_itimestep = 0;
350 
351  // NoahMP timestep (DTBL), broadcast to all ranks in Init so the firing
352  // decision is well-defined on land-free ranks too.
353  amrex::Real m_dtbl = std::numeric_limits<amrex::Real>::max();
354 
355  // domain klo-1 or lsm khi
356  int khi_lsm;
357 
358  // Number of grid points in z
359  int m_nz_lsm = 1;
360 
361  // Size of grid spacing in z
363 
364  // LSM data variables, sized at runtime to NumVars + 3*m_nsoil (fixed 2D fields +
365  // the SMOIS/SH2O/TSLB soil profile). Vector, since m_nsoil is only known in Init.
366  amrex::Vector<FabPtr> lsm_fab_data;
367 
368  // LSM flux variables
369  amrex::Array<FabPtr, LsmFlux_NOAHMP::NumVars> lsm_fab_flux;
370 
371  // LSM data variables at level 0 (runtime-sized, see lsm_fab_data)
372  amrex::Vector<amrex::MultiFab*> lsm_lev0_data;
373 
374  // LSM flux variables at level 0
375  amrex::Array<amrex::MultiFab*, LsmFlux_NOAHMP::NumVars> lsm_lev0_flux;
376 
377  // Number of Noah-MP soil layers, set from erf.lsm_nsoil (identical on every rank,
378  // so no broadcast needed for the collective writes). Asserted vs namelist NSOIL.
379  int m_nsoil = 4;
380 
381  // Vector to store NoahmpIO objects at a level
382  NoahmpIO_vector noahmpio_vect;
383 
384  // Pinned memory buffers for host/device coupling to Noah-MP
385  amrex::Vector<std::unique_ptr<amrex::FArrayBox>> noahmp_input_tmp;
386  amrex::Vector<std::unique_ptr<amrex::FArrayBox>> noahmp_output_tmp;
387 
388  // Previous cumulative precip accumulator (native units) per slot per level;
389  // interval precip is (current - this) * native_to_kg_m2. Only provided slots exist.
390  amrex::Vector<amrex::Array<std::unique_ptr<amrex::MultiFab>, NoahmpPrecipSlot::NumSlots>>
392 
393  // Checkpointed previous-accumulation snapshots staged by Read_Lsm_Restart, consumed
394  // (reset) by the first Advance. Empty on a cold start or legacy checkpoint.
395  amrex::Array<std::unique_ptr<amrex::MultiFab>, NoahmpPrecipSlot::NumSlots> m_precip_accum_restored;
396 
397  // This instance's AMR level (set in Init); keys the per-level snapshot filenames.
398  int m_lev = 0;
399 
400  // Plot frequency
401  int m_plot_int_1 = -1;
402 
403  // Update status
404  bool m_updated = false;
405 
406  // Do we have a nc init file?
407  bool m_has_nc_file = false;
408 };
409 #endif
constexpr amrex::Real one
Definition: ERF_Constants.H:9
AMREX_ALWAYS_ASSERT(bx.length()[2]==khi+1)
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int idx(int i, int j, int k, int nx, int ny)
Definition: ERF_InitForEnsemble.cpp:287
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Definition: ERF_NOAHMP.H:56
int Lsm_DataIndex(std::string varname) override
Definition: ERF_NOAHMP.H:144
std::string Lsm_DataName(const int &varIdx) override
Definition: ERF_NOAHMP.H:135
int khi_lsm
Definition: ERF_NOAHMP.H:356
bool m_nsoil_resolved
Definition: ERF_NOAHMP.H:291
NOAHMP()
Definition: ERF_NOAHMP.H:62
void Define(SolverChoice &) override
Definition: ERF_NOAHMP.H:69
std::string Lsm_FluxName(const int &varIdx) override
Definition: ERF_NOAHMP.H:158
amrex::Vector< amrex::BCRec > m_domain_bcs_type
Definition: ERF_NOAHMP.H:342
int m_plot_int_1
Definition: ERF_NOAHMP.H:401
void Plot_Landfile(const int &nstep) override
Definition: ERF_NOAHMP_IO.cpp:20
static std::string m_precip_snapshot_name(const std::string &dir, int l, int s)
Definition: ERF_NOAHMP.H:303
void Advance_With_State(const int &lev, amrex::MultiFab &cons_in, amrex::MultiFab &xvel_in, amrex::MultiFab &yvel_in, amrex::MultiFab *hfx3_out, amrex::MultiFab *qfx3_out, const SurfacePrecipAccumulationSources &precip_sources, const amrex::Real &elapsed_time, const amrex::Real &dt, const int &nstep, const bool updated_lev0) override
Definition: ERF_NOAHMP_Advance.cpp:342
int Lsm_FluxIndex(std::string varname) override
Definition: ERF_NOAHMP.H:167
amrex::Array< amrex::MultiFab *, LsmFlux_NOAHMP::NumVars > lsm_lev0_flux
Definition: ERF_NOAHMP.H:375
amrex::Array< FabPtr, LsmFlux_NOAHMP::NumVars > lsm_fab_flux
Definition: ERF_NOAHMP.H:369
bool m_updated
Definition: ERF_NOAHMP.H:404
int Get_LSM_Step() const override
Definition: ERF_NOAHMP.H:199
void Write_Lsm_Restart(const std::string &dir) const override
Definition: ERF_NOAHMP_IO.cpp:30
amrex::Vector< std::string > LsmDataName
Definition: ERF_NOAHMP.H:324
std::shared_ptr< amrex::MultiFab > FabPtr
Definition: ERF_NOAHMP.H:58
amrex::Vector< int > LsmDataMap
Definition: ERF_NOAHMP.H:318
void read_results(const amrex::MFIter &mfi, const erf_noahmp::NoahmpBlockViews &blk, const amrex::Box &bx, const amrex::Box &gbx, amrex::MultiFab &cons_in)
Definition: ERF_NOAHMP_Advance.cpp:207
void Init(const int &lev, const amrex::MultiFab &cons_in, const amrex::Geometry &geom, const amrex::Geometry &geom0, amrex::Vector< amrex::BCRec > &domain_bcs_type, amrex::IntVect &refRatio, const amrex::Real &dt, amrex::Vector< amrex::Vector< std::string >> &nc_init_file) override
Definition: ERF_NOAHMP_Init.cpp:23
amrex::Vector< std::unique_ptr< amrex::FArrayBox > > noahmp_output_tmp
Definition: ERF_NOAHMP.H:386
int soil_data_idx(int g, int k) const
Definition: ERF_NOAHMP.H:285
amrex::Vector< std::unique_ptr< amrex::FArrayBox > > noahmp_input_tmp
Definition: ERF_NOAHMP.H:385
int m_nsoil
Definition: ERF_NOAHMP.H:379
int Lsm_Flux_Size() override
Definition: ERF_NOAHMP.H:131
bool Get_Update_Status() override
Definition: ERF_NOAHMP.H:194
int Lsm_Data_Size() override
Definition: ERF_NOAHMP.H:127
amrex::Geometry Lsm_Geom() override
Definition: ERF_NOAHMP.H:122
amrex::IntVect m_refRatio
Definition: ERF_NOAHMP.H:339
void Read_Lsm_Restart(const std::string &dir) override
Definition: ERF_NOAHMP_IO.cpp:49
amrex::Vector< FabPtr > lsm_fab_data
Definition: ERF_NOAHMP.H:366
NoahmpIO_vector noahmpio_vect
Definition: ERF_NOAHMP.H:382
int m_lsm_data_size
Definition: ERF_NOAHMP.H:312
erf_noahmp::PrecipSlots collect_precip_sources(const SurfacePrecipAccumulationSources &precip_sources)
Definition: ERF_NOAHMP_Precip.cpp:20
void report_precip_diagnostics(const int &lev, const amrex::Vector< erf_noahmp::ClampedPrecipCell > &clamped_cells, const amrex::Vector< erf_noahmp::InvariantPrecipCell > &invariant_cells)
Definition: ERF_NOAHMP_Precip.cpp:80
virtual ~NOAHMP()=default
int m_lev
Definition: ERF_NOAHMP.H:398
amrex::Geometry m_lsm_geom
Definition: ERF_NOAHMP.H:336
int m_itimestep
Definition: ERF_NOAHMP.H:349
amrex::Geometry m_geom0
Definition: ERF_NOAHMP.H:333
void stage_forcing(const amrex::MFIter &mfi, const erf_noahmp::NoahmpBlockViews &blk, const amrex::Box &bx, const int &klo, const int &lev, const bool is_moist, amrex::MultiFab &cons_in, amrex::MultiFab &xvel_in, amrex::MultiFab &yvel_in, const erf_noahmp::PrecipSlots &precip, amrex::Vector< erf_noahmp::ClampedPrecipCell > &clamped_cells, amrex::Vector< erf_noahmp::InvariantPrecipCell > &invariant_cells)
Definition: ERF_NOAHMP_Advance.cpp:76
void prepare_precip_snapshots(const int &lev, const erf_noahmp::PrecipSlots &precip)
Definition: ERF_NOAHMP_Precip.cpp:38
bool m_has_nc_file
Definition: ERF_NOAHMP.H:407
int m_nz_lsm
Definition: ERF_NOAHMP.H:359
amrex::Vector< amrex::MultiFab * > lsm_lev0_data
Definition: ERF_NOAHMP.H:372
int m_lsm_flux_size
Definition: ERF_NOAHMP.H:315
amrex::Vector< amrex::Array< std::unique_ptr< amrex::MultiFab >, NoahmpPrecipSlot::NumSlots > > m_precip_accum_prev
Definition: ERF_NOAHMP.H:391
amrex::Real m_dtbl
Definition: ERF_NOAHMP.H:353
void interp_from_lev0(const int &lev, amrex::MultiFab &cons_in, const int &nstep)
Definition: ERF_NOAHMP_Advance.cpp:24
void Lsm_Set_Lev0_Flux_Ptr(const int &varIdx, amrex::MultiFab *lev0_flux_ptr) override
Definition: ERF_NOAHMP.H:187
amrex::Vector< int > LsmFluxMap
Definition: ERF_NOAHMP.H:321
void Lsm_Set_Lev0_Data_Ptr(const int &varIdx, amrex::MultiFab *lev0_data_ptr) override
Definition: ERF_NOAHMP.H:180
void Set_LSM_Step(int step) override
Definition: ERF_NOAHMP.H:205
amrex::MultiFab * Lsm_Data_Ptr(const int &varIdx) override
Definition: ERF_NOAHMP.H:104
amrex::Array< std::unique_ptr< amrex::MultiFab >, NoahmpPrecipSlot::NumSlots > m_precip_accum_restored
Definition: ERF_NOAHMP.H:395
void m_ensure_nsoil_resolved()
Definition: ERF_NOAHMP.H:292
amrex::Vector< std::string > LsmFluxName
Definition: ERF_NOAHMP.H:327
void advance_precip_snapshots(const int &lev, const erf_noahmp::PrecipSlots &precip)
Definition: ERF_NOAHMP_Precip.cpp:66
amrex::Geometry m_geom
Definition: ERF_NOAHMP.H:330
bool time_to_fire(const amrex::Real &elapsed_time)
Definition: ERF_NOAHMP_Advance.cpp:59
amrex::Real m_dz_lsm
Definition: ERF_NOAHMP.H:362
amrex::MultiFab * Lsm_Flux_Ptr(const int &varIdx) override
Definition: ERF_NOAHMP.H:113
amrex::Real m_dt
Definition: ERF_NOAHMP.H:345
Definition: ERF_NullSurf.H:10
@ NumVars
Definition: ERF_NOAHMP_Fields.H:120
@ NumVars
Definition: ERF_NOAHMP_Fields.H:133
@ NumSlots
Definition: ERF_NOAHMP_Fields.H:146
Definition: ERF_NOAHMP.H:30
real(c_double), parameter g
Definition: ERF_module_model_constants.F90:19
Definition: ERF_DataStruct.H:141
Definition: ERF_SurfacePrecipitation.H:21
Definition: ERF_NOAHMP.H:41
int i
Definition: ERF_NOAHMP.H:41
amrex::Real raw_mm
Definition: ERF_NOAHMP.H:41
int j
Definition: ERF_NOAHMP.H:41
Definition: ERF_NOAHMP.H:45
int j
Definition: ERF_NOAHMP.H:45
amrex::Real froz_mm
Definition: ERF_NOAHMP.H:45
amrex::Real total_mm
Definition: ERF_NOAHMP.H:45
int i
Definition: ERF_NOAHMP.H:45
Definition: ERF_NOAHMP.H:49
NoahmpIO_type * io
Definition: ERF_NOAHMP.H:50
amrex::Array4< amrex::Real > output
Definition: ERF_NOAHMP.H:52
amrex::Array4< amrex::Real > input
Definition: ERF_NOAHMP.H:51
Definition: ERF_NOAHMP.H:33
bool have_any
Definition: ERF_NOAHMP.H:37
bool has[NoahmpPrecipSlot::NumSlots]
Definition: ERF_NOAHMP.H:36
const amrex::MultiFab * accum[NoahmpPrecipSlot::NumSlots]
Definition: ERF_NOAHMP.H:34
amrex::Real factor[NoahmpPrecipSlot::NumSlots]
Definition: ERF_NOAHMP.H:35