REMORA
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <sstream>
#include <string>
#include <ctime>
#include <atomic>
#include "AMReX_FArrayBox.H"
#include "AMReX_IArrayBox.H"
#include "NCInterface.H"
Go to the source code of this file.
Classes | |
struct | NDArray< DataType > |
Typedefs | |
using | PlaneVector = amrex::Vector< amrex::FArrayBox > |
Enumerations | |
enum class | NC_Data_Dims_Type { Time_BT_SN_WE , Time_SN_WE , SN_WE } |
Functions | |
template<typename DType > | |
void | ReadNetCDFFile (const std::string &fname, amrex::Vector< std::string > names, amrex::Vector< NDArray< DType > > &arrays) |
std::string | ReadNetCDFVarAttrStr (const std::string &fname, const std::string &var_name, const std::string &attr_name) |
template<class FAB , typename DType > | |
void | fill_fab_from_arrays (int iv, amrex::Vector< NDArray< float >> &nc_arrays, const std::string &var_name, NC_Data_Dims_Type &NC_dim_type, FAB &temp) |
template<class FAB , typename DType > | |
void | BuildFABsFromNetCDFFile (const amrex::Box &domain, const std::string &fname, amrex::Vector< std::string > nc_var_names, amrex::Vector< enum NC_Data_Dims_Type > NC_dim_types, amrex::Vector< FAB * > fab_vars) |
using PlaneVector = amrex::Vector<amrex::FArrayBox> |
|
strong |
void BuildFABsFromNetCDFFile | ( | const amrex::Box & | domain, |
const std::string & | fname, | ||
amrex::Vector< std::string > | nc_var_names, | ||
amrex::Vector< enum NC_Data_Dims_Type > | NC_dim_types, | ||
amrex::Vector< FAB * > | fab_vars | ||
) |
Function to read NetCDF variables and fill the corresponding Array4's
fname | Name of the NetCDF file to be read |
nc_var_names | Variable names in the NetCDF file |
NC_dim_types | NetCDF data dimension types |
fab_vars | Fab data we are to fill |
void fill_fab_from_arrays | ( | int | iv, |
amrex::Vector< NDArray< float >> & | nc_arrays, | ||
const std::string & | var_name, | ||
NC_Data_Dims_Type & | NC_dim_type, | ||
FAB & | temp | ||
) |
Helper function for reading data from NetCDF file into a provided FAB.
iv | Index for which variable we are going to fill |
nc_arrays | Arrays of data from NetCDF file |
var_name | Variable name |
NC_dim_type | Dimension type for the variable as stored in the NetCDF file |
temp | FAB where we store the variable data from the NetCDF Arrays |
void ReadNetCDFFile | ( | const std::string & | fname, |
amrex::Vector< std::string > | names, | ||
amrex::Vector< NDArray< DType > > & | arrays | ||
) |
Referenced by BuildFABsFromNetCDFFile().
std::string ReadNetCDFVarAttrStr | ( | const std::string & | fname, |
const std::string & | var_name, | ||
const std::string & | attr_name | ||
) |
Helper function for reading a single variable attribute
fname | Name of NetCDF file |
var_name | Name of variable |
attr_name | Name of attribute to read |