REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA Class Reference

Class that stores all relevant simulation state data with methods for time stepping. More...

#include <REMORA.H>

Inheritance diagram for REMORA:
Collaboration diagram for REMORA:

Public Member Functions

 REMORA ()
 
virtual ~REMORA ()
 
void Evolve ()
 Advance solution to final time.
 
virtual void ErrorEst (int lev, amrex::TagBoxArray &tags, amrex::Real time, int ngrow) override
 Tag cells for refinement.
 
void InitData ()
 Initialize multilevel data.
 
void init_only (int lev, amrex::Real time)
 Init (NOT restart or regrid)
 
void restart ()
 
void post_timestep (int nstep, amrex::Real time, amrex::Real dt_lev)
 Called after every level 0 timestep.
 
void sum_integrated_quantities (amrex::Real time)
 Integrate conserved quantities for diagnostics.
 
amrex::Real volWgtSumMF (int lev, const amrex::MultiFab &mf, int comp, bool local, bool finemask)
 Perform the volume-weighted sum.
 
bool is_it_time_for_action (int nstep, amrex::Real time, amrex::Real dt, int action_interval, amrex::Real action_per)
 Decide if it is time to take an action.
 
virtual void MakeNewLevelFromCoarse (int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override
 Make a new level using provided BoxArray and DistributionMapping and fill with interpolated coarse level data. Overrides the pure virtual function in AmrCore.
 
virtual void RemakeLevel (int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override
 Remake an existing level using provided BoxArray and DistributionMapping and fill with existing fine and coarse data. Overrides the pure virtual function in AmrCore.
 
virtual void ClearLevel (int lev) override
 Delete level data Overrides the pure virtual function in AmrCore.
 
virtual void MakeNewLevelFromScratch (int lev, amrex::Real time, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm) override
 Make a new level from scratch using provided BoxArray and DistributionMapping. Only used during initialization. Overrides the pure virtual function in AmrCore.
 
void set_grid_scale (int lev)
 Set pm and pn arrays on level lev. Only works if using analytic initialization.
 
void set_zeta_to_Ztavg (int lev)
 Set zeta components to be equal to time-averaged Zt_avg1.
 
void update_mskp (int lev)
 Set psi-point mask to be consistent with rho-point mask.
 
amrex::Real estTimeStep (int lev) const
 compute dt from CFL considerations
 
void remora_advance (int level, amrex::MultiFab &cons_old, amrex::MultiFab &cons_new, amrex::MultiFab &xvel_old, amrex::MultiFab &yvel_old, amrex::MultiFab &zvel_old, amrex::MultiFab &xvel_new, amrex::MultiFab &yvel_new, amrex::MultiFab &zvel_new, amrex::MultiFab &source, const amrex::Geometry fine_geom, const amrex::Real dt, const amrex::Real time)
 Interface for advancing the data at one level by one "slow" timestep.
 
amrex::MultiFab & build_fine_mask (int lev)
 Make mask to zero out covered cells (for mesh refinement)
 
void WritePlotFile ()
 main driver for writing AMReX plotfiles
 
void WriteMultiLevelPlotfileWithBathymetry (const std::string &plotfilename, int nlevels, const amrex::Vector< const amrex::MultiFab * > &mf, const amrex::Vector< const amrex::MultiFab * > &mf_nd, const amrex::Vector< std::string > &varnames, amrex::Real time, const amrex::Vector< int > &level_steps, const std::string &versionName="HyperCLaw-V1.1", const std::string &levelPrefix="Level_", const std::string &mfPrefix="Cell", const amrex::Vector< std::string > &extra_dirs=amrex::Vector< std::string >()) const
 write out particular data to an AMReX plotfile
 
void WriteGenericPlotfileHeaderWithBathymetry (std::ostream &HeaderFile, int nlevels, const amrex::Vector< amrex::BoxArray > &bArray, const amrex::Vector< std::string > &varnames, amrex::Real time, const amrex::Vector< int > &level_steps, const std::string &versionName, const std::string &levelPrefix, const std::string &mfPrefix) const
 write out header data for an AMReX plotfile
 
void Advance (int lev, amrex::Real time, amrex::Real dt_lev, int iteration, int ncycle)
 advance a single level for a single time step
 
void setup_step (int lev, amrex::Real time, amrex::Real dt_lev)
 Set everything up for a step on a level.
 
void advance_3d_ml (int lev, amrex::Real dt_lev)
 3D advance on a single level
 
void advance_2d_onestep (int lev, amrex::Real dt_lev, amrex::Real dtfast_lev, int my_iif, int nfast_counter)
 2D advance, one predictor/corrector step
 
void advance_2d (int lev, amrex::MultiFab const *mf_rhoS, amrex::MultiFab const *mf_rhoA, amrex::MultiFab *mf_ru2d, amrex::MultiFab *mf_rv2d, amrex::MultiFab *mf_rufrc, amrex::MultiFab *mf_rvfrc, amrex::MultiFab *mf_Zt_avg1, std::unique_ptr< amrex::MultiFab > &mf_DU_avg1, std::unique_ptr< amrex::MultiFab > &mf_DU_avg2, std::unique_ptr< amrex::MultiFab > &mf_DV_avg1, std::unique_ptr< amrex::MultiFab > &mf_DV_avg2, std::unique_ptr< amrex::MultiFab > &mf_rubar, std::unique_ptr< amrex::MultiFab > &mf_rvbar, std::unique_ptr< amrex::MultiFab > &mf_rzeta, std::unique_ptr< amrex::MultiFab > &mf_ubar, std::unique_ptr< amrex::MultiFab > &mf_vbar, amrex::MultiFab *mf_zeta, amrex::MultiFab const *mf_h, amrex::MultiFab const *mf_pm, amrex::MultiFab const *mf_pn, amrex::MultiFab const *mf_fcor, amrex::MultiFab const *mf_visc2_p, amrex::MultiFab const *mf_visc2_r, amrex::MultiFab const *mf_mskr, amrex::MultiFab const *mf_msku, amrex::MultiFab const *mf_mskv, amrex::MultiFab const *mf_mskp, amrex::Real dtfast_lev, bool predictor_2d_step, bool first_2d_step, int my_iif, int &next_indx1)
 Perform a 2D predictor (predictor_2d_step=True) or corrector (predictor_2d_step=False) step.
 
void advance_3d (int lev, amrex::MultiFab &mf_cons, amrex::MultiFab &mf_u, amrex::MultiFab &mf_v, amrex::MultiFab *mf_sstore, amrex::MultiFab *mf_ru, amrex::MultiFab *mf_rv, std::unique_ptr< amrex::MultiFab > &mf_DU_avg1, std::unique_ptr< amrex::MultiFab > &mf_DU_avg2, std::unique_ptr< amrex::MultiFab > &mf_DV_avg1, std::unique_ptr< amrex::MultiFab > &mf_DV_avg2, std::unique_ptr< amrex::MultiFab > &mf_ubar, std::unique_ptr< amrex::MultiFab > &mf_vbar, std::unique_ptr< amrex::MultiFab > &mf_Akv, std::unique_ptr< amrex::MultiFab > &mf_Akt, std::unique_ptr< amrex::MultiFab > &mf_Hz, std::unique_ptr< amrex::MultiFab > &mf_Huon, std::unique_ptr< amrex::MultiFab > &mf_Hvom, std::unique_ptr< amrex::MultiFab > &mf_z_w, amrex::MultiFab const *mf_h, amrex::MultiFab const *mf_pm, amrex::MultiFab const *mf_pn, amrex::MultiFab const *mf_mskr, amrex::MultiFab const *mf_msku, amrex::MultiFab const *mf_mskv, const int N, const amrex::Real dt_lev)
 Advance the 3D variables.
 
void bulk_fluxes (int lev, amrex::MultiFab *mf_cons, amrex::MultiFab *mf_uwind, amrex::MultiFab *mf_vwind, amrex::MultiFab *mf_evap, amrex::MultiFab *mf_sustr, amrex::MultiFab *mf_svstr, amrex::MultiFab *mf_stflux, amrex::MultiFab *mf_lrflx, amrex::MultiFab *mf_lhflx, amrex::MultiFab *mf_shflx, const int N)
 Calculate bulk temperature, salinity, wind fluxes.
 
void prestep (int lev, amrex::MultiFab &mf_uold, amrex::MultiFab &mf_vold, amrex::MultiFab &mf_u, amrex::MultiFab &mf_v, amrex::MultiFab *mf_ru, amrex::MultiFab *mf_rv, amrex::MultiFab &S_old, amrex::MultiFab &S_new, amrex::MultiFab &mf_W, amrex::MultiFab &mf_DC, const amrex::MultiFab *mf_z_r, const amrex::MultiFab *mf_z_w, const amrex::MultiFab *mf_h, const amrex::MultiFab *mf_pm, const amrex::MultiFab *mf_pn, const amrex::MultiFab *mf_sustr, const amrex::MultiFab *mf_svstr, const amrex::MultiFab *mf_bustr, const amrex::MultiFab *mf_bvstr, const amrex::MultiFab *mf_msku, const amrex::MultiFab *mf_mskv, const int iic, const int nfirst, const int nnew, int nstp, int nrhs, int N, const amrex::Real dt_lev)
 Wrapper function for prestep.
 
void prestep_t_advection (const amrex::Box &tbx, const amrex::Box &gbx, const amrex::Array4< amrex::Real > &tempold, const amrex::Array4< amrex::Real > &tempcache, const amrex::Array4< amrex::Real > &Hz, const amrex::Array4< amrex::Real > &Huon, const amrex::Array4< amrex::Real > &Hvom, const amrex::Array4< amrex::Real > &W, const amrex::Array4< amrex::Real > &DC, const amrex::Array4< amrex::Real > &FC, const amrex::Array4< amrex::Real > &sstore, const amrex::Array4< amrex::Real const > &z_w, const amrex::Array4< amrex::Real const > &h, const amrex::Array4< amrex::Real const > &pm, const amrex::Array4< amrex::Real const > &pn, const amrex::Array4< amrex::Real const > &msku, const amrex::Array4< amrex::Real const > &mskv, const amrex::Array4< int const > &river_pos, const amrex::Array4< amrex::Real const > &river_source, int iic, int ntfirst, int nrhs, int N, const amrex::Real dt_lev)
 Prestep advection calculations for the tracers.
 
void rhs_t_3d (const amrex::Box &bx, const amrex::Array4< amrex::Real > &t, const amrex::Array4< amrex::Real const > &tempstore, const amrex::Array4< amrex::Real const > &Huon, const amrex::Array4< amrex::Real const > &Hvom, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &pn, const amrex::Array4< amrex::Real const > &pm, const amrex::Array4< amrex::Real const > &W, const amrex::Array4< amrex::Real > &FC, const amrex::Array4< amrex::Real const > &mskr, const amrex::Array4< amrex::Real const > &msku, const amrex::Array4< amrex::Real const > &mskv, const amrex::Array4< int const > &river_pos, const amrex::Array4< amrex::Real const > &river_source, int nrhs, int nnew, int N, const amrex::Real dt_lev)
 RHS terms for tracer.
 
void rhs_uv_3d (const amrex::Box &xbx, const amrex::Box &ybx, const amrex::Array4< amrex::Real const > &uold, const amrex::Array4< amrex::Real const > &vold, const amrex::Array4< amrex::Real > &ru, const amrex::Array4< amrex::Real > &rv, const amrex::Array4< amrex::Real > &rufrc, const amrex::Array4< amrex::Real > &rvfrc, const amrex::Array4< amrex::Real const > &sustr, const amrex::Array4< amrex::Real const > &svstr, const amrex::Array4< amrex::Real const > &bustr, const amrex::Array4< amrex::Real const > &bvstr, const amrex::Array4< amrex::Real const > &Huon, const amrex::Array4< amrex::Real const > &Hvom, const amrex::Array4< amrex::Real const > &pm, const amrex::Array4< amrex::Real const > &pn, const amrex::Array4< amrex::Real const > &W, const amrex::Array4< amrex::Real > &FC, int nrhs, int N)
 RHS terms for 3D momentum.
 
void rhs_uv_2d (const amrex::Box &xbx, const amrex::Box &ybx, const amrex::Array4< amrex::Real const > &uold, const amrex::Array4< amrex::Real const > &vold, const amrex::Array4< amrex::Real > &ru, const amrex::Array4< amrex::Real > &rv, const amrex::Array4< amrex::Real const > &Duon, const amrex::Array4< amrex::Real const > &Dvom, const int nrhs)
 RHS terms for 2D momentum.
 
void rho_eos (const amrex::Box &bx, const amrex::Array4< amrex::Real const > &state, const amrex::Array4< amrex::Real > &rho, const amrex::Array4< amrex::Real > &rhoA, const amrex::Array4< amrex::Real > &rhoS, const amrex::Array4< amrex::Real > &bvf, const amrex::Array4< amrex::Real > &alpha, const amrex::Array4< amrex::Real > &beta, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &z_w, const amrex::Array4< amrex::Real const > &z_r, const amrex::Array4< amrex::Real const > &h, const amrex::Array4< amrex::Real const > &mskr, const int N)
 Wrapper around equation of state calculation.
 
void lin_eos (const amrex::Box &bx, const amrex::Array4< amrex::Real const > &state, const amrex::Array4< amrex::Real > &rho, const amrex::Array4< amrex::Real > &rhoA, const amrex::Array4< amrex::Real > &rhoS, const amrex::Array4< amrex::Real > &bvf, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &z_w, const amrex::Array4< amrex::Real const > &z_r, const amrex::Array4< amrex::Real const > &h, const amrex::Array4< amrex::Real const > &mskr, const int N)
 Calculate density and related quantities from linear equation of state.
 
void nonlin_eos (const amrex::Box &bx, const amrex::Array4< amrex::Real const > &state, const amrex::Array4< amrex::Real > &rho, const amrex::Array4< amrex::Real > &rhoA, const amrex::Array4< amrex::Real > &rhoS, const amrex::Array4< amrex::Real > &bvf, const amrex::Array4< amrex::Real > &alpha, const amrex::Array4< amrex::Real > &beta, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &z_w, const amrex::Array4< amrex::Real const > &z_r, const amrex::Array4< amrex::Real const > &h, const amrex::Array4< amrex::Real const > &mskr, const int N)
 Calculate density and related quantities from nonlinear equation of state.
 
void prsgrd (const amrex::Box &bx, const amrex::Box &gbx, const amrex::Box &utbx, const amrex::Box &vtbx, const amrex::Array4< amrex::Real > &ru, const amrex::Array4< amrex::Real > &rv, const amrex::Array4< amrex::Real const > &pn, const amrex::Array4< amrex::Real const > &pm, const amrex::Array4< amrex::Real const > &rho, const amrex::Array4< amrex::Real > &FC, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &z_r, const amrex::Array4< amrex::Real const > &z_w, const amrex::Array4< amrex::Real const > &msku, const amrex::Array4< amrex::Real const > &mskv, const int nrhs, const int N)
 Calculate pressure gradient.
 
void prestep_diffusion (const amrex::Box &bx, const amrex::Box &gbx, const int ioff, const int joff, const amrex::Array4< amrex::Real > &vel, const amrex::Array4< amrex::Real const > &vel_old, const amrex::Array4< amrex::Real > &rvel, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &Akv, const amrex::Array4< amrex::Real > &DC, const amrex::Array4< amrex::Real > &FC, const amrex::Array4< amrex::Real const > &sstr, const amrex::Array4< amrex::Real const > &bstr, const amrex::Array4< amrex::Real const > &z_r, const amrex::Array4< amrex::Real const > &pm, const amrex::Array4< amrex::Real const > &pn, const int iic, const int ntfirst, const int nnew, int nstp, int nrhs, int N, const amrex::Real lambda, const amrex::Real dt_lev)
 Update velocities or tracers with diffusion/viscosity as the last part of the prestep.
 
void vert_visc_3d (const amrex::Box &bx, const int ioff, const int joff, const amrex::Array4< amrex::Real > &phi, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real > &Hzk, const amrex::Array4< amrex::Real > &AK, const amrex::Array4< amrex::Real const > &Akv, const amrex::Array4< amrex::Real > &BC, const amrex::Array4< amrex::Real > &DC, const amrex::Array4< amrex::Real > &FC, const amrex::Array4< amrex::Real > &CF, const int nnew, const int N, const amrex::Real dt_lev)
 Calculate effects of vertical viscosity or diffusivity.
 
void update_massflux_3d (const amrex::Box &bx, const int ioff, const int joff, const amrex::Array4< amrex::Real > &phi, const amrex::Array4< amrex::Real > &phibar, const amrex::Array4< amrex::Real > &Hphi, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &pm_or_pn, const amrex::Array4< amrex::Real const > &Dphi1, const amrex::Array4< amrex::Real const > &Dphi2, const amrex::Array4< amrex::Real > &DC, const amrex::Array4< amrex::Real > &FC, const amrex::Array4< amrex::Real const > &msk, const int nnew)
 Correct mass flux.
 
void vert_mean_3d (const amrex::Box &bx, const int ioff, const int joff, const amrex::Array4< amrex::Real > &phi, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &Dphi_avg1, const amrex::Array4< amrex::Real > &DC, const amrex::Array4< amrex::Real > &CF, const amrex::Array4< amrex::Real const > &pm_or_pn, const amrex::Array4< amrex::Real const > &msk, const int nnew, const int N)
 Adjust 3D momentum variables based on vertical mean momentum.
 
void uv3dmix (const amrex::Box &xbx, const amrex::Box &ybx, const amrex::Array4< amrex::Real > &u, const amrex::Array4< amrex::Real > &v, const amrex::Array4< amrex::Real const > &uold, const amrex::Array4< amrex::Real const > &vold, const amrex::Array4< amrex::Real > &rufrc, const amrex::Array4< amrex::Real > &rvfrc, const amrex::Array4< amrex::Real const > &visc2_p, const amrex::Array4< amrex::Real const > &visc2_r, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &pm, const amrex::Array4< amrex::Real const > &pn, const amrex::Array4< amrex::Real const > &mskp, int nrhs, int nnew, const amrex::Real dt_lev)
 Harmonic viscosity.
 
void t3dmix (const amrex::Box &bx, const amrex::Array4< amrex::Real > &state, const amrex::Array4< amrex::Real > &state_rhs, const amrex::Array4< amrex::Real const > &diff2, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &pm, const amrex::Array4< amrex::Real const > &pn, const amrex::Array4< amrex::Real const > &msku, const amrex::Array4< amrex::Real const > &mskv, const amrex::Real dt_lev, const int ncomp)
 Harmonic diffusivity for tracers.
 
void coriolis (const amrex::Box &xbx, const amrex::Box &ybx, const amrex::Array4< amrex::Real const > &uold, const amrex::Array4< amrex::Real const > &vold, const amrex::Array4< amrex::Real > &ru, const amrex::Array4< amrex::Real > &rv, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &fomn, int nrhs, int nr)
 Calculate Coriolis terms.
 
void apply_clim_nudg (const amrex::Box &bx, int ioff, int joff, const amrex::Array4< amrex::Real > &var, const amrex::Array4< amrex::Real const > &var_old, const amrex::Array4< amrex::Real const > &var_clim, const amrex::Array4< amrex::Real const > &clim_coeff, const amrex::Array4< amrex::Real const > &Hz, const amrex::Array4< amrex::Real const > &pm, const amrex::Array4< amrex::Real const > &pn, const amrex::Real dt_lev=amrex::Real(0.0))
 Apply climatology nudging.
 
void set_2darrays (int lev)
 Set 2D momentum arrays from 3D momentum.
 
void set_zeta_average (int lev)
 Set Zt_avg1 to zeta.
 
void set_zeta (int lev)
 Initialize zeta from file or analytic.
 
void set_bathymetry (int lev)
 Initialize bathymetry from file or analytic.
 
void set_coriolis (int lev)
 Initialize Coriolis factor from file or analytic.
 
void stretch_transform (int lev)
 Calculate vertical stretched coordinates.
 
void init_set_vmix (int lev)
 Initialize vertical mixing coefficients from file or analytic.
 
void set_analytic_vmix (int lev)
 Set vertical mixing coefficients from analytic.
 
void init_gls_vmix (int lev, SolverChoice solver_choice)
 Initialize GLS variables.
 
void gls_prestep (int lev, amrex::MultiFab *mf_gls, amrex::MultiFab *mf_tke, amrex::MultiFab &mf_W, amrex::MultiFab *mf_msku, amrex::MultiFab *mf_mskv, const int nstp, const int nnew, const int iic, const int ntfirst, const int N, const amrex::Real dt_lev)
 Prestep for GLS calculation.
 
void gls_corrector (int lev, amrex::MultiFab *mf_gls, amrex::MultiFab *mf_tke, amrex::MultiFab &mf_W, amrex::MultiFab *mf_Akv, amrex::MultiFab *mf_Akt, amrex::MultiFab *mf_Akk, amrex::MultiFab *mf_Akp, amrex::MultiFab *mf_mskr, amrex::MultiFab *mf_msku, amrex::MultiFab *mf_mskv, const int nstp, const int nnew, const int N, const amrex::Real dt_lev)
 Corrector step for GLS calculation.
 
void scale_rhs_vars ()
 Scale RHS momentum variables by 1/cell area, needed before FillPatch to different levels.
 
void scale_rhs_vars_inv ()
 Scale RHS momentum variables by cell area, needed after FillPatch to different levels.
 
void set_smflux (int lev)
 Initialize or calculate surface momentum flux from file or analytic.
 
void set_wind (int lev)
 Initialize or calculate wind speed from file or analytic.
 
void set_hmixcoef (int lev)
 Initialize horizontal mixing coefficients.
 
void set_drag (int lev)
 Initialize or calculate bottom drag.
 
void set_weights (int lev)
 Set weights for averaging 3D variables to 2D.
 
void FillBdyCCVels (int lev, amrex::MultiFab &mf_cc_vel)
 Fill the physical boundary conditions for cell-centered velocity (diagnostic only)
 
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.
 
void FillPatchNoBC (int lev, amrex::Real time, amrex::MultiFab &mf_to_be_filled, amrex::Vector< amrex::MultiFab * > const &mfs, const int bdy_var_type=BdyVars::null, const int icomp=0, const bool fill_all=true, const bool fill_set=true)
 Fill a new MultiFab by copying in phi from valid region and filling ghost cells without applying boundary conditions.
 
void fill_from_bdyfiles (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.
 
void init_beta_plane_coriolis (int lev)
 Calculate Coriolis parameters from beta plane parametrization.
 
void init_data_from_netcdf (int lev)
 Problem initialization from NetCDF file.
 
void init_bdry_from_netcdf ()
 Boundary data initialization from NetCDF file.
 
void init_masks_from_netcdf (int lev)
 Mask data initialization from NetCDF file.
 
void init_bathymetry_from_netcdf (int lev)
 Bathymetry data initialization from NetCDF file.
 
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 init_clim_nudg_coeff_from_netcdf (int lev)
 Climatology nudging coefficient initialization from NetCDF file.
 
void init_clim_nudg_coeff (int lev)
 Wrapper to initialize climatology nudging coefficient.
 
void init_riv_pos_from_netcdf (int lev)
 
void convert_inv_days_to_inv_s (amrex::MultiFab *)
 Convert data in a multifab from inverse days to inverse seconds.
 
void mask_arrays_for_write (int lev, amrex::Real fill_value, amrex::Real fill_where)
 Mask data arrays before writing output.
 
void writeJobInfo (const std::string &dir) const
 Write job info to stdout.
 
amrex::Real get_t_old (int lev) const
 Accessor method for t_old to expose to outside classes.
 

Static Public Member Functions

static void writeBuildInfo (std::ostream &os)
 Write build info to os.
 
static void print_banner (MPI_Comm, std::ostream &)
 
static void print_usage (MPI_Comm, std::ostream &)
 
static void print_error (MPI_Comm, const std::string &msg)
 
static void print_summary (std::ostream &)
 
static void print_tpls (std::ostream &)
 
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real bulk_psiu (amrex::Real ZoL)
 Evaluate stability function psi for wind speed.
 
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real bulk_psit (amrex::Real ZoL)
 Evaluate stability function psi for moisture and heat.
 

Public Attributes

std::string pp_prefix {"remora"}
 default prefix for input file parameters
 
amrex::Vector< amrex::MultiFab * > cons_old
 multilevel data container for last step's scalar data: temperature, salinity, passive scalar

 
amrex::Vector< amrex::MultiFab * > xvel_old
 multilevel data container for last step's x velocities (u in ROMS)
 
amrex::Vector< amrex::MultiFab * > yvel_old
 multilevel data container for last step's y velocities (v in ROMS)
 
amrex::Vector< amrex::MultiFab * > zvel_old
 multilevel data container for last step's z velocities (largely unused; W stored separately)
 
amrex::Vector< amrex::MultiFab * > cons_new
 multilevel data container for current step's scalar data: temperature, salinity, passive scalar

 
amrex::Vector< amrex::MultiFab * > xvel_new
 multilevel data container for current step's x velocities (u in ROMS)
 
amrex::Vector< amrex::MultiFab * > yvel_new
 multilevel data container for current step's y velocities (v in ROMS)
 
amrex::Vector< amrex::MultiFab * > zvel_new
 multilevel data container for current step's z velocities (largely unused; W stored separately)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_hOfTheConfusingName
 Bathymetry data (2D, positive valued, h in ROMS)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Hz
 Width of cells in the vertical (z-) direction (3D, Hz in ROMS)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Huon
 u-volume flux (3D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Hvom
 v-volume flux (3D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_ru
 u velocity RHS (3D, includes horizontal and vertical advection)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rv
 v velocity RHS (3D, includes horizontal and vertical advection)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_ru2d
 u velocity RHS (2D, includes horizontal and vertical advection)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rv2d
 v velocity RHS (2D, includes horizontal and vertical advection)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rufrc
 u velocity RHS, integrated, including advection and bottom/surface stresses (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rvfrc
 v velocity RHS, integrated, including advection and bottom/surface stresses (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akv
 Vertical viscosity coefficient (3D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akt
 Vertical diffusion coefficient (3D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_visc2_p
 Harmonic viscosity defined on the psi points (corners of horizontal grid cells)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_visc2_r
 Harmonic viscosity defined on the rho points (centers)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_diff2
 Harmonic diffusivity for temperature / salinity.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_z_r
 z coordinates at rho points (cell centers)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_z_w
 z coordinates at w points (faces between z-cells)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_s_r
 Scaled vertical coordinate (range [0,1]) that transforms to z, defined at rho points (cell centers)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_s_w
 Scaled vertical coordinate (range [0,1]) that transforms to z, defined at w-points (cell faces)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Cs_r
 Stretching coefficients at rho points.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Cs_w
 Stretching coefficients at w points.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_z_phys_nd
 z coordinates at psi points (cell nodes)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Zt_avg1
 Average of the free surface, zeta (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_sustr
 Surface stress in the u direction.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_svstr
 Surface stress in the v direction.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_uwind
 Wind in the u direction, defined at rho-points.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_vwind
 Wind in the v direction, defined at rho-points.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_lrflx
 longwave radiation
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_lhflx
 latent heat flux
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_shflx
 sensible heat flux
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_stflx
 Surface tracer flux; working arrays.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_stflux
 Surface tracer flux; input arrays.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_btflx
 Bottom tracer flux; working arrays.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_btflux
 Bottom tracer flux; input arrays.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rain
 precipitation rate [kg/m^2/s]
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_evap
 evaporation rate [kg/m^2/s]
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rdrag
 Linear drag coefficient [m/s], defined at rho points.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rdrag2
 Quadratic drag coefficient [unitless], defined at rho points.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_ZoBot
 Bottom roughness length [m], defined at rho points.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_bustr
 Bottom stress in the u direction.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_bvstr
 Bottom stress in the v direction.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_DU_avg1
 time average of barotropic x velocity flux (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_DU_avg2
 correct time average of barotropic x velocity flux for coupling (2D)
 
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_DV_avg2
 correct time average of barotropic y velocity flux for coupling (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rubar
 barotropic x velocity for the RHS (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rvbar
 barotropic y velocity for the RHS (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rzeta
 free surface height for the RHS (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_ubar
 barotropic x velocity (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_vbar
 barotropic y velocity (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_zeta
 free surface height (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskr
 land/sea mask at cell centers (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_msku
 land/sea mask at x-faces (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskv
 land/sea mask at y-faces (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_mskp
 land/sea mask at cell corners (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pm
 horizontal scaling factor: 1 / dx (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_pn
 horizontal scaling factor: 1 / dy (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_fcor
 coriolis factor (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_xr
 x_grid on rho points (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yr
 y_grid on rho points (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_xu
 x_grid on u-points (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yu
 y_grid on u-points (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_xv
 x_grid on v-points (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yv
 y_grid on v-points (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_xp
 x_grid on psi-points (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_yp
 y_grid on psi-points (2D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_sstore
 additional scratch space for calculations on temp, salt, etc
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rhoS
 density perturbation
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_rhoA
 vertically-averaged density
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_bvf
 Brunt-Vaisala frequency (3D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_alpha
 Thermal expansion coefficient (3D)
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_beta
 Saline contraction coefficient (3D)
 
amrex::Vector< amrex::Real > vec_weight1
 Weights for calculating avg1 in 2D advance.
 
amrex::Vector< amrex::Real > vec_weight2
 Weights for calculating avg2 in 2D advance.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_tke
 Turbulent kinetic energy.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_gls
 Turbulent generic length scale.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Lscale
 Vertical mixing turbulent length scale.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akk
 Turbulent kinetic energy vertical diffusion coefficient.
 
amrex::Vector< std::unique_ptr< amrex::MultiFab > > vec_Akp
 Turbulent length scale vertical diffusion coefficient.
 
amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > vec_nudg_coeff
 Climatology nudging coefficients.
 

Static Public Attributes

static int total_nc_plot_file_step = 1
 

Private Member Functions

void ReadParameters ()
 read in some parameters from inputs file
 
void AverageDown ()
 set covered coarse cells to be the average of overlying fine cells
 
void init_bcs ()
 Read in boundary parameters from input file and set up data structures.
 
void init_analytic (int lev)
 Initialize initial problem data from analytic functions.
 
void init_stuff (int lev, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm)
 Allocate MultiFabs for state and evolution variables.
 
void init_masks (int lev, const amrex::BoxArray &ba, const amrex::DistributionMapping &dm)
 Allocate MultiFabs for masks.
 
void resize_stuff (int lev)
 Resize variable containers to accommodate data on levels 0 to max_lev.
 
void AverageDownTo (int crse_lev)
 more flexible version of AverageDown() that lets you average down across multiple levels
 
void Construct_REMORAFillPatchers (int lev)
 Construct FillPatchers.
 
void Define_REMORAFillPatchers (int lev)
 Define FillPatchers.
 
void FillCoarsePatch (int lev, amrex::Real time, amrex::MultiFab *mf_fine, amrex::MultiFab *mf_crse, const int icomp=0, const bool fill_all=true)
 fill an entire multifab by interpolating from the coarser level
 
TimeInterpolatedData GetDataAtTime (int lev, amrex::Real time)
 utility to copy in data from old and/or new state into another multifab
 
void timeStep (int lev, amrex::Real time, int iteration)
 advance a level by dt, includes a recursive call for finer levels
 
void timeStepML (amrex::Real time, int iteration)
 advance all levels by dt, loops over finer levels
 
void ComputeDt ()
 a wrapper for estTimeStep()
 
std::string PlotFileName (int lev) const
 get plotfile name
 
void setPlotVariables (const std::string &pp_plot_var_names)
 
void appendPlotVariables (const std::string &pp_plot_var_names)
 
void WriteNCPlotFile (int istep)
 Write plotfile using NetCDF (wrapper)
 
void WriteNCPlotFile_which (int lev, int which_subdomain, bool write_header, ncutils::NCFile &ncf, bool is_history)
 Write a particular NetCDF plotfile.
 
void WriteNCMultiFab (const amrex::FabArray< amrex::FArrayBox > &fab, const std::string &name, bool set_ghost=false) const
 Write MultiFab in NetCDF format.
 
void ReadNCMultiFab (amrex::FabArray< amrex::FArrayBox > &fab, const std::string &name, int coordinatorProc=amrex::ParallelDescriptor::IOProcessorNumber(), int allow_empty_mf=0)
 Read MultiFab in NetCDF format.
 
void WriteCheckpointFile ()
 write checkpoint file to disk
 
void ReadCheckpointFile ()
 read checkpoint file from disk
 
void InitializeFromFile ()
 Read the file passed to remora.restart and use it as an initial condition for the current simulation.
 
void InitializeLevelFromData (int lev, const amrex::MultiFab &initial_data)
 Initialize the new-time data at a level from the initial_data MultiFab.
 
void refinement_criteria_setup ()
 Set refinement criteria.
 
AMREX_FORCE_INLINE int ComputeGhostCells (const int &spatial_order)
 Helper function to determine number of ghost cells.
 
AMREX_FORCE_INLINE amrex::YAFluxRegister * getAdvFluxReg (int lev)
 Get flux register.
 
AMREX_FORCE_INLINE std::ostream & DataLog (int i)
 Helper function for IO stream.
 
AMREX_FORCE_INLINE int NumDataLogs () noexcept
 
amrex::Real getCPUTime () const
 Get CPU time used.
 
void setRecordDataInfo (int i, const std::string &filename)
 
const std::string DataLogName (int i) const noexcept
 The filename of the ith datalog file.
 

Static Private Member Functions

static void GotoNextLine (std::istream &is)
 utility to skip to next line in Header
 

Private Attributes

amrex::Vector< amrex::Vector< amrex::FArrayBox > > bdy_data_xlo
 Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Western boundary data from file.
 
amrex::Vector< amrex::Vector< amrex::FArrayBox > > bdy_data_xhi
 Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Eastern boundary data from file.
 
amrex::Vector< amrex::Vector< amrex::FArrayBox > > bdy_data_ylo
 Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Southern boundary data from file.
 
amrex::Vector< amrex::Vector< amrex::FArrayBox > > bdy_data_yhi
 Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Northern boundary data from file.
 
amrex::Real start_bdy_time
 Start time in the time series of boundary data.
 
amrex::Real bdy_time_interval
 Interval between boundary data times.
 
NCTimeSeriessustr_data_from_file
 Data container for u-component surface momentum flux read from file.
 
NCTimeSeriessvstr_data_from_file
 Data container for v-component surface momentum flux read from file.
 
NCTimeSeriesUwind_data_from_file
 Data container for u-direction wind read from file.
 
NCTimeSeriesVwind_data_from_file
 Data container for v-direction wind read from file.
 
NCTimeSeriesubar_clim_data_from_file
 Data container for ubar climatology data read from file.
 
NCTimeSeriesvbar_clim_data_from_file
 Data container for vbar climatology data read from file.
 
NCTimeSeriesu_clim_data_from_file
 Data container for u-velocity climatology data read from file.
 
NCTimeSeriesv_clim_data_from_file
 Data container for v-velocity climatology data read from file.
 
NCTimeSeriestemp_clim_data_from_file
 Data container for temperature climatology data read from file.
 
NCTimeSeriessalt_clim_data_from_file
 Data container for salinity climatology data read from file.
 
amrex::Vector< NCTimeSeriesRiver * > river_source_cons
 Vector of data containers for scalar data in rivers.
 
NCTimeSeriesRiverriver_source_transport
 Data container for momentum transport in rivers.
 
NCTimeSeriesRiverriver_source_transportbar
 Data container for vertically integrated momentum transport in rivers.
 
amrex::Vector< std::unique_ptr< amrex::iMultiFab > > vec_river_position
 iMultiFab for river positions; contents are indices of rivers
 
amrex::Gpu::DeviceVector< int > river_direction
 Vector over rivers of river direction: 0: u-face; 1: v-face; 2: w-face.
 
int cf_width {0}
 Nudging width at coarse-fine interface.
 
int cf_set_width {0}
 Width for fixing values at coarse-fine interface.
 
amrex::Vector< REMORAFillPatcherFPr_c
 Vector over levels of FillPatchers for scalars.
 
amrex::Vector< REMORAFillPatcherFPr_u
 Vector over levels of FillPatchers for u (3D)
 
amrex::Vector< REMORAFillPatcherFPr_v
 Vector over levels of FillPatchers for v (3D)
 
amrex::Vector< REMORAFillPatcherFPr_w
 Vector over levels of FillPatchers for w.
 
amrex::Vector< REMORAFillPatcherFPr_ubar
 Vector over levels of FillPatchers for ubar (2D)
 
amrex::Vector< REMORAFillPatcherFPr_vbar
 Vector over levels of FillPatchers for vbar (2D)
 
std::unique_ptr< ProblemBaseprob = nullptr
 Pointer to container of analytical functions for problem definition.
 
amrex::Vector< int > num_boxes_at_level
 how many boxes specified at each level by tagging criteria
 
amrex::Vector< int > num_files_at_level
 how many netcdf input files specified at each level
 
amrex::Vector< amrex::Vector< amrex::Box > > boxes_at_level
 the boxes specified at each level by tagging criteria
 
amrex::Vector< int > istep
 which step?
 
amrex::Vector< int > nsubsteps
 How many substeps on each level?
 
amrex::Vector< amrex::Real > t_new
 new time at each level
 
amrex::Vector< amrex::Real > t_old
 old time at each level
 
amrex::Vector< amrex::Real > dt
 time step at each level
 
bool set_bcs_by_var
 whether to set boundary conditions by variable rather than just by side
 
amrex::Vector< std::unique_ptr< REMORAPhysBCFunct > > physbcs
 Vector (over level) of functors to apply physical boundary conditions.
 
amrex::Vector< amrex::YAFluxRegister * > advflux_reg
 array of flux registers for refluxing in multilevel
 
amrex::Vector< amrex::BCRec > domain_bcs_type
 vector (over BCVars) of BCRecs
 
amrex::Gpu::DeviceVector< amrex::BCRec > domain_bcs_type_d
 GPU vector (over BCVars) of BCRecs.
 
amrex::Array< std::string, 2 *AMREX_SPACEDIM > domain_bc_type
 Array of strings describing domain boundary conditions.
 
amrex::Array< amrex::Array< amrex::Real, AMREX_SPACEDIM *2 >, AMREX_SPACEDIM+NCONS+8 > m_bc_extdir_vals
 Array holding the Dirichlet values at walls which need them.
 
amrex::GpuArray< amrex::GpuArray< REMORA_BC, AMREX_SPACEDIM *2 >, BCVars::NumTypesphys_bc_type
 Array holding the "physical" boundary condition types (e.g. "inflow")
 
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< int > bdy_index
 Container to connect boundary data being read in boundary condition containers.
 
int last_plot_file_step
 Step when we last output a plotfile.
 
amrex::Real last_plot_file_time
 Simulation time when we last output a plotfile.
 
int last_check_file_step
 Step when we last output a checkpoint file.
 
amrex::Real last_check_file_time
 Simulation time when we last output a checkpoint file.
 
int plot_file_on_restart = 1
 Whether to output a plotfile on restart from checkpoint.
 
int max_step = std::numeric_limits<int>::max()
 maximum number of steps
 
amrex::Real stop_time = std::numeric_limits<amrex::Real>::max()
 Time to stop.
 
amrex::Real start_time = 0.0
 Time of the start of the simulation, in seconds.
 
std::string restart_chkfile = ""
 If set, restart from this checkpoint file.
 
int nfast
 Number of fast steps to take.
 
int do_substep = 0
 Whether to substep fine levels in time.
 
int regrid_int = 2
 how often each level regrids the higher levels of refinement (after a level advances that many time steps)
 
std::string plot_file_name {"plt_"}
 Plotfile prefix.
 
int plot_int = -1
 Plotfile output interval in iterations.
 
amrex::Real plot_int_time = amrex::Real(-1.0)
 Plotfile output interval in seconds.
 
std::string check_file {"chk"}
 Checkpoint file prefix.
 
int check_int = -1
 Checkpoint output interval in iterations.
 
amrex::Real check_int_time = amrex::Real(-1.0)
 Checkpoint output interval in seconds.
 
bool chunk_history_file = false
 Whether to chunk netcdf history file.
 
int steps_per_history_file = -1
 Number of time steps per netcdf history file.
 
int history_count = 0
 Counter for which time index we are writing to in the netcdf history file.
 
amrex::Vector< std::string > plot_var_names
 Names of variables to output to AMReX plotfile.
 
const amrex::Vector< std::string > cons_names {"temp", "salt", "scalar"}
 Names of scalars for plotfile output.
 
const amrex::Vector< std::string > derived_names {"vorticity"}
 Names of derived fields for plotfiles.
 
std::string nc_frc_file
 NetCDF forcing file.
 
std::string nc_riv_file
 
std::string nc_clim_his_file
 NetCDF climatology history file.
 
std::string nc_clim_coeff_file
 NetCDF climatology coefficient file.
 
std::string bdry_time_varname = "ocean_time"
 Name of time field for boundary data.
 
std::string clim_ubar_time_varname = "ocean_time"
 Name of time field for ubar climatology data.
 
std::string clim_vbar_time_varname = "ocean_time"
 Name of time field for vbar climatology data.
 
std::string clim_u_time_varname = "ocean_time"
 Name of time field for u climatology data.
 
std::string clim_v_time_varname = "ocean_time"
 Name of time field for v climatology data.
 
std::string clim_salt_time_varname = "ocean_time"
 Name of time field for salinity climatology data.
 
std::string clim_temp_time_varname = "ocean_time"
 Name of time field for temperature climatology data.
 
std::string riv_time_varname = "river_time"
 Name of time field for river time.
 
std::string frc_time_varname = ""
 Name of time field for forcing data.
 
amrex::MultiFab fine_mask
 Mask that zeroes out values on a coarse level underlying grids on the next finest level.
 
amrex::Vector< std::unique_ptr< std::fstream > > datalog
 
amrex::Vector< std::string > datalogname
 

Static Private Attributes

static bool write_history_file = true
 Whether to output NetCDF files as a single history file with several time steps.
 
static amrex::Real cfl = 0.8_rt
 CFL condition.
 
static amrex::Real change_max = 1.1_rt
 Fraction maximum change in subsequent time steps.
 
static amrex::Real fixed_dt = -1.0_rt
 User specified fixed baroclinic time step.
 
static amrex::Real fixed_fast_dt = -1.0_rt
 User specified fixed barotropic time step.
 
static int fixed_ndtfast_ratio = 0
 User specified, number of barotropic steps per baroclinic step.
 
static SolverChoice solverChoice
 Container for algorithmic choices.
 
static int verbose = 0
 Verbosity level of output.
 
static int sum_interval = -1
 Diagnostic sum output interval in number of steps.
 
static amrex::Real sum_per = -1.0_rt
 Diagnostic sum output interval in time.
 
static int file_min_digits = 5
 Minimum number of digits in plotfile name or chunked history file.
 
static PlotfileType plotfile_type = PlotfileType::amrex
 Native or NetCDF plotfile output.
 
static amrex::Vector< amrex::Vector< std::string > > nc_init_file = {{""}}
 NetCDF initialization file.
 
static amrex::Vector< amrex::Vector< std::string > > nc_grid_file = {{""}}
 NetCDF grid file.
 
static amrex::Vector< std::string > nc_bdry_file = {""}
 NetCDF boundary data.
 
static amrex::Vector< amrex::AMRErrorTag > ref_tags
 Holds info for dynamically generated tagging criteria.
 
static amrex::Real startCPUTime = 0.0_rt
 Variable for CPU timing.
 
static amrex::Real previousCPUTimeUsed = 0.0_rt
 Accumulator variable for CPU time used thusfar.
 

Detailed Description

Class that stores all relevant simulation state data with methods for time stepping.

Definition at line 86 of file REMORA.H.

Constructor & Destructor Documentation

◆ REMORA()

REMORA::REMORA ( )

constructor:

  • reads in parameters from inputs file
  • sizes multilevel arrays and data structures
  • initializes BCRec boundary condition object

Definition at line 61 of file REMORA.cpp.

Here is the call graph for this function:

◆ ~REMORA()

REMORA::~REMORA ( )
virtual

Definition at line 135 of file REMORA.cpp.

Member Function Documentation

◆ Advance()

void REMORA::Advance ( int  lev,
amrex::Real  time,
amrex::Real  dt_lev,
int  iteration,
int  ncycle 
)

advance a single level for a single time step

Parameters
[in]levlevel of refinement
[in]timesimulation time at start of step
[in]dt_levbaroclinic time step at level
[in]iterationiteration in subcycling, if using
[in]ncycletotal number of subcycles, if using

Definition at line 17 of file REMORA_Advance.cpp.

Referenced by timeStep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ advance_2d()

void REMORA::advance_2d ( int  lev,
amrex::MultiFab const *  mf_rhoS,
amrex::MultiFab const *  mf_rhoA,
amrex::MultiFab *  mf_ru2d,
amrex::MultiFab *  mf_rv2d,
amrex::MultiFab *  mf_rufrc,
amrex::MultiFab *  mf_rvfrc,
amrex::MultiFab *  mf_Zt_avg1,
std::unique_ptr< amrex::MultiFab > &  mf_DU_avg1,
std::unique_ptr< amrex::MultiFab > &  mf_DU_avg2,
std::unique_ptr< amrex::MultiFab > &  mf_DV_avg1,
std::unique_ptr< amrex::MultiFab > &  mf_DV_avg2,
std::unique_ptr< amrex::MultiFab > &  mf_rubar,
std::unique_ptr< amrex::MultiFab > &  mf_rvbar,
std::unique_ptr< amrex::MultiFab > &  mf_rzeta,
std::unique_ptr< amrex::MultiFab > &  mf_ubar,
std::unique_ptr< amrex::MultiFab > &  mf_vbar,
amrex::MultiFab *  mf_zeta,
amrex::MultiFab const *  mf_h,
amrex::MultiFab const *  mf_pm,
amrex::MultiFab const *  mf_pn,
amrex::MultiFab const *  mf_fcor,
amrex::MultiFab const *  mf_visc2_p,
amrex::MultiFab const *  mf_visc2_r,
amrex::MultiFab const *  mf_mskr,
amrex::MultiFab const *  mf_msku,
amrex::MultiFab const *  mf_mskv,
amrex::MultiFab const *  mf_mskp,
amrex::Real  dtfast_lev,
bool  predictor_2d_step,
bool  first_2d_step,
int  my_iif,
int &  next_indx1 
)

Perform a 2D predictor (predictor_2d_step=True) or corrector (predictor_2d_step=False) step.

Nonlinear shallow-water rpimitive equations predictor (Leap-frog) and corrector (Adams-Moulton) time-stepping engine. Corresponds to Nonlinear/step2d_LF_AM3.h in ROMS.

Parameters
[in]levlevel of refinement (coarsest level is 0)
[in]mf_rhoSdensity perturbation
[in]mf_rhoAvertically-averaged density
[in,out]mf_ru2dRHS contributions to 2D u-momentum
[in,out]mf_rv2dRHS contribtuions to 2D v-momentum
[in,out]mf_rufrcbefore first predictor, vertical integral of 3D RHS for uvel, converted to forcing terms
[in,out]mf_rvfrcbefore first predictor, vertical integral of 3D RHS for vvel, converted to forcing term
[in,out]mf_Zt_avg1average of sea surface height over all fast steps
[in,out]mf_DU_avg1time-averaged u-flux for 2D equations
[in,out]mf_DU_avg2time-averaged u-flux for 3D equation coupling
[in,out]mf_DV_avg1time-averaged v-flux for 2D equations
[in,out]mf_DV_avg2time-averaged v-flux for 3D equation coupling
[in,out]mf_rubarRHS of vertically integrated u-momentum
[in,out]mf_rvbarRHS of vertically integrated v-momentum
[in,out]mf_rzetaRHS of sea surface height
[in,out]mf_ubarvertically integrated u-momentum
[in,out]mf_vbarvertically integrated v-momentum
[in,out]mf_zetaSea-surface height
[in]mf_hBathymetry
[in]mf_pm1 / dx
[in]mf_pn1 / dy
[in]mf_fcorCoriolis factor
[in,out]mf_visc2_pHarmonic viscosity at psi points
[in,out]mf_visc2_rHarmoic viscosity at rho points
[in]mf_mskrLand-sea mask at rho-points
[in]mf_mskuLand-sea mask at u-points
[in]mf_mskvLand-sea mask at v-points
[in]mf_mskpLand-sea mask at psi-points
[in]dtfast_levLength of current barotropic step
[in]predictor_2d_stepIs this a predictor step?
[in]first_2d_stepIs this the first barotropic step?
[in]my_iifWhich barotropic predictor-corrector pair?
[in,out]next_indx1Cached index for

Definition at line 44 of file REMORA_advance_2d.cpp.

Referenced by advance_2d_onestep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ advance_2d_onestep()

void REMORA::advance_2d_onestep ( int  lev,
amrex::Real  dt_lev,
amrex::Real  dtfast_lev,
int  my_iif,
int  nfast_counter 
)

2D advance, one predictor/corrector step

Parameters
[in]levlevel of refinement
[in]dt_levbaroclinic time step at level
[in]dtfast_levbarotropic time step at level
[in]my_iifcurrent barotropic time step
[in]nfast_counterhow many bartropicc time steps to do per baroclinic step

Definition at line 12 of file REMORA_advance_2d_onestep.cpp.

Referenced by Advance(), and timeStepML().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ advance_3d()

void REMORA::advance_3d ( int  lev,
amrex::MultiFab &  mf_cons,
amrex::MultiFab &  mf_u,
amrex::MultiFab &  mf_v,
amrex::MultiFab *  mf_sstore,
amrex::MultiFab *  mf_ru,
amrex::MultiFab *  mf_rv,
std::unique_ptr< amrex::MultiFab > &  mf_DU_avg1,
std::unique_ptr< amrex::MultiFab > &  mf_DU_avg2,
std::unique_ptr< amrex::MultiFab > &  mf_DV_avg1,
std::unique_ptr< amrex::MultiFab > &  mf_DV_avg2,
std::unique_ptr< amrex::MultiFab > &  mf_ubar,
std::unique_ptr< amrex::MultiFab > &  mf_vbar,
std::unique_ptr< amrex::MultiFab > &  mf_Akv,
std::unique_ptr< amrex::MultiFab > &  mf_Akt,
std::unique_ptr< amrex::MultiFab > &  mf_Hz,
std::unique_ptr< amrex::MultiFab > &  mf_Huon,
std::unique_ptr< amrex::MultiFab > &  mf_Hvom,
std::unique_ptr< amrex::MultiFab > &  mf_z_w,
amrex::MultiFab const *  mf_h,
amrex::MultiFab const *  mf_pm,
amrex::MultiFab const *  mf_pn,
amrex::MultiFab const *  mf_mskr,
amrex::MultiFab const *  mf_msku,
amrex::MultiFab const *  mf_mskv,
const int  N,
const amrex::Real  dt_lev 
)

Advance the 3D variables.

Corresponds to step3d_uv.F and step3d_t.F in ROMS

Parameters
[in]levlevel of refinement (coarsest level is 0)
[in,out]mf_consscalar variables (temp, salt, scalar, etc)
[in,out]mf_uu-velocity
[in,out]mf_vv-velocity
[in,out]mf_sstoreintermediate-step scalar variables
[in,out]mf_ruRHS of total u-velocity
[in,out]mf_rvRHS of total v-velocity
[in]mf_DU_avg1time-averaged u-flux for 2D equations
[in]mf_DU_avg2time-averaged u-flux for 3D equation coupling
[in]mf_DV_avg1time-averaged v-flux for 2D equations
[in]mf_DV_avg2time-averaged v-flux for 3D equation coupling
[in,out]mf_ubarvertically integrated u-momentum
[in,out]mf_vbarvertically integrated v-momentum
[in,out]mf_Akvvertical viscosity coefficient
[in,out]mf_Aktvertical diffusivity coefficient
[in,out]mf_Hzvertical height of cells
[in,out]mf_Huonu-volume flux
[in,out]mf_Huonv-volume flux
[in,out]mf_z_wvertical coordinates on w points
[in]mf_hbathymetry
[in]mf_pm1 / dx
[in]mf_pn1 / dy
[in]mf_mskuland-sea mask at u-points
[in]mf_mskvland-sea mask at v-points
[in]Nnumber of vertical levels
[in]dt_levtime step at this refinement level

Definition at line 35 of file REMORA_advance_3d.cpp.

Referenced by advance_3d_ml().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ advance_3d_ml()

void REMORA::advance_3d_ml ( int  lev,
amrex::Real  dt_lev 
)

3D advance on a single level

Parameters
[in]levrefinement level
[in]dt_levtime step at refinement level

Definition at line 9 of file REMORA_advance_3d_ml.cpp.

Referenced by Advance(), and timeStepML().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ appendPlotVariables()

void REMORA::appendPlotVariables ( const std::string &  pp_plot_var_names)
private
Parameters
pp_plot_var_namesvariables to add to plot list

Definition at line 102 of file REMORA_Plotfile.cpp.

Referenced by InitData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply_clim_nudg()

void REMORA::apply_clim_nudg ( const amrex::Box &  bx,
int  ioff,
int  joff,
const amrex::Array4< amrex::Real > &  var,
const amrex::Array4< amrex::Real const > &  var_old,
const amrex::Array4< amrex::Real const > &  var_clim,
const amrex::Array4< amrex::Real const > &  clim_coeff,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  pm,
const amrex::Array4< amrex::Real const > &  pn,
const amrex::Real  dt_lev = amrex::Real(0.0) 
)

Apply climatology nudging.

Parameters
[in]bxbox to apply climatology on
[in]ioffoffset in x-direction
[in]joffoffset in y-direction
[in,out]varvariable to update
[in]var_oldvariable to compare against for nudging
[in]var_climclimatology value to nudge towards
[in]clim_coeffnudging time scale (1/s)
[in]Hzvertical cell height
[in]pm1/dx
[in]pn1/dy
[in]dt_levtime step

Definition at line 19 of file REMORA_apply_clim_nudg.cpp.

Referenced by advance_2d(), advance_3d(), and setup_step().

Here is the caller graph for this function:

◆ AverageDown()

void REMORA::AverageDown ( )
private

set covered coarse cells to be the average of overlying fine cells

Definition at line 1057 of file REMORA.cpp.

Referenced by InitData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AverageDownTo()

void REMORA::AverageDownTo ( int  crse_lev)
private

more flexible version of AverageDown() that lets you average down across multiple levels

Parameters
[in]crse_levlevel to average down to

Definition at line 1069 of file REMORA.cpp.

Referenced by AverageDown(), post_timestep(), timeStep(), and timeStepML().

Here is the caller graph for this function:

◆ build_fine_mask()

MultiFab & REMORA::build_fine_mask ( int  level)

Make mask to zero out covered cells (for mesh refinement)

Parameters
[in]levlevel to calculate on

Definition at line 162 of file REMORA_SumIQ.cpp.

Referenced by volWgtSumMF().

Here is the caller graph for this function:

◆ bulk_fluxes()

void REMORA::bulk_fluxes ( int  lev,
amrex::MultiFab *  mf_cons,
amrex::MultiFab *  mf_uwind,
amrex::MultiFab *  mf_vwind,
amrex::MultiFab *  mf_evap,
amrex::MultiFab *  mf_sustr,
amrex::MultiFab *  mf_svstr,
amrex::MultiFab *  mf_stflux,
amrex::MultiFab *  mf_lrflx,
amrex::MultiFab *  mf_lhflx,
amrex::MultiFab *  mf_shflx,
const int  N 
)

Calculate bulk temperature, salinity, wind fluxes.

Parameters
[in]levlevel to operate on
[in]mf_consscalar data: temperature, salinity, passsive scalar, etc
[in]mf_uwindu-direction wind dvelocity
[in]mf_vwindv-direction wind dvelocity
[in,out]mf_evapevaporation rate
[out]mf_sustru-direction surface momentum stress
[out]mf_svstrv-direction surface momentum stress
[out]mf_stfluxsurface scalar flux (temperature, salinity)
[out]mf_lrflxlongwave radiation flux
[in,out]mf_lhflxlatent heat flux
[in,out]mf_shflxsensible heat flux
[in]Nnumber of vertical levels

Spec Hum (kg/kg)

Definition at line 20 of file REMORA_bulk_flux.cpp.

Referenced by nonlin_eos(), and setup_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bulk_psit()

AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real REMORA::bulk_psit ( amrex::Real  ZoL)
inlinestatic

Evaluate stability function psi for moisture and heat.

Definition at line 1445 of file REMORA.H.

Referenced by bulk_fluxes().

Here is the caller graph for this function:

◆ bulk_psiu()

AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE amrex::Real REMORA::bulk_psiu ( amrex::Real  ZoL)
inlinestatic

Evaluate stability function psi for wind speed.

Definition at line 1413 of file REMORA.H.

Referenced by bulk_fluxes().

Here is the caller graph for this function:

◆ ClearLevel()

void REMORA::ClearLevel ( int  lev)
overridevirtual

Delete level data Overrides the pure virtual function in AmrCore.

Delete level data. Overrides the pure virtual function in AmrCore

Parameters
[in]levlevel to operate on

Definition at line 657 of file REMORA_make_new_level.cpp.

◆ ComputeDt()

void REMORA::ComputeDt ( )
private

a wrapper for estTimeStep()

Definition at line 6 of file REMORA_ComputeTimestep.cpp.

Referenced by Evolve(), and InitData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeGhostCells()

AMREX_FORCE_INLINE int REMORA::ComputeGhostCells ( const int &  spatial_order)
inlineprivate

Helper function to determine number of ghost cells.

Definition at line 1309 of file REMORA.H.

Referenced by MakeNewLevelFromScratch(), and RemakeLevel().

Here is the caller graph for this function:

◆ Construct_REMORAFillPatchers()

void REMORA::Construct_REMORAFillPatchers ( int  lev)
private

Construct FillPatchers.

Parameters
[in]levlevel to operate on

Definition at line 364 of file REMORA.cpp.

Referenced by init_stuff(), InitData(), and MakeNewLevelFromCoarse().

Here is the caller graph for this function:

◆ convert_inv_days_to_inv_s()

void REMORA::convert_inv_days_to_inv_s ( amrex::MultiFab *  )

Convert data in a multifab from inverse days to inverse seconds.

Parameters
[in,out]mfmultifab of data to convert

Definition at line 622 of file REMORA_init_from_netcdf.cpp.

Referenced by init_clim_nudg_coeff_from_netcdf().

Here is the caller graph for this function:

◆ coriolis()

void REMORA::coriolis ( const amrex::Box &  xbx,
const amrex::Box &  ybx,
const amrex::Array4< amrex::Real const > &  uold,
const amrex::Array4< amrex::Real const > &  vold,
const amrex::Array4< amrex::Real > &  ru,
const amrex::Array4< amrex::Real > &  rv,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  fomn,
int  nrhs,
int  nr 
)

Calculate Coriolis terms.

Parameters
[in]xbxnodal box in x-direction
[in]ybxnodal box in y-direction
[in]uoldu-direction velocity
[in]voldv-direction velocity
[in,out]ruu-direction velocity RHS
[in,out]rvv-direction velocity RHS
[in]Hzvertical cell height
[in]fomnscaled coriolis factor
[in]nrhswhich velocity component to use
[in]nrwhich RHS component to update

Definition at line 19 of file REMORA_coriolis.cpp.

Referenced by advance_2d(), and setup_step().

Here is the caller graph for this function:

◆ DataLog()

AMREX_FORCE_INLINE std::ostream & REMORA::DataLog ( int  i)
inlineprivate

Helper function for IO stream.

Definition at line 1344 of file REMORA.H.

Referenced by sum_integrated_quantities().

Here is the caller graph for this function:

◆ DataLogName()

const std::string REMORA::DataLogName ( int  i) const
inlineprivatenoexcept

The filename of the ith datalog file.

Definition at line 1394 of file REMORA.H.

◆ Define_REMORAFillPatchers()

void REMORA::Define_REMORAFillPatchers ( int  lev)
private

Define FillPatchers.

Parameters
[in]levlevel to operate on

Definition at line 412 of file REMORA.cpp.

Referenced by init_stuff(), MakeNewLevelFromCoarse(), and RemakeLevel().

Here is the caller graph for this function:

◆ ErrorEst()

void REMORA::ErrorEst ( int  lev,
amrex::TagBoxArray &  tags,
amrex::Real  time,
int  ngrow 
)
overridevirtual

Tag cells for refinement.

Function to tag cells for refinement – this overrides the pure virtual function in AmrCore

Parameters
[in]levclevel of refinement (0 is coarsest level)
[out]tagsarray of tagged cells
[in]timecurrent time
[in]ngrownumber of grow cells

Definition at line 15 of file REMORA_Tagging.cpp.

Here is the call graph for this function:

◆ estTimeStep()

Real REMORA::estTimeStep ( int  level) const

compute dt from CFL considerations

Parameters
[in]levellevel of refinement

Definition at line 41 of file REMORA_ComputeTimestep.cpp.

Referenced by ComputeDt().

Here is the caller graph for this function:

◆ Evolve()

void REMORA::Evolve ( )

Advance solution to final time.

Definition at line 140 of file REMORA.cpp.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_from_bdyfiles()

void REMORA::fill_from_bdyfiles ( 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.

Definition at line 19 of file REMORA_BoundaryConditions_netcdf.cpp.

Referenced by advance_3d(), FillPatch(), and init_zeta_from_netcdf().

Here is the caller graph for this function:

◆ FillBdyCCVels()

void REMORA::FillBdyCCVels ( int  lev,
amrex::MultiFab &  mf_cc_vel 
)

Fill the physical boundary conditions for cell-centered velocity (diagnostic only)

Parameters
[in]levlevel to fill at
[in]levMultiFab of cell-centered velocities

Definition at line 447 of file REMORA_FillPatch.cpp.

Referenced by ErrorEst().

Here is the caller graph for this function:

◆ FillCoarsePatch()

void REMORA::FillCoarsePatch ( int  lev,
amrex::Real  time,
amrex::MultiFab *  mf_fine,
amrex::MultiFab *  mf_crse,
const int  icomp = 0,
const bool  fill_all = true 
)
private

fill an entire multifab by interpolating from the coarser level

Fill an entire multifab by interpolating from the coarser level – this is used only when a new level of refinement is being created during a run (i.e not at initialization) This will never be used with static refinement.

Parameters
[in]levlevel to FillPatch on
[in]timecurrent time
[in,out]mf_to_fillMultiFab to fill
[in,out]mf_crseMultiFab of coarse data
[in]icompcomponent to fill
[in]fill_allwhether to fill all components

Definition at line 364 of file REMORA_FillPatch.cpp.

Referenced by FillCoarsePatch(), init_only(), MakeNewLevelFromCoarse(), and set_bathymetry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillPatch()

void REMORA::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.

Fill valid and ghost data in the MultiFab "mf" This version fills the MultiFab mf_to_fill in valid regions with the "state data" at the given time; values in mf when it is passed in are not used.

Parameters
[in]levlevel to FillPatch on
[in]timecurrent time
[in,out]mf_to_fillMultiFab to fill
[in]mfsvector over levels of multifabs associated with mf_to_fill
[in]bccompindex into domain_bcs_type
[in]bdy_var_typewhen filling from NetCDF, which boundary data
[in]icompcomponent to fill
[in]fill_allwhether to fill all components
[in]fill_setwhether to use FillPatchers
[in]icomp_calccomponent to use in RHS boundary calculation
[in]dt_levtime step at this level
[in]mf_calcdata to use in RHS boundary calculation

Definition at line 30 of file REMORA_FillPatch.cpp.

Referenced by advance_2d(), advance_3d(), advance_3d_ml(), gls_corrector(), gls_prestep(), init_bathymetry_from_netcdf(), InitData(), RemakeLevel(), set_2darrays(), set_analytic_vmix(), set_coriolis(), set_hmixcoef(), set_smflux(), set_wind(), setup_step(), and timeStepML().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillPatchNoBC()

void REMORA::FillPatchNoBC ( int  lev,
amrex::Real  time,
amrex::MultiFab &  mf_to_be_filled,
amrex::Vector< amrex::MultiFab * > const &  mfs,
const int  bdy_var_type = BdyVars::null,
const int  icomp = 0,
const bool  fill_all = true,
const bool  fill_set = true 
)

Fill a new MultiFab by copying in phi from valid region and filling ghost cells without applying boundary conditions.

Fill valid and ghost data in the MultiFab "mf" This version fills the MultiFab mf_to_fill in valid regions with the "state data" at the given time; values in mf when it is passed in are not used. Unlike FillPatch, FillPatchNoBC does not apply boundary conditions

Parameters
[in]levlevel to FillPatch on
[in]timecurrent time
[in,out]mf_to_fillMultiFab to fill
[in]mfsvector over levels of multifabs associated with mf_to_fill
[in]bdy_var_typewhen filling from NetCDF, which boundary data
[in]icompcomponent to fill
[in]fill_allwhether to fill all components
[in]fill_setwhether to use FillPatchers

Definition at line 192 of file REMORA_FillPatch.cpp.

Referenced by advance_2d(), advance_3d_ml(), gls_corrector(), setup_step(), and WritePlotFile().

Here is the caller graph for this function:

◆ get_t_old()

amrex::Real REMORA::get_t_old ( int  lev) const

Accessor method for t_old to expose to outside classes.

Parameters
[in]levlevel at which to get time

Definition at line 1093 of file REMORA.cpp.

◆ getAdvFluxReg()

AMREX_FORCE_INLINE amrex::YAFluxRegister * REMORA::getAdvFluxReg ( int  lev)
inlineprivate

Get flux register.

Definition at line 1336 of file REMORA.H.

◆ getCPUTime()

amrex::Real REMORA::getCPUTime ( ) const
inlineprivate

Get CPU time used.

Definition at line 1363 of file REMORA.H.

Referenced by writeJobInfo().

Here is the caller graph for this function:

◆ GetDataAtTime()

TimeInterpolatedData REMORA::GetDataAtTime ( int  lev,
amrex::Real  time 
)
private

utility to copy in data from old and/or new state into another multifab

Definition at line 293 of file REMORA_FillPatch.cpp.

Referenced by FillCoarsePatch(), and GetDataAtTime().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gls_corrector()

void REMORA::gls_corrector ( int  lev,
amrex::MultiFab *  mf_gls,
amrex::MultiFab *  mf_tke,
amrex::MultiFab &  mf_W,
amrex::MultiFab *  mf_Akv,
amrex::MultiFab *  mf_Akt,
amrex::MultiFab *  mf_Akk,
amrex::MultiFab *  mf_Akp,
amrex::MultiFab *  mf_mskr,
amrex::MultiFab *  mf_msku,
amrex::MultiFab *  mf_mskv,
const int  nstp,
const int  nnew,
const int  N,
const amrex::Real  dt_lev 
)

Corrector step for GLS calculation.

Parameters
[in]levlevel to operate on
[in,out]mf_glsturbulent generic length scale
[in,out]mf_tketurbulent kinetic energy
[in]mf_Wvertical velocity
[in,out]mf_Akvvertical viscosity coefficient
[in,out]mf_Aktvertical diffusivity coefficients
[in,out]mf_Akkturbulent kinetic energy vertical diffusion coefficient
[in,out]mf_Akpturbulent length scale vertical diffusion coefficient
[in]mf_mskrland-sea mask on rho points
[in]mf_mskuland-sea mask on u points
[in]mf_mskvland-sea mask on v points
[in]nstpindex of last time step in gls and tke MultiFabs
[in]nnewindex of time step to update in gls and tke MultiFabs
[in]Nnumber of vertical levels
[in]dt_levtime step at this level

Definition at line 246 of file REMORA_gls.cpp.

Referenced by advance_3d().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gls_prestep()

void REMORA::gls_prestep ( int  lev,
amrex::MultiFab *  mf_gls,
amrex::MultiFab *  mf_tke,
amrex::MultiFab &  mf_W,
amrex::MultiFab *  mf_msku,
amrex::MultiFab *  mf_mskv,
const int  nstp,
const int  nnew,
const int  iic,
const int  ntfirst,
const int  N,
const amrex::Real  dt_lev 
)

Prestep for GLS calculation.

Parameters
[in]levlevel to operate on
[in,out]mf_glsturbulent generic length scale
[in,out]mf_tketurbulent kinetic energy
[in]mf_Wvertical velocity
[in]mf_mskuland-sea mask on u points
[in]mf_mskvland-sea mask on v points
[in]nstpindex of last time step in gls and tke MultiFabs
[in]nnewindex of time step to update in gls and tke MultiFabs
[in]iicwhich time step we're on
[in]ntfirstwhat is the first time step?
[in]Nnumber of vertical levels
[in]dt_levtime step at this level

Definition at line 20 of file REMORA_gls.cpp.

Referenced by setup_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GotoNextLine()

void REMORA::GotoNextLine ( std::istream &  is)
staticprivate

utility to skip to next line in Header

Definition at line 8 of file REMORA_Checkpoint.cpp.

Referenced by ReadCheckpointFile().

Here is the caller graph for this function:

◆ init_analytic()

void REMORA::init_analytic ( int  lev)
private

Initialize initial problem data from analytic functions.

Parameters
[in]levlevel to initialize on

Definition at line 15 of file REMORA_init.cpp.

Referenced by init_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_bathymetry_from_netcdf()

void REMORA::init_bathymetry_from_netcdf ( int  lev)

Bathymetry data initialization from NetCDF file.

Parameters
levInteger specifying the current level

Definition at line 183 of file REMORA_init_from_netcdf.cpp.

Referenced by set_bathymetry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_bcs()

void REMORA::init_bcs ( )
private

Read in boundary parameters from input file and set up data structures.

Definition at line 9 of file REMORA_init_bcs.cpp.

Referenced by InitData().

Here is the caller graph for this function:

◆ init_bdry_from_netcdf()

void REMORA::init_bdry_from_netcdf ( )

Boundary data initialization from NetCDF file.

Parameters
levInteger specifying the current level

Definition at line 422 of file REMORA_init_from_netcdf.cpp.

Referenced by init_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_beta_plane_coriolis()

void REMORA::init_beta_plane_coriolis ( int  lev)

Calculate Coriolis parameters from beta plane parametrization.

Parameters
[in]levlevel to initialize on

Definition at line 26 of file REMORA_init.cpp.

Referenced by set_coriolis().

Here is the caller graph for this function:

◆ init_clim_nudg_coeff()

void REMORA::init_clim_nudg_coeff ( int  lev)

Wrapper to initialize climatology nudging coefficient.

Parameters
[in]levlevel to operate on

Definition at line 186 of file REMORA_init.cpp.

Referenced by init_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_clim_nudg_coeff_from_netcdf()

void REMORA::init_clim_nudg_coeff_from_netcdf ( int  lev)

Climatology nudging coefficient initialization from NetCDF file.

Parameters
levInteger specifying the current level

Definition at line 497 of file REMORA_init_from_netcdf.cpp.

Referenced by init_clim_nudg_coeff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_coriolis_from_netcdf()

void REMORA::init_coriolis_from_netcdf ( int  lev)

Coriolis parameter data initialization from NetCDF file.

Parameters
levInteger specifying the current level

Definition at line 340 of file REMORA_init_from_netcdf.cpp.

Referenced by set_coriolis().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_data_from_netcdf()

void REMORA::init_data_from_netcdf ( int  lev)

Problem initialization from NetCDF file.

Parameters
levInteger specifying the current level

Definition at line 90 of file REMORA_init_from_netcdf.cpp.

Referenced by init_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_gls_vmix()

void REMORA::init_gls_vmix ( int  lev,
SolverChoice  solver_choice 
)

Initialize GLS variables.

Parameters
[in]levlevel to operate on
[in]solver_choicealgorithmic choices

Definition at line 144 of file REMORA_init.cpp.

Referenced by init_set_vmix().

Here is the caller graph for this function:

◆ init_masks()

void REMORA::init_masks ( int  lev,
const amrex::BoxArray &  ba,
const amrex::DistributionMapping &  dm 
)
private

Allocate MultiFabs for masks.

Parameters
[in]levlevel to operate on
[in]baBoxArray for the level
[in]dmDistributionMapping for the level

Definition at line 427 of file REMORA_make_new_level.cpp.

Referenced by MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), and RemakeLevel().

Here is the caller graph for this function:

◆ init_masks_from_netcdf()

void REMORA::init_masks_from_netcdf ( int  lev)

Mask data initialization from NetCDF file.

Parameters
levInteger specifying the current level

Definition at line 375 of file REMORA_init_from_netcdf.cpp.

Referenced by init_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_only()

void REMORA::init_only ( int  lev,
amrex::Real  time 
)

Init (NOT restart or regrid)

Parameters
[in]levlevel to operate on
[in]timecurrent time for initialization

Definition at line 674 of file REMORA.cpp.

Referenced by MakeNewLevelFromScratch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_riv_pos_from_netcdf()

void REMORA::init_riv_pos_from_netcdf ( int  lev)
Parameters
[in]levlevel to read in river data

Definition at line 573 of file REMORA_init_from_netcdf.cpp.

Referenced by init_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_set_vmix()

void REMORA::init_set_vmix ( int  lev)

Initialize vertical mixing coefficients from file or analytic.

Definition at line 583 of file REMORA.cpp.

Referenced by init_only(), MakeNewLevelFromCoarse(), and RemakeLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_stuff()

void REMORA::init_stuff ( int  lev,
const amrex::BoxArray &  ba,
const amrex::DistributionMapping &  dm 
)
private

Allocate MultiFabs for state and evolution variables.

Parameters
[in]levlevel to operate on
[in]baBoxArray for the level
[in]dmDistributionMapping for the level

Definition at line 451 of file REMORA_make_new_level.cpp.

Referenced by MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), and RemakeLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_zeta_from_netcdf()

void REMORA::init_zeta_from_netcdf ( int  lev)

Sea-surface height data initialization from NetCDF file.

Parameters
levInteger specifying the current level

Definition at line 141 of file REMORA_init_from_netcdf.cpp.

Referenced by set_zeta().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitData()

void REMORA::InitData ( )

Initialize multilevel data.

This is called from main.cpp and handles all initialization, whether from start or restart

Definition at line 258 of file REMORA.cpp.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeFromFile()

void REMORA::InitializeFromFile ( )
private

Read the file passed to remora.restart and use it as an initial condition for the current simulation.

◆ InitializeLevelFromData()

void REMORA::InitializeLevelFromData ( int  lev,
const amrex::MultiFab &  initial_data 
)
private

Initialize the new-time data at a level from the initial_data MultiFab.

◆ is_it_time_for_action()

bool REMORA::is_it_time_for_action ( int  nstep,
amrex::Real  time,
amrex::Real  dt,
int  action_interval,
amrex::Real  action_per 
)

Decide if it is time to take an action.

Parameters
[in]nstepwhat step we're on
[in]levlevel to calculate on
[in]dtlevtime step for this level
[in]action_intervalnumber of time steps between actions
[in]action_pertime interval between actions

Definition at line 197 of file REMORA_SumIQ.cpp.

Referenced by InitData(), and post_timestep().

Here is the caller graph for this function:

◆ lin_eos()

void REMORA::lin_eos ( const amrex::Box &  bx,
const amrex::Array4< amrex::Real const > &  state,
const amrex::Array4< amrex::Real > &  rho,
const amrex::Array4< amrex::Real > &  rhoA,
const amrex::Array4< amrex::Real > &  rhoS,
const amrex::Array4< amrex::Real > &  bvf,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  z_w,
const amrex::Array4< amrex::Real const > &  z_r,
const amrex::Array4< amrex::Real const > &  h,
const amrex::Array4< amrex::Real const > &  mskr,
const int  N 
)

Calculate density and related quantities from linear equation of state.

Parameters
[in]bxbox for calculation
[in]statestate holds temp, salt
[out]rhodensity
[out]rhoAvertically-averaged density
[out]rhoSdensity perturbation
[out]bvfBrunt-Vaisala frequency
[in]Hzvertical cell height
[in]z_rz coordinates at rho points
[in]z_wz coordinates at w points
[in]hbathymetry
[in]mskrland-sea mask on rho points
[in]Nnumber of vertical levels

Definition at line 61 of file REMORA_rho_eos.cpp.

Referenced by rho_eos().

Here is the caller graph for this function:

◆ MakeNewLevelFromCoarse()

void REMORA::MakeNewLevelFromCoarse ( int  lev,
amrex::Real  time,
const amrex::BoxArray &  ba,
const amrex::DistributionMapping &  dm 
)
overridevirtual

Make a new level using provided BoxArray and DistributionMapping and fill with interpolated coarse level data. Overrides the pure virtual function in AmrCore.

Make a new level using provided BoxArray and DistributionMapping and fill with interpolated coarse level data (overrides the pure virtual function in AmrCore) regrid --> RemakeLevel (if level already existed) regrid --> MakeNewLevelFromCoarse (if adding new level)

Parameters
[in]levlevel to make
[in]timecurrent time
[in]baBoxArray for the level
[in]dmDistributionMapping for the level

Definition at line 24 of file REMORA_make_new_level.cpp.

Here is the call graph for this function:

◆ MakeNewLevelFromScratch()

void REMORA::MakeNewLevelFromScratch ( int  lev,
amrex::Real  time,
const amrex::BoxArray &  ba,
const amrex::DistributionMapping &  dm 
)
overridevirtual

Make a new level from scratch using provided BoxArray and DistributionMapping. Only used during initialization. Overrides the pure virtual function in AmrCore.

Make a new level from scratch using provided BoxArray and DistributionMapping. This is called both for initialization and for restart (overrides the pure virtual function in AmrCore) main.cpp --> REMORA::InitData --> InitFromScratch --> MakeNewGrids --> MakeNewLevelFromScratch restart --> MakeNewGrids --> MakeNewLevelFromScratch

Parameters
[in]levlevel to make
[in]timecurrent time
[in]baBoxArray for the level
[in]dmDistributionMapping for the level

Definition at line 254 of file REMORA_make_new_level.cpp.

Referenced by ReadCheckpointFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mask_arrays_for_write()

void REMORA::mask_arrays_for_write ( int  lev,
amrex::Real  fill_value,
amrex::Real  fill_where 
)

Mask data arrays before writing output.

Parameters
levlevel to mask
fill_valuefill value to mask with
fill_wherevalue at cells where we will apply the mask. This is necessary because rivers

Definition at line 662 of file REMORA_Plotfile.cpp.

Referenced by WriteNCPlotFile_which().

Here is the caller graph for this function:

◆ nonlin_eos()

void REMORA::nonlin_eos ( const amrex::Box &  bx,
const amrex::Array4< amrex::Real const > &  state,
const amrex::Array4< amrex::Real > &  rho,
const amrex::Array4< amrex::Real > &  rhoA,
const amrex::Array4< amrex::Real > &  rhoS,
const amrex::Array4< amrex::Real > &  bvf,
const amrex::Array4< amrex::Real > &  alpha,
const amrex::Array4< amrex::Real > &  beta,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  z_w,
const amrex::Array4< amrex::Real const > &  z_r,
const amrex::Array4< amrex::Real const > &  h,
const amrex::Array4< amrex::Real const > &  mskr,
const int  N 
)

Calculate density and related quantities from nonlinear equation of state.

Parameters
[in]bxbox for calculation
[in]statestate holds temp, salt
[out]rhodensity
[out]rhoAvertically-averaged density
[out]rhoSdensity perturbation
[out]bvfBrunt-Vaisala frequency
[out]alphathermal expansion coefficient
[out]betasaline contraction coefficient
[in]Hzvertical cell height
[in]z_rz coordinates at rho points
[in]z_wz coordinates at w points
[in]hbathymetry
[in]mskrland-sea mask on rho points
[in]Nnumber of vertical levels

Definition at line 157 of file REMORA_rho_eos.cpp.

Referenced by rho_eos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NumDataLogs()

AMREX_FORCE_INLINE int REMORA::NumDataLogs ( )
inlineprivatenoexcept

Definition at line 1351 of file REMORA.H.

Referenced by sum_integrated_quantities().

Here is the caller graph for this function:

◆ PlotFileName()

std::string REMORA::PlotFileName ( int  lev) const
private

get plotfile name

◆ post_timestep()

void REMORA::post_timestep ( int  nstep,
amrex::Real  time,
amrex::Real  dt_lev 
)

Called after every level 0 timestep.

Parameters
[in]nstepwhich step we're on
[in]timecurrent time
[in]dt_lev0time step on level 0

Definition at line 226 of file REMORA.cpp.

Referenced by Evolve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prestep()

void REMORA::prestep ( int  lev,
amrex::MultiFab &  mf_uold,
amrex::MultiFab &  mf_vold,
amrex::MultiFab &  mf_u,
amrex::MultiFab &  mf_v,
amrex::MultiFab *  mf_ru,
amrex::MultiFab *  mf_rv,
amrex::MultiFab &  S_old,
amrex::MultiFab &  S_new,
amrex::MultiFab &  mf_W,
amrex::MultiFab &  mf_DC,
const amrex::MultiFab *  mf_z_r,
const amrex::MultiFab *  mf_z_w,
const amrex::MultiFab *  mf_h,
const amrex::MultiFab *  mf_pm,
const amrex::MultiFab *  mf_pn,
const amrex::MultiFab *  mf_sustr,
const amrex::MultiFab *  mf_svstr,
const amrex::MultiFab *  mf_bustr,
const amrex::MultiFab *  mf_bvstr,
const amrex::MultiFab *  mf_msku,
const amrex::MultiFab *  mf_mskv,
const int  iic,
const int  nfirst,
const int  nnew,
int  nstp,
int  nrhs,
int  N,
const amrex::Real  dt_lev 
)

Wrapper function for prestep.

Parameters
[in]levlevel to operate on
[in]mf_uoldu-velocity from last time step
[in]mf_voldv-velocity from last time step
[out]mf_uu-velocity at current time step
[out]mf_vv-velocity at current time step
[in,out]mf_ruu-velocity RHS at current time step
[in,out]mf_rvv-velocity RHS at current time step
[in]S_oldscalar variables at last time step
[in,out]S_newscalar variables at current time step
[in]mf_Wvertical velocity
mf_DCtemporary variable container
[in]mf_z_rz coordinates at rho points (cell centers)
[in]mf_z_wz coordinates at w points
[in]mf_hbathymetry
[in]mf_pm1/dx
[in]mf_pn1/dy
[in]mf_sustru-direction surface momentum flux
[in]mf_svstrv-direction surface momentum flux
[in]mf_bustru-direction bottom stress
[in]mf_bvstrv-direction bottom stress
[in]mf_mskuland-sea mask on u-points
[in]mf_mskvland-sea mask on v-points
[in]iicwhich time step we're on
[in]ntfirstwhat is the first time step?
[in]nnewindex of time step to update
[in]nstpindex of last time step
[in]nrhsindex of RHS component
[in]Nnumber of vertical levels
[in]dt_levtime step at this level

Definition at line 38 of file REMORA_prestep.cpp.

Referenced by setup_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prestep_diffusion()

void REMORA::prestep_diffusion ( const amrex::Box &  bx,
const amrex::Box &  gbx,
const int  ioff,
const int  joff,
const amrex::Array4< amrex::Real > &  vel,
const amrex::Array4< amrex::Real const > &  vel_old,
const amrex::Array4< amrex::Real > &  rvel,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  Akv,
const amrex::Array4< amrex::Real > &  DC,
const amrex::Array4< amrex::Real > &  FC,
const amrex::Array4< amrex::Real const > &  sstr,
const amrex::Array4< amrex::Real const > &  bstr,
const amrex::Array4< amrex::Real const > &  z_r,
const amrex::Array4< amrex::Real const > &  pm,
const amrex::Array4< amrex::Real const > &  pn,
const int  iic,
const int  ntfirst,
const int  nnew,
int  nstp,
int  nrhs,
int  N,
const amrex::Real  lambda,
const amrex::Real  dt_lev 
)

Update velocities or tracers with diffusion/viscosity as the last part of the prestep.

Called from prestep. The tracer update is a bit different from the u,v updates so we test for it, but checking if ioff=0 and joff=0. In some cases, though, we can recover the tracer update from the generic one by setting those indices. Setting icc and ntfirst identically for the tracers should be equivalent to setting ioff=0 and joff=0

Parameters
[in]vel_bxtile box
[in]gbxgrown tile box
[in]ioffoffset in x direction
[in]joffoffset in y direction
[out]velvelocity or scalar to update
[in]vel_oldvelocity or scalar at last time
[in,out]rvelvelocity or scalar RHS
[in]Hzvertical cell height
[in]Akvvertical viscosity coefficient
DCtemporary
FCtemporary
[in]sstrsurface flux
[in]bstrbottom flux
[in]z_rz coordinates at rho points
[in]pm1/dx
[in]pn1/dy
[in]iicwhich time step we're on
[in]ntfirstwhat is the first time step?
[in]nnewindex of time step to update
[in]nstpindex of last time step
[in]nrhsindex of RHS component
[in]Nnumber of vertical levels
[in]lambdaweighting coefficient for the newest (implicit) time step derivatives
[in]dt_levtime step at this level

Definition at line 39 of file REMORA_prestep_diffusion.cpp.

Referenced by prestep().

Here is the caller graph for this function:

◆ prestep_t_advection()

void REMORA::prestep_t_advection ( const amrex::Box &  tbx,
const amrex::Box &  gbx,
const amrex::Array4< amrex::Real > &  tempold,
const amrex::Array4< amrex::Real > &  tempcache,
const amrex::Array4< amrex::Real > &  Hz,
const amrex::Array4< amrex::Real > &  Huon,
const amrex::Array4< amrex::Real > &  Hvom,
const amrex::Array4< amrex::Real > &  W,
const amrex::Array4< amrex::Real > &  DC,
const amrex::Array4< amrex::Real > &  FC,
const amrex::Array4< amrex::Real > &  sstore,
const amrex::Array4< amrex::Real const > &  z_w,
const amrex::Array4< amrex::Real const > &  h,
const amrex::Array4< amrex::Real const > &  pm,
const amrex::Array4< amrex::Real const > &  pn,
const amrex::Array4< amrex::Real const > &  msku,
const amrex::Array4< amrex::Real const > &  mskv,
const amrex::Array4< int const > &  river_pos,
const amrex::Array4< amrex::Real const > &  river_source,
int  iic,
int  ntfirst,
int  nrhs,
int  N,
const amrex::Real  dt_lev 
)

Prestep advection calculations for the tracers.

Parameters
[in]tbxtile box
[in]gbxgrown tile box
[in]tempoldscalar at last time
[in]tempcachecached current time step's scalar value
[in]Hzvertical cell height
[in]Huonu-volume flux
[in]Hvomv-volume flux
[in]Akvvertical viscosity coefficient
[in,out]Wvertical velocity
DCtemporary
FCtemporary
[out]tempstorescratch space for calculations on scalars
[in]z_wz coordinates at w points
[in]hbathymetry
[in]pm1/dx
[in]pn1/dy
[in]mskuland-sea mask on u-points
[in]mskvland-sea mask on v-points
[in]river_posriver positions
[in]river_sourceriver source data to add, if using
[in]iicwhich time step we're on
[in]ntfirstwhat is the first time step?
[in]nrhsindex of RHS component
[in]Nnumber of vertical levels
[in]dt_levtime step at this level

Definition at line 34 of file REMORA_prestep_t_advection.cpp.

Referenced by prestep().

Here is the caller graph for this function:

◆ print_banner()

void REMORA::print_banner ( MPI_Comm  comm,
std::ostream &  out 
)
static

Definition at line 60 of file REMORA_console_io.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ print_error()

void REMORA::print_error ( MPI_Comm  comm,
const std::string &  msg 
)
static

Definition at line 43 of file REMORA_console_io.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ print_summary()

static void REMORA::print_summary ( std::ostream &  )
static

◆ print_tpls()

void REMORA::print_tpls ( std::ostream &  out)
static

Definition at line 137 of file REMORA_console_io.cpp.

◆ print_usage()

void REMORA::print_usage ( MPI_Comm  comm,
std::ostream &  out 
)
static

Definition at line 26 of file REMORA_console_io.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ prsgrd()

void REMORA::prsgrd ( const amrex::Box &  bx,
const amrex::Box &  gbx,
const amrex::Box &  utbx,
const amrex::Box &  vtbx,
const amrex::Array4< amrex::Real > &  ru,
const amrex::Array4< amrex::Real > &  rv,
const amrex::Array4< amrex::Real const > &  pn,
const amrex::Array4< amrex::Real const > &  pm,
const amrex::Array4< amrex::Real const > &  rho,
const amrex::Array4< amrex::Real > &  FC,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  z_r,
const amrex::Array4< amrex::Real const > &  z_w,
const amrex::Array4< amrex::Real const > &  msku,
const amrex::Array4< amrex::Real const > &  mskv,
const int  nrhs,
const int  N 
)

Calculate pressure gradient.

Parameters
[in]phi_bxtilebox
[in]phi_gbxgrownbox
[in]utbxu-nodal tilebox
[in]vtbxv-nodal tilebox
[out]ruu-velocity RHS
[out]rvv-velocity RHS
[in]pm1/dx
[in]pn1/dy
[in]rhodensity
FCtemporary
[in]Hzvertical cell height
[in]z_rz coordinates at rho points
[in]z_wz coordinates at w points
[in]mskuland-sea mask on u-points
[in]mskvland-sea mask on v-points
[in]nrhsindex of RHS component
[in]Nnumber of vertical levels

Definition at line 25 of file REMORA_prsgrd.cpp.

Referenced by setup_step().

Here is the caller graph for this function:

◆ ReadCheckpointFile()

void REMORA::ReadCheckpointFile ( )
private

read checkpoint file from disk

Definition at line 256 of file REMORA_Checkpoint.cpp.

Referenced by restart().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadNCMultiFab()

void REMORA::ReadNCMultiFab ( amrex::FabArray< amrex::FArrayBox > &  fab,
const std::string &  name,
int  coordinatorProc = amrex::ParallelDescriptor::IOProcessorNumber(),
int  allow_empty_mf = 0 
)
private

Read MultiFab in NetCDF format.

◆ ReadParameters()

void REMORA::ReadParameters ( )
private

read in some parameters from inputs file

Definition at line 847 of file REMORA.cpp.

Referenced by REMORA().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refinement_criteria_setup()

void REMORA::refinement_criteria_setup ( )
private

Set refinement criteria.

Function to define the refinement criteria based on user input

Definition at line 115 of file REMORA_Tagging.cpp.

Referenced by REMORA().

Here is the caller graph for this function:

◆ RemakeLevel()

void REMORA::RemakeLevel ( int  lev,
amrex::Real  time,
const amrex::BoxArray &  ba,
const amrex::DistributionMapping &  dm 
)
overridevirtual

Remake an existing level using provided BoxArray and DistributionMapping and fill with existing fine and coarse data. Overrides the pure virtual function in AmrCore.

Remake an existing level using provided BoxArray and DistributionMapping and fill with existing fine and coarse data. overrides the pure virtual function in AmrCore

Parameters
[in]levlevel to make
[in]timecurrent time
[in]baBoxArray for the level
[in]dmDistributionMapping for the level

Definition at line 116 of file REMORA_make_new_level.cpp.

Here is the call graph for this function:

◆ remora_advance()

void REMORA::remora_advance ( int  level,
amrex::MultiFab &  cons_old,
amrex::MultiFab &  cons_new,
amrex::MultiFab &  xvel_old,
amrex::MultiFab &  yvel_old,
amrex::MultiFab &  zvel_old,
amrex::MultiFab &  xvel_new,
amrex::MultiFab &  yvel_new,
amrex::MultiFab &  zvel_new,
amrex::MultiFab &  source,
const amrex::Geometry  fine_geom,
const amrex::Real  dt,
const amrex::Real  time 
)

Interface for advancing the data at one level by one "slow" timestep.

◆ resize_stuff()

void REMORA::resize_stuff ( int  lev)
private

Resize variable containers to accommodate data on levels 0 to max_lev.

Parameters
[in]levlevel do operate on

Definition at line 323 of file REMORA_make_new_level.cpp.

Referenced by MakeNewLevelFromCoarse(), and MakeNewLevelFromScratch().

Here is the caller graph for this function:

◆ restart()

void REMORA::restart ( )

\briefRestart

Definition at line 458 of file REMORA.cpp.

Referenced by InitData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rho_eos()

void REMORA::rho_eos ( const amrex::Box &  bx,
const amrex::Array4< amrex::Real const > &  state,
const amrex::Array4< amrex::Real > &  rho,
const amrex::Array4< amrex::Real > &  rhoA,
const amrex::Array4< amrex::Real > &  rhoS,
const amrex::Array4< amrex::Real > &  bvf,
const amrex::Array4< amrex::Real > &  alpha,
const amrex::Array4< amrex::Real > &  beta,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  z_w,
const amrex::Array4< amrex::Real const > &  z_r,
const amrex::Array4< amrex::Real const > &  h,
const amrex::Array4< amrex::Real const > &  mskr,
const int  N 
)

Wrapper around equation of state calculation.

Parameters
[in]bxbox for calculation
[in]statestate holds temp, salt
[out]rhodensity
[out]rhoAvertically-averaged density
[out]rhoSdensity perturbation
[out]bvfBrunt-Vaisala frequency
[out]alphathermal expansion coefficient
[out]betasaline contraction coefficient
[in]Hzvertical cell height
[in]z_rz coordinates at rho points
[in]z_wz coordinates at w points
[in]hbathymetry
[in]mskrland-sea mask on rho points
[in]Nnumber of vertical levels

Definition at line 22 of file REMORA_rho_eos.cpp.

Referenced by setup_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rhs_t_3d()

void REMORA::rhs_t_3d ( const amrex::Box &  bx,
const amrex::Array4< amrex::Real > &  t,
const amrex::Array4< amrex::Real const > &  tempstore,
const amrex::Array4< amrex::Real const > &  Huon,
const amrex::Array4< amrex::Real const > &  Hvom,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  pn,
const amrex::Array4< amrex::Real const > &  pm,
const amrex::Array4< amrex::Real const > &  W,
const amrex::Array4< amrex::Real > &  FC,
const amrex::Array4< amrex::Real const > &  mskr,
const amrex::Array4< amrex::Real const > &  msku,
const amrex::Array4< amrex::Real const > &  mskv,
const amrex::Array4< int const > &  river_pos,
const amrex::Array4< amrex::Real const > &  river_source,
int  nrhs,
int  nnew,
int  N,
const amrex::Real  dt_lev 
)

RHS terms for tracer.

Parameters
[in]bxtilebox
[in,out]ttracer data
[in]sstorescratch space for tracer calculations
[in]Huonu-volume flux
[in]Hvomv-volume flux
[in]Hzvertical cell height
[in]pn1/dx
[in]pm1/dy
[in]Wvertical velocity
FCtemporary
[in]mskrland-sea mask on rho-points
[in]mskuland-sea mask on u-points
[in]mskvland-sea mask on v-points
[in]river_posriver positions
[in]river_sourceriver source data to add, if using
[in]nrhsindex of RHS component
[in]nnewindex of current time step
[in]Nnumber of vertical levels
[in]dt_levtime step at this level

Definition at line 27 of file REMORA_rhs_t_3d.cpp.

Referenced by advance_3d().

Here is the caller graph for this function:

◆ rhs_uv_2d()

void REMORA::rhs_uv_2d ( const amrex::Box &  xbx,
const amrex::Box &  ybx,
const amrex::Array4< amrex::Real const > &  uold,
const amrex::Array4< amrex::Real const > &  vold,
const amrex::Array4< amrex::Real > &  ru,
const amrex::Array4< amrex::Real > &  rv,
const amrex::Array4< amrex::Real const > &  Duon,
const amrex::Array4< amrex::Real const > &  Dvom,
const int  nrhs 
)

RHS terms for 2D momentum.

Parameters
[in]xbxBox for operations on x-velocity
[in]ybxBox for operations on y-velocity
[in]ubarbarotropic x-velocity
[in]vbarbarotropic y-velocity
[in,out]rhs_ubarRHS for barotropic x-velocity
[in,out]rhs_vbarRHS for barotropic y-velocity
[in]DUonu-volume flux (barotropic)
[in]DVomv-volume flux (barotropic)
[in]krhsindex of rhs component

Definition at line 17 of file REMORA_rhs_uv_2d.cpp.

Referenced by advance_2d().

Here is the caller graph for this function:

◆ rhs_uv_3d()

void REMORA::rhs_uv_3d ( const amrex::Box &  xbx,
const amrex::Box &  ybx,
const amrex::Array4< amrex::Real const > &  uold,
const amrex::Array4< amrex::Real const > &  vold,
const amrex::Array4< amrex::Real > &  ru,
const amrex::Array4< amrex::Real > &  rv,
const amrex::Array4< amrex::Real > &  rufrc,
const amrex::Array4< amrex::Real > &  rvfrc,
const amrex::Array4< amrex::Real const > &  sustr,
const amrex::Array4< amrex::Real const > &  svstr,
const amrex::Array4< amrex::Real const > &  bustr,
const amrex::Array4< amrex::Real const > &  bvstr,
const amrex::Array4< amrex::Real const > &  Huon,
const amrex::Array4< amrex::Real const > &  Hvom,
const amrex::Array4< amrex::Real const > &  pm,
const amrex::Array4< amrex::Real const > &  pn,
const amrex::Array4< amrex::Real const > &  W,
const amrex::Array4< amrex::Real > &  FC,
int  nrhs,
int  N 
)

RHS terms for 3D momentum.

Parameters
[in]xbxBox for operations on x-velocity
[in]ybxBox for operations on y-velocity
[in]uoldu-velocity at last time step
[in]voldv-velocity at last time step
[in,out]ruu-velocity RHS
[in,out]rvv-velocity RHS
[in,out]rufrcforcing for u-velocity RHS
[in,out]rvfrcforcing for v-velocity RHS
[in]sustru-direction surface momentum flux
[in]svstrv-direction surface momentum flux
[in]bustru-direction bottom stress
[in]bvstrv-direction bottom stress
[in]Huonu-volume flux
[in]Hvomv-volume flux
[in]pm1/dx
[in]pn1/dy
[in]Wvertical velocity
FCtemporary
[in]nrhsindex of component for RHS
[in]Nnumber of vertical levels

Definition at line 28 of file REMORA_rhs_uv_3d.cpp.

Referenced by setup_step().

Here is the caller graph for this function:

◆ scale_rhs_vars()

void REMORA::scale_rhs_vars ( )

Scale RHS momentum variables by 1/cell area, needed before FillPatch to different levels.

Definition at line 6 of file REMORA_scale_rhs_vars.cpp.

Referenced by timeStepML().

Here is the caller graph for this function:

◆ scale_rhs_vars_inv()

void REMORA::scale_rhs_vars_inv ( )

Scale RHS momentum variables by cell area, needed after FillPatch to different levels.

Definition at line 50 of file REMORA_scale_rhs_vars.cpp.

Referenced by timeStepML().

Here is the caller graph for this function:

◆ set_2darrays()

void REMORA::set_2darrays ( int  lev)

Set 2D momentum arrays from 3D momentum.

Parameters
[in]levlevel to operate on

Definition at line 81 of file REMORA_init.cpp.

Referenced by init_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_analytic_vmix()

void REMORA::set_analytic_vmix ( int  lev)

Set vertical mixing coefficients from analytic.

Parameters
[in]levlevel to operate on

Definition at line 599 of file REMORA.cpp.

Referenced by init_set_vmix(), and setup_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_bathymetry()

void REMORA::set_bathymetry ( int  lev)

Initialize bathymetry from file or analytic.

Parameters
[in]levlevel to operate on

Definition at line 492 of file REMORA.cpp.

Referenced by init_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_coriolis()

void REMORA::set_coriolis ( int  lev)

Initialize Coriolis factor from file or analytic.

Parameters
[in]levlevel to operate on

Definition at line 560 of file REMORA.cpp.

Referenced by init_only(), MakeNewLevelFromCoarse(), and RemakeLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_drag()

void REMORA::set_drag ( int  lev)

Initialize or calculate bottom drag.

◆ set_grid_scale()

void REMORA::set_grid_scale ( int  lev)

Set pm and pn arrays on level lev. Only works if using analytic initialization.

Parameters
[in]levlevel to operate on

Definition at line 667 of file REMORA_make_new_level.cpp.

Referenced by init_analytic(), init_only(), MakeNewLevelFromCoarse(), and RemakeLevel().

Here is the caller graph for this function:

◆ set_hmixcoef()

void REMORA::set_hmixcoef ( int  lev)

Initialize horizontal mixing coefficients.

Parameters
[in]levlevel to operate on

Definition at line 612 of file REMORA.cpp.

Referenced by init_only(), MakeNewLevelFromCoarse(), and RemakeLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_smflux()

void REMORA::set_smflux ( int  lev)

Initialize or calculate surface momentum flux from file or analytic.

Parameters
[in]levlevel to operate on

Definition at line 637 of file REMORA.cpp.

Referenced by setup_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_weights()

void REMORA::set_weights ( int  lev)

Set weights for averaging 3D variables to 2D.

Parameters
[in]levlevel to operate on

Definition at line 11 of file REMORA_set_weights.cpp.

Referenced by init_stuff().

Here is the caller graph for this function:

◆ set_wind()

void REMORA::set_wind ( int  lev)

Initialize or calculate wind speed from file or analytic.

Parameters
[in]levlevel to operate on

Definition at line 655 of file REMORA.cpp.

Referenced by setup_step().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_zeta()

void REMORA::set_zeta ( int  lev)

Initialize zeta from file or analytic.

Parameters
[in]levlevel to operate on

Definition at line 470 of file REMORA.cpp.

Referenced by init_only().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_zeta_average()

void REMORA::set_zeta_average ( int  lev)

Set Zt_avg1 to zeta.

Parameters
[in]levlevel to operate on

Definition at line 57 of file REMORA_init.cpp.

Referenced by set_zeta().

Here is the caller graph for this function:

◆ set_zeta_to_Ztavg()

void REMORA::set_zeta_to_Ztavg ( int  lev)

Set zeta components to be equal to time-averaged Zt_avg1.

Parameters
[in]levlevel to operate on

Definition at line 724 of file REMORA_make_new_level.cpp.

Referenced by init_only(), MakeNewLevelFromCoarse(), RemakeLevel(), and setup_step().

Here is the caller graph for this function:

◆ setPlotVariables()

void REMORA::setPlotVariables ( const std::string &  pp_plot_var_names)
private
Parameters
pp_plot_var_nameslist of variable names to plot read in from parameter file

Definition at line 18 of file REMORA_Plotfile.cpp.

Referenced by REMORA().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRecordDataInfo()

void REMORA::setRecordDataInfo ( int  i,
const std::string &  filename 
)
inlineprivate

Definition at line 1377 of file REMORA.H.

Referenced by ReadParameters().

Here is the caller graph for this function:

◆ setup_step()

void REMORA::setup_step ( int  lev,
amrex::Real  time,
amrex::Real  dt_lev 
)

Set everything up for a step on a level.

Parameters
[in]levlevel to operate on
[in]timetime at start of step
[in]dt_levtime step at level

Definition at line 11 of file REMORA_setup_step.cpp.

Referenced by Advance(), and timeStepML().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stretch_transform()

void REMORA::stretch_transform ( int  lev)

Calculate vertical stretched coordinates.

Parameters
[in]levlevel to operate on

Definition at line 15 of file REMORA_DepthStretchTransform.H.

Referenced by advance_3d(), init_only(), MakeNewLevelFromCoarse(), ReadCheckpointFile(), and RemakeLevel().

Here is the caller graph for this function:

◆ sum_integrated_quantities()

void REMORA::sum_integrated_quantities ( amrex::Real  time)

Integrate conserved quantities for diagnostics.

Parameters
[in]timecurrent time

Definition at line 11 of file REMORA_SumIQ.cpp.

Referenced by InitData(), and post_timestep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ t3dmix()

void REMORA::t3dmix ( const amrex::Box &  bx,
const amrex::Array4< amrex::Real > &  state,
const amrex::Array4< amrex::Real > &  state_rhs,
const amrex::Array4< amrex::Real const > &  diff2,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  pm,
const amrex::Array4< amrex::Real const > &  pn,
const amrex::Array4< amrex::Real const > &  msku,
const amrex::Array4< amrex::Real const > &  mskv,
const amrex::Real  dt_lev,
const int  ncomp 
)

Harmonic diffusivity for tracers.

Parameters
[in]bxbox to operate on
[in,out]statescalar data
[out]state_rhsscalar data RHS
[in]diff2diffusivity
[in]Hzvertical cell height
[in]pm1/dx
[in]pn1/dy
[in]mskuland-sea mask on u-points
[in]mskvland-sea mask on v-points
[in]dt_levtime step at level
[in]ncompnumber of components to do this calculation on

Definition at line 19 of file REMORA_t3dmix.cpp.

Referenced by setup_step().

Here is the caller graph for this function:

◆ timeStep()

void REMORA::timeStep ( int  lev,
amrex::Real  time,
int  iteration 
)
private

advance a level by dt, includes a recursive call for finer levels

Parameters
[in]levlevel of refinement
[in]timesimulation time at start of step
[in]iterationiteration in subcycling, if using

Definition at line 11 of file REMORA_TimeStep.cpp.

Referenced by Evolve(), and timeStep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timeStepML()

void REMORA::timeStepML ( amrex::Real  time,
int  iteration 
)
private

advance all levels by dt, loops over finer levels

Parameters
[in]timesimulation time at start of step
[in]iterationiteration in subcycling, if using

Definition at line 10 of file REMORA_TimeStepML.cpp.

Referenced by Evolve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_massflux_3d()

void REMORA::update_massflux_3d ( const amrex::Box &  bx,
const int  ioff,
const int  joff,
const amrex::Array4< amrex::Real > &  phi,
const amrex::Array4< amrex::Real > &  phibar,
const amrex::Array4< amrex::Real > &  Hphi,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  pm_or_pn,
const amrex::Array4< amrex::Real const > &  Dphi1,
const amrex::Array4< amrex::Real const > &  Dphi2,
const amrex::Array4< amrex::Real > &  DC,
const amrex::Array4< amrex::Real > &  FC,
const amrex::Array4< amrex::Real const > &  msk,
const int  nnew 
)

Correct mass flux.

Parameters
[in]bxbox on which to update
[in]ioffoffset in x-direction
[in]joffoffset in y-direction
[in,out]phiu or v
[in,out]phibarubar or vbar
[in,out]Hphiphi-volume flux
[in]Hzvertical cell height
[in]pm_or_pnpm or pn
[in]Dphi_avg1DU_avg1 or DV_avg1
[in]Dphi_avg2DU_avg2 or DV_avg2
DCtemporary
FCtemporary
[in]mskland-sea mask
[in]nnewcomponent of velocity

Definition at line 22 of file REMORA_update_massflux_3d.cpp.

Referenced by advance_3d().

Here is the caller graph for this function:

◆ update_mskp()

void REMORA::update_mskp ( int  lev)

Set psi-point mask to be consistent with rho-point mask.

Parameters
[in]levlevel to operate on

Definition at line 766 of file REMORA_make_new_level.cpp.

Referenced by init_masks_from_netcdf().

Here is the caller graph for this function:

◆ uv3dmix()

void REMORA::uv3dmix ( const amrex::Box &  xbx,
const amrex::Box &  ybx,
const amrex::Array4< amrex::Real > &  u,
const amrex::Array4< amrex::Real > &  v,
const amrex::Array4< amrex::Real const > &  uold,
const amrex::Array4< amrex::Real const > &  vold,
const amrex::Array4< amrex::Real > &  rufrc,
const amrex::Array4< amrex::Real > &  rvfrc,
const amrex::Array4< amrex::Real const > &  visc2_p,
const amrex::Array4< amrex::Real const > &  visc2_r,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  pm,
const amrex::Array4< amrex::Real const > &  pn,
const amrex::Array4< amrex::Real const > &  mskp,
int  nrhs,
int  nnew,
const amrex::Real  dt_lev 
)

Harmonic viscosity.

Parameters
[in]xbxx-nodal tile box
[in]ybxy-nodal tile box
[in,out]uu-direction velocity
[in,out]vv-direction velocity
[in]uoldu-direction velocity at last step
[in]voldv-direction velocity at last step
[in,out]rufrcforcing term for u-velocity RHS
[in,out]rvfrcforcing term for v-velocity RHS
[in]visc2_pharmonic viscosity on psi points
[in]visc2_rharmonic viscosity on rho points
[in]Hzvertical cell height
[in]pm1/dx
[in]pn1/dy
[in]mskpland-sea mask on psi-points
[in]nrhsindex of RHS component
[in]nnewindex of time step to update
[in]dt_levtime step at this level

Definition at line 25 of file REMORA_uv3dmix.cpp.

Referenced by advance_2d(), and setup_step().

Here is the caller graph for this function:

◆ vert_mean_3d()

void REMORA::vert_mean_3d ( const amrex::Box &  bx,
const int  ioff,
const int  joff,
const amrex::Array4< amrex::Real > &  phi,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real const > &  Dphi_avg1,
const amrex::Array4< amrex::Real > &  DC,
const amrex::Array4< amrex::Real > &  CF,
const amrex::Array4< amrex::Real const > &  pm_or_pn,
const amrex::Array4< amrex::Real const > &  msk,
const int  nnew,
const int  N 
)

Adjust 3D momentum variables based on vertical mean momentum.

Parameters
[in]phi_bxbox to update on
[in]ioffx-direction offset
[in]joffy-direction offset
[in,out]phivelocity (u or v)
[in]Dphi_avg1time average of barotropic velocity
DCtemporary
CFtemporary
[in]pm_or_pn1/dx or 1/dy
[in]mskland-sea mask
[in]nnewindex of time step to update
[in]Nnumber of vertical levels

Definition at line 19 of file REMORA_vert_mean_3d.cpp.

Referenced by advance_3d().

Here is the caller graph for this function:

◆ vert_visc_3d()

void REMORA::vert_visc_3d ( const amrex::Box &  bx,
const int  ioff,
const int  joff,
const amrex::Array4< amrex::Real > &  phi,
const amrex::Array4< amrex::Real const > &  Hz,
const amrex::Array4< amrex::Real > &  Hzk,
const amrex::Array4< amrex::Real > &  AK,
const amrex::Array4< amrex::Real const > &  Akv,
const amrex::Array4< amrex::Real > &  BC,
const amrex::Array4< amrex::Real > &  DC,
const amrex::Array4< amrex::Real > &  FC,
const amrex::Array4< amrex::Real > &  CF,
const int  nnew,
const int  N,
const amrex::Real  dt_lev 
)

Calculate effects of vertical viscosity or diffusivity.

Parameters
[in]phi_bxbox to update on
[in]ioffx-direction offset
[in]joffy-direction offset
[in,out]phivelocity (u or v)
[in]Hzvertical height of cells
Hzktemporary
AKtemporary
[in]Akvvertical viscosity coefficient
BCtemporary
DCtemporary
FCtemporary
CFtemporary
[in]nnewindex of time step to update
[in]Nnumber of vertical levels
[in]dt_levtime step at this refinement level

Definition at line 23 of file REMORA_vert_visc_3d.cpp.

Referenced by advance_3d().

Here is the caller graph for this function:

◆ volWgtSumMF()

Real REMORA::volWgtSumMF ( int  lev,
const amrex::MultiFab &  mf,
int  comp,
bool  local,
bool  finemask 
)

Perform the volume-weighted sum.

Parameters
[in]levlevel to calculate on
[in]mfdata to sum over
[in]compcomponent on which to calculate sum
[in]localwhether to do the sum locally
[in]finemaskwhether to mask fine level

Definition at line 121 of file REMORA_SumIQ.cpp.

Referenced by sum_integrated_quantities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeBuildInfo()

void REMORA::writeBuildInfo ( std::ostream &  os)
static

Write build info to os.

Definition at line 135 of file REMORA_writeJobInfo.cpp.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteCheckpointFile()

void REMORA::WriteCheckpointFile ( )
private

write checkpoint file to disk

Definition at line 15 of file REMORA_Checkpoint.cpp.

Referenced by Evolve(), and InitData().

Here is the caller graph for this function:

◆ WriteGenericPlotfileHeaderWithBathymetry()

void REMORA::WriteGenericPlotfileHeaderWithBathymetry ( std::ostream &  HeaderFile,
int  nlevels,
const amrex::Vector< amrex::BoxArray > &  bArray,
const amrex::Vector< std::string > &  varnames,
amrex::Real  time,
const amrex::Vector< int > &  level_steps,
const std::string &  versionName,
const std::string &  levelPrefix,
const std::string &  mfPrefix 
) const

write out header data for an AMReX plotfile

Parameters
HeaderFileoutput stream for header
nlevelsnumber of levels to write out
bArrayvector over levels of BoxArrays
varnamesvariable names to write out
timetime at which to output
level_stepsvector over level of iterations
versionNameversion string for VisIt
levelPrefixstring to prepend to level number
mfPrefixsubdirectory for multifab data

Definition at line 570 of file REMORA_Plotfile.cpp.

Referenced by WriteMultiLevelPlotfileWithBathymetry().

Here is the caller graph for this function:

◆ writeJobInfo()

void REMORA::writeJobInfo ( const std::string &  dir) const

Write job info to stdout.

Definition at line 7 of file REMORA_writeJobInfo.cpp.

Referenced by WritePlotFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteMultiLevelPlotfileWithBathymetry()

void REMORA::WriteMultiLevelPlotfileWithBathymetry ( const std::string &  plotfilename,
int  nlevels,
const amrex::Vector< const amrex::MultiFab * > &  mf,
const amrex::Vector< const amrex::MultiFab * > &  mf_nd,
const amrex::Vector< std::string > &  varnames,
amrex::Real  time,
const amrex::Vector< int > &  level_steps,
const std::string &  versionName = "HyperCLaw-V1.1",
const std::string &  levelPrefix = "Level_",
const std::string &  mfPrefix = "Cell",
const amrex::Vector< std::string > &  extra_dirs = amrex::Vector<std::string>() 
) const

write out particular data to an AMReX plotfile

Parameters
plotfilenamename of plotfile to write to
nlevelsnumber of levels to write out
mfMultiFab of data to write out
mf_ndMultifab of nodal data to write out
varnamesvariable names to write out
timetime at which to output
level_stepsvector over level of iterations
versionNameversion string for VisIt
levelPrefixstring to prepend to level number
mfPrefixsubdirectory for multifab data
extra_dirsadditional subdirectories within plotfile

Definition at line 474 of file REMORA_Plotfile.cpp.

Referenced by WritePlotFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteNCMultiFab()

void REMORA::WriteNCMultiFab ( const amrex::FabArray< amrex::FArrayBox > &  fab,
const std::string &  name,
bool  set_ghost = false 
) const
private

Write MultiFab in NetCDF format.

◆ WriteNCPlotFile()

void REMORA::WriteNCPlotFile ( int  which_step)
private

Write plotfile using NetCDF (wrapper)

Parameters
which_stepcurrent step for output

Definition at line 24 of file REMORA_NCPlotFile.cpp.

Referenced by Evolve(), and InitData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteNCPlotFile_which()

void REMORA::WriteNCPlotFile_which ( int  lev,
int  which_subdomain,
bool  write_header,
ncutils::NCFile ncf,
bool  is_history 
)
private

Write a particular NetCDF plotfile.

Parameters
levlevel of data to output
which_subdomainindex of subdomain if lev != 0
write_headerwhether to write a header
ncfnetcdf file object
is_historywhether the file being written is a history file

Definition at line 109 of file REMORA_NCPlotFile.cpp.

Referenced by WriteNCPlotFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WritePlotFile()

void REMORA::WritePlotFile ( )

main driver for writing AMReX plotfiles

Definition at line 147 of file REMORA_Plotfile.cpp.

Referenced by Evolve(), InitData(), and timeStepML().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ advflux_reg

amrex::Vector<amrex::YAFluxRegister*> REMORA::advflux_reg
private

array of flux registers for refluxing in multilevel

Definition at line 1111 of file REMORA.H.

Referenced by getAdvFluxReg(), InitData(), and REMORA().

◆ bdry_time_varname

std::string REMORA::bdry_time_varname = "ocean_time"
private

Name of time field for boundary data.

Definition at line 1278 of file REMORA.H.

Referenced by init_bdry_from_netcdf(), and ReadParameters().

◆ bdy_data_xhi

amrex::Vector<amrex::Vector<amrex::FArrayBox> > REMORA::bdy_data_xhi
private

Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Eastern boundary data from file.

Definition at line 992 of file REMORA.H.

Referenced by fill_from_bdyfiles(), FillCoarsePatch(), init_bdry_from_netcdf(), ReadCheckpointFile(), and WriteCheckpointFile().

◆ bdy_data_xlo

amrex::Vector<amrex::Vector<amrex::FArrayBox> > REMORA::bdy_data_xlo
private

Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Western boundary data from file.

Definition at line 990 of file REMORA.H.

Referenced by fill_from_bdyfiles(), FillCoarsePatch(), init_bdry_from_netcdf(), ReadCheckpointFile(), and WriteCheckpointFile().

◆ bdy_data_yhi

amrex::Vector<amrex::Vector<amrex::FArrayBox> > REMORA::bdy_data_yhi
private

Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Northern boundary data from file.

Definition at line 996 of file REMORA.H.

Referenced by fill_from_bdyfiles(), FillCoarsePatch(), init_bdry_from_netcdf(), ReadCheckpointFile(), and WriteCheckpointFile().

◆ bdy_data_ylo

amrex::Vector<amrex::Vector<amrex::FArrayBox> > REMORA::bdy_data_ylo
private

Vectors (over time) of Vector (over variables) of FArrayBoxs for holding Southern boundary data from file.

Definition at line 994 of file REMORA.H.

Referenced by fill_from_bdyfiles(), FillCoarsePatch(), init_bdry_from_netcdf(), ReadCheckpointFile(), and WriteCheckpointFile().

◆ bdy_index

amrex::Vector<int> REMORA::bdy_index
private

Container to connect boundary data being read in boundary condition containers.

Needed for phys_bc_need_data to work correctly

Definition at line 1140 of file REMORA.H.

Referenced by init_bcs().

◆ bdy_time_interval

amrex::Real REMORA::bdy_time_interval
private

Interval between boundary data times.

Definition at line 1001 of file REMORA.H.

Referenced by fill_from_bdyfiles(), FillCoarsePatch(), init_bdry_from_netcdf(), ReadCheckpointFile(), and WriteCheckpointFile().

◆ boxes_at_level

amrex::Vector<amrex::Vector<amrex::Box> > REMORA::boxes_at_level
private

◆ cf_set_width

int REMORA::cf_set_width {0}
private

Width for fixing values at coarse-fine interface.

Definition at line 1048 of file REMORA.H.

Referenced by Construct_REMORAFillPatchers(), Define_REMORAFillPatchers(), FillPatch(), and FillPatchNoBC().

◆ cf_width

int REMORA::cf_width {0}
private

Nudging width at coarse-fine interface.

Definition at line 1046 of file REMORA.H.

Referenced by Construct_REMORAFillPatchers(), Define_REMORAFillPatchers(), init_stuff(), InitData(), MakeNewLevelFromCoarse(), RemakeLevel(), and timeStepML().

◆ cfl

amrex::Real REMORA::cfl = 0.8_rt
staticprivate

CFL condition.

Definition at line 1170 of file REMORA.H.

Referenced by estTimeStep(), and ReadParameters().

◆ change_max

amrex::Real REMORA::change_max = 1.1_rt
staticprivate

Fraction maximum change in subsequent time steps.

Definition at line 1172 of file REMORA.H.

Referenced by ComputeDt(), and ReadParameters().

◆ check_file

std::string REMORA::check_file {"chk"}
private

Checkpoint file prefix.

Definition at line 1196 of file REMORA.H.

Referenced by ReadParameters(), and WriteCheckpointFile().

◆ check_int

int REMORA::check_int = -1
private

Checkpoint output interval in iterations.

Definition at line 1198 of file REMORA.H.

Referenced by Evolve(), InitData(), and ReadParameters().

◆ check_int_time

amrex::Real REMORA::check_int_time = amrex::Real(-1.0)
private

Checkpoint output interval in seconds.

Definition at line 1200 of file REMORA.H.

Referenced by Evolve(), InitData(), and ReadParameters().

◆ chunk_history_file

bool REMORA::chunk_history_file = false
private

Whether to chunk netcdf history file.

Definition at line 1203 of file REMORA.H.

Referenced by ReadParameters(), WriteNCPlotFile(), and WriteNCPlotFile_which().

◆ clim_salt_time_varname

std::string REMORA::clim_salt_time_varname = "ocean_time"
private

Name of time field for salinity climatology data.

Definition at line 1288 of file REMORA.H.

Referenced by init_only(), and ReadParameters().

◆ clim_temp_time_varname

std::string REMORA::clim_temp_time_varname = "ocean_time"
private

Name of time field for temperature climatology data.

Definition at line 1290 of file REMORA.H.

Referenced by init_only(), and ReadParameters().

◆ clim_u_time_varname

std::string REMORA::clim_u_time_varname = "ocean_time"
private

Name of time field for u climatology data.

Definition at line 1284 of file REMORA.H.

Referenced by init_only(), and ReadParameters().

◆ clim_ubar_time_varname

std::string REMORA::clim_ubar_time_varname = "ocean_time"
private

Name of time field for ubar climatology data.

Definition at line 1280 of file REMORA.H.

Referenced by init_only(), and ReadParameters().

◆ clim_v_time_varname

std::string REMORA::clim_v_time_varname = "ocean_time"
private

Name of time field for v climatology data.

Definition at line 1286 of file REMORA.H.

Referenced by init_only(), and ReadParameters().

◆ clim_vbar_time_varname

std::string REMORA::clim_vbar_time_varname = "ocean_time"
private

Name of time field for vbar climatology data.

Definition at line 1282 of file REMORA.H.

Referenced by ReadParameters().

◆ cons_names

const amrex::Vector<std::string> REMORA::cons_names {"temp", "salt", "scalar"}
private

Names of scalars for plotfile output.

Definition at line 1215 of file REMORA.H.

Referenced by setPlotVariables(), and WritePlotFile().

◆ cons_new

◆ cons_old

amrex::Vector<amrex::MultiFab*> REMORA::cons_old

multilevel data container for last step's scalar data: temperature, salinity, passive scalar

Definition at line 208 of file REMORA.H.

Referenced by advance_3d(), ClearLevel(), gls_corrector(), InitData(), MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), ReadCheckpointFile(), RemakeLevel(), REMORA(), setup_step(), timeStep(), timeStepML(), and WriteCheckpointFile().

◆ datalog

amrex::Vector<std::unique_ptr<std::fstream> > REMORA::datalog
private

Definition at line 1390 of file REMORA.H.

Referenced by DataLog(), NumDataLogs(), ReadParameters(), and setRecordDataInfo().

◆ datalogname

amrex::Vector<std::string> REMORA::datalogname
private

Definition at line 1391 of file REMORA.H.

Referenced by DataLogName(), and ReadParameters().

◆ derived_names

const amrex::Vector<std::string> REMORA::derived_names {"vorticity"}
private

Names of derived fields for plotfiles.

Definition at line 1218 of file REMORA.H.

Referenced by setPlotVariables().

◆ do_substep

int REMORA::do_substep = 0
private

Whether to substep fine levels in time.

Definition at line 1183 of file REMORA.H.

Referenced by ReadParameters(), and REMORA().

◆ domain_bc_type

amrex::Array<std::string,2*AMREX_SPACEDIM> REMORA::domain_bc_type
private

Array of strings describing domain boundary conditions.

Definition at line 1125 of file REMORA.H.

Referenced by init_bcs(), and writeJobInfo().

◆ domain_bcs_type

amrex::Vector<amrex::BCRec> REMORA::domain_bcs_type
private

◆ domain_bcs_type_d

amrex::Gpu::DeviceVector<amrex::BCRec> REMORA::domain_bcs_type_d
private

GPU vector (over BCVars) of BCRecs.

Definition at line 1122 of file REMORA.H.

Referenced by FillCoarsePatch(), init_bcs(), and init_stuff().

◆ dt

amrex::Vector<amrex::Real> REMORA::dt
private

time step at each level

Definition at line 1102 of file REMORA.H.

Referenced by ComputeDt(), Evolve(), InitData(), ReadCheckpointFile(), REMORA(), set_zeta_to_Ztavg(), timeStep(), timeStepML(), and WriteCheckpointFile().

◆ file_min_digits

int REMORA::file_min_digits = 5
staticprivate

Minimum number of digits in plotfile name or chunked history file.

Definition at line 1256 of file REMORA.H.

Referenced by ReadParameters(), WriteCheckpointFile(), WriteNCPlotFile(), and WritePlotFile().

◆ fine_mask

amrex::MultiFab REMORA::fine_mask
private

Mask that zeroes out values on a coarse level underlying grids on the next finest level.

Definition at line 1304 of file REMORA.H.

Referenced by build_fine_mask().

◆ fixed_dt

amrex::Real REMORA::fixed_dt = -1.0_rt
staticprivate

User specified fixed baroclinic time step.

Definition at line 1174 of file REMORA.H.

Referenced by estTimeStep(), ReadParameters(), and set_weights().

◆ fixed_fast_dt

amrex::Real REMORA::fixed_fast_dt = -1.0_rt
staticprivate

User specified fixed barotropic time step.

Definition at line 1176 of file REMORA.H.

Referenced by ReadParameters(), and set_weights().

◆ fixed_ndtfast_ratio

int REMORA::fixed_ndtfast_ratio = 0
staticprivate

User specified, number of barotropic steps per baroclinic step.

Definition at line 1178 of file REMORA.H.

Referenced by Advance(), ReadParameters(), set_weights(), and timeStepML().

◆ FPr_c

amrex::Vector<REMORAFillPatcher> REMORA::FPr_c
private

Vector over levels of FillPatchers for scalars.

Definition at line 1051 of file REMORA.H.

Referenced by Construct_REMORAFillPatchers(), Define_REMORAFillPatchers(), FillPatch(), FillPatchNoBC(), and timeStepML().

◆ FPr_u

amrex::Vector<REMORAFillPatcher> REMORA::FPr_u
private

Vector over levels of FillPatchers for u (3D)

Definition at line 1053 of file REMORA.H.

Referenced by Construct_REMORAFillPatchers(), Define_REMORAFillPatchers(), FillPatch(), FillPatchNoBC(), and timeStepML().

◆ FPr_ubar

amrex::Vector<REMORAFillPatcher> REMORA::FPr_ubar
private

Vector over levels of FillPatchers for ubar (2D)

Definition at line 1061 of file REMORA.H.

Referenced by Construct_REMORAFillPatchers(), Define_REMORAFillPatchers(), FillPatch(), FillPatchNoBC(), and timeStepML().

◆ FPr_v

amrex::Vector<REMORAFillPatcher> REMORA::FPr_v
private

Vector over levels of FillPatchers for v (3D)

Definition at line 1055 of file REMORA.H.

Referenced by Construct_REMORAFillPatchers(), Define_REMORAFillPatchers(), FillPatch(), FillPatchNoBC(), and timeStepML().

◆ FPr_vbar

amrex::Vector<REMORAFillPatcher> REMORA::FPr_vbar
private

Vector over levels of FillPatchers for vbar (2D)

Definition at line 1063 of file REMORA.H.

Referenced by Construct_REMORAFillPatchers(), Define_REMORAFillPatchers(), FillPatch(), FillPatchNoBC(), and timeStepML().

◆ FPr_w

amrex::Vector<REMORAFillPatcher> REMORA::FPr_w
private

Vector over levels of FillPatchers for w.

Definition at line 1057 of file REMORA.H.

Referenced by Construct_REMORAFillPatchers(), Define_REMORAFillPatchers(), FillPatch(), FillPatchNoBC(), and timeStepML().

◆ frc_time_varname

std::string REMORA::frc_time_varname = ""
private

Name of time field for forcing data.

Definition at line 1294 of file REMORA.H.

Referenced by init_only(), and ReadParameters().

◆ history_count

int REMORA::history_count = 0
private

Counter for which time index we are writing to in the netcdf history file.

Definition at line 1210 of file REMORA.H.

Referenced by Evolve(), InitData(), WriteNCPlotFile(), and WriteNCPlotFile_which().

◆ istep

amrex::Vector<int> REMORA::istep
private

◆ last_check_file_step

int REMORA::last_check_file_step
private

Step when we last output a checkpoint file.

Definition at line 1148 of file REMORA.H.

Referenced by Evolve(), InitData(), and restart().

◆ last_check_file_time

amrex::Real REMORA::last_check_file_time
private

Simulation time when we last output a checkpoint file.

Definition at line 1150 of file REMORA.H.

Referenced by Evolve(), and InitData().

◆ last_plot_file_step

int REMORA::last_plot_file_step
private

Step when we last output a plotfile.

Definition at line 1143 of file REMORA.H.

Referenced by Evolve(), and InitData().

◆ last_plot_file_time

amrex::Real REMORA::last_plot_file_time
private

Simulation time when we last output a plotfile.

Definition at line 1145 of file REMORA.H.

Referenced by Evolve(), and InitData().

◆ m_bc_extdir_vals

amrex::Array<amrex::Array<amrex::Real, AMREX_SPACEDIM*2>,AMREX_SPACEDIM+NCONS+8> REMORA::m_bc_extdir_vals
private

Array holding the Dirichlet values at walls which need them.

Definition at line 1128 of file REMORA.H.

Referenced by FillCoarsePatch(), init_bcs(), and init_stuff().

◆ max_step

int REMORA::max_step = std::numeric_limits<int>::max()
private

maximum number of steps

Definition at line 1158 of file REMORA.H.

Referenced by Evolve(), ReadParameters(), and WriteNCPlotFile_which().

◆ nc_bdry_file

amrex::Vector< std::string > REMORA::nc_bdry_file = {""}
staticprivate

NetCDF boundary data.

Definition at line 48 of file REMORA.H.

Referenced by init_bdry_from_netcdf(), and ReadParameters().

◆ nc_clim_coeff_file

std::string REMORA::nc_clim_coeff_file
private

NetCDF climatology coefficient file.

Definition at line 1275 of file REMORA.H.

Referenced by init_clim_nudg_coeff_from_netcdf(), and ReadParameters().

◆ nc_clim_his_file

std::string REMORA::nc_clim_his_file
private

NetCDF climatology history file.

Definition at line 1273 of file REMORA.H.

Referenced by init_only(), and ReadParameters().

◆ nc_frc_file

std::string REMORA::nc_frc_file
private

NetCDF forcing file.

Definition at line 1269 of file REMORA.H.

Referenced by init_only(), and ReadParameters().

◆ nc_grid_file

amrex::Vector< amrex::Vector< std::string > > REMORA::nc_grid_file = {{""}}
staticprivate

NetCDF grid file.

Definition at line 50 of file REMORA.H.

Referenced by init_bathymetry_from_netcdf(), init_coriolis_from_netcdf(), init_masks_from_netcdf(), and ReadParameters().

◆ nc_init_file

amrex::Vector< amrex::Vector< std::string > > REMORA::nc_init_file = {{""}}
staticprivate

NetCDF initialization file.

Definition at line 49 of file REMORA.H.

Referenced by init_data_from_netcdf(), init_zeta_from_netcdf(), and ReadParameters().

◆ nc_riv_file

std::string REMORA::nc_riv_file
private

Definition at line 1270 of file REMORA.H.

Referenced by init_only(), init_riv_pos_from_netcdf(), and ReadParameters().

◆ nfast

int REMORA::nfast
private

Number of fast steps to take.

Definition at line 1180 of file REMORA.H.

Referenced by Advance(), advance_2d(), set_weights(), and timeStepML().

◆ nsubsteps

amrex::Vector<int> REMORA::nsubsteps
private

How many substeps on each level?

Definition at line 1096 of file REMORA.H.

Referenced by ComputeDt(), REMORA(), timeStep(), and timeStepML().

◆ num_boxes_at_level

amrex::Vector<int> REMORA::num_boxes_at_level
private

◆ num_files_at_level

amrex::Vector<int> REMORA::num_files_at_level
private

how many netcdf input files specified at each level

Definition at line 1089 of file REMORA.H.

Referenced by ReadParameters().

◆ phys_bc_need_data

amrex::GpuArray<amrex::GpuArray<bool, AMREX_SPACEDIM*2>,BdyVars::NumTypes+1> REMORA::phys_bc_need_data
private

These are flags that indicate whether we need to read in boundary data from file.

Definition at line 1134 of file REMORA.H.

Referenced by init_bcs(), and init_bdry_from_netcdf().

◆ phys_bc_type

amrex::GpuArray<amrex::GpuArray<REMORA_BC, AMREX_SPACEDIM*2>,BCVars::NumTypes> REMORA::phys_bc_type
private

Array holding the "physical" boundary condition types (e.g. "inflow")

Definition at line 1131 of file REMORA.H.

Referenced by FillBdyCCVels(), and init_bcs().

◆ physbcs

amrex::Vector<std::unique_ptr<REMORAPhysBCFunct> > REMORA::physbcs
private

Vector (over level) of functors to apply physical boundary conditions.

Definition at line 1108 of file REMORA.H.

Referenced by advance_3d(), FillPatch(), gls_corrector(), init_stuff(), init_zeta_from_netcdf(), REMORA(), and setup_step().

◆ plot_file_name

std::string REMORA::plot_file_name {"plt_"}
private

Plotfile prefix.

Definition at line 1190 of file REMORA.H.

Referenced by ReadParameters(), WriteNCPlotFile(), and WritePlotFile().

◆ plot_file_on_restart

int REMORA::plot_file_on_restart = 1
private

Whether to output a plotfile on restart from checkpoint.

Definition at line 1152 of file REMORA.H.

Referenced by InitData().

◆ plot_int

int REMORA::plot_int = -1
private

Plotfile output interval in iterations.

Definition at line 1192 of file REMORA.H.

Referenced by Evolve(), InitData(), ReadParameters(), and WriteNCPlotFile_which().

◆ plot_int_time

amrex::Real REMORA::plot_int_time = amrex::Real(-1.0)
private

Plotfile output interval in seconds.

Definition at line 1194 of file REMORA.H.

Referenced by Evolve(), InitData(), and ReadParameters().

◆ plot_var_names

amrex::Vector<std::string> REMORA::plot_var_names
private

Names of variables to output to AMReX plotfile.

Definition at line 1213 of file REMORA.H.

Referenced by appendPlotVariables(), setPlotVariables(), and WritePlotFile().

◆ plotfile_type

PlotfileType REMORA::plotfile_type = PlotfileType::amrex
staticprivate

Native or NetCDF plotfile output.

Definition at line 1259 of file REMORA.H.

Referenced by Evolve(), InitData(), ReadParameters(), and WritePlotFile().

◆ pp_prefix

std::string REMORA::pp_prefix {"remora"}

default prefix for input file parameters

Definition at line 205 of file REMORA.H.

Referenced by appendPlotVariables(), ReadParameters(), refinement_criteria_setup(), and setPlotVariables().

◆ previousCPUTimeUsed

amrex::Real REMORA::previousCPUTimeUsed = 0.0_rt
staticprivate

Accumulator variable for CPU time used thusfar.

Definition at line 1359 of file REMORA.H.

Referenced by getCPUTime().

◆ prob

std::unique_ptr<ProblemBase> REMORA::prob = nullptr
private

Pointer to container of analytical functions for problem definition.

Definition at line 1084 of file REMORA.H.

Referenced by init_analytic(), REMORA(), set_analytic_vmix(), set_bathymetry(), set_coriolis(), set_grid_scale(), set_hmixcoef(), set_smflux(), set_wind(), and set_zeta().

◆ ref_tags

Vector< AMRErrorTag > REMORA::ref_tags
staticprivate

Holds info for dynamically generated tagging criteria.

Definition at line 1301 of file REMORA.H.

Referenced by ErrorEst(), and refinement_criteria_setup().

◆ regrid_int

int REMORA::regrid_int = 2
private

how often each level regrids the higher levels of refinement (after a level advances that many time steps)

Definition at line 1186 of file REMORA.H.

Referenced by ReadParameters(), timeStep(), and timeStepML().

◆ restart_chkfile

std::string REMORA::restart_chkfile = ""
private

If set, restart from this checkpoint file.

Definition at line 1166 of file REMORA.H.

Referenced by InitData(), MakeNewLevelFromScratch(), ReadCheckpointFile(), and ReadParameters().

◆ riv_time_varname

std::string REMORA::riv_time_varname = "river_time"
private

Name of time field for river time.

Definition at line 1292 of file REMORA.H.

Referenced by init_only(), and ReadParameters().

◆ river_direction

amrex::Gpu::DeviceVector<int> REMORA::river_direction
private

Vector over rivers of river direction: 0: u-face; 1: v-face; 2: w-face.

Definition at line 1038 of file REMORA.H.

Referenced by advance_2d(), advance_3d(), init_riv_pos_from_netcdf(), prestep_t_advection(), and rhs_t_3d().

◆ river_source_cons

amrex::Vector<NCTimeSeriesRiver*> REMORA::river_source_cons
private

Vector of data containers for scalar data in rivers.

Definition at line 1029 of file REMORA.H.

Referenced by advance_3d(), init_only(), and prestep().

◆ river_source_transport

NCTimeSeriesRiver* REMORA::river_source_transport
private

Data container for momentum transport in rivers.

Definition at line 1031 of file REMORA.H.

Referenced by advance_3d(), and init_only().

◆ river_source_transportbar

NCTimeSeriesRiver* REMORA::river_source_transportbar
private

Data container for vertically integrated momentum transport in rivers.

Definition at line 1033 of file REMORA.H.

Referenced by advance_2d(), and init_only().

◆ salt_clim_data_from_file

NCTimeSeries* REMORA::salt_clim_data_from_file
private

Data container for salinity climatology data read from file.

Definition at line 1026 of file REMORA.H.

Referenced by advance_3d(), and init_only().

◆ set_bcs_by_var

bool REMORA::set_bcs_by_var
private

whether to set boundary conditions by variable rather than just by side

Definition at line 1105 of file REMORA.H.

Referenced by init_bcs().

◆ solverChoice

◆ start_bdy_time

amrex::Real REMORA::start_bdy_time
private

Start time in the time series of boundary data.

Definition at line 999 of file REMORA.H.

Referenced by fill_from_bdyfiles(), init_bdry_from_netcdf(), ReadCheckpointFile(), WriteCheckpointFile(), and WriteNCPlotFile_which().

◆ start_time

amrex::Real REMORA::start_time = 0.0
private

Time of the start of the simulation, in seconds.

Definition at line 1163 of file REMORA.H.

Referenced by InitData(), and ReadParameters().

◆ startCPUTime

amrex::Real REMORA::startCPUTime = 0.0_rt
staticprivate

Variable for CPU timing.

Definition at line 1357 of file REMORA.H.

Referenced by getCPUTime(), and InitData().

◆ steps_per_history_file

int REMORA::steps_per_history_file = -1
private

Number of time steps per netcdf history file.

-1 is the default and means code will automatically compute number of steps per file based on grid size to keep files < 2 GB

Definition at line 1208 of file REMORA.H.

Referenced by ReadParameters(), WriteNCPlotFile(), and WriteNCPlotFile_which().

◆ stop_time

amrex::Real REMORA::stop_time = std::numeric_limits<amrex::Real>::max()
private

Time to stop.

Definition at line 1160 of file REMORA.H.

Referenced by ComputeDt(), Evolve(), and ReadParameters().

◆ sum_interval

int REMORA::sum_interval = -1
staticprivate

Diagnostic sum output interval in number of steps.

Definition at line 1251 of file REMORA.H.

Referenced by InitData(), post_timestep(), and ReadParameters().

◆ sum_per

amrex::Real REMORA::sum_per = -1.0_rt
staticprivate

Diagnostic sum output interval in time.

Definition at line 1253 of file REMORA.H.

Referenced by InitData(), post_timestep(), and ReadParameters().

◆ sustr_data_from_file

NCTimeSeries* REMORA::sustr_data_from_file
private

Data container for u-component surface momentum flux read from file.

Definition at line 1007 of file REMORA.H.

Referenced by init_only(), and set_smflux().

◆ svstr_data_from_file

NCTimeSeries* REMORA::svstr_data_from_file
private

Data container for v-component surface momentum flux read from file.

Definition at line 1009 of file REMORA.H.

Referenced by init_only(), and set_smflux().

◆ t_new

◆ t_old

◆ temp_clim_data_from_file

NCTimeSeries* REMORA::temp_clim_data_from_file
private

Data container for temperature climatology data read from file.

Definition at line 1024 of file REMORA.H.

Referenced by advance_3d(), and init_only().

◆ total_nc_plot_file_step

int REMORA::total_nc_plot_file_step = 1
static

Definition at line 905 of file REMORA.H.

Referenced by WriteNCPlotFile_which().

◆ u_clim_data_from_file

NCTimeSeries* REMORA::u_clim_data_from_file
private

Data container for u-velocity climatology data read from file.

Definition at line 1020 of file REMORA.H.

Referenced by init_only(), and setup_step().

◆ ubar_clim_data_from_file

NCTimeSeries* REMORA::ubar_clim_data_from_file
private

Data container for ubar climatology data read from file.

Definition at line 1016 of file REMORA.H.

Referenced by advance_2d(), and init_only().

◆ Uwind_data_from_file

NCTimeSeries* REMORA::Uwind_data_from_file
private

Data container for u-direction wind read from file.

Definition at line 1011 of file REMORA.H.

Referenced by init_only(), and set_wind().

◆ v_clim_data_from_file

NCTimeSeries* REMORA::v_clim_data_from_file
private

Data container for v-velocity climatology data read from file.

Definition at line 1022 of file REMORA.H.

Referenced by init_only(), and setup_step().

◆ vbar_clim_data_from_file

NCTimeSeries* REMORA::vbar_clim_data_from_file
private

Data container for vbar climatology data read from file.

Definition at line 1018 of file REMORA.H.

Referenced by advance_2d(), and init_only().

◆ vec_Akk

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Akk

Turbulent kinetic energy vertical diffusion coefficient.

Definition at line 409 of file REMORA.H.

Referenced by advance_3d(), gls_corrector(), init_gls_vmix(), init_stuff(), ReadCheckpointFile(), resize_stuff(), and WriteCheckpointFile().

◆ vec_Akp

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Akp

Turbulent length scale vertical diffusion coefficient.

Definition at line 411 of file REMORA.H.

Referenced by advance_3d(), gls_corrector(), init_gls_vmix(), init_stuff(), ReadCheckpointFile(), resize_stuff(), and WriteCheckpointFile().

◆ vec_Akt

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Akt

◆ vec_Akv

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Akv

◆ vec_alpha

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_alpha

Thermal expansion coefficient (3D)

Definition at line 392 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), and setup_step().

◆ vec_beta

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_beta

Saline contraction coefficient (3D)

Definition at line 394 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), and setup_step().

◆ vec_btflux

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_btflux

Bottom tracer flux; input arrays.

Definition at line 305 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), and setup_step().

◆ vec_btflx

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_btflx

Bottom tracer flux; working arrays.

Definition at line 303 of file REMORA.H.

Referenced by init_stuff(), prestep(), resize_stuff(), and setup_step().

◆ vec_bustr

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_bustr

Bottom stress in the u direction.

Definition at line 320 of file REMORA.H.

Referenced by gls_corrector(), init_stuff(), resize_stuff(), and setup_step().

◆ vec_bvf

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_bvf

Brunt-Vaisala frequency (3D)

Definition at line 390 of file REMORA.H.

Referenced by gls_corrector(), init_stuff(), resize_stuff(), and setup_step().

◆ vec_bvstr

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_bvstr

Bottom stress in the v direction.

Definition at line 322 of file REMORA.H.

Referenced by gls_corrector(), init_stuff(), resize_stuff(), and setup_step().

◆ vec_Cs_r

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Cs_r

Stretching coefficients at rho points.

Definition at line 271 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), stretch_transform(), and WriteNCPlotFile_which().

◆ vec_Cs_w

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Cs_w

Stretching coefficients at w points.

Definition at line 273 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), stretch_transform(), and WriteNCPlotFile_which().

◆ vec_diff2

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_diff2

Harmonic diffusivity for temperature / salinity.

Definition at line 258 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), set_hmixcoef(), and setup_step().

◆ vec_DU_avg1

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_DU_avg1

time average of barotropic x velocity flux (2D)

Definition at line 325 of file REMORA.H.

Referenced by advance_2d_onestep(), advance_3d_ml(), init_stuff(), ReadCheckpointFile(), resize_stuff(), and WriteCheckpointFile().

◆ vec_DU_avg2

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_DU_avg2

correct time average of barotropic x velocity flux for coupling (2D)

Definition at line 327 of file REMORA.H.

Referenced by advance_2d_onestep(), advance_3d_ml(), init_stuff(), ReadCheckpointFile(), resize_stuff(), and WriteCheckpointFile().

◆ vec_DV_avg1

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_DV_avg1

time average of barotropic y velocity flux

Definition at line 329 of file REMORA.H.

Referenced by advance_2d_onestep(), advance_3d_ml(), init_stuff(), ReadCheckpointFile(), resize_stuff(), and WriteCheckpointFile().

◆ vec_DV_avg2

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_DV_avg2

correct time average of barotropic y velocity flux for coupling (2D)

Definition at line 331 of file REMORA.H.

Referenced by advance_2d_onestep(), advance_3d_ml(), init_stuff(), ReadCheckpointFile(), resize_stuff(), and WriteCheckpointFile().

◆ vec_evap

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_evap

evaporation rate [kg/m^2/s]

Definition at line 310 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), set_zeta_to_Ztavg(), and setup_step().

◆ vec_fcor

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_fcor

◆ vec_gls

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_gls

Turbulent generic length scale.

Definition at line 405 of file REMORA.H.

Referenced by advance_3d(), gls_corrector(), gls_prestep(), init_gls_vmix(), init_stuff(), ReadCheckpointFile(), resize_stuff(), setup_step(), and WriteCheckpointFile().

◆ vec_hOfTheConfusingName

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_hOfTheConfusingName

◆ vec_Huon

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Huon

u-volume flux (3D)

Definition at line 234 of file REMORA.H.

Referenced by advance_3d_ml(), gls_corrector(), gls_prestep(), init_stuff(), prestep(), resize_stuff(), and setup_step().

◆ vec_Hvom

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Hvom

v-volume flux (3D)

Definition at line 236 of file REMORA.H.

Referenced by advance_3d_ml(), gls_corrector(), gls_prestep(), init_stuff(), prestep(), resize_stuff(), and setup_step().

◆ vec_Hz

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Hz

Width of cells in the vertical (z-) direction (3D, Hz in ROMS)

Definition at line 232 of file REMORA.H.

Referenced by advance_3d(), advance_3d_ml(), gls_corrector(), gls_prestep(), init_stuff(), prestep(), resize_stuff(), set_2darrays(), setup_step(), stretch_transform(), and volWgtSumMF().

◆ vec_lhflx

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_lhflx

latent heat flux

Definition at line 294 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), and setup_step().

◆ vec_lrflx

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_lrflx

longwave radiation

Definition at line 292 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), and setup_step().

◆ vec_Lscale

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Lscale

Vertical mixing turbulent length scale.

Definition at line 407 of file REMORA.H.

Referenced by gls_corrector(), init_gls_vmix(), init_stuff(), ReadCheckpointFile(), resize_stuff(), and WriteCheckpointFile().

◆ vec_mskp

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_mskp

land/sea mask at cell corners (2D)

Definition at line 352 of file REMORA.H.

Referenced by advance_2d_onestep(), init_masks(), init_masks_from_netcdf(), resize_stuff(), setup_step(), and update_mskp().

◆ vec_mskr

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_mskr

◆ vec_msku

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_msku

◆ vec_mskv

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_mskv

◆ vec_nudg_coeff

amrex::Vector<amrex::Vector<std::unique_ptr<amrex::MultiFab> > > REMORA::vec_nudg_coeff

◆ vec_pm

◆ vec_pn

◆ vec_rain

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rain

precipitation rate [kg/m^2/s]

Definition at line 308 of file REMORA.H.

Referenced by bulk_fluxes(), init_stuff(), resize_stuff(), and set_zeta_to_Ztavg().

◆ vec_rdrag

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rdrag

Linear drag coefficient [m/s], defined at rho points.

Definition at line 313 of file REMORA.H.

Referenced by init_stuff(), ReadCheckpointFile(), resize_stuff(), setup_step(), and WriteCheckpointFile().

◆ vec_rdrag2

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rdrag2

Quadratic drag coefficient [unitless], defined at rho points.

Definition at line 315 of file REMORA.H.

Referenced by init_stuff(), ReadCheckpointFile(), resize_stuff(), setup_step(), and WriteCheckpointFile().

◆ vec_rhoA

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rhoA

vertically-averaged density

Definition at line 388 of file REMORA.H.

Referenced by advance_2d_onestep(), init_stuff(), resize_stuff(), and setup_step().

◆ vec_rhoS

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rhoS

density perturbation

Definition at line 386 of file REMORA.H.

Referenced by Advance(), advance_2d_onestep(), init_stuff(), resize_stuff(), and setup_step().

◆ vec_river_position

amrex::Vector<std::unique_ptr<amrex::iMultiFab> > REMORA::vec_river_position
private

iMultiFab for river positions; contents are indices of rivers

Definition at line 1036 of file REMORA.H.

Referenced by advance_2d(), advance_3d(), init_riv_pos_from_netcdf(), init_stuff(), prestep(), and resize_stuff().

◆ vec_ru

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_ru

u velocity RHS (3D, includes horizontal and vertical advection)

Definition at line 238 of file REMORA.H.

Referenced by advance_3d_ml(), init_only(), MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), ReadCheckpointFile(), RemakeLevel(), resize_stuff(), scale_rhs_vars(), scale_rhs_vars_inv(), setup_step(), and WriteCheckpointFile().

◆ vec_ru2d

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_ru2d

u velocity RHS (2D, includes horizontal and vertical advection)

Definition at line 242 of file REMORA.H.

Referenced by advance_2d_onestep(), init_only(), MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), ReadCheckpointFile(), RemakeLevel(), resize_stuff(), scale_rhs_vars(), scale_rhs_vars_inv(), and WriteCheckpointFile().

◆ vec_rubar

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rubar

barotropic x velocity for the RHS (2D)

Definition at line 333 of file REMORA.H.

Referenced by advance_2d_onestep(), init_stuff(), and resize_stuff().

◆ vec_rufrc

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rufrc

u velocity RHS, integrated, including advection and bottom/surface stresses (2D)

Definition at line 246 of file REMORA.H.

Referenced by advance_2d_onestep(), init_stuff(), resize_stuff(), and setup_step().

◆ vec_rv

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rv

v velocity RHS (3D, includes horizontal and vertical advection)

Definition at line 240 of file REMORA.H.

Referenced by advance_3d_ml(), init_only(), MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), ReadCheckpointFile(), RemakeLevel(), resize_stuff(), scale_rhs_vars(), scale_rhs_vars_inv(), setup_step(), and WriteCheckpointFile().

◆ vec_rv2d

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rv2d

v velocity RHS (2D, includes horizontal and vertical advection)

Definition at line 244 of file REMORA.H.

Referenced by advance_2d_onestep(), init_only(), MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), ReadCheckpointFile(), RemakeLevel(), resize_stuff(), scale_rhs_vars(), scale_rhs_vars_inv(), and WriteCheckpointFile().

◆ vec_rvbar

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rvbar

barotropic y velocity for the RHS (2D)

Definition at line 335 of file REMORA.H.

Referenced by advance_2d_onestep(), init_stuff(), and resize_stuff().

◆ vec_rvfrc

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rvfrc

v velocity RHS, integrated, including advection and bottom/surface stresses (2D)

Definition at line 248 of file REMORA.H.

Referenced by advance_2d_onestep(), init_stuff(), resize_stuff(), and setup_step().

◆ vec_rzeta

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_rzeta

free surface height for the RHS (2D)

Definition at line 337 of file REMORA.H.

Referenced by advance_2d_onestep(), init_stuff(), and resize_stuff().

◆ vec_s_r

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_s_r

Scaled vertical coordinate (range [0,1]) that transforms to z, defined at rho points (cell centers)

Definition at line 266 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), stretch_transform(), and WriteNCPlotFile_which().

◆ vec_s_w

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_s_w

Scaled vertical coordinate (range [0,1]) that transforms to z, defined at w-points (cell faces)

Definition at line 268 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), stretch_transform(), and WriteNCPlotFile_which().

◆ vec_shflx

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_shflx

sensible heat flux

Definition at line 296 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), and setup_step().

◆ vec_sstore

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_sstore

additional scratch space for calculations on temp, salt, etc

Definition at line 383 of file REMORA.H.

Referenced by advance_3d_ml(), init_stuff(), prestep(), resize_stuff(), and setup_step().

◆ vec_stflux

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_stflux

Surface tracer flux; input arrays.

Definition at line 301 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), and setup_step().

◆ vec_stflx

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_stflx

Surface tracer flux; working arrays.

Definition at line 299 of file REMORA.H.

Referenced by init_stuff(), prestep(), resize_stuff(), and setup_step().

◆ vec_sustr

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_sustr

Surface stress in the u direction.

Definition at line 282 of file REMORA.H.

Referenced by gls_corrector(), init_only(), init_stuff(), resize_stuff(), set_smflux(), setup_step(), and WriteNCPlotFile_which().

◆ vec_svstr

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_svstr

Surface stress in the v direction.

Definition at line 284 of file REMORA.H.

Referenced by gls_corrector(), init_only(), init_stuff(), resize_stuff(), set_smflux(), setup_step(), and WriteNCPlotFile_which().

◆ vec_tke

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_tke

◆ vec_ubar

◆ vec_uwind

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_uwind

Wind in the u direction, defined at rho-points.

Definition at line 287 of file REMORA.H.

Referenced by init_only(), init_stuff(), resize_stuff(), set_wind(), and setup_step().

◆ vec_vbar

◆ vec_visc2_p

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_visc2_p

Harmonic viscosity defined on the psi points (corners of horizontal grid cells)

Definition at line 254 of file REMORA.H.

Referenced by advance_2d_onestep(), init_stuff(), resize_stuff(), set_hmixcoef(), and setup_step().

◆ vec_visc2_r

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_visc2_r

Harmonic viscosity defined on the rho points (centers)

Definition at line 256 of file REMORA.H.

Referenced by advance_2d_onestep(), init_stuff(), resize_stuff(), set_hmixcoef(), and setup_step().

◆ vec_vwind

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_vwind

Wind in the v direction, defined at rho-points.

Definition at line 289 of file REMORA.H.

Referenced by init_only(), init_stuff(), resize_stuff(), set_wind(), and setup_step().

◆ vec_weight1

amrex::Vector<amrex::Real> REMORA::vec_weight1

Weights for calculating avg1 in 2D advance.

Definition at line 397 of file REMORA.H.

Referenced by advance_2d(), and set_weights().

◆ vec_weight2

amrex::Vector<amrex::Real> REMORA::vec_weight2

Weights for calculating avg2 in 2D advance.

Definition at line 399 of file REMORA.H.

Referenced by advance_2d(), and set_weights().

◆ vec_xp

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_xp

x_grid on psi-points (2D)

Definition at line 378 of file REMORA.H.

Referenced by init_bathymetry_from_netcdf(), init_stuff(), resize_stuff(), set_grid_scale(), and WriteNCPlotFile_which().

◆ vec_xr

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_xr

x_grid on rho points (2D)

Definition at line 363 of file REMORA.H.

Referenced by init_bathymetry_from_netcdf(), init_stuff(), resize_stuff(), set_grid_scale(), and WriteNCPlotFile_which().

◆ vec_xu

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_xu

x_grid on u-points (2D)

Definition at line 368 of file REMORA.H.

Referenced by init_bathymetry_from_netcdf(), init_stuff(), resize_stuff(), set_grid_scale(), and WriteNCPlotFile_which().

◆ vec_xv

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_xv

x_grid on v-points (2D)

Definition at line 373 of file REMORA.H.

Referenced by init_bathymetry_from_netcdf(), init_stuff(), resize_stuff(), set_grid_scale(), and WriteNCPlotFile_which().

◆ vec_yp

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_yp

y_grid on psi-points (2D)

Definition at line 380 of file REMORA.H.

Referenced by init_bathymetry_from_netcdf(), init_stuff(), resize_stuff(), set_grid_scale(), and WriteNCPlotFile_which().

◆ vec_yr

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_yr

y_grid on rho points (2D)

Definition at line 365 of file REMORA.H.

Referenced by init_bathymetry_from_netcdf(), init_stuff(), resize_stuff(), set_grid_scale(), and WriteNCPlotFile_which().

◆ vec_yu

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_yu

y_grid on u-points (2D)

Definition at line 370 of file REMORA.H.

Referenced by init_bathymetry_from_netcdf(), init_stuff(), resize_stuff(), set_grid_scale(), and WriteNCPlotFile_which().

◆ vec_yv

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_yv

y_grid on v-points (2D)

Definition at line 375 of file REMORA.H.

Referenced by init_bathymetry_from_netcdf(), init_stuff(), resize_stuff(), set_grid_scale(), and WriteNCPlotFile_which().

◆ vec_z_phys_nd

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_z_phys_nd

z coordinates at psi points (cell nodes)

Definition at line 276 of file REMORA.H.

Referenced by advance_3d_ml(), init_stuff(), MakeNewLevelFromScratch(), resize_stuff(), stretch_transform(), and WritePlotFile().

◆ vec_z_r

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_z_r

z coordinates at rho points (cell centers)

Definition at line 261 of file REMORA.H.

Referenced by init_stuff(), resize_stuff(), setup_step(), and stretch_transform().

◆ vec_z_w

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_z_w

z coordinates at w points (faces between z-cells)

Definition at line 264 of file REMORA.H.

Referenced by advance_3d_ml(), gls_corrector(), init_stuff(), resize_stuff(), setup_step(), and stretch_transform().

◆ vec_zeta

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_zeta

◆ vec_ZoBot

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_ZoBot

Bottom roughness length [m], defined at rho points.

Definition at line 317 of file REMORA.H.

Referenced by gls_corrector(), init_stuff(), ReadCheckpointFile(), resize_stuff(), setup_step(), and WriteCheckpointFile().

◆ vec_Zt_avg1

amrex::Vector<std::unique_ptr<amrex::MultiFab> > REMORA::vec_Zt_avg1

◆ verbose

int REMORA::verbose = 0
staticprivate

Verbosity level of output.

Definition at line 1248 of file REMORA.H.

Referenced by estTimeStep(), prestep_diffusion(), ReadParameters(), sum_integrated_quantities(), and vert_visc_3d().

◆ Vwind_data_from_file

NCTimeSeries* REMORA::Vwind_data_from_file
private

Data container for v-direction wind read from file.

Definition at line 1013 of file REMORA.H.

Referenced by init_only(), and set_wind().

◆ write_history_file

bool REMORA::write_history_file = true
staticprivate

Whether to output NetCDF files as a single history file with several time steps.

Definition at line 1004 of file REMORA.H.

Referenced by ReadParameters(), and WriteNCPlotFile().

◆ xvel_new

◆ xvel_old

amrex::Vector<amrex::MultiFab*> REMORA::xvel_old

multilevel data container for last step's x velocities (u in ROMS)

Definition at line 210 of file REMORA.H.

Referenced by advance_3d(), ClearLevel(), gls_corrector(), init_only(), InitData(), MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), ReadCheckpointFile(), RemakeLevel(), REMORA(), setup_step(), timeStep(), timeStepML(), and WriteCheckpointFile().

◆ yvel_new

◆ yvel_old

amrex::Vector<amrex::MultiFab*> REMORA::yvel_old

multilevel data container for last step's y velocities (v in ROMS)

Definition at line 212 of file REMORA.H.

Referenced by advance_3d(), ClearLevel(), gls_corrector(), init_only(), InitData(), MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), ReadCheckpointFile(), RemakeLevel(), REMORA(), setup_step(), timeStep(), timeStepML(), and WriteCheckpointFile().

◆ zvel_new

amrex::Vector<amrex::MultiFab*> REMORA::zvel_new

◆ zvel_old

amrex::Vector<amrex::MultiFab*> REMORA::zvel_old

multilevel data container for last step's z velocities (largely unused; W stored separately)

Definition at line 214 of file REMORA.H.

Referenced by ClearLevel(), init_only(), InitData(), MakeNewLevelFromCoarse(), MakeNewLevelFromScratch(), ReadCheckpointFile(), RemakeLevel(), REMORA(), setup_step(), timeStep(), timeStepML(), and WriteCheckpointFile().


The documentation for this class was generated from the following files: