|
REMORA
Regional Modeling of Oceans Refined Adaptively
|
A class to hold and interpolate time series data read from a NetCDF file. More...
#include <REMORA_NCTimeSeriesBoundary.H>

Public Member Functions | |
| NCTimeSeriesBoundary (int a_lev, const amrex::Vector< amrex::Geometry > a_geom, const amrex::Vector< std::string > &a_file_name, const std::string a_field_name, const std::string a_time_name, const amrex::IntVect a_index_type, const amrex::GpuArray< bool, AMREX_SPACEDIM *2 > *a_var_need_data, bool a_is2d, int rx, int ry) | |
| Constructor. | |
| void | Initialize () |
| Read in time array from file and allocate data arrays. | |
| void | update_interpolated_to_time (amrex::Real time) |
| Calculate interpolated values at time, reading in data as necessary. | |
| void | interp_fab (amrex::FArrayBox &dat_crse, amrex::FArrayBox &dat_fine) |
| spatially interpolate boundary fabs from level 0 data (read in) to current level | |
Public Attributes | |
| amrex::FArrayBox | xlo_dat_interp |
| FArrayBox to store data at inteprolated time at xlo boundary */. | |
| amrex::FArrayBox | ylo_dat_interp |
| FArrayBox to store data at inteprolated time at ylo boundary */. | |
| amrex::FArrayBox | xhi_dat_interp |
| FArrayBox to store data at inteprolated time at xhi boundary */. | |
| amrex::FArrayBox | yhi_dat_interp |
| FArrayBox to store data at inteprolated time at yhi boundary */. | |
| int | m_rx |
| Refinement ratios relative to level 0. | |
| int | m_ry |
Private Member Functions | |
| void | read_in_at_time (amrex::FArrayBox &fab_xlo, amrex::FArrayBox &fab_xhi, amrex::FArrayBox &fab_ylo, amrex::FArrayBox &fab_yhi, int itime) |
| Read in data from file at time index itime and fill into mf. | |
Private Attributes | |
| amrex::Vector< std::string > | file_names |
| File name to read from. | |
| std::string | field_name |
| Field name in netcdf file. | |
| amrex::Vector< std::string > | nc_var_names |
| Variable names that will be read from file. | |
| std::string | time_name |
| Field name for time series in netcdf file. | |
| amrex::Box | domain |
| Domain. | |
| amrex::IntVect | index_type |
| Index type for field to fill. | |
| int | m_lev |
| Level at which we are holding the boundary data. | |
| amrex::Vector< amrex::Geometry > | m_geom |
| Geometry at all levels. | |
| bool | is2d |
| Whether the field we're reading in is 2d. | |
| amrex::Vector< amrex::Real > | bry_times |
| Time points in netcdf file. | |
| amrex::Vector< int > | file_for_time |
| File index to access a particular time. | |
| amrex::Vector< int > | file_itime_offset |
| Offset to access a particular time within its file. | |
| int | i_time_before |
| Time index immediately before the last time interpolated to. | |
| amrex::Real | time_before |
| Time in ocean_times immediately before the last time interpolated to. | |
| amrex::Real | time_after |
| Time in ocean_times immediately after the last time interpolated to. | |
| amrex::FArrayBox | xlo_dat_before |
| FArrayBox to store data at time_before at xlo boundary. | |
| amrex::FArrayBox | xlo_dat_after |
| FArrayBox to store data at time_after at xlo boundary. | |
| amrex::FArrayBox | ylo_dat_before |
| FArrayBox to store data at time_before at ylo boundary. | |
| amrex::FArrayBox | ylo_dat_after |
| FArrayBox to store data at time_after at ylo boundary. | |
| amrex::FArrayBox | xhi_dat_before |
| FArrayBox to store data at time_before at xhi boundary. | |
| amrex::FArrayBox | xhi_dat_after |
| FArrayBox to store data at time_after at xhi boundary. | |
| amrex::FArrayBox | yhi_dat_before |
| FArrayBox to store data at time_before at yhi boundary. | |
| amrex::FArrayBox | yhi_dat_after |
| FArrayBox to store data at time_after at yhi boundary. | |
| amrex::GpuArray< bool, AMREX_SPACEDIM *2 > | var_need_data |
| Array over boundaries indicating whether we need physical data for this variable. | |
A class to hold and interpolate time series data read from a NetCDF file.
The class only ever holds the two time steps necessary to interpoplate to the current simulation time.
Definition at line 17 of file REMORA_NCTimeSeriesBoundary.H.
| NCTimeSeriesBoundary::NCTimeSeriesBoundary | ( | int | a_lev, |
| const amrex::Vector< amrex::Geometry > | a_geom, | ||
| const amrex::Vector< std::string > & | a_file_names, | ||
| const std::string | a_field_name, | ||
| const std::string | a_time_name, | ||
| const amrex::IntVect | a_index_type, | ||
| const amrex::GpuArray< bool, AMREX_SPACEDIM *2 > * | a_var_need_data, | ||
| bool | a_is2d, | ||
| int | a_rx, | ||
| int | a_ry | ||
| ) |
Constructor.
| [in] | a_lev | level at which we will store the data |
| [in] | a_geom | Vector of Geometry objects at all levels |
| [in] | a_file_name | file name to read from |
| [in] | a_field_name | name of field to read in |
| [in] | a_time_name | name of time variable in NetCDF file |
| [in] | a_index_type | nodality of data field |
| [in] | a_var_need_data | array over boundaries of flags that indicate whether we need data for the variable |
| [in] | a_is2d | Whether the variable we're working with is 2D |
| [in] | a_rx | refinement ratio in x relative to level 0 |
| [in] | a_ry | refinement ratio in y relative to level 0 |
Definition at line 21 of file REMORA_NCTimeSeriesBoundary.cpp.
| void NCTimeSeriesBoundary::Initialize | ( | ) |
Read in time array from file and allocate data arrays.
Definition at line 41 of file REMORA_NCTimeSeriesBoundary.cpp.

