REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_init_from_netcdf.cpp File Reference
#include <REMORA.H>
#include <REMORA_Constants.H>
#include <REMORA_prob_common.H>
#include <REMORA_DataStruct.H>
Include dependency graph for REMORA_init_from_netcdf.cpp:

Go to the source code of this file.

Functions

void read_data_from_netcdf (int, const Box &domain, const std::string &fname, FArrayBox &NC_temp_fab, FArrayBox &NC_salt_fab, FArrayBox &NC_xvel_fab, FArrayBox &NC_yvel_fab, FArrayBox &NC_ubar_fab, FArrayBox &NC_vbar_fab)
 helper function for reading in initial state data from netcdf
 
void read_masks_from_netcdf (int, const Box &domain, const std::string &fname, FArrayBox &NC_mskr_fab, FArrayBox &NC_msku_fab, FArrayBox &NC_mskv_fab)
 helper function for reading in land-sea masks from netcdf
 
Real read_bdry_from_netcdf (const Box &domain, const std::string &fname, Vector< Vector< FArrayBox > > &bdy_data_xlo, Vector< Vector< FArrayBox > > &bdy_data_xhi, Vector< Vector< FArrayBox > > &bdy_data_ylo, Vector< Vector< FArrayBox > > &bdy_data_yhi, int &width, amrex::Real &start_bdy_time, std::string bdry_time_varname, amrex::GpuArray< amrex::GpuArray< bool, AMREX_SPACEDIM *2 >, BdyVars::NumTypes+1 > &)
 helper function for reading boundary data from netcdf
 
void init_state_from_netcdf (int lev, FArrayBox &temp_fab, FArrayBox &salt_fab, FArrayBox &x_vel_fab, FArrayBox &y_vel_fab, FArrayBox &ubar_fab, FArrayBox &vbar_fab, const Vector< FArrayBox > &NC_temp_fab, const Vector< FArrayBox > &NC_salt_fab, const Vector< FArrayBox > &NC_xvel_fab, const Vector< FArrayBox > &NC_yvel_fab, const Vector< FArrayBox > &NC_ubar_fab, const Vector< FArrayBox > &NC_vbar_fab)
 helper function to initialize state from netcdf
 
void read_bathymetry_from_netcdf (int lev, const Box &domain, const std::string &fname, FArrayBox &NC_h_fab, FArrayBox &NC_pm_fab, FArrayBox &NC_pn_fab, FArrayBox &NC_xr_fab, FArrayBox &NC_yr_fab, FArrayBox &NC_xu_fab, FArrayBox &NC_yu_fab, FArrayBox &NC_xv_fab, FArrayBox &NC_yv_fab, FArrayBox &NC_xp_fab, FArrayBox &NC_yp_fab)
 helper function to read bathymetry from netcdf
 
void read_coriolis_from_netcdf (int lev, const Box &domain, const std::string &fname, FArrayBox &NC_fcor_fab)
 helper function to read coriolis factor from netcdf
 
void read_zeta_from_netcdf (int lev, const Box &domain, const std::string &fname, FArrayBox &NC_zeta_fab)
 helper function to read sea surface height from netcdf
 
void read_clim_nudg_coeff_from_netcdf (int lev, const Box &domain, const std::string &fname, bool do_m2_clim_nudg, bool do_m3_clim_nudg, bool do_temp_clim_nudg, bool do_salt_clim_nudg, FArrayBox &NC_M2NC_fab, FArrayBox &NC_M3NC_fab, FArrayBox &NC_TempNC_fab, FArrayBox &NC_SaltNC_fab)
 helper function to read climatology nudging from netcdf
 
void read_vec_from_netcdf (int lev, const std::string &fname, const std::string &field_name, amrex::Vector< int > &vec_dat)
 helper function to read in vector of data from netcdf
 

Function Documentation

◆ init_state_from_netcdf()

void init_state_from_netcdf ( int  ,
FArrayBox &  temp_fab,
FArrayBox &  salt_fab,
FArrayBox &  x_vel_fab,
FArrayBox &  y_vel_fab,
FArrayBox &  ubar_fab,
FArrayBox &  vbar_fab,
const Vector< FArrayBox > &  NC_temp_fab,
const Vector< FArrayBox > &  NC_salt_fab,
const Vector< FArrayBox > &  NC_xvel_fab,
const Vector< FArrayBox > &  NC_yvel_fab,
const Vector< FArrayBox > &  NC_ubar_fab,
const Vector< FArrayBox > &  NC_vbar_fab 
)

