1#ifndef _REMORA_NCTIMESEIRES_H_
2#define _REMORA_NCTIMESEIRES_H_
4#ifdef REMORA_USE_NETCDF
9#include <AMReX_AmrCore.H>
21 const std::string a_field_name,
22 const std::string a_time_name,
23 const amrex::Box& a_domain,
24 amrex::MultiFab* a_mf_var,
25 bool a_is2d,
bool a_save_interpolated);
32 amrex::MultiFab* mf_lev,
33 const amrex::Vector<amrex::Geometry>& geom,
34 const amrex::Vector<amrex::IntVect>& ref_ratio);
44 const amrex::Vector<amrex::IntVect>& ref_ratio)
const;
A class to hold and interpolate time series data read from a NetCDF file.
amrex::Vector< std::unique_ptr< amrex::MultiFab > > mf_interpolated_lev
Interpolated data on each requested AMR level if save_interpolated=true.
bool is2d
Whether the field we're reading in is 2d.
void update_interpolated_to_time(amrex::Real time, int lev, amrex::MultiFab *mf_lev, const amrex::Vector< amrex::Geometry > &geom, const amrex::Vector< amrex::IntVect > &ref_ratio)
Calculate interpolated values at time and fill data for level lev.
void read_in_at_time(amrex::MultiFab *mf, int itime)
Read in data from file at time index itime and fill into mf.
amrex::MultiFab * mf_interp_lev0
Multifab storing temporally interpolated data on level 0.
amrex::Real time_after
Time in ocean_times immediately after the last time interpolated to.
amrex::Real time_before
Time in ocean_times immediately before the last time interpolated to.
void Initialize()
Read in time array from file and allocate data arrays.
amrex::MultiFab * mf_before
Multifab to store data at time_before.
int i_time_before
Time index immediately before the last time interpolated to.
std::string field_name
Field name in netcdf file.
amrex::IntVect cumulative_ref_ratio(int lev, const amrex::Vector< amrex::IntVect > &ref_ratio) const
Build cumulative refinement ratio from level 0 to lev.
amrex::MultiFab * mf_after
Multifab to store data at time_after.
std::string time_name
Field name for time series in netcdf file.
std::string file_name
File name to read from.
const amrex::MultiFab * get_interpolated_mf(int lev) const
Access interpolated data saved for a specific level.
amrex::Vector< amrex::Real > ocean_times
Time points in netcdf file.