REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_init.cpp
Go to the documentation of this file.
1/**
2 * \file REMORA_init.cpp
3 */
4
5#include <REMORA.H>
6#include <REMORA_Constants.H>
8
9using namespace amrex;
10
11/**
12 * @param[in ] lev level to initialize on
13 */
14void
16{
17 prob->init_analytic_prob(lev, geom[lev], solverChoice, *this, *cons_new[lev], *xvel_new[lev], *yvel_new[lev]);
18
20}
21
22/**
23 * \brief Initialize the biology tracers from whichever source
24 * remora.biology_ic_type selects.
25 *
26 * Deliberately decoupled from remora.ic_type. A NetCDF initial file supplies
27 * only the tracers it happens to contain -- the BioToy file has `oxygen` but
28 * no `PO4` or `ODU` -- so validating an option set the file does not cover
29 * would otherwise mean regenerating binary input that no fresh clone can
30 * reproduce. With biology_ic_type = analytic the physical fields still come
31 * from NetCDF while biology comes from the problem's analytic profile.
32 *
33 * Must be called after the physical fields are initialized: the analytic
34 * biology profiles are functions of temperature.
35 *
36 * @param[in ] lev level to initialize on
37 */
38void
40{
42 return;
43 }
44
45 const bool use_analytic =
49
50 if (use_analytic) {
51 // The base-class hook in REMORA_prob_common.H is an amrex::Error, so a
52 // problem that enables biology without providing an analytic biology
53 // IC fails loudly rather than starting from uninitialized tracers.
54 prob->init_analytic_biology(lev, geom[lev], solverChoice, fennel_params,
55 *this, *cons_new[lev]);
56 } else {
57#ifdef REMORA_USE_NETCDF
59#else
60 amrex::Abort("remora.biology_ic_type = netcdf requires a NetCDF build");
61#endif
62 }
63}
64
65/**
66 * \brief Full-domain counterpart of init_biology_ic, for the hires_init_level
67 * path where initial data is specified on a high-resolution level and
68 * averaged down.
69 *
70 * Fills the biology components of vec_cons_full_domain[hires_init_level].
71 * Must be called after the physical fields on that level are set (the
72 * analytic profiles are functions of temperature) and before whatever
73 * averages vec_cons_full_domain down.
74 */
75void
77{
79 return;
80 }
81
82 const bool use_analytic =
86
87 if (use_analytic) {
88 prob->init_analytic_biology(hires_init_level, geom[hires_init_level],
91 } else {
92#ifdef REMORA_USE_NETCDF
94#else
95 amrex::Abort("remora.biology_ic_type = netcdf requires a NetCDF build");
96#endif
97 }
98
99 // Average down here, after the branch, rather than inside one of the two sources. When
100 // this loop lived in the NetCDF reader, the analytic branch filled hires_init_level and
101 // nothing else, so every level below it -- including level 0, the one the run actually
102 // integrates -- kept the zeros that init_data_full_domain_from_netcdf had written.
103 for (int lev = hires_init_level-1; lev >= 0; lev--) {
105 }
106}
107
108/**
109 * @param[in ] lev level to initialize on
110 */
111void
113{
114 std::unique_ptr<MultiFab>& mf_fcor = vec_fcor[lev];
115 auto geomdata = Geom(lev).data();
116
117#ifdef _OPENMP
118#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
119#endif
120 for (MFIter mfi(*cons_new[lev], TilingIfNotGPU()); mfi.isValid(); ++mfi)
121 {
122 // Valid region only, since vec_yr's ghost cells aren't all filled. set_coriolis
123 // FillPatches vec_fcor with foextrap right after this, as for coriolis_type = netcdf.
124 Box bx = mfi.tilebox();
125 auto fcor_arr = (mf_fcor)->array(mfi);
126 auto yr_arr = vec_yr[lev]->const_array(mfi);
127 Real coriolis_f0 = solverChoice.coriolis_f0;
128 Real coriolis_beta = solverChoice.coriolis_beta;
129 // Units: yr is metric (1/pn, or y_rho from the grid file), so beta_plane assumes
130 // prob_lo/prob_hi are too. A domain given in degrees would silently mix the two.
131 Real Esize = geomdata.ProbHi()[1] - geomdata.ProbLo()[1];
132
133 ParallelFor(makeSlab(bx,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int )
134 {
135 // yr is measured from the southern edge of the domain (ROMS ana_grid convention), so
136 // f is coriolis_f0 at mid-domain. Adding prob_lo back would shift f by beta*prob_lo.
137 fcor_arr(i,j,0) = coriolis_f0 + coriolis_beta * (yr_arr(i,j,0) - Real(0.5) * Esize);
138 });
139 } //mfi
140
141 vec_fcor[lev]->FillBoundary(geom[lev].periodicity());
142}
143
144/**
145 * @param[in ] lev level to operate on
146 */
147void
149{
150 std::unique_ptr<MultiFab>& mf_zeta = vec_zeta[lev];
151 std::unique_ptr<MultiFab>& mf_Zt_avg1 = vec_Zt_avg1[lev];
152 for ( MFIter mfi(*cons_new[lev], TilingIfNotGPU()); mfi.isValid(); ++mfi )
153 {
154 int nstp = 0;
155 Array4<Real> const& Zt_avg1 = (mf_Zt_avg1)->array(mfi);
156 Array4<const Real> const& zeta = mf_zeta->const_array(mfi);
157
158 Box bx3 = mfi.tilebox() ; bx3.grow(IntVect(NGROW+1,NGROW+1,0)); // cell-centered, grown by 3
159
160 ParallelFor(makeSlab(bx3,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int )
161 {
162 Zt_avg1(i,j,0) = zeta(i,j,0,nstp);
163 });
164
165 }
166}
167
168/**
169 * @param[in ] lev level to operate on
170 */
171void
173{
174 auto N = Geom(lev).Domain().size()[2]-1; // Number of vertical "levs" aka, NZ
175
176 vec_ubar[lev]->setVal(zero);
177 vec_vbar[lev]->setVal(zero);
178
179 MultiFab* U_old = xvel_new[lev];
180 MultiFab* V_old = yvel_new[lev];
181 std::unique_ptr<MultiFab>& mf_ubar = vec_ubar[lev];
182 std::unique_ptr<MultiFab>& mf_vbar = vec_vbar[lev];
183 std::unique_ptr<MultiFab>& mf_Hz = vec_Hz[lev];
184 int nstp = 0;
185
186 for ( MFIter mfi(*cons_new[lev], TilingIfNotGPU()); mfi.isValid(); ++mfi )
187 {
188 Array4<Real> const& ubar = (mf_ubar)->array(mfi);
189 Array4<Real> const& vbar = (mf_vbar)->array(mfi);
190
191 Array4<const Real> const& Hz = mf_Hz->const_array(mfi);
192 Array4<const Real> const& u = U_old->const_array(mfi);
193 Array4<const Real> const& v = V_old->const_array(mfi);
194
195 Box bx2 = mfi.tilebox() ; bx2.grow(IntVect(NGROW ,NGROW ,0)); // cell-centered, grown by 2
196 Box ubx2 = mfi.nodaltilebox(0); ubx2.grow(IntVect(NGROW ,NGROW ,0)); // x-face-centered, grown by 2
197 Box vbx2 = mfi.nodaltilebox(1); vbx2.grow(IntVect(NGROW ,NGROW ,0)); // y-face-centered, grown by 2
198
199 ParallelFor(makeSlab(ubx2,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int )
200 {
201 Real CF = zero;
202 Real sum_of_hz = zero;
203
204 for (int k=0; k<=N; k++) {
205 Real avg_hz = Real(0.5)*(Hz(i,j,k)+Hz(i-1,j,k));
206 sum_of_hz += avg_hz;
207 CF += avg_hz*u(i,j,k,nstp);
208 }
209 ubar(i,j,0,0) = CF / sum_of_hz;
210 });
211
212 ParallelFor(makeSlab(vbx2,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int )
213 {
214 Real CF = zero;
215 Real sum_of_hz = zero;
216
217 for(int k=0; k<=N; k++) {
218 Real avg_hz = Real(0.5)*(Hz(i,j,k)+Hz(i,j-1,k));
219 sum_of_hz += avg_hz;
220 CF += avg_hz*v(i,j,k,nstp);
221 }
222 vbar(i,j,0,0) = CF / sum_of_hz;
223 });
224 }
225
228}
229
230/**
231 * @param[in ] lev level to operate on
232 * @param[in ] solver_choice algorithmic choices
233 */
234void
236{
237 vec_tke[lev]->setVal(solver_choice.gls_Kmin);
238 vec_gls[lev]->setVal(solver_choice.gls_Pmin);
239 vec_Lscale[lev]->setVal(zero);
240 vec_Akk[lev]->setVal(solver_choice.Akk_bak);
241 vec_Akp[lev]->setVal(solver_choice.Akp_bak);
242 vec_Akv[lev]->setVal(solver_choice.Akv_bak);
243 for (int n = 0; n < NAT; n++) {
244 vec_Akt[lev]->setVal(solver_choice.Akt_bak[n], n, 1);
245 }
246
247 auto N = Geom(lev).Domain().size()[2]-1; // Number of vertical "levs" aka, NZ
248
249#ifdef _OPENMP
250#pragma omp parallel if (Gpu::notInLaunchRegion())
251#endif
252 for (MFIter mfi(*vec_Akk[lev], TilingIfNotGPU()); mfi.isValid(); ++mfi) {
253 Box bx = mfi.growntilebox(IntVect(NGROW,NGROW,0));
254 Array4<Real> const& Akk = vec_Akk[lev]->array(mfi);
255 Array4<Real> const& Akp = vec_Akp[lev]->array(mfi);
256 Array4<Real> const& Akt = vec_Akt[lev]->array(mfi);
257 Array4<Real> const& Akv = vec_Akv[lev]->array(mfi);
258
259 ParallelFor(makeSlab(bx,2,0), [=] AMREX_GPU_DEVICE (int i, int j, int )
260 {
261 Akk(i,j, 0) = zero;
262 Akk(i,j, N+1) = zero;
263
264 Akp(i,j, 0) = zero;
265 Akp(i,j, N+1) = zero;
266
267 Akv(i,j, 0) = zero;
268 Akv(i,j, N+1) = zero;
269
270 Akt(i,j, 0) = zero;
271 Akt(i,j, N+1) = zero;
272 });
273 }
274}
275
276/**
277 * @param[in ] lev level to operate on
278 */
279void
281 // Fill nudging coefficients from constant values, then overwrite
282 // with coeffs read from file if using
285 for (int icomp = 0; icomp < ncons; ++icomp) {
287 }
291#ifdef REMORA_USE_NETCDF
293 // A coefficient file is optional. Without one every variable keeps the constant
294 // timescale set above, which is a reasonable setup for tracers nudged on the
295 // single remora.tnudg timescale.
296 if (nc_clim_coeff_file.empty()) {
297 amrex::Print() << "No remora.nc_clim_coeff_file given; climatology nudging will use "
298 "the constant timescales from remora.tnudg, m2nudg, and m3nudg"
299 << std::endl;
300 } else {
301 amrex::Print() << "Calling init_clim_nudg_coeff_from_netcdf \n " << std::endl;
303 amrex::Print() << "Climatology weights loaded from netcdf file \n " << std::endl;
304 }
305 }
306#endif
307}
308
309void
311 int nz = geom[0].Domain().length(2);
312 s_r.resize(nz);
313 s_w.resize(nz+1);
314 Cs_r.resize(nz);
315 Cs_w.resize(nz+1);
316
318}
319
321 // Make fake boxArray that covers the whole domain on level 0
322 BoxArray ba;
323 ba.define(makeSlab(geom[0].Domain(),2,0));
324 Box refined_domain = makeSlab(geom[0].Domain(),2,0);
325
326 DistributionMapping dm(ba);
327 vec_h_full_domain[0].reset(new MultiFab(ba, dm, 1, IntVect(1,1,0)));
328 vec_pm_full_domain[0].reset(new MultiFab(ba, dm, 1, IntVect(1,1,0)));
329 vec_pn_full_domain[0].reset(new MultiFab(ba, dm, 1, IntVect(1,1,0)));
330
331 auto h_growvect = vec_h[0]->nGrowVect();
332 auto pm_growvect = vec_pm[0]->nGrowVect();
333 auto pn_growvect = vec_pn[0]->nGrowVect();
334 for (int lev=1; lev <= hires_grid_level; lev++) {
335 ba = ba.refine(refRatio(lev-1));
336 refined_domain.refine(refRatio(lev-1));
337
338 // Always allocate at least as many grow cells as there are in the level's normal variable multifab
339 // This makes copying and boundary filling much easier
340 vec_h_full_domain[lev].reset(new MultiFab(ba, dm, 1, max(cum_ref_ratios[lev],h_growvect)));
341 vec_pm_full_domain[lev].reset(new MultiFab(ba, dm, 1, max(cum_ref_ratios[lev],pm_growvect)));
342 vec_pn_full_domain[lev].reset(new MultiFab(ba, dm, 1, max(cum_ref_ratios[lev],pn_growvect)));
343 }
344 // A NetCDF read covers only as many grow cells as the file carries, and the analytic
345 // bathymetry hook fills h alone, so parts of these arrays can reach the average-down
346 // unwritten. Zero them so what lands at level 0 does not depend on the arena.
347 for (int lev = 0; lev <= hires_grid_level; lev++) {
348 vec_h_full_domain[lev]->setVal(0.0);
349 vec_pm_full_domain[lev]->setVal(0.0);
350 vec_pn_full_domain[lev]->setVal(0.0);
351 }
353}
354
355void
357{
358 // init_analytic_bathymetry needs to be able to handle the full number of grow cells that vec_h_full_domain has
360 // Average down to fill levels below hires_grid_level. Use a special average_down so grow cells
361 // get populated by averaged down fine data
362 for (int lev=hires_grid_level-1; lev >= 0; lev--) {
364 }
365}
366
368 // Make fake boxArray that covers the whole domain on level 0
369 BoxArray ba;
370 ba.define(geom[0].Domain());
371 BoxArray ba2d;
372 ba2d.define(makeSlab(geom[0].Domain(),2,0));
373 Box refined_domain = geom[0].Domain();
374
375 DistributionMapping dm(ba);
376 vec_cons_full_domain[0].reset(new MultiFab(ba, dm, ncons, IntVect(1,1,0)));
377 vec_xvel_full_domain[0].reset(new MultiFab(convert(ba,IntVect(1,0,0)), dm, 1, IntVect(0,1,0)));
378 vec_yvel_full_domain[0].reset(new MultiFab(convert(ba,IntVect(0,1,0)), dm, 1, IntVect(1,0,0)));
379 vec_zeta_full_domain[0].reset(new MultiFab(ba2d, dm, 1, IntVect(1,1,0)));
380
381
382 auto cons_growvect = cons_new[0]->nGrowVect();
383 auto xvel_growvect = xvel_new[0]->nGrowVect();
384 auto yvel_growvect = yvel_new[0]->nGrowVect();
385 auto zeta_growvect = vec_zeta[0]->nGrowVect();
386 for (int lev=1; lev <= hires_init_level; lev++) {
387 ba = ba.refine(refRatio(lev-1));
388 ba2d = ba2d.refine(refRatio(lev-1));
389 refined_domain.refine(refRatio(lev-1));
390
391 // Always allocate at least as many grow cells as there are in the level's normal variable multifab
392 // This makes copying and boundary filling much easier
394 vec_xvel_full_domain[lev].reset(new MultiFab(convert(ba,IntVect(1,0,0)), dm, 1, max(cum_ref_ratios[lev],xvel_growvect) - IntVect(1,0,0)));
395 vec_yvel_full_domain[lev].reset(new MultiFab(convert(ba,IntVect(0,1,0)), dm, 1, max(cum_ref_ratios[lev],yvel_growvect) - IntVect(0,1,0)));
396 vec_zeta_full_domain[lev].reset(new MultiFab(ba2d, dm, 1, max(cum_ref_ratios[lev],zeta_growvect)));
397 }
398 // See the note in allocate_bathymetry_grid_vars_full_domain: the vertical grow cells in
399 // particular are never covered by the read, since cum_ref_ratios has no z component.
400 for (int lev = 0; lev <= hires_init_level; lev++) {
401 vec_cons_full_domain[lev]->setVal(0.0);
402 vec_xvel_full_domain[lev]->setVal(0.0);
403 vec_yvel_full_domain[lev]->setVal(0.0);
404 vec_zeta_full_domain[lev]->setVal(0.0);
405 }
407}
408
409void
411{
413
414 // Biology must be filled on the hires level before the average-down loop
415 // below, or the biology components of vec_cons_full_domain are averaged
416 // down uninitialized.
418
419 for (int lev=hires_init_level-1; lev >= 0; lev--) {
423 }
424}
425
426void
constexpr amrex::Real zero
#define NGROW
#define NAT
mf_h setVal(geomdata.ProbHi(2))
int ncons
Number of conserved scalars in the state (temperature + salt + passive scalars + biology tracers)
Definition REMORA.H:1644
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_zeta_full_domain
high resolution initial free surface height (2D)
Definition REMORA.H:554
void init_full_domain_zeta_from_analytic()
Initialize high resolution initial sea surface height from analytic functions.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_fcor
coriolis factor (2D)
Definition REMORA.H:577
void allocate_init_full_domain()
Allocate multifabs for storing full-domain high resolution initial data.
void init_gls_vmix(int lev, SolverChoice solver_choice)
Initialize GLS variables.
void init_biology_from_netcdf(int lev)
Biology initialization from NetCDF file.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_xvel_full_domain
multilevel data container for high res initial x velocities (u in ROMS)
Definition REMORA.H:397
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_h
multilevel data container for current step's z velocities (largely unused; W stored separately)
Definition REMORA.H:406
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pm
horizontal scaling factor: 1 / dx (2D)
Definition REMORA.H:568
void init_biology_ic(int lev)
Initialize biology tracers from whichever source remora.biology_ic_type selects. Call after the physi...
amrex::Vector< amrex::MultiFab * > cons_new
multilevel data container for current step's scalar data: temperature, salinity, passive tracer
Definition REMORA.H:386
void init_biology_ic_full_domain()
Full-domain counterpart of init_biology_ic, for the hires_init_level average-down path.
amrex::Gpu::DeviceVector< amrex::Real > s_w
Scaled vertical coordinate (range [0,1]) that transforms to z, defined at w-points (cell faces)
Definition REMORA.H:448
REMORABiology::BiologyModel biology_model
Active biology package.
Definition REMORA.H:1646
std::unique_ptr< ProblemBase > prob
Pointer to container of analytical functions for problem definition.
Definition REMORA.H:1542
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_tke
Turbulent kinetic energy.
Definition REMORA.H:632
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_gls
Turbulent generic length scale.
Definition REMORA.H:634
void init_biology_full_domain_from_netcdf()
Full-domain high-res biology initialization from NetCDF file.
void set_grid_scale(int lev)
Set pm and pn arrays and x/y coords on level lev.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Lscale
Vertical mixing turbulent length scale.
Definition REMORA.H:636
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Hz
Width of cells in the vertical (z-) direction (3D, Hz in ROMS)
Definition REMORA.H:412
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akt
Vertical diffusion coefficient (3D)
Definition REMORA.H:432
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pm_full_domain
horizontal scaling factor: 1 / dx (2D) on whole domain
Definition REMORA.H:572
amrex::Vector< amrex::MultiFab * > yvel_new
multilevel data container for current step's y velocities (v in ROMS)
Definition REMORA.H:390
amrex::Box nc_hires_init_box
Box for the full domain at nc_hires_init_level.
Definition REMORA.H:1791
amrex::Gpu::DeviceVector< amrex::Real > s_r
Scaled vertical coordinate (range [0,1]) that transforms to z, defined at rho points (cell centers)
Definition REMORA.H:446
amrex::Vector< amrex::IntVect > cum_ref_ratios
Cumulative refinement ratio between level 0 and level i.
Definition REMORA.H:1794
amrex::Vector< amrex::MultiFab * > xvel_new
multilevel data container for current step's x velocities (u in ROMS)
Definition REMORA.H:388
int bdy_zeta() const noexcept
Definition REMORA.H:1331
void init_beta_plane_coriolis(int lev)
Calculate Coriolis parameters from beta plane parametrization.
std::string nc_clim_coeff_file
NetCDF climatology coefficient file.
Definition REMORA.H:1804
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yvel_full_domain
multilevel data container for high res initial y velocities (v in ROMS)
Definition REMORA.H:399
void calc_stretch_coeffs()
calculate vertical stretch coefficients
void set_zeta_average(int lev)
Set Zt_avg1 to zeta.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_h_full_domain
Bathymetry data on the whole domain at each potential level.
Definition REMORA.H:409
void init_full_domain_from_analytic()
Initialize high resolution initial problem data from analytic functions.
int hires_init_level
Which level the high resolution initialization data is at.
Definition REMORA.H:1787
int bdy_vbar() const noexcept
Definition REMORA.H:1330
void average_down_with_grow_cells(int lev, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &mf)
Average down from level lev+1 to lev in mf, including grow cells.
Definition REMORA.cpp:2079
amrex::Gpu::DeviceVector< amrex::Real > Cs_r
Stretching coefficients at rho points.
Definition REMORA.H:456
amrex::Vector< amrex::Real > t_new
new time at each level
Definition REMORA.H:1556
void init_stretch_coeffs()
initialize and calculate stretch coefficients
static SolverChoice solverChoice
Container for algorithmic choices.
Definition REMORA.H:1717
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akk
Turbulent kinetic energy vertical diffusion coefficient.
Definition REMORA.H:638
int bdy_ubar() const noexcept
Definition REMORA.H:1329
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_zeta
free surface height (2D)
Definition REMORA.H:551
int ubar_bc() const noexcept
Definition REMORA.H:1316
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_vbar
barotropic y velocity (2D)
Definition REMORA.H:549
amrex::Box nc_hires_grid_box
Box for the full domain at nc_hires_grid_level.
Definition REMORA.H:1784
amrex::Gpu::DeviceVector< amrex::Real > Cs_w
Stretching coefficients at w points.
Definition REMORA.H:458
void set_2darrays(int lev)
Set 2D momentum arrays from 3D momentum.
void init_analytic(int lev)
Initialize initial problem data from analytic functions.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_ubar
barotropic x velocity (2D)
Definition REMORA.H:547
void init_clim_nudg_coeff_from_netcdf(int lev)
Climatology nudging coefficient initialization from NetCDF file.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_cons_full_domain
multilevel data container for high res initial data: temperature, salinity, passive tracer
Definition REMORA.H:395
void FillPatch(int lev, amrex::Real time, amrex::MultiFab &mf_to_be_filled, amrex::Vector< amrex::MultiFab * > const &mfs, const int bccomp, const int bdy_var_type=BdyVars::null, const int icomp=0, const bool fill_all=true, const bool fill_set=false, const int n_not_fill=0, const int icomp_calc=0, const amrex::Real dt=zero, const amrex::MultiFab &mf_calc=amrex::MultiFab())
Fill a new MultiFab by copying in phi from valid region and filling ghost cells.
int vbar_bc() const noexcept
Definition REMORA.H:1317
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pn_full_domain
horizontal scaling factor: 1 / dy (2D) on whole domain
Definition REMORA.H:574
amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > vec_nudg_coeff
Climatology nudging coefficients.
Definition REMORA.H:643
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pn
horizontal scaling factor: 1 / dy (2D)
Definition REMORA.H:570
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akv
Vertical viscosity coefficient (3D)
Definition REMORA.H:430
REMORABiology::FennelParameters fennel_params
Runtime parameters for the Fennel biology package.
Definition REMORA.H:1648
void allocate_bathymetry_grid_vars_full_domain()
Allocate multifabs for storing full-domain bathymetry and grid vars data.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Zt_avg1
Average of the free surface, zeta (2D)
Definition REMORA.H:464
void init_clim_nudg_coeff(int lev)
Wrapper to initialize climatology nudging coefficient.
void init_bathymetry_full_domain_from_analytic()
Full domain bathymetry data initialization from analytic.
int hires_grid_level
Which level the high resolution bathymetry is at.
Definition REMORA.H:1780
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yr
y_grid on rho points (2D)
Definition REMORA.H:582
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akp
Turbulent length scale vertical diffusion coefficient.
Definition REMORA.H:640
REMORABiology::BiologyICType biology_ic_type
Source of the biology tracer initial condition, independent of remora.ic_type. Default follows ic_typ...
Definition REMORA.H:1651
static constexpr int u
static constexpr int v
int cons(int icomp) noexcept
bool has_biology(BiologyModel model) noexcept
@ follow_ic_type
default: NetCDF when ic_type is netcdf, else analytic
amrex::Real coriolis_beta
amrex::Vector< amrex::Real > nudg_coeff
amrex::Real coriolis_f0