|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <ERF_LargeScaleForcingData.H>

Public Member Functions | |
| LargeScaleForcingData () | |
| Construct large-scale forcing metadata from the ERF input namespace. More... | |
| int | get_columns_in_str (std::string &str) |
| Count the number of whitespace-separated columns in a line. More... | |
| void | read_forcing_file () |
| Read the forcing file and cache the raw time slices on host. More... | |
| void | interp_forcing (const amrex::GeometryData &geom, const amrex::Vector< amrex::Real > &zlevels_stag, const InputSoundingData &sounding) |
| Interpolate the forcing profiles onto the model grid. More... | |
| void | get_forcing_time_coeffs (const amrex::Real &time, int &curr, int &next, amrex::Real &coeff_curr, amrex::Real &coeff_next) |
| Determine interpolation coefficients to apply tendencies for the given time. More... | |
| void | host_to_device (int itime) |
| Copy one interpolated forcing slice from host memory to device memory. More... | |
Public Attributes | |
| amrex::Real | tau_lsf = zero |
| std::string | lsf_file = "" |
| bool | use_z_grid = true |
| bool | verbose_print = false |
| int | nz_lsf = -1 |
| int | num_times = -1 |
| amrex::Vector< amrex::Real > | times_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | z_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | p_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | t_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | q_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | u_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | v_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | w_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | z_int_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | t_int_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | q_int_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | u_int_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | v_int_lsf |
| amrex::Vector< amrex::Vector< amrex::Real > > | w_int_lsf |
| amrex::Vector< amrex::Gpu::DeviceVector< amrex::Real > > | z_int_lsf_d |
| amrex::Vector< amrex::Gpu::DeviceVector< amrex::Real > > | t_int_lsf_d |
| amrex::Vector< amrex::Gpu::DeviceVector< amrex::Real > > | q_int_lsf_d |
| amrex::Vector< amrex::Gpu::DeviceVector< amrex::Real > > | u_int_lsf_d |
| amrex::Vector< amrex::Gpu::DeviceVector< amrex::Real > > | v_int_lsf_d |
| amrex::Vector< amrex::Gpu::DeviceVector< amrex::Real > > | w_int_lsf_d |
Data structure storing large-scale forcing data.
This provides time-varying vertical profiles for large scale temperature, and water vapor tendencies, as well as observed large scale zonal and meridonal wind, and vertical subsidence. Profiles are read from a text file, interpolated to the model vertical grid, and then copied to device memory for use during time integration.
This mirrors the lsf functionality as implemented in SAM.
|
inline |
Construct large-scale forcing metadata from the ERF input namespace.

|
inline |
Count the number of whitespace-separated columns in a line.
| str | Input line to inspect. |
Referenced by read_forcing_file().

|
inline |
Determine interpolation coefficients to apply tendencies for the given time.
| time | Elapsed simulation time in seconds. |
| curr | Index of the lower bracketing forcing time. |
| next | Index of the upper bracketing forcing time. |
| coeff_curr | Interpolation weight for the lower time slice. |
| coeff_next | Interpolation weight for the upper time slice. |
Referenced by make_mom_sources().

|
inline |
Copy one interpolated forcing slice from host memory to device memory.
| itime | Time-slice index to copy. |
Referenced by interp_forcing().

|
inline |
Interpolate the forcing profiles onto the model grid.
| geom | Geometry defining the vertical grid. |
| zlevels_stag | Staggered vertical coordinates used for interpolation. |
| sounding | Input sounding data used when the forcing file is on pressure levels. |

|
inline |
Read the forcing file and cache the raw time slices on host.

| std::string LargeScaleForcingData::lsf_file = "" |
Path to the large-scale forcing input file.
Referenced by LargeScaleForcingData(), and read_forcing_file().
| int LargeScaleForcingData::num_times = -1 |
Referenced by get_forcing_time_coeffs(), interp_forcing(), and read_forcing_file().
| int LargeScaleForcingData::nz_lsf = -1 |
Number of vertical levels and times found in the forcing file.
Referenced by interp_forcing(), and read_forcing_file().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::p_lsf |
Referenced by interp_forcing(), and read_forcing_file().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::q_int_lsf |
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Gpu::DeviceVector<amrex::Real> > LargeScaleForcingData::q_int_lsf_d |
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::q_lsf |
Referenced by interp_forcing(), and read_forcing_file().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::t_int_lsf |
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Gpu::DeviceVector<amrex::Real> > LargeScaleForcingData::t_int_lsf_d |
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::t_lsf |
Referenced by interp_forcing(), and read_forcing_file().
| amrex::Real LargeScaleForcingData::tau_lsf = zero |
Relaxation time scale used by the large-scale forcing and nudging terms.
Referenced by LargeScaleForcingData(), and make_mom_sources().
| amrex::Vector<amrex::Real> LargeScaleForcingData::times_lsf |
Forcing times read from the file, converted to elapsed seconds.
Referenced by get_forcing_time_coeffs(), interp_forcing(), and read_forcing_file().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::u_int_lsf |
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Gpu::DeviceVector<amrex::Real> > LargeScaleForcingData::u_int_lsf_d |
Referenced by host_to_device(), interp_forcing(), and make_mom_sources().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::u_lsf |
Referenced by interp_forcing(), and read_forcing_file().
| bool LargeScaleForcingData::use_z_grid = true |
True when the forcing file is tabulated on height levels, false when it is tabulated on pressure levels.
Referenced by interp_forcing(), and read_forcing_file().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::v_int_lsf |
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Gpu::DeviceVector<amrex::Real> > LargeScaleForcingData::v_int_lsf_d |
Referenced by host_to_device(), interp_forcing(), and make_mom_sources().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::v_lsf |
Referenced by interp_forcing(), and read_forcing_file().
| bool LargeScaleForcingData::verbose_print = false |
Whether to display the lsf at initialization (before and after interpolation)
Referenced by interp_forcing(), and read_forcing_file().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::w_int_lsf |
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Gpu::DeviceVector<amrex::Real> > LargeScaleForcingData::w_int_lsf_d |
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::w_lsf |
Referenced by interp_forcing(), and read_forcing_file().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::z_int_lsf |
Forcing profiles interpolated onto the model grid, indexed by time then level.
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Gpu::DeviceVector<amrex::Real> > LargeScaleForcingData::z_int_lsf_d |
Device copies of the interpolated forcing profiles.
Referenced by host_to_device(), and interp_forcing().
| amrex::Vector<amrex::Vector<amrex::Real> > LargeScaleForcingData::z_lsf |
Raw forcing profiles read from the input file, indexed by time then level.
Referenced by interp_forcing(), and read_forcing_file().