helper function to initialize state from netcdf

Helper function to initialize state and velocity data in a Fab from a REMORAdataset.

Parameters
levInteger specifying current level
state_fabFArrayBox object holding the state data we initialize
temp_fabFArrayBox object holding the temperature data we initialize
salt_fabFArrayBox object holding the salt data we initialize
x_vel_fabFArrayBox object holding the x-velocity data we initialize
y_vel_fabFArrayBox object holding the y-velocity data we initialize
ubar_fabFArrayBox object holding the ubar data we initialize
vbar_fabFArrayBox object holding the vbar data we initialize
zeta_fabFArrayBox object holding the zeta data we initialize
NC_temp_fabVector of FArrayBox objects with the REMORA dataset specifying temperature
NC_salt_fabVector of FArrayBox objects with the REMORA dataset specifying salinity
NC_xvel_fabVector of FArrayBox objects with the REMORA dataset specifying x-velocity
NC_yvel_fabVector of FArrayBox objects with the REMORA dataset specifying y-velocity
NC_ubar_fabVector of FArrayBox objects with the REMORA dataset specifying ubar
NC_vbar_fabVector of FArrayBox objects with the REMORA dataset specifying vbar
NC_zeta_fabVector of FArrayBox objects with the REMORA dataset specifying zeta

Definition at line 466 of file REMORA_init_from_netcdf.cpp.

Referenced by REMORA::init_data_from_netcdf().

Here is the caller graph for this function:

◆ read_bathymetry_from_netcdf()

void read_bathymetry_from_netcdf ( int  lev,
const Box &  domain,
const std::string &  fname,
FArrayBox &  NC_h_fab,
FArrayBox &  NC_pm_fab,
FArrayBox &  NC_pn_fab,
FArrayBox &  NC_xr_fab,
FArrayBox &  NC_yr_fab,
FArrayBox &  NC_xu_fab,
FArrayBox &  NC_yu_fab,
FArrayBox &  NC_xv_fab,
FArrayBox &  NC_yv_fab,
FArrayBox &  NC_xp_fab,
FArrayBox &  NC_yp_fab 
)

helper function to read bathymetry from netcdf

Parameters
levlevel of data to read
domainsimulation domain
fnamefile name to read from
NC_h_fabcontainer for bathymetry data
NC_pm_fabcontainer for pm data
NC_pn_fabcontainer for pn data
NC_xr_fabcontainer for x_rho data
NC_yr_fabcontainer for y_rho data
NC_xu_fabcontainer for x_u data
NC_yu_fabcontainer for y_u data
NC_xv_fabcontainer for x_v data
NC_yv_fabcontainer for y_v data
NC_xp_fabcontainer for x_p data
NC_yp_fabcontainer for y_p data

Definition at line 85 of file REMORA_ReadFromInitNetcdf.cpp.

Referenced by REMORA::init_bathymetry_from_netcdf().

Here is the caller graph for this function:

◆ read_bdry_from_netcdf()

Real read_bdry_from_netcdf ( const Box &  domain,
const std::string &  fname,
Vector< Vector< FArrayBox > > &  bdy_data_xlo,
Vector< Vector< FArrayBox > > &  bdy_data_xhi,
Vector< Vector< FArrayBox > > &  bdy_data_ylo,
Vector< Vector< FArrayBox > > &  bdy_data_yhi,
int &  width,
amrex::Real &  start_bdy_time,
std::string  bdry_time_varname,
amrex::GpuArray< amrex::GpuArray< bool, AMREX_SPACEDIM *2 >, BdyVars::NumTypes+1 > &   
)

helper function for reading boundary data from netcdf

Referenced by REMORA::init_bdry_from_netcdf().

Here is the caller graph for this function:

◆ read_clim_nudg_coeff_from_netcdf()

void read_clim_nudg_coeff_from_netcdf ( int  lev,
const Box &  domain,
const std::string &  fname,
bool  do_m2_clim_nudg,
bool  do_m3_clim_nudg,
bool  do_temp_clim_nudg,
bool  do_salt_clim_nudg,
FArrayBox &  NC_M2NC_fab,
FArrayBox &  NC_M3NC_fab,
FArrayBox &  NC_TempNC_fab,
FArrayBox &  NC_SaltNC_fab 
)

