40 W(
i,
j,k) =
W(
i,
j,k-1) - (
Huon(
i+1,
j,k-1)-
Huon(
i,
j,k-1)) - (
Hvom(
i,
j+1,k-1)-
Hvom(
i,
j,k-1));
50 W(
i,
j,k) =
W(
i,
j,k)-
W(
i,
j,
N+1)*(z_w(
i,
j,k)+
h(
i,
j,0,0));
72 const int N =
Geom(
lev).Domain().size()[2]-1;
78#pragma omp parallel if (Gpu::notInLaunchRegion())
149 const int nz =
Geom(
lev).Domain().length(2);
153 const Real
cff1 = Real(3.0)/Real(8.0);
154 const Real
cff2 = Real(3.0)/Real(4.0);
155 const Real
cff3 = Real(1.0)/Real(8.0);
156 const Real
cff4 = Real(9.0)/Real(16.0);
157 const Real
cff5 = Real(1.0)/Real(16.0);
161#pragma omp parallel if (Gpu::notInLaunchRegion())
177 const Box
bx =
mfi.validbox().enclosedCells(2);
178 FArrayBox
fab_vert(
bx,1,amrex::The_Async_Arena());
184 const Real
wrk_ulo = u(
i ,
j,k) * (z_r(
i ,
j,k)-z_r(
i-1,
j,k)) * (
pm(
i-1,
j,0)+
pm(
i ,
j,0));
185 const Real
wrk_uhi = u(
i+1,
j,k) * (z_r(
i+1,
j,k)-z_r(
i ,
j,k)) * (
pm(
i ,
j,0)+
pm(
i+1,
j,0));
186 const Real
wrk_vlo = v(
i,
j ,k) * (z_r(
i,
j ,k)-z_r(
i,
j-1,k)) * (
pn(
i,
j-1,0)+
pn(
i,
j ,0));
187 const Real
wrk_vhi = v(
i,
j+1,k) * (z_r(
i,
j+1,k)-z_r(
i,
j ,k)) * (
pn(
i,
j ,0)+
pn(
i,
j+1,0));
197 / (z_w(
i,
j,nz)-z_w(
i,
j,0));
203 Real
slope = (z_r(
i,
j,0)-z_w(
i,
j,0)) / (z_r(
i,
j,1)-z_r(
i,
j,0));
207 for (
int k = 2; k <= nz-2; ++k) {
211 slope = (z_w(
i,
j,nz)-z_r(
i,
j,nz-1)) / (z_r(
i,
j,nz-1)-z_r(
i,
j,nz-2));
233#pragma omp parallel if (Gpu::notInLaunchRegion())
249#pragma omp parallel if (Gpu::notInLaunchRegion())
constexpr amrex::Real two
constexpr amrex::Real zero
mf_h setVal(geomdata.ProbHi(2))
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_h
multilevel data container for current step's z velocities (largely unused; W stored separately)
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pm
horizontal scaling factor: 1 / dx (2D)
void compute_diagnostic_omega(int lev, amrex::MultiFab &mf_omega)
omega (m/s) as ROMS writes it: from mass fluxes of the current velocities
void set_massflux_3d(int lev, amrex::MultiFab &mf_Huon, amrex::MultiFab &mf_Hvom)
Horizontal mass fluxes Hz*u/n and Hz*v/m of the current velocities, as ROMS set_massflux.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Hz
Width of cells in the vertical (z-) direction (3D, Hz in ROMS)
amrex::Vector< amrex::MultiFab * > yvel_new
multilevel data container for current step's y velocities (v in ROMS)
void compute_omega(int lev, amrex::MultiFab &mf_omega, const amrex::MultiFab &mf_Huon, const amrex::MultiFab &mf_Hvom)
Velocity across the w-levels (omega, m/s) from the given mass fluxes.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_z_r
z coordinates at rho points (cell centers)
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_DV_avg1
time average of barotropic y velocity flux
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_DU_avg1
time average of barotropic x velocity flux (2D)
void compute_wvel(int lev, amrex::MultiFab &mf_w)
"True" vertical velocity w (m/s) at w-points, as ROMS wvelocity
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pn
horizontal scaling factor: 1 / dy (2D)
static void compute_W(const amrex::Box &bx2d, const amrex::Array4< amrex::Real > &W, const amrex::Array4< amrex::Real const > &Huon, const amrex::Array4< amrex::Real const > &Hvom, const amrex::Array4< amrex::Real const > &z_w, const amrex::Array4< amrex::Real const > &h, const int N)
Vertical volume flux W from the horizontal mass flux divergence.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_z_w
z coordinates at w points (faces between z-cells)