| void NCTimeSeriesBoundary::interp_fab | ( | amrex::FArrayBox & | dat_crse, |
| amrex::FArrayBox & | dat_fine | ||
| ) |
spatially interpolate boundary fabs from level 0 data (read in) to current level
| [in] | dat_crse | fab of coarse data to interpolate from |
| [out] | dat_fine | fab of fine data to interpoalte to |
Definition at line 443 of file REMORA_NCTimeSeriesBoundary.cpp.
Referenced by update_interpolated_to_time().

|
private |
Read in data from file at time index itime and fill into mf.
| [in,out] | fab_xlo | fab to store xlo boundary data into |
| [in,out] | fab_xhi | fab to store xhi boundary data into |
| [in,out] | fab_ylo | fab to store ylo boundary data into |
| [in,out] | fab_yhi | fab to store yhi boundary data into |
| [in] | itime | index of time step to read from file |
Definition at line 316 of file REMORA_NCTimeSeriesBoundary.cpp.
Referenced by update_interpolated_to_time().


| void NCTimeSeriesBoundary::update_interpolated_to_time | ( | amrex::Real | time | ) |
Calculate interpolated values at time, reading in data as necessary.
| time | time to interpolate to |
Definition at line 157 of file REMORA_NCTimeSeriesBoundary.cpp.

|
private |
Time points in netcdf file.
Definition at line 86 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), read_in_at_time(), and update_interpolated_to_time().
|
private |
Domain.
Definition at line 72 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and NCTimeSeriesBoundary().
|
private |
Field name in netcdf file.
Definition at line 66 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), NCTimeSeriesBoundary(), read_in_at_time(), and update_interpolated_to_time().
|
private |
File index to access a particular time.
Definition at line 88 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and read_in_at_time().
|
private |
Offset to access a particular time within its file.
Definition at line 90 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and read_in_at_time().
|
private |
File name to read from.
Definition at line 64 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), NCTimeSeriesBoundary(), and read_in_at_time().
|
private |
Time index immediately before the last time interpolated to.
Definition at line 92 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
|
private |
Index type for field to fill.
Definition at line 74 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), NCTimeSeriesBoundary(), and update_interpolated_to_time().
|
private |
Whether the field we're reading in is 2d.
Definition at line 83 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), NCTimeSeriesBoundary(), read_in_at_time(), and update_interpolated_to_time().
|
private |
Geometry at all levels.
Definition at line 80 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by NCTimeSeriesBoundary(), and update_interpolated_to_time().
|
private |
Level at which we are holding the boundary data.
Definition at line 77 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by NCTimeSeriesBoundary(), and update_interpolated_to_time().
| int NCTimeSeriesBoundary::m_rx |
Refinement ratios relative to level 0.
Definition at line 49 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by interp_fab(), and NCTimeSeriesBoundary().
| int NCTimeSeriesBoundary::m_ry |
Definition at line 49 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by interp_fab(), and NCTimeSeriesBoundary().
|
private |
Variable names that will be read from file.
Definition at line 68 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and read_in_at_time().
|
private |
Time in ocean_times immediately after the last time interpolated to.
Definition at line 96 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by update_interpolated_to_time().
|
private |
Time in ocean_times immediately before the last time interpolated to.
Definition at line 94 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by update_interpolated_to_time().
|
private |
Field name for time series in netcdf file.
Definition at line 70 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and NCTimeSeriesBoundary().
|
private |
Array over boundaries indicating whether we need physical data for this variable.
Definition at line 119 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), NCTimeSeriesBoundary(), and update_interpolated_to_time().
|
private |
FArrayBox to store data at time_after at xhi boundary.
Definition at line 111 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
|
private |
FArrayBox to store data at time_before at xhi boundary.
Definition at line 109 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
| amrex::FArrayBox NCTimeSeriesBoundary::xhi_dat_interp |
FArrayBox to store data at inteprolated time at xhi boundary */.
Definition at line 43 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
|
private |
FArrayBox to store data at time_after at xlo boundary.
Definition at line 101 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
|
private |
FArrayBox to store data at time_before at xlo boundary.
Definition at line 99 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
| amrex::FArrayBox NCTimeSeriesBoundary::xlo_dat_interp |
FArrayBox to store data at inteprolated time at xlo boundary */.
Definition at line 37 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
|
private |
FArrayBox to store data at time_after at yhi boundary.
Definition at line 116 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
|
private |
FArrayBox to store data at time_before at yhi boundary.
Definition at line 114 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
| amrex::FArrayBox NCTimeSeriesBoundary::yhi_dat_interp |
FArrayBox to store data at inteprolated time at yhi boundary */.
Definition at line 46 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
|
private |
FArrayBox to store data at time_after at ylo boundary.
Definition at line 106 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
|
private |
FArrayBox to store data at time_before at ylo boundary.
Definition at line 104 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
| amrex::FArrayBox NCTimeSeriesBoundary::ylo_dat_interp |
FArrayBox to store data at inteprolated time at ylo boundary */.
Definition at line 40 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().