helper function to read climatology nudging from netcdf

Parameters
levlevel of data to read
domainsimulation domain
fnamefile name to read from
do_m2_clim_nudgwhether to do 2d momentum climatology nudging
do_m3_clim_nudgwhether to do 3d momentum climatology nudging
do_temp_clim_nudgwhether to do temperature climatology nudging
do_salt_clim_nudgwhether to do salinity climatology nudging
NC_M2NC_fabcontainer for 2d momentum climatology data
NC_M3NC_fabcontainer for 3d momentum climatology data
NC_TempNC_fabcontainer for temperature climatology data
NC_SaltNC_fabcontainer for salinity climatology data

Definition at line 185 of file REMORA_ReadFromInitNetcdf.cpp.

Referenced by REMORA::init_clim_nudg_coeff_from_netcdf().

Here is the caller graph for this function:

◆ read_coriolis_from_netcdf()

void read_coriolis_from_netcdf ( int  lev,
const Box &  domain,
const std::string &  fname,
FArrayBox &  NC_fcor_fab 
)

helper function to read coriolis factor from netcdf

Parameters
levlevel of data to read
domainsimulation domain
fnamefile name to read from
NC_fcor_fabcontainer for Coriolis parameter data

Definition at line 124 of file REMORA_ReadFromInitNetcdf.cpp.

Referenced by REMORA::init_coriolis_from_netcdf().

Here is the caller graph for this function:

◆ read_data_from_netcdf()

void read_data_from_netcdf ( int  ,
const Box &  domain,
const std::string &  fname,
FArrayBox &  NC_temp_fab,
FArrayBox &  NC_salt_fab,
FArrayBox &  NC_xvel_fab,
FArrayBox &  NC_yvel_fab,
FArrayBox &  NC_ubar_fab,
FArrayBox &  NC_vbar_fab 
)

helper function for reading in initial state data from netcdf

Parameters
levlevel of data to read
domainsimulation domain
fnamefile name to read from
NC_temp_fabcontainer for temperature data
NC_salt_fabcontainer for salinity data
NC_u_fabcontainer for u velocity data
NC_v_fabcontainer for v velocity data
NC_ubar_fabcontainer for u_bar velocity data
NC_vbar_fabcontainer for v_bar velocity data

Definition at line 20 of file REMORA_ReadFromInitNetcdf.cpp.

Referenced by REMORA::init_data_from_netcdf().

Here is the caller graph for this function:

◆ read_masks_from_netcdf()

void read_masks_from_netcdf ( int  ,
const Box &  domain,
const std::string &  fname,
FArrayBox &  NC_mskr_fab,
FArrayBox &  NC_msku_fab,
FArrayBox &  NC_mskv_fab 
)

helper function for reading in land-sea masks from netcdf

Parameters
levlevel of data to read
domainsimulation domain
fnamefile name to read from
NC_mskr_fabcontainer for rho-point land/sea mask data
NC_msku_fabcontainer for u-point land/sea mask data
NC_mskv_fabcontainer for v-point land/sea mask data

Definition at line 150 of file REMORA_ReadFromInitNetcdf.cpp.

Referenced by REMORA::init_masks_from_netcdf().

Here is the caller graph for this function:

◆ read_vec_from_netcdf()

void read_vec_from_netcdf ( int  lev,
const std::string &  fname,
const std::string &  field_name,
amrex::Vector< int > &  vec_dat 
)

helper function to read in vector of data from netcdf

Parameters
levlevel of data to read
fnamefile name to read from
field_namefield name to read
vec_datvector to fill data

Definition at line 226 of file REMORA_ReadFromInitNetcdf.cpp.

Referenced by REMORA::init_riv_pos_from_netcdf().

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

◆ read_zeta_from_netcdf()

void read_zeta_from_netcdf ( int  lev,
const Box &  domain,
const std::string &  fname,
FArrayBox &  NC_zeta_fab 
)

helper function to read sea surface height from netcdf

Parameters
levlevel of data to read
domainsimulation domain
fnamefile name to read from
NC_zeta_fabcontainer for sea surface height data

Definition at line 51 of file REMORA_ReadFromInitNetcdf.cpp.

Referenced by REMORA::init_zeta_from_netcdf().

Here is the caller graph for this function: