|
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, double a_time_ref) | |
| Constructor. | |
| void | Initialize () |
| Read in time array from file and allocate data arrays. | |
| void | update_interpolated_to_time (double time) |
| Calculate interpolated values at time, in seconds on the model clock, 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. | |
| double | time_ref |
| amrex::Vector< double > | bry_times |
| Time points in netcdf file, in seconds on the model clock. | |
| 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. | |
| double | time_before |
| Time in ocean_times immediately before the last time interpolated to. | |
| double | 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, | ||
| double | a_time_ref | ||
| ) |
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 | vector of file name(s) 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 |
| [in] | a_time_ref | remora.time_ref, the reference date of the model clock |
Definition at line 22 of file REMORA_NCTimeSeriesBoundary.cpp.

| void NCTimeSeriesBoundary::Initialize | ( | ) |
Read in time array from file and allocate data arrays.
Definition at line 45 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 513 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 382 of file REMORA_NCTimeSeriesBoundary.cpp.
Referenced by update_interpolated_to_time().


| void NCTimeSeriesBoundary::update_interpolated_to_time | ( | double | time | ) |
Calculate interpolated values at time, in seconds on the model clock, reading in data as necessary.
| time | time to interpolate to |
Definition at line 193 of file REMORA_NCTimeSeriesBoundary.cpp.

|
private |
Time points in netcdf file, in seconds on the model clock.
Definition at line 92 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), read_in_at_time(), and update_interpolated_to_time().
|
private |
Domain.
Definition at line 73 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and NCTimeSeriesBoundary().
|
private |
Field name in netcdf file.
Definition at line 67 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 94 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 96 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and read_in_at_time().
|
private |
File name to read from.
Definition at line 65 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 98 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().
|
private |
Index type for field to fill.
Definition at line 75 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 84 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 81 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 78 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 50 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by interp_fab(), and NCTimeSeriesBoundary().
| int NCTimeSeriesBoundary::m_ry |
Definition at line 50 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by interp_fab(), and NCTimeSeriesBoundary().
|
private |
Variable names that will be read from file.
Definition at line 69 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), read_in_at_time(), and update_interpolated_to_time().
|
private |
Time in ocean_times immediately after the last time interpolated to.
Definition at line 102 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 100 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by update_interpolated_to_time().
|
private |
Field name for time series in netcdf file.
Definition at line 71 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and NCTimeSeriesBoundary().
|
private |
remora.time_ref: the reference date the model clock counts from. The file's times are placed on that clock from the reference date in their units attribute. Double, like every reference date.
Definition at line 89 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 125 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 117 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 115 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 44 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 107 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 105 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 38 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 122 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 120 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 47 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 112 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 110 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 41 of file REMORA_NCTimeSeriesBoundary.H.
Referenced by Initialize(), and update_interpolated_to_time().