12#ifdef REMORA_USE_NETCDF
17 FArrayBox& NC_temp_fab, FArrayBox& NC_salt_fab,
18 FArrayBox& NC_xvel_fab, FArrayBox& NC_yvel_fab,
19 FArrayBox& NC_ubar_fab, FArrayBox& NC_vbar_fab);
24 FArrayBox& NC_mskr_fab, FArrayBox& NC_msku_fab,
25 FArrayBox& NC_mskv_fab);
30 Vector<Vector<FArrayBox>>& bdy_data_xlo,
31 Vector<Vector<FArrayBox>>& bdy_data_xhi,
32 Vector<Vector<FArrayBox>>& bdy_data_ylo,
33 Vector<Vector<FArrayBox>>& bdy_data_yhi,
34 int& width, amrex::Real& start_bdy_time,
35 std::string bdry_time_varname,
41 FArrayBox& temp_fab, FArrayBox& salt_fab,
42 FArrayBox& x_vel_fab, FArrayBox& y_vel_fab,
43 FArrayBox& ubar_fab, FArrayBox& vbar_fab,
44 const Vector<FArrayBox>& NC_temp_fab,
45 const Vector<FArrayBox>& NC_salt_fab,
46 const Vector<FArrayBox>& NC_xvel_fab,
47 const Vector<FArrayBox>& NC_yvel_fab,
48 const Vector<FArrayBox>& NC_ubar_fab,
49 const Vector<FArrayBox>& NC_vbar_fab);
55 FArrayBox& NC_pm_fab, FArrayBox& NC_pn_fab,
56 FArrayBox& NC_xr_fab, FArrayBox& NC_yr_fab,
57 FArrayBox& NC_xu_fab, FArrayBox& NC_yu_fab,
58 FArrayBox& NC_xv_fab, FArrayBox& NC_yv_fab,
59 FArrayBox& NC_xp_fab, FArrayBox& NC_yp_fab);
64 FArrayBox& NC_h_fab, IntVect ngrow);
73 FArrayBox& NC_zeta_fab);
80 bool do_temp_clim_nudg,
81 bool do_salt_clim_nudg,
82 FArrayBox& NC_M2NC_fab,
83 FArrayBox& NC_M3NC_fab,
84 FArrayBox& NC_TempNC_fab,
85 FArrayBox& NC_SaltNC_fab);
88void read_vec_from_netcdf (
int lev,
const amrex::Vector<std::string>& fnames,
const std::string& field_name, amrex::Vector<int>& vec_dat);
107 NC_temp_fab[idx], NC_salt_fab[idx],
108 NC_xvel_fab[idx], NC_yvel_fab[idx],
109 NC_ubar_fab[idx], NC_vbar_fab[idx]);
117#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
121 for ( MFIter mfi(*
cons_new[lev],
false); mfi.isValid(); ++mfi )
124 FArrayBox &temp_fab = mf_temp[mfi];
125 FArrayBox &salt_fab = mf_salt[mfi];
126 FArrayBox &xvel_fab = (*
xvel_new[lev])[mfi];
127 FArrayBox &yvel_fab = (*
yvel_new[lev])[mfi];
128 FArrayBox &ubar_fab = (*
vec_ubar[lev])[mfi];
129 FArrayBox &vbar_fab = (*
vec_vbar[lev])[mfi];
134 NC_temp_fab, NC_salt_fab,
135 NC_xvel_fab, NC_yvel_fab,
136 NC_ubar_fab, NC_vbar_fab);
160#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
164 for ( MFIter mfi(*
cons_new[lev],
false); mfi.isValid(); ++mfi )
166 FArrayBox &zeta_fab = (*
vec_zeta[lev])[mfi];
173 zeta_fab.template copy<RunOn::Device>(NC_zeta_fab[idx],0,0,1);
178 vec_zeta[lev]->FillBoundary(geom[lev].periodicity());
179 (*
physbcs[lev])(*
vec_zeta[lev],*
vec_mskr[lev].get(),0,1,
vec_zeta[lev]->nGrowVect(),
t_new[lev],
zeta_bc(),0,*
vec_zeta[lev],*
vec_msku[lev],*
vec_mskv[lev]);
184 Real told =
t_new[lev];
190 0,
false,
false,0,0,0.0,*
vec_zeta[lev]);
219 NC_pm_fab[idx], NC_pn_fab[idx],
220 NC_xr_fab[idx], NC_yr_fab[idx],
221 NC_xu_fab[idx], NC_yu_fab[idx],
222 NC_xv_fab[idx], NC_yv_fab[idx],
223 NC_xp_fab[idx], NC_yp_fab[idx]);
226#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
230 for ( MFIter mfi(*
cons_new[lev],
false); mfi.isValid(); ++mfi )
232 FArrayBox &h_fab = (*
vec_h[lev])[mfi];
233 FArrayBox &pm_fab = (*
vec_pm[lev])[mfi];
234 FArrayBox &pn_fab = (*
vec_pn[lev])[mfi];
235 FArrayBox &xr_fab = (*
vec_xr[lev])[mfi];
236 FArrayBox &yr_fab = (*
vec_yr[lev])[mfi];
237 FArrayBox &xu_fab = (*
vec_xu[lev])[mfi];
238 FArrayBox &yu_fab = (*
vec_yu[lev])[mfi];
239 FArrayBox &xv_fab = (*
vec_xv[lev])[mfi];
240 FArrayBox &yv_fab = (*
vec_yv[lev])[mfi];
241 FArrayBox &xp_fab = (*
vec_xp[lev])[mfi];
242 FArrayBox &yp_fab = (*
vec_yp[lev])[mfi];
250 h_fab.template copy<RunOn::Device>(NC_h_fab[idx],0,0,1);
251 h_fab.template copy<RunOn::Device>(NC_h_fab[idx],0,1,1);
253 pm_fab.template copy<RunOn::Device>(NC_pm_fab[idx]);
254 pn_fab.template copy<RunOn::Device>(NC_pn_fab[idx]);
256 xr_fab.template copy<RunOn::Device>(NC_xr_fab[idx]);
257 yr_fab.template copy<RunOn::Device>(NC_yr_fab[idx]);
258 xu_fab.template copy<RunOn::Device>(NC_xu_fab[idx]);
259 yu_fab.template copy<RunOn::Device>(NC_yu_fab[idx]);
260 xv_fab.template copy<RunOn::Device>(NC_xv_fab[idx]);
261 yv_fab.template copy<RunOn::Device>(NC_yv_fab[idx]);
262 xp_fab.template copy<RunOn::Device>(NC_xp_fab[idx]);
263 yp_fab.template copy<RunOn::Device>(NC_yp_fab[idx]);
268 const double dummy_time = 0.0_rt;
288 int ng =
vec_pm[lev]->nGrow();
290 const auto& dom_lo = amrex::lbound(geom[lev].Domain());
291 const auto& dom_hi = amrex::ubound(geom[lev].Domain());
300 vec_pm[lev]->FillBoundary(geom[lev].periodicity());
301 vec_pn[lev]->FillBoundary(geom[lev].periodicity());
303 vec_xr[lev]->FillBoundary(geom[lev].periodicity());
304 vec_yr[lev]->FillBoundary(geom[lev].periodicity());
305 vec_xu[lev]->FillBoundary(geom[lev].periodicity());
306 vec_yu[lev]->FillBoundary(geom[lev].periodicity());
307 vec_xv[lev]->FillBoundary(geom[lev].periodicity());
308 vec_yv[lev]->FillBoundary(geom[lev].periodicity());
309 vec_xp[lev]->FillBoundary(geom[lev].periodicity());
310 vec_yp[lev]->FillBoundary(geom[lev].periodicity());
312 for ( MFIter mfi(*
vec_pm[lev]); mfi.isValid(); ++mfi )
314 Box bx = mfi.tilebox();
316 auto pm_fab =
vec_pm[lev]->array(mfi);
317 auto pn_fab =
vec_pn[lev]->array(mfi);
319 Box gbx_lox = adjCellLo(bx,0,ng); gbx_lox.grow(1,ng); gbx_lox.setBig (0,dom_lo.x-2);
320 Box gbx_hix = adjCellHi(bx,0,ng); gbx_hix.grow(1,ng); gbx_hix.setSmall(0,dom_hi.x+2);
321 Box gbx_loy = adjCellLo(bx,1,ng); gbx_loy.grow(0,ng); gbx_loy.setBig (1,dom_lo.y-2);
322 Box gbx_hiy = adjCellHi(bx,1,ng); gbx_hiy.grow(0,ng); gbx_hiy.setSmall(1,dom_hi.y+2);
330 ParallelFor(gbx_lox, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
332 pm_fab(i,j,k,0) = pm_fab(dom_lo.x-1,j,k,0);
333 pn_fab(i,j,k,0) = pn_fab(dom_lo.x-1,j,k,0);
337 ParallelFor(gbx_hix, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
339 pm_fab(i,j,k,0) = pm_fab(dom_hi.x+1,j,k,0);
340 pn_fab(i,j,k,0) = pn_fab(dom_hi.x+1,j,k,0);
344 ParallelFor(gbx_loy, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
346 pm_fab(i,j,k,0) = pm_fab(i,dom_lo.y-1,k,0);
347 pn_fab(i,j,k,0) = pn_fab(i,dom_lo.y-1,k,0);
351 ParallelFor(gbx_hiy, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k)
353 pm_fab(i,j,k,0) = pm_fab(i,dom_hi.y+1,k,0);
354 pn_fab(i,j,k,0) = pn_fab(i,dom_hi.y+1,k,0);
359 vec_h[lev]->FillBoundary(geom[lev].periodicity());
377#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
381 for ( MFIter mfi(*
cons_new[lev],
false); mfi.isValid(); ++mfi )
383 FArrayBox &fcor_fab = (*
vec_fcor[lev])[mfi];
390 fcor_fab.template copy<RunOn::Device>(NC_fcor_fab[idx]);
394 vec_fcor[lev]->FillBoundary(geom[lev].periodicity());
411 NC_mskr_fab[idx],NC_msku_fab[idx],
415#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
419 for ( MFIter mfi(*
cons_new[lev],
false); mfi.isValid(); ++mfi )
421 FArrayBox &mskr_fab = (*
vec_mskr[lev])[mfi];
422 FArrayBox &msku_fab = (*
vec_msku[lev])[mfi];
423 FArrayBox &mskv_fab = (*
vec_mskv[lev])[mfi];
430 mskr_fab.template copy<RunOn::Device>(NC_mskr_fab[idx]);
431 msku_fab.template copy<RunOn::Device>(NC_msku_fab[idx]);
432 mskv_fab.template copy<RunOn::Device>(NC_mskv_fab[idx]);
438 vec_mskr[lev]->FillBoundary(geom[lev].periodicity());
439 vec_msku[lev]->FillBoundary(geom[lev].periodicity());
440 vec_mskv[lev]->FillBoundary(geom[lev].periodicity());
441 vec_mskp[lev]->FillBoundary(geom[lev].periodicity());
451 amrex::Error(
"NetCDF boundary file name must be provided via input");
454 amrex::Vector<std::string> field_name = {
"u",
"v",
"temp",
"salt",
"ubar",
"vbar",
"zeta"};
455 amrex::Vector<IntVect > index_types = {IntVect(1,0,0), IntVect(0,1,0),
456 IntVect(0,0,0), IntVect(0,0,0),
457 IntVect(1,0,0), IntVect(0,1,0),
459 std::vector<bool > is_2d = {
false,
false,
false,
false,
true,
true,
true};
461 amrex::Print() <<
"DOING INIT AT LEVEL " << lev << std::endl;
462 int rx = 1;
int ry = 1;
464 for (
int k = lev-1; k >= 0; k--) {
465 rx *= ref_ratio[k][0];
466 ry *= ref_ratio[k][1];
500 FArrayBox& temp_fab, FArrayBox& salt_fab,
501 FArrayBox& x_vel_fab, FArrayBox& y_vel_fab,
502 FArrayBox& ubar_fab, FArrayBox& vbar_fab,
503 const Vector<FArrayBox>& NC_temp_fab,
504 const Vector<FArrayBox>& NC_salt_fab,
505 const Vector<FArrayBox>& NC_xvel_fab,
506 const Vector<FArrayBox>& NC_yvel_fab,
507 const Vector<FArrayBox>& NC_ubar_fab,
508 const Vector<FArrayBox>& NC_vbar_fab)
510 int nboxes = NC_xvel_fab.size();
511 for (
int idx = 0; idx < nboxes; idx++)
517 temp_fab.template copy<RunOn::Device>(NC_temp_fab[idx]);
518 salt_fab.template copy<RunOn::Device>(NC_salt_fab[idx]);
519 x_vel_fab.template copy<RunOn::Device>(NC_xvel_fab[idx]);
520 y_vel_fab.template copy<RunOn::Device>(NC_yvel_fab[idx]);
521 ubar_fab.template copy<RunOn::Device>(NC_ubar_fab[idx],0,0,1);
522 vbar_fab.template copy<RunOn::Device>(NC_vbar_fab[idx],0,0,1);
545 NC_M2NC_fab[idx],NC_M3NC_fab[idx],
546 NC_TempNC_fab[idx],NC_SaltNC_fab[idx]);
549#pragma omp parallel if (amrex::Gpu::notInLaunchRegion())
553 for ( MFIter mfi(*
cons_new[lev],
false); mfi.isValid(); ++mfi )
557 ubarNC_fab.template copy<RunOn::Device>(NC_M2NC_fab[idx]);
559 vbarNC_fab.template copy<RunOn::Device>(NC_M2NC_fab[idx]);
563 uNC_fab.template copy<RunOn::Device>(NC_M3NC_fab[idx]);
565 vNC_fab.template copy<RunOn::Device>(NC_M3NC_fab[idx]);
569 TempNC_fab.template copy<RunOn::Device>(NC_TempNC_fab[idx]);
573 SaltNC_fab.template copy<RunOn::Device>(NC_SaltNC_fab[idx]);
608 amrex::Vector<int> river_pos_x;
609 amrex::Vector<int> river_pos_y;
610 amrex::Vector<int> river_direction_tmp;
612 std::string river_x_name =
"river_Xposition";
613 std::string river_y_name =
"river_Eposition";
614 std::string river_dir_name =
"river_direction";
620 int nriv = river_pos_x.size();
621 amrex::Gpu::DeviceVector<int> xpos_d(nriv);
622 amrex::Gpu::DeviceVector<int> ypos_d(nriv);
625 Gpu::htod_memcpy(xpos_d.data(), river_pos_x.data(),
sizeof(
int)*nriv);
626 Gpu::htod_memcpy(ypos_d.data(), river_pos_y.data(),
sizeof(
int)*nriv);
627 Gpu::htod_memcpy(
river_direction.data(), river_direction_tmp.data(),
sizeof(
int)*nriv);
629 std::memcpy(xpos_d.data(), river_pos_x.data(),
sizeof(
int)*nriv);
630 std::memcpy(ypos_d.data(), river_pos_y.data(),
sizeof(
int)*nriv);
631 std::memcpy(
river_direction.data(), river_direction_tmp.data(),
sizeof(
int)*nriv);
633 const int* xpos_ptr = xpos_d.data();
634 const int* ypos_ptr = ypos_d.data();
636 for (amrex::MFIter mfi(*(
vec_river_position[lev]).get(),
true); mfi.isValid(); ++mfi) {
637 amrex::Box bx = mfi.growntilebox(amrex::IntVect(
NGROW,
NGROW,0));
639 ParallelFor(bx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int ) {
640 for (
int iriv=0; iriv < nriv; iriv++) {
641 int xriv = xpos_ptr[iriv]-1;
642 int yriv = ypos_ptr[iriv]-1;
643 if (i==xriv && j==yriv) {
644 river_pos(i,j,0) = iriv;
656 Real inv_days_to_inv_s = 1.0_rt / (3600._rt * 24._rt);
658 for ( MFIter mfi(*mf, TilingIfNotGPU()); mfi.isValid(); ++mfi )
660 Array4<Real>
const& arr = mf->array(mfi);
661 Box bx = mfi.growntilebox(IntVect(
NGROW,
NGROW,0));
662 ParallelFor(bx, [=] AMREX_GPU_DEVICE (
int i,
int j,
int k) {
663 arr(i,j,k) *= inv_days_to_inv_s;
673 Abort(
"Must specify high-resolution grid file when initializing from NetCDF and hires_grid_level > 0");
675 Vector<FArrayBox> NC_h_fab ; NC_h_fab.resize(1);
682 h_fab.template copy<RunOn::Device>(NC_h_fab[0]);
void init_state_from_netcdf(int lev, FArrayBox &temp_fab, FArrayBox &salt_fab, FArrayBox &x_vel_fab, FArrayBox &y_vel_fab, FArrayBox &ubar_fab, FArrayBox &vbar_fab, const Vector< FArrayBox > &NC_temp_fab, const Vector< FArrayBox > &NC_salt_fab, const Vector< FArrayBox > &NC_xvel_fab, const Vector< FArrayBox > &NC_yvel_fab, const Vector< FArrayBox > &NC_ubar_fab, const Vector< FArrayBox > &NC_vbar_fab)
helper function to initialize state from netcdf
void read_vec_from_netcdf(int lev, const amrex::Vector< std::string > &fnames, const std::string &field_name, amrex::Vector< int > &vec_dat)
helper function to read in vector of data from netcdf
void read_coriolis_from_netcdf(int lev, const Box &domain, const std::string &fname, FArrayBox &NC_fcor_fab)
helper function to read coriolis factor from netcdf
void read_data_from_netcdf(int, const Box &domain, const std::string &fname, FArrayBox &NC_temp_fab, FArrayBox &NC_salt_fab, FArrayBox &NC_xvel_fab, FArrayBox &NC_yvel_fab, FArrayBox &NC_ubar_fab, FArrayBox &NC_vbar_fab)
helper function for reading in initial state data from netcdf
void read_zeta_from_netcdf(int lev, const Box &domain, const std::string &fname, FArrayBox &NC_zeta_fab)
helper function to read sea surface height from netcdf
Real read_bdry_from_netcdf(const Box &domain, const std::string &fname, Vector< Vector< FArrayBox > > &bdy_data_xlo, Vector< Vector< FArrayBox > > &bdy_data_xhi, Vector< Vector< FArrayBox > > &bdy_data_ylo, Vector< Vector< FArrayBox > > &bdy_data_yhi, int &width, amrex::Real &start_bdy_time, std::string bdry_time_varname, amrex::GpuArray< amrex::GpuArray< bool, AMREX_SPACEDIM *2 >, BdyVars::NumTypes+1 > &)
helper function for reading boundary data from netcdf
void read_bathymetry_full_domain_from_netcdf(const Box &domain, const std::string &fname, FArrayBox &NC_h_fab, IntVect ngrow)
helper function to read full-domain high resolution bathymetry from netcdf
void read_masks_from_netcdf(int, const Box &domain, const std::string &fname, FArrayBox &NC_mskr_fab, FArrayBox &NC_msku_fab, FArrayBox &NC_mskv_fab)
helper function for reading in land-sea masks from netcdf
void read_bathymetry_from_netcdf(int lev, const Box &domain, const std::string &fname, FArrayBox &NC_h_fab, FArrayBox &NC_pm_fab, FArrayBox &NC_pn_fab, FArrayBox &NC_xr_fab, FArrayBox &NC_yr_fab, FArrayBox &NC_xu_fab, FArrayBox &NC_yu_fab, FArrayBox &NC_xv_fab, FArrayBox &NC_yv_fab, FArrayBox &NC_xp_fab, FArrayBox &NC_yp_fab)
helper function to read bathymetry from netcdf
void read_clim_nudg_coeff_from_netcdf(int lev, const Box &domain, const std::string &fname, bool do_m2_clim_nudg, bool do_m3_clim_nudg, bool do_temp_clim_nudg, bool do_salt_clim_nudg, FArrayBox &NC_M2NC_fab, FArrayBox &NC_M3NC_fab, FArrayBox &NC_TempNC_fab, FArrayBox &NC_SaltNC_fab)
helper function to read climatology nudging from netcdf
A class to hold and interpolate time series data read from a NetCDF file.
std::string nc_grid_file_hires
Grid file for high resolution bathymetry.
amrex::Vector< std::string > nc_riv_file
NetCDF river file(s)
int foextrap_periodic_bc() const noexcept
void init_bathymetry_from_netcdf(int lev)
Bathymetry data initialization from NetCDF file.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_fcor
coriolis factor (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_h
Bathymetry data (2D, positive valued, h in ROMS)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pm
horizontal scaling factor: 1 / dx (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yv
y_grid on v-points (2D)
amrex::Vector< amrex::MultiFab * > cons_new
multilevel data container for current step's scalar data: temperature, salinity, passive tracer
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskr
land/sea mask at cell centers (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yp
y_grid on psi-points (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_xr
x_grid on rho points (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_xv
x_grid on v-points (2D)
amrex::Vector< amrex::Vector< amrex::Box > > boxes_at_level
the boxes specified at each level by tagging criteria
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_msku
land/sea mask at x-faces (2D)
void init_data_from_netcdf(int lev)
Problem initialization from NetCDF file.
void init_masks_from_netcdf(int lev)
Mask data initialization from NetCDF file.
amrex::Vector< amrex::MultiFab * > yvel_new
multilevel data container for current step's y velocities (v in ROMS)
int zeta_bc() const noexcept
amrex::Vector< amrex::IntVect > cum_ref_ratios
Cumulative refinement ratio between level 0 and level i.
amrex::Vector< int > num_boxes_at_level
how many boxes specified at each level by tagging criteria
amrex::Vector< amrex::MultiFab * > xvel_new
multilevel data container for current step's x velocities (u in ROMS)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskp
land/sea mask at cell corners (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskv
land/sea mask at y-faces (2D)
amrex::Vector< std::unique_ptr< REMORAPhysBCFunct > > physbcs
Vector (over level) of functors to apply physical boundary conditions.
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=true, const int n_not_fill=0, const int icomp_calc=0, const amrex::Real dt=amrex::Real(0.0), const amrex::MultiFab &mf_calc=amrex::MultiFab())
Fill a new MultiFab by copying in phi from valid region and filling ghost cells.
std::string nc_clim_coeff_file
NetCDF climatology coefficient file.
amrex::Vector< std::string > bdry_time_name_byvar
Name of time fields for boundary data.
void init_riv_pos_from_netcdf(int lev)
static amrex::Vector< std::string > nc_bdry_file
NetCDF boundary data.
void update_mskp(int lev)
Set psi-point mask to be consistent with rho-point mask.
void init_zeta_from_netcdf(int lev)
Sea-surface height data initialization from NetCDF file.
void init_coriolis_from_netcdf(int lev)
Coriolis parameter data initialization from NetCDF file.
void fill_from_bdyfiles(int lev, amrex::MultiFab &mf_to_fill, const amrex::MultiFab &mf_mask, const amrex::Real time, const int bccomp, const int bdy_var_type, const int icomp_to_fill, const int icomp_calc=0, const amrex::MultiFab &mf_calc=amrex::MultiFab(), const amrex::Real=amrex::Real(0.0))
Fill boundary data from netcdf file.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_h_full_domain
Bathymetry data on the whole domain at each potential level.
int nscalar
Number of passive scalars carried in the state.
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.
amrex::Vector< amrex::Real > t_new
new time at each level
void init_bdry_from_netcdf(int lev)
Boundary data initialization from NetCDF file.
static SolverChoice solverChoice
Container for algorithmic choices.
amrex::Vector< std::unique_ptr< amrex::iMultiFab > > vec_river_position
iMultiFab for river positions; contents are indices of rivers
amrex::Vector< amrex::Vector< std::unique_ptr< NCTimeSeriesBoundary > > > boundary_series
Vector over BdyVars of boundary series data containers.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_xp
x_grid on psi-points (2D)
static amrex::Vector< amrex::Vector< std::string > > nc_grid_file
NetCDF grid file.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_zeta
free surface height (2D)
amrex::Gpu::DeviceVector< int > river_direction
Vector over rivers of river direction: 0: u-face; 1: v-face; 2: w-face.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_vbar
barotropic y velocity (2D)
amrex::Box nc_hires_grid_box
Box for the full domain at nc_hires_grid_level.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_ubar
barotropic x velocity (2D)
void init_clim_nudg_coeff_from_netcdf(int lev)
Climatology nudging coefficient initialization from NetCDF file.
void init_bathymetry_full_domain_from_netcdf()
Full domain bathymetry data initialization from NetCDF file.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yu
y_grid on u-points (2D)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_xu
x_grid on u-points (2D)
amrex::GpuArray< amrex::GpuArray< bool, AMREX_SPACEDIM *2 >, BdyVars::NumTypes+1 > phys_bc_need_data
These are flags that indicate whether we need to read in boundary data from file.
amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > vec_nudg_coeff
Climatology nudging coefficients.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pn
horizontal scaling factor: 1 / dy (2D)
static amrex::Vector< amrex::Vector< std::string > > nc_init_file
NetCDF initialization file.
amrex::Vector< amrex::Real > t_old
old time at each level
int hires_grid_level
Which level the high resolution bathymetry is at.
void convert_inv_days_to_inv_s(amrex::MultiFab *)
Convert data in a multifab from inverse days to inverse seconds.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yr
y_grid on rho points (2D)
bool boundary_from_netcdf