REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
REMORA_NCTimeSeriesRiver.H
Go to the documentation of this file.
1#ifndef _REMORA_NCTIMESEIRESRIVER_H_
2#define _REMORA_NCTIMESEIRESRIVER_H_
3
4#ifdef REMORA_USE_NETCDF
5
6#include <string>
7
8#include <AMReX_AmrCore.H>
9
10#include <REMORA.H>
11
13{
14 public:
15 NCTimeSeriesRiver (const std::string a_file_name,
16 const std::string a_field_name,
17 const std::string a_time_name,
18 const int a_nz, const int a_use_vert_integ=0);
19
20 void Initialize ();
21
22 /// Calculate
23 void update_interpolated_to_time (amrex::Real time);
24
25 /// Container for interpolated data; Only used if save_interpolated == true
26 amrex::FArrayBox* fab_interp;
27
28 /// Whether the field is specified in the z-dimension
29 int has_z;
30 /// Whether to use the depth-integrated value read from file; Used
31 /// when !has_z
33
34 /// FABs to pointers of river data
35 amrex::FArrayBox* fab_before;
36 amrex::FArrayBox* fab_after;
37 /// Vshape data if needed
38 amrex::FArrayBox* fab_vshape;
39
40 /**
41 * Read in data from file at time index itime and fill into FAB
42 */
43 void read_in_at_time (amrex::FArrayBox* vec, int itime);
44 private:
45
46 /// File name to read from
47 std::string file_name;
48 /// Field name in netcdf file
49 std::string field_name;
50 /// Field name for time series in netcdf file
51 std::string time_name;
52
53 /// Number of rivers
54 int nriv;
55 /// Number of vertical points
56 int nz;
57 /// How many vertical cells there are in the data fabs
58 int nzbox;
59
60 /// Time points in netcdf file
61 amrex::Vector<amrex::Real> river_times;
62 /// Time index immediately before the last time interpolated to
64 /// Time in ocean_time immediately before the last time interpolated to
65 amrex::Real time_before;
66 /// Time in ocean_time immediately after the last time interpolated to
67 amrex::Real time_after;
68
69};
70
71#endif // REMORA_USE_NETCDF
72#endif //_REMORA_NCTIMESEIRESRIVER_H_
std::string file_name
File name to read from.
int nriv
Number of rivers.
amrex::Real time_before
Time in ocean_time immediately before the last time interpolated to.
int nzbox
How many vertical cells there are in the data fabs.
void update_interpolated_to_time(amrex::Real time)
Calculate.
std::string time_name
Field name for time series in netcdf file.
amrex::Vector< amrex::Real > river_times
Time points in netcdf file.
std::string field_name
Field name in netcdf file.
amrex::FArrayBox * fab_vshape
Vshape data if needed.
amrex::FArrayBox * fab_after
int i_time_before
Time index immediately before the last time interpolated to.
void read_in_at_time(amrex::FArrayBox *vec, int itime)
amrex::FArrayBox * fab_before
FABs to pointers of river data.
int nz
Number of vertical points.
amrex::FArrayBox * fab_interp
Container for interpolated data; Only used if save_interpolated == true.
int has_z
Whether the field is specified in the z-dimension.
amrex::Real time_after
Time in ocean_time immediately after the last time interpolated to.