ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_SurfaceLayer.H
Go to the documentation of this file.
1 #ifndef ERF_SURFACELAYER_H
2 #define ERF_SURFACELAYER_H
3 
4 #include "AMReX_Geometry.H"
5 #include "AMReX_ParmParse.H"
6 #include "AMReX_FArrayBox.H"
7 #include "AMReX_MultiFab.H"
8 #include "AMReX_iMultiFab.H"
9 #include "AMReX_MFInterpolater.H"
10 
11 #include "ERF_IndexDefines.H"
12 #include "ERF_Constants.H"
13 #include "ERF_MOSTAverage.H"
14 #include "ERF_MOSTStress.H"
15 #include "ERF_EBMOSTStress.H"
16 #include "ERF_TerrainMetrics.H"
17 #include "ERF_PBLHeight.H"
18 #include "ERF_MicrophysicsUtils.H"
19 #include "ERF_EB.H"
20 
21 /** Abstraction layer for different surface layer schemes (e.g. MOST, Cd)
22  *
23  * van der Laan, P., Kelly, M. C., & Sørensen, N. N. (2017). A new k-epsilon
24  * model consistent with Monin-Obukhov similarity theory. Wind Energy,
25  * 20(3), 479–amrex::Real(489.) https://doi.org/amrex::Real(10.1002)/we.2017
26  *
27  * Consistent with Dyer (1974) formulation from page 57, Chapter 2, Modeling
28  * the vertical ABL structure in Modelling of Atmospheric Flow Fields,
29  * Demetri P Lalas and Corrado F Ratto, January 1996,
30  * https://doi.org/amrex::Real(10.1142)/amrex::Real(2975.)
31  */
33 {
34 
35 public:
36  // Constructor
37  explicit SurfaceLayer (const amrex::Vector<amrex::Geometry>& geom,
38  bool& use_rot_surface_flux,
39  std::string a_pp_prefix,
40  amrex::Vector<std::unique_ptr<amrex::MultiFab>>& Qv_prim,
41  amrex::Vector<std::unique_ptr<amrex::MultiFab>>& z_phys_nd,
42  const MeshType& a_mesh_type,
43  const TerrainType& a_terrain_type,
44  const TurbChoice& a_turb_choice,
45  amrex::Real start_low_time,
46  amrex::Real final_low_time,
47  amrex::Real low_time_interval = zero,
48  const amrex::Vector<const eb_*>& eb_vec = {})
49  : m_geom(geom),
50  m_rotate(use_rot_surface_flux),
51  m_start_low_time(start_low_time),
52  m_final_low_time(final_low_time),
53  m_low_time_interval(low_time_interval),
54  m_eb_vec(eb_vec),
55  m_terrain_type(a_terrain_type),
56  m_ma(geom, (z_phys_nd[0] != nullptr), a_pp_prefix, a_mesh_type, a_terrain_type, eb_vec)
57  {
58  // We have a moisture model if Qv_prim is a valid pointer
59  use_moisture = (Qv_prim[0].get());
60 
61  // Get roughness
62  amrex::ParmParse pp("erf");
63  pp.query("most.z0", z0_const);
64 
65  // Specify how to compute the flux
66  if (use_rot_surface_flux) {
68  } else {
69  std::string flux_string_in;
70  std::string flux_string{"moeng"};
71  auto read_flux = pp.query("surface_layer.flux_type", flux_string_in);
72  if (read_flux) {
73  flux_string = amrex::toLower(flux_string_in);
74  }
75  if (flux_string == "donelan") {
77  } else if (flux_string == "moeng") {
79  } else if (flux_string == "rico") {
81  } else if (flux_string == "bulk_coeff") {
83  } else if (flux_string == "custom") {
85  } else {
86  amrex::Abort("Undefined MOST flux type!");
87  }
88  }
89 
90  // Include w* to handle free convection (Beljaars 1995, QJRMS)
91  pp.query("most.include_wstar", m_include_wstar);
92 
93  std::string pblh_string_in;
94  std::string pblh_string{"none"};
95  auto read_pblh = pp.query("most.pblh_calc", pblh_string_in);
96  if (read_pblh) {
97  pblh_string = amrex::toLower(pblh_string_in);
98  }
99  if (pblh_string == "none") {
101  } else if (pblh_string == "mynn25") {
103  } else if (pblh_string == "mynnedmf") {
105  } else if (pblh_string == "ysu") {
107  } else if (pblh_string == "mrf") {
109  } else {
110  amrex::Abort("Undefined PBLH calc type!");
111  }
112 
113  // Get surface temperature
114  auto erf_st = pp.query("most.surf_temp", surf_temp);
115  if (erf_st) { default_land_surf_temp = surf_temp; }
116 
117  // Get surface moisture
118  bool erf_sq = false;
119  if (use_moisture) { erf_sq = pp.query("most.surf_moist", surf_moist); }
120  if (erf_sq) { default_land_surf_moist = surf_moist; }
121 
122  // Custom type user must specify the fluxes
127  pp.get("most.ustar", custom_ustar);
128  pp.get("most.tstar", custom_tstar);
129  pp.get("most.qstar", custom_qstar);
130  pp.query("most.rhosurf", custom_rhosurf);
131  if (custom_qstar != 0) {
133  "Specified custom MOST qv flux without moisture model!");
134  }
135  amrex::Print() << "Using specified ustar, tstar, qstar for MOST = "
136  << custom_ustar << " " << custom_tstar << " "
137  << custom_qstar << std::endl;
138 
139  // Bulk transfer coefficient (must specify coeffs and surface values)
140  } else if (flux_type == FluxCalcType::BULK_COEFF) {
141  pp.get("most.Cd", m_Cd);
142  pp.get("most.Ch", m_Ch);
143  pp.get("most.Cq", m_Cq);
144  pp.get("most.surf_temp", default_land_surf_temp);
145  pp.get("most.surf_moist", default_land_surf_moist);
146  amrex::Print() << "Using specified Cd, Ch, Cq for MOST = "
147  << m_Cd << " " << m_Ch << " "
148  << m_Cq << std::endl;
149 
150  // Specify surface temperature/moisture or surface flux
151  } else {
152  if (erf_st) {
154  pp.query("most.surf_heating_rate", surf_heating_rate); // [K/h]
155 
156  // Modify rate to be in units of K / s rather than K / hr
157  surf_heating_rate /= amrex::Real(3600.0); // [K/s]
158 
159  if (pp.query("most.surf_temp_flux", surf_temp_flux)) {
160  amrex::Abort("Can only specify one of surf_temp_flux or surf_heating_rate");
161  }
162  } else {
163  pp.query("most.surf_temp_flux", surf_temp_flux);
164 
165  if (pp.query("most.surf_heating_rate", surf_heating_rate)) {
166  amrex::Abort("Can only specify one of surf_temp_flux or surf_heating_rate");
167  }
168  if (std::abs(surf_temp_flux) >
171  } else {
173  }
174  }
175 
176  if (erf_sq) {
178  } else {
179  pp.query("most.surf_moist_flux", surf_moist_flux);
180  if (std::abs(surf_moist_flux) >
183  } else {
185  }
186  }
187  }
188 
190  {
191  pp.query("most.rico.theta_z0", rico_theta_z0);
192  pp.query("most.rico.qsat_z0", rico_qsat_z0);
193  }
194 
195  // Make sure the inputs file doesn't try to use most.roughness_type
196  std::string bogus_input;
197  if (pp.query("most.roughness_type", bogus_input) > 0) {
198  amrex::Abort("most.roughness_type is deprecated; use "
199  "most.roughness_type_land and/or most.roughness_type_sea");
200  }
201 
202  // Specify how to compute the surface flux over land (if there is any)
203  std::string rough_land_string_in;
204  std::string rough_land_string{"constant"};
205  auto read_rough_land =
206  pp.query("most.roughness_type_land", rough_land_string_in);
207  if (read_rough_land) {
208  rough_land_string = amrex::toLower(rough_land_string_in);
209  }
210  if (rough_land_string == "constant") {
212  } else {
213  amrex::Abort("Undefined MOST roughness type for land!");
214  }
215 
216  // Specify how to compute the surface flux over sea (if there is any)
217  std::string rough_sea_string_in;
218  std::string rough_sea_string{"charnock"};
219  auto read_rough_sea = pp.query("most.roughness_type_sea", rough_sea_string_in);
220  if (read_rough_sea) {
221  rough_sea_string = amrex::toLower(rough_sea_string_in);
222  }
223  if (rough_sea_string == "charnock") {
225  pp.query("most.charnock_constant", cnk_a);
226  pp.query("most.charnock_viscosity", cnk_visc);
227  if (cnk_a > 0) {
228  amrex::Print() << "If there is water, Charnock relation with C_a="
229  << cnk_a << (cnk_visc ? " and viscosity" : "")
230  << " will be used" << std::endl;
231  } else {
232  amrex::Print() << "If there is water, Charnock relation with variable "
233  "Charnock parameter (COARE3.0)"
234  << (cnk_visc ? " and viscosity" : "") << " will be used"
235  << std::endl;
236  }
237  } else if (rough_sea_string == "coare3.0") {
239  amrex::Print() << "If there is water, Charnock relation with variable "
240  "Charnock parameter (COARE3.0)"
241  << (cnk_visc ? " and viscosity" : "") << " will be used"
242  << std::endl;
243  cnk_a = -1;
244  } else if (rough_sea_string == "donelan") {
246  } else if (rough_sea_string == "modified_charnock") {
248  pp.query("most.modified_charnock_depth", depth);
249  } else if (rough_sea_string == "wave_coupled") {
251  } else if (rough_sea_string == "constant") {
253  } else {
254  amrex::Abort("Undefined MOST roughness type for sea!");
255  }
256 
257  // use skin temperature instead of sea-surface temperature
258  // (wrfinput data may have lower resolution SST data)
259  pp.query("most.ignore_sst", m_ignore_sst);
260 
261  // If we're using the RANS k model, then we need to update the dirichlet
262  // BC based on the instantaneous u* and θ*; the turbulence modeling
263  // choices can vary per level but for now, assume that if specified then
264  // all levels are using the same RANS model.
265  m_update_k_rans = (a_turb_choice.rans_type == RANSType::kEqn &&
266  a_turb_choice.dirichlet_k == true);
267  if (m_update_k_rans) {
268  inv_Cmu2 = one / (a_turb_choice.Cmu0 * a_turb_choice.Cmu0);
269  theta_ref = a_turb_choice.theta_ref;
270  }
271 
272  } // constructor
273 
274  void make_SurfaceLayer_at_level (const int& lev,
275  int nlevs,
276  const amrex::Vector<amrex::MultiFab*>& mfv,
277  std::unique_ptr<amrex::MultiFab>& Theta_prim,
278  std::unique_ptr<amrex::MultiFab>& Qv_prim,
279  std::unique_ptr<amrex::MultiFab>& Qr_prim,
280  std::unique_ptr<amrex::MultiFab>& z_phys_nd,
281  amrex::MultiFab* Hwave,
282  amrex::MultiFab* Lwave,
283  amrex::MultiFab* eddyDiffs,
284  amrex::Vector<amrex::MultiFab*> lsm_data,
285  amrex::Vector<std::string> lsm_data_name,
286  amrex::Vector<amrex::MultiFab*> lsm_flux,
287  amrex::Vector<std::string> lsm_flux_name,
288  amrex::Vector<std::unique_ptr<amrex::MultiFab>>& sst_lev,
289  amrex::Vector<std::unique_ptr<amrex::MultiFab>>& tsk_lev,
290  amrex::Vector<std::unique_ptr<amrex::iMultiFab>>& lmask_lev)
291  {
292  // Update MOST Average
294  Theta_prim, Qv_prim, Qr_prim,
295  z_phys_nd);
296 
297  // Get CC vars
298  amrex::MultiFab& mf = *(mfv[0]);
299 
300  amrex::ParmParse pp("erf");
301 
302  // Do we have a time-varying surface roughness that needs to be saved?
303  if (lev == 0) {
304  const int nghost = 0; // ghost cells not included
305  int lmask_min = lmask_min_reduce(*lmask_lev[0].get(), nghost);
306  amrex::ParallelDescriptor::ReduceIntMin(lmask_min);
307 
308  m_var_z0 = (lmask_min < 1) & (rough_type_sea != RoughCalcType::CONSTANT);
309  if (m_var_z0) {
310  std::string rough_sea_string{"charnock"};
311  pp.query("most.roughness_type_sea", rough_sea_string);
312  amrex::Print() << "Variable sea roughness (type " << rough_sea_string
313  << ")" << std::endl;
314  }
315  }
316 
317  if (m_eddyDiffs_lev.size() < lev+1) {
318  m_Hwave_lev.resize(nlevs);
319  m_Lwave_lev.resize(nlevs);
320  m_eddyDiffs_lev.resize(nlevs);
321 
322  m_lsm_data_lev.resize(nlevs);
323  m_lsm_flux_lev.resize(nlevs);
324 
325  m_sst_lev.resize(nlevs);
326  m_tsk_lev.resize(nlevs);
327  m_lmask_lev.resize(nlevs);
328 
329  // Size the MOST params for all levels
330  z_0.resize(nlevs);
331  u_star.resize(nlevs);
332  w_star.resize(nlevs);
333  t_star.resize(nlevs);
334  q_star.resize(nlevs);
335  t_surf.resize(nlevs);
336  q_surf.resize(nlevs);
337  olen.resize(nlevs);
338  pblh.resize(nlevs);
339  }
340 
341  // Get pointers to SST,TSK and LANDMASK data
342  int nt_tot_sst = sst_lev.size();
343  m_sst_lev[lev].resize(nt_tot_sst);
344  for (int nt(0); nt < nt_tot_sst; ++nt) {
345  m_sst_lev[lev][nt] = sst_lev[nt].get();
346  }
347  int nt_tot_tsk = static_cast<int>(tsk_lev.size());
348  m_tsk_lev[lev].resize(nt_tot_tsk);
349  for (int nt(0); nt < nt_tot_tsk; ++nt) {
350  m_tsk_lev[lev][nt] = tsk_lev[nt].get();
351  }
352  int nt_tot_lmask = static_cast<int>(lmask_lev.size());
353  m_lmask_lev[lev].resize(nt_tot_lmask);
354  for (int nt(0); nt < nt_tot_lmask; ++nt) {
355  m_lmask_lev[lev][nt] = lmask_lev[nt].get();
356  }
357 
358  // Get pointers to wave data
359  m_Hwave_lev[lev] = Hwave;
360  m_Lwave_lev[lev] = Lwave;
361  m_eddyDiffs_lev[lev] = eddyDiffs;
362 
363  // Get pointers to LSM data and Fluxes
364  int ndata = static_cast<int>(lsm_data.size());
365  int nflux = static_cast<int>(lsm_flux.size());
366  m_lsm_data_name.resize(ndata);
367  m_lsm_data_lev[lev].resize(ndata);
368  m_lsm_flux_name.resize(nflux);
369  m_lsm_flux_lev[lev].resize(nflux);
370  for (int n(0); n < ndata; ++n) {
371  m_lsm_data_name[n] = lsm_data_name[n];
372  m_lsm_data_lev[lev][n] = lsm_data[n];
373  const std::string lc_name = amrex::toLower(lsm_data_name[n]);
374  if (lc_name == "theta" || lc_name == "t_surf") {
375  m_has_lsm_tsurf = true;
376  m_lsm_tsurf_indx = n;
377  m_has_ocean_lsm_tsurf = (lc_name == "t_surf");
378  }
379  }
380  int n_valid_lsm_flux = 0;
381  for (int n(0); n < nflux; ++n) {
382  m_lsm_flux_name[n] = lsm_flux_name[n];
383  m_lsm_flux_lev[lev][n] = lsm_flux[n];
384  if (m_lsm_flux_lev[lev][n]) { ++n_valid_lsm_flux; }
385  }
386  AMREX_ALWAYS_ASSERT((n_valid_lsm_flux==0 || n_valid_lsm_flux>=4));
387  if (n_valid_lsm_flux>=4) { m_has_lsm_fluxes = true; }
388 
389  // Check if there is a user-specified roughness file to be read
390  std::string fname;
391  bool read_z0 = false;
392  if ( (flux_type == FluxCalcType::MOENG) ||
394  int count = pp.countval("most.roughness_file_name");
395  if (count > 1) {
396  AMREX_ALWAYS_ASSERT(count >= lev+1);
397  pp.query("most.roughness_file_name", fname, lev);
398  read_z0 = true;
399  } else if (count == 1) {
400  if (lev == 0) {
401  pp.query("most.roughness_file_name", fname);
402  } else {
403  // we will interpolate from the coarsest level
404  fname = "";
405  }
406  read_z0 = true;
407  }
408  // else use z0_const
409  }
410 
411  // Attributes for MFs and FABs
412  //--------------------------------------------------------
413  // Create a 2D ba for planar terrain, 3D for EB terrain
414  amrex::BoxArray ba = mf.boxArray();
415  amrex::BoxArray ba_flux;
416  amrex::IntVect ng{1,1,0};
417 
418  if (m_terrain_type == TerrainType::EB) {
419  // Use full 3D BoxArray for EB terrain
420  ba_flux = ba;
421  ng = amrex::IntVect{1,1,1}; // Include z ghost cells
422  } else {
423  // Collapse to 2D for planar terrain
424  amrex::BoxList bl2d = ba.boxList();
425  for (auto& b : bl2d) { b.setRange(2,0); }
426  ba_flux = amrex::BoxArray(std::move(bl2d));
427  }
428 
429  const amrex::DistributionMapping& dm = mf.DistributionMap();
430  const int ncomp = 1;
431 
432  // Z0 heights FAB
433  //--------------------------------------------------------
434  z_0[lev].define(ba_flux, dm, ncomp, ng);
435  z_0[lev].setVal(z0_const);
436  if (read_z0) {
437  read_custom_roughness(lev, fname);
438  }
439 
440  // 2D MFs for U*, T*, T_surf
441  //--------------------------------------------------------
442  u_star[lev] = std::make_unique<amrex::MultiFab>(ba_flux, dm, ncomp, ng);
443  u_star[lev]->setVal(1.E34);
444 
445  w_star[lev] = std::make_unique<amrex::MultiFab>(ba_flux, dm, ncomp, ng);
446  w_star[lev]->setVal(1.E34);
447 
448  t_star[lev] = std::make_unique<amrex::MultiFab>(ba_flux, dm, ncomp, ng);
449  t_star[lev]->setVal(0.0); // default to neutral
450 
451  q_star[lev] = std::make_unique<amrex::MultiFab>(ba_flux, dm, ncomp, ng);
452  q_star[lev]->setVal(0.0); // default to dry
453 
454  olen[lev] = std::make_unique<amrex::MultiFab>(ba_flux, dm, ncomp, ng);
455  olen[lev]->setVal(1.E34);
456 
457  pblh[lev] = std::make_unique<amrex::MultiFab>(ba_flux, dm, ncomp, ng);
458  pblh[lev]->setVal(1.E34);
459 
460  t_surf[lev] = std::make_unique<amrex::MultiFab>(ba_flux, dm, ncomp, ng);
461  t_surf[lev]->setVal(default_land_surf_temp);
462 
463  q_surf[lev] = std::make_unique<amrex::MultiFab>(ba_flux, dm, ncomp, ng);
464  q_surf[lev]->setVal(default_land_surf_moist);
465 
466  // TODO: Do we want an enum struct for indexing?
467 
468  bool use_sst = (!m_sst_lev[lev].empty() && m_sst_lev[lev][0]);
469  bool use_tsk = (!m_tsk_lev[lev].empty() && m_tsk_lev[lev][0]);
470  if (use_sst || use_tsk || m_has_lsm_tsurf) {
471  // Valid SST, TSK or LSM data; t_surf set before computing fluxes (avoids
472  // extended lambda capture) Note that land temp will be set from m_tsk_lev
473  // while sea temp will be set from m_sst_lev
475 
476  // Pathways in fill_tsurf_with_sst_and_tsk
477  amrex::Print() << "Using MOST with specified surface temperature ";
478  if (m_has_ocean_lsm_tsurf) {
479  amrex::Print() << "(OceanSurf: t_surf)" << std::endl;
480  } else {
481  // NOTE: SST from the LOW file populates TSK in update_sst_tsk.
482  // So if we have TSK, it contains everything and has been
483  // sanity checked for valid SST values.
484  if (use_tsk) { m_ignore_sst = true; }
485  if (use_tsk) {
486  amrex::Print() << "(land: TSK, ";
487  } else {
488  amrex::Print() << "(land: T0, ";
489  }
490  if (use_tsk && !use_sst) {
491  amrex::Print() << "sea: TSK)" << std::endl;
492  } else {
493  amrex::Print() << "sea: SST)" << std::endl;
495  }
496  }
497  }
498  }
499 
500  void
501  update_fluxes (const int& lev,
502  const amrex::Real& elapsed_time,
503  const amrex::Real& elapsed_time_since_start_low,
504  amrex::MultiFab& cons_in,
505  const std::unique_ptr<amrex::MultiFab>& z_phys_nd,
506  const std::unique_ptr<amrex::MultiFab>& walldist,
507  int max_iters = 100);
508 
509  template <typename FluxIter>
510  void compute_fluxes (const int& lev,
511  const int& max_iters,
512  amrex::MultiFab& cons_in,
513  const FluxIter& most_flux,
514  bool is_land);
515 
516  void init_tke_from_ustar (const int& lev,
517  amrex::MultiFab& cons,
518  const std::unique_ptr<amrex::MultiFab>& z_phys_nd,
519  const amrex::Real tkefac = one,
520  const amrex::Real zscale = amrex::Real(700.0));
521 
522  void impose_SurfaceLayer_bcs (const int& lev,
523  amrex::Vector<const amrex::MultiFab*> mfs,
524  amrex::Vector<std::unique_ptr<amrex::MultiFab>>& Tau_lev,
525  amrex::MultiFab* xheat_flux,
526  amrex::MultiFab* yheat_flux,
527  amrex::MultiFab* zheat_flux,
528  amrex::MultiFab* xqv_flux,
529  amrex::MultiFab* yqv_flux,
530  amrex::MultiFab* zqv_flux,
531  const amrex::MultiFab* z_phys);
532 
533  void impose_SurfaceLayer_bcs_EB (const int& lev,
534  amrex::Vector<const amrex::MultiFab*> mfs,
535  amrex::Vector<amrex::Vector<std::unique_ptr<amrex::MultiFab>>>& Tau_lev,
536  amrex::MultiFab* xheat_flux,
537  amrex::MultiFab* yheat_flux,
538  amrex::MultiFab* zheat_flux,
539  amrex::MultiFab* xqv_flux,
540  amrex::MultiFab* yqv_flux,
541  amrex::MultiFab* zqv_flux);
542  template <typename FluxCalc>
543  void compute_SurfaceLayer_bcs (const int& lev,
544  amrex::Vector<const amrex::MultiFab*> mfs,
545  amrex::Vector<std::unique_ptr<amrex::MultiFab>>& Tau_lev,
546  amrex::MultiFab* xheat_flux,
547  amrex::MultiFab* yheat_flux,
548  amrex::MultiFab* zheat_flux,
549  amrex::MultiFab* xqv_flux,
550  amrex::MultiFab* yqv_flux,
551  amrex::MultiFab* zqv_flux,
552  const amrex::MultiFab* z_phys,
553  const FluxCalc& flux_comp);
554 
555  template <typename FluxCalc>
556  void compute_SurfaceLayer_bcs_EB (const int& lev,
557  amrex::Vector<const amrex::MultiFab*> mfs,
558  amrex::Vector<amrex::Vector<std::unique_ptr<amrex::MultiFab>>>& Tau_lev,
559  amrex::MultiFab* xheat_flux,
560  amrex::MultiFab* yheat_flux,
561  amrex::MultiFab* zheat_flux,
562  amrex::MultiFab* xqv_flux,
563  amrex::MultiFab* yqv_flux,
564  amrex::MultiFab* zqv_flux,
565  const FluxCalc& flux_comp);
566 
567  void compute_sfc_params_from_lsm_fluxes(const int& lev,
568  amrex::MultiFab& cons_in);
569 
570  void fill_tsurf_with_sst_and_tsk (const int& lev,
571  const amrex::Real& time);
572 
573  void fill_qsurf_with_qsat (const int& lev,
574  const amrex::MultiFab& cons_in,
575  const std::unique_ptr<amrex::MultiFab>& z_phys_nd);
576 
577  void get_lsm_tsurf (const int& lev);
578 
579  /* wrapper around compute_pblh */
580  void update_pblh (const int& lev,
581  amrex::Vector<amrex::Vector<amrex::MultiFab>>& vars,
582  amrex::MultiFab* z_phys_cc,
583  const MoistureComponentIndices& moisture_indices);
584 
585  template <typename PBLHeightEstimator>
586  void compute_pblh (const int& lev,
587  amrex::Vector<amrex::Vector<amrex::MultiFab>>& vars,
588  amrex::MultiFab* z_phys_cc,
589  const PBLHeightEstimator& est,
590  const MoistureComponentIndices& moisture_indice);
591 
592  void read_custom_roughness (const int& lev,
593  const std::string& fname);
594 
595  void update_surf_temp (const amrex::Real& time)
596  {
597  if (m_has_ocean_lsm_tsurf) {
598  return;
599  }
600  if (surf_heating_rate != 0) {
601  int nlevs = static_cast<int>(m_geom.size());
602  for (int lev = 0; lev < nlevs; lev++) {
603  t_surf[lev]->setVal(surf_temp + surf_heating_rate * time);
604  amrex::Print() << "Surface temp at t=" << time << ": "
605  << surf_temp + surf_heating_rate * time << std::endl;
606  }
607  }
608  }
609 
610  void update_mac_ptrs (const int& lev,
611  amrex::Vector<amrex::Vector<amrex::MultiFab>>& vars_old,
612  amrex::Vector<std::unique_ptr<amrex::MultiFab>>& Theta_prim,
613  amrex::Vector<std::unique_ptr<amrex::MultiFab>>& Qv_prim,
614  amrex::Vector<std::unique_ptr<amrex::MultiFab>>& Qr_prim)
615  {
616  m_ma.update_field_ptrs(lev, vars_old, Theta_prim, Qv_prim, Qr_prim);
617  }
618 
619  amrex::MultiFab* get_u_star (const int& lev) { return u_star[lev].get(); }
620 
621  amrex::MultiFab* get_w_star (const int& lev) { return w_star[lev].get(); }
622 
623  amrex::MultiFab* get_t_star (const int& lev) { return t_star[lev].get(); }
624 
625  amrex::MultiFab* get_q_star (const int& lev) { return q_star[lev].get(); }
626 
627  amrex::MultiFab* get_olen (const int& lev) { return olen[lev].get(); }
628 
629  amrex::MultiFab* get_pblh (const int& lev) { return pblh[lev].get(); }
630 
631  const amrex::MultiFab* get_mac_avg (const int& lev, int comp)
632  {
633  return m_ma.get_average(lev, comp);
634  }
635 
636  amrex::MultiFab* get_t_surf (const int& lev) { return t_surf[lev].get(); }
637  void set_t_surf(const int& lev, const amrex::Real tsurf) { t_surf[lev]->setVal(tsurf); }
638 
639  amrex::MultiFab* get_q_surf (const int& lev) { return q_surf[lev].get(); }
640  void set_q_surf(const int& lev, const amrex::Real qsurf) { q_surf[lev]->setVal(qsurf); }
641 
642  amrex::Real get_zref (const int& lev) { return (m_ma.get_zref(lev))->min(0); }
643 
644  amrex::MultiFab* get_z0 (const int& lev) { return &z_0[lev]; }
645 
647 
648  amrex::iMultiFab* get_lmask (const int& lev) { return m_lmask_lev[lev][0]; }
649 
650  int lmask_min_reduce (amrex::iMultiFab& lmask,
651  const int& nghost)
652  {
653  int lmask_min = amrex::ReduceMin(lmask, nghost, [=] AMREX_GPU_HOST_DEVICE(
654  amrex::Box const& bx, amrex::Array4<int const> const& lm_arr) -> int
655  {
656  int locmin = std::numeric_limits<int>::max();
657  const auto lo = lbound(bx);
658  const auto hi = ubound(bx);
659  for (int j = lo.y; j <= hi.y; ++j) {
660  for (int i = lo.x; i <= hi.x; ++i) {
661  locmin = std::min(locmin, lm_arr(i, j, 0));
662  }
663  }
664  return locmin;
665  });
666 
667  return lmask_min;
668  }
669 
670  void update_sst_ptr(const int lev, const int itime, amrex::MultiFab* sst_ptr) {
671  m_sst_lev[lev][itime] = sst_ptr;
672  }
673 
674  void update_tsk_ptr(const int lev, const int itime, amrex::MultiFab* tsk_ptr) {
675  m_tsk_lev[lev][itime] = tsk_ptr;
676  }
677 
678  enum struct FluxCalcType {
679  MOENG = 0, ///< Moeng functional form
680  DONELAN, ///< Donelan functional form
681  CUSTOM, ///< Custom constant flux functional form
682  BULK_COEFF, ///< Bulk transfer coefficient functional form
683  ROTATE, ///< Terrain rotation flux functional form
684  RICO
685  };
686 
687  enum struct ThetaCalcType {
688  ADIABATIC = 0,
689  HEAT_FLUX, ///< Heat-flux specified
690  SURFACE_TEMPERATURE ///< Surface temperature specified
691  };
692 
693  enum struct MoistCalcType {
694  ADIABATIC = 0,
695  MOISTURE_FLUX, ///< Qv-flux specified
696  SURFACE_MOISTURE ///< Surface Qv specified
697  };
698 
699  enum struct RoughCalcType {
700  CONSTANT = 0, ///< Constant z0
701  CHARNOCK,
703  DONELAN,
705  };
706 
707  enum struct PBLHeightCalcType { None, MYNN25, YSU, MRF };
708 
715 
716 private:
717  // Set in constructor
718  amrex::Vector<amrex::Geometry> m_geom;
719  bool m_rotate = false;
723 
724  bool m_include_wstar = false;
736  amrex::Real custom_rhosurf{0}; // use specified value instead of rho from first cell
737  bool specified_rho_surf{false};
739  bool cnk_visc{false};
741  amrex::Vector<amrex::MultiFab> z_0;
742  bool m_var_z0{false};
743 
746 
748  bool m_has_lsm_fluxes = false;
749  bool m_has_lsm_tsurf = false;
750  bool m_has_ocean_lsm_tsurf = false;
752 
756 
757  bool m_ignore_sst = false;
758 
759  amrex::Vector<const eb_*> m_eb_vec;
760  TerrainType m_terrain_type;
762  amrex::Vector<std::unique_ptr<amrex::MultiFab>> u_star;
763  amrex::Vector<std::unique_ptr<amrex::MultiFab>> w_star;
764  amrex::Vector<std::unique_ptr<amrex::MultiFab>> t_star;
765  amrex::Vector<std::unique_ptr<amrex::MultiFab>> q_star;
766  amrex::Vector<std::unique_ptr<amrex::MultiFab>> olen;
767  amrex::Vector<std::unique_ptr<amrex::MultiFab>> pblh;
768  amrex::Vector<std::unique_ptr<amrex::MultiFab>> t_surf;
769  amrex::Vector<std::unique_ptr<amrex::MultiFab>> q_surf;
770 
771  amrex::Vector<amrex::Vector<amrex::MultiFab*>> m_sst_lev;
772  amrex::Vector<amrex::Vector<amrex::MultiFab*>> m_tsk_lev;
773  amrex::Vector<amrex::Vector<amrex::iMultiFab*>> m_lmask_lev;
774  amrex::Vector<amrex::Vector<amrex::MultiFab*>> m_lsm_data_lev;
775  amrex::Vector<amrex::Vector<amrex::MultiFab*>> m_lsm_flux_lev;
776  amrex::Vector<std::string> m_lsm_data_name;
777  amrex::Vector<std::string> m_lsm_flux_name;
778  amrex::Vector<amrex::MultiFab*> m_Hwave_lev;
779  amrex::Vector<amrex::MultiFab*> m_Lwave_lev;
780  amrex::Vector<amrex::MultiFab*> m_eddyDiffs_lev;
781 
782  bool m_update_k_rans = false;
785 };
786 
787 #endif /* SURFACELAYER_H */
constexpr amrex::Real one
Definition: ERF_Constants.H:7
constexpr amrex::Real zero
Definition: ERF_Constants.H:6
ParmParse pp("prob")
AMREX_ALWAYS_ASSERT(bx.length()[2]==khi+1)
pp get("wavelength", wavelength)
amrex::Real Real
Definition: ERF_ShocInterface.H:19
AMREX_ASSERT_WITH_MESSAGE(wbar_cutoff_min > wbar_cutoff_max, "ERROR: wbar_cutoff_min < wbar_cutoff_max")
Definition: ERF_MOSTAverage.H:15
amrex::MultiFab * get_zref(const int &lev) const
Definition: ERF_MOSTAverage.H:116
const amrex::MultiFab * get_average(const int &lev, const int &comp) const
Definition: ERF_MOSTAverage.H:113
void update_field_ptrs(const int &lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_old, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Theta_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qr_prim)
Definition: ERF_MOSTAverage.cpp:279
void make_MOSTAverage_at_level(const int &lev, const amrex::Vector< amrex::MultiFab * > &vars_old, std::unique_ptr< amrex::MultiFab > &Theta_prim, std::unique_ptr< amrex::MultiFab > &Qv_prim, std::unique_ptr< amrex::MultiFab > &Qr_prim, std::unique_ptr< amrex::MultiFab > &z_phys_nd)
Definition: ERF_MOSTAverage.cpp:90
Definition: ERF_SurfaceLayer.H:33
ThetaCalcType theta_type
Definition: ERF_SurfaceLayer.H:710
int lmask_min_reduce(amrex::iMultiFab &lmask, const int &nghost)
Definition: ERF_SurfaceLayer.H:650
amrex::Vector< std::string > m_lsm_data_name
Definition: ERF_SurfaceLayer.H:776
bool m_include_wstar
Definition: ERF_SurfaceLayer.H:724
bool specified_rho_surf
Definition: ERF_SurfaceLayer.H:737
void set_q_surf(const int &lev, const amrex::Real qsurf)
Definition: ERF_SurfaceLayer.H:640
bool m_rotate
Definition: ERF_SurfaceLayer.H:719
PBLHeightCalcType pblh_type
Definition: ERF_SurfaceLayer.H:714
amrex::Vector< amrex::Vector< amrex::iMultiFab * > > m_lmask_lev
Definition: ERF_SurfaceLayer.H:773
amrex::iMultiFab * get_lmask(const int &lev)
Definition: ERF_SurfaceLayer.H:648
bool use_moisture
Definition: ERF_SurfaceLayer.H:747
amrex::MultiFab * get_q_surf(const int &lev)
Definition: ERF_SurfaceLayer.H:639
bool m_has_lsm_tsurf
Definition: ERF_SurfaceLayer.H:749
amrex::MultiFab * get_w_star(const int &lev)
Definition: ERF_SurfaceLayer.H:621
void update_surf_temp(const amrex::Real &time)
Definition: ERF_SurfaceLayer.H:595
amrex::Real m_Cq
Definition: ERF_SurfaceLayer.H:755
amrex::Vector< const eb_ * > m_eb_vec
Definition: ERF_SurfaceLayer.H:759
RoughCalcType rough_type_land
Definition: ERF_SurfaceLayer.H:712
void update_pblh(const int &lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars, amrex::MultiFab *z_phys_cc, const MoistureComponentIndices &moisture_indices)
Definition: ERF_SurfaceLayer.cpp:1144
amrex::Vector< std::unique_ptr< amrex::MultiFab > > t_surf
Definition: ERF_SurfaceLayer.H:768
amrex::Real z0_const
Definition: ERF_SurfaceLayer.H:725
amrex::Real cnk_a
Definition: ERF_SurfaceLayer.H:738
amrex::Real m_Ch
Definition: ERF_SurfaceLayer.H:754
amrex::Real m_start_low_time
Definition: ERF_SurfaceLayer.H:720
amrex::Real surf_temp
Definition: ERF_SurfaceLayer.H:727
void update_mac_ptrs(const int &lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_old, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Theta_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qr_prim)
Definition: ERF_SurfaceLayer.H:610
void compute_pblh(const int &lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars, amrex::MultiFab *z_phys_cc, const PBLHeightEstimator &est, const MoistureComponentIndices &moisture_indice)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > q_star
Definition: ERF_SurfaceLayer.H:765
int m_lsm_tsurf_indx
Definition: ERF_SurfaceLayer.H:751
amrex::Real rico_qsat_z0
Definition: ERF_SurfaceLayer.H:745
bool m_has_lsm_fluxes
Definition: ERF_SurfaceLayer.H:748
bool m_update_k_rans
Definition: ERF_SurfaceLayer.H:782
amrex::Vector< amrex::MultiFab * > m_Lwave_lev
Definition: ERF_SurfaceLayer.H:779
void update_fluxes(const int &lev, const amrex::Real &elapsed_time, const amrex::Real &elapsed_time_since_start_low, amrex::MultiFab &cons_in, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const std::unique_ptr< amrex::MultiFab > &walldist, int max_iters=100)
Definition: ERF_SurfaceLayer.cpp:12
void get_lsm_tsurf(const int &lev)
Definition: ERF_SurfaceLayer.cpp:1106
void fill_qsurf_with_qsat(const int &lev, const amrex::MultiFab &cons_in, const std::unique_ptr< amrex::MultiFab > &z_phys_nd)
Definition: ERF_SurfaceLayer.cpp:1063
amrex::Real get_zref(const int &lev)
Definition: ERF_SurfaceLayer.H:642
amrex::MultiFab * get_olen(const int &lev)
Definition: ERF_SurfaceLayer.H:627
amrex::Vector< amrex::MultiFab > z_0
Definition: ERF_SurfaceLayer.H:741
amrex::Real surf_moist_flux
Definition: ERF_SurfaceLayer.H:732
void compute_SurfaceLayer_bcs(const int &lev, amrex::Vector< const amrex::MultiFab * > mfs, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_lev, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux, const amrex::MultiFab *z_phys, const FluxCalc &flux_comp)
RoughCalcType rough_type_sea
Definition: ERF_SurfaceLayer.H:713
void init_tke_from_ustar(const int &lev, amrex::MultiFab &cons, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const amrex::Real tkefac=one, const amrex::Real zscale=amrex::Real(700.0))
Definition: ERF_SurfaceLayer.cpp:1171
amrex::Real surf_moist
Definition: ERF_SurfaceLayer.H:731
amrex::Vector< std::unique_ptr< amrex::MultiFab > > w_star
Definition: ERF_SurfaceLayer.H:763
bool m_ignore_sst
Definition: ERF_SurfaceLayer.H:757
amrex::MultiFab * get_u_star(const int &lev)
Definition: ERF_SurfaceLayer.H:619
SurfaceLayer(const amrex::Vector< amrex::Geometry > &geom, bool &use_rot_surface_flux, std::string a_pp_prefix, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &z_phys_nd, const MeshType &a_mesh_type, const TerrainType &a_terrain_type, const TurbChoice &a_turb_choice, amrex::Real start_low_time, amrex::Real final_low_time, amrex::Real low_time_interval=zero, const amrex::Vector< const eb_ * > &eb_vec={})
Definition: ERF_SurfaceLayer.H:37
void compute_fluxes(const int &lev, const int &max_iters, amrex::MultiFab &cons_in, const FluxIter &most_flux, bool is_land)
amrex::Vector< amrex::Vector< amrex::MultiFab * > > m_lsm_data_lev
Definition: ERF_SurfaceLayer.H:774
void set_t_surf(const int &lev, const amrex::Real tsurf)
Definition: ERF_SurfaceLayer.H:637
amrex::Real custom_qstar
Definition: ERF_SurfaceLayer.H:735
amrex::Vector< std::unique_ptr< amrex::MultiFab > > u_star
Definition: ERF_SurfaceLayer.H:762
void update_tsk_ptr(const int lev, const int itime, amrex::MultiFab *tsk_ptr)
Definition: ERF_SurfaceLayer.H:674
amrex::Real custom_rhosurf
Definition: ERF_SurfaceLayer.H:736
amrex::Vector< std::unique_ptr< amrex::MultiFab > > q_surf
Definition: ERF_SurfaceLayer.H:769
amrex::Vector< amrex::Vector< amrex::MultiFab * > > m_sst_lev
Definition: ERF_SurfaceLayer.H:771
FluxCalcType
Definition: ERF_SurfaceLayer.H:678
@ MOENG
Moeng functional form.
@ BULK_COEFF
Bulk transfer coefficient functional form.
@ CUSTOM
Custom constant flux functional form.
@ ROTATE
Terrain rotation flux functional form.
@ DONELAN
Donelan functional form.
MoistCalcType
Definition: ERF_SurfaceLayer.H:693
@ SURFACE_MOISTURE
Surface Qv specified.
@ MOISTURE_FLUX
Qv-flux specified.
amrex::Real depth
Definition: ERF_SurfaceLayer.H:740
amrex::Vector< amrex::MultiFab * > m_Hwave_lev
Definition: ERF_SurfaceLayer.H:778
amrex::Real default_land_surf_moist
Definition: ERF_SurfaceLayer.H:730
bool m_var_z0
Definition: ERF_SurfaceLayer.H:742
amrex::MultiFab * get_t_star(const int &lev)
Definition: ERF_SurfaceLayer.H:623
bool have_variable_sea_roughness()
Definition: ERF_SurfaceLayer.H:646
void impose_SurfaceLayer_bcs_EB(const int &lev, amrex::Vector< const amrex::MultiFab * > mfs, amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab >>> &Tau_lev, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux)
Definition: ERF_SurfaceLayer.cpp:447
amrex::MultiFab * get_q_star(const int &lev)
Definition: ERF_SurfaceLayer.H:625
amrex::Vector< amrex::Vector< amrex::MultiFab * > > m_lsm_flux_lev
Definition: ERF_SurfaceLayer.H:775
PBLHeightCalcType
Definition: ERF_SurfaceLayer.H:707
amrex::MultiFab * get_pblh(const int &lev)
Definition: ERF_SurfaceLayer.H:629
void compute_SurfaceLayer_bcs_EB(const int &lev, amrex::Vector< const amrex::MultiFab * > mfs, amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab >>> &Tau_lev, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux, const FluxCalc &flux_comp)
amrex::Real rico_theta_z0
Definition: ERF_SurfaceLayer.H:744
void fill_tsurf_with_sst_and_tsk(const int &lev, const amrex::Real &time)
Definition: ERF_SurfaceLayer.cpp:976
amrex::Real surf_temp_flux
Definition: ERF_SurfaceLayer.H:729
amrex::Vector< amrex::Geometry > m_geom
Definition: ERF_SurfaceLayer.H:718
amrex::Vector< std::unique_ptr< amrex::MultiFab > > t_star
Definition: ERF_SurfaceLayer.H:764
amrex::Real theta_ref
Definition: ERF_SurfaceLayer.H:784
amrex::MultiFab * get_z0(const int &lev)
Definition: ERF_SurfaceLayer.H:644
amrex::Vector< amrex::Vector< amrex::MultiFab * > > m_tsk_lev
Definition: ERF_SurfaceLayer.H:772
amrex::Real custom_tstar
Definition: ERF_SurfaceLayer.H:734
amrex::Real m_final_low_time
Definition: ERF_SurfaceLayer.H:721
bool cnk_visc
Definition: ERF_SurfaceLayer.H:739
amrex::Real surf_heating_rate
Definition: ERF_SurfaceLayer.H:728
void make_SurfaceLayer_at_level(const int &lev, int nlevs, const amrex::Vector< amrex::MultiFab * > &mfv, std::unique_ptr< amrex::MultiFab > &Theta_prim, std::unique_ptr< amrex::MultiFab > &Qv_prim, std::unique_ptr< amrex::MultiFab > &Qr_prim, std::unique_ptr< amrex::MultiFab > &z_phys_nd, amrex::MultiFab *Hwave, amrex::MultiFab *Lwave, amrex::MultiFab *eddyDiffs, amrex::Vector< amrex::MultiFab * > lsm_data, amrex::Vector< std::string > lsm_data_name, amrex::Vector< amrex::MultiFab * > lsm_flux, amrex::Vector< std::string > lsm_flux_name, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &sst_lev, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &tsk_lev, amrex::Vector< std::unique_ptr< amrex::iMultiFab >> &lmask_lev)
Definition: ERF_SurfaceLayer.H:274
bool m_has_ocean_lsm_tsurf
Definition: ERF_SurfaceLayer.H:750
RoughCalcType
Definition: ERF_SurfaceLayer.H:699
FluxCalcType flux_type
Definition: ERF_SurfaceLayer.H:709
MoistCalcType moist_type
Definition: ERF_SurfaceLayer.H:711
void compute_sfc_params_from_lsm_fluxes(const int &lev, amrex::MultiFab &cons_in)
Definition: ERF_SurfaceLayer.cpp:907
amrex::Real inv_Cmu2
Definition: ERF_SurfaceLayer.H:783
void impose_SurfaceLayer_bcs(const int &lev, amrex::Vector< const amrex::MultiFab * > mfs, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_lev, amrex::MultiFab *xheat_flux, amrex::MultiFab *yheat_flux, amrex::MultiFab *zheat_flux, amrex::MultiFab *xqv_flux, amrex::MultiFab *yqv_flux, amrex::MultiFab *zqv_flux, const amrex::MultiFab *z_phys)
Definition: ERF_SurfaceLayer.cpp:387
amrex::Vector< amrex::MultiFab * > m_eddyDiffs_lev
Definition: ERF_SurfaceLayer.H:780
const amrex::MultiFab * get_mac_avg(const int &lev, int comp)
Definition: ERF_SurfaceLayer.H:631
void update_sst_ptr(const int lev, const int itime, amrex::MultiFab *sst_ptr)
Definition: ERF_SurfaceLayer.H:670
amrex::Real custom_ustar
Definition: ERF_SurfaceLayer.H:733
amrex::Vector< std::unique_ptr< amrex::MultiFab > > olen
Definition: ERF_SurfaceLayer.H:766
amrex::MultiFab * get_t_surf(const int &lev)
Definition: ERF_SurfaceLayer.H:636
amrex::Real m_Cd
Definition: ERF_SurfaceLayer.H:753
amrex::Vector< std::unique_ptr< amrex::MultiFab > > pblh
Definition: ERF_SurfaceLayer.H:767
amrex::Real default_land_surf_temp
Definition: ERF_SurfaceLayer.H:726
ThetaCalcType
Definition: ERF_SurfaceLayer.H:687
@ SURFACE_TEMPERATURE
Surface temperature specified.
@ HEAT_FLUX
Heat-flux specified.
void read_custom_roughness(const int &lev, const std::string &fname)
Definition: ERF_SurfaceLayer.cpp:1240
TerrainType m_terrain_type
Definition: ERF_SurfaceLayer.H:760
amrex::Vector< std::string > m_lsm_flux_name
Definition: ERF_SurfaceLayer.H:777
amrex::Real m_low_time_interval
Definition: ERF_SurfaceLayer.H:722
MOSTAverage m_ma
Definition: ERF_SurfaceLayer.H:761
@ ng
Definition: ERF_Morrison.H:48
@ cons
Definition: ERF_IndexDefines.H:174
real(c_double), parameter epsilon
Definition: ERF_module_model_constants.F90:12
Definition: ERF_DataStruct.H:106
Definition: ERF_TurbStruct.H:82
RANSType rans_type
Definition: ERF_TurbStruct.H:454
bool dirichlet_k
Definition: ERF_TurbStruct.H:456
amrex::Real Cmu0
Definition: ERF_TurbStruct.H:432
amrex::Real theta_ref
Definition: ERF_TurbStruct.H:443