ERF
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 "ERF_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 , Time_BT , Time , Time_BdyWidth_BT_SN , Time_BdyWidth_BT_WE , Time_BdyWidth_SN , Time_BdyWidth_WE } |
Functions | |
int | BuildFABsFromWRFBdyFile (const std::string &fname, amrex::Vector< amrex::Vector< amrex::FArrayBox >> &bdy_data_xlo, amrex::Vector< amrex::Vector< amrex::FArrayBox >> &bdy_data_xhi, amrex::Vector< amrex::Vector< amrex::FArrayBox >> &bdy_data_ylo, amrex::Vector< amrex::Vector< amrex::FArrayBox >> &bdy_data_yhi) |
AMREX_FORCE_INLINE std::time_t | getEpochTime (const std::string &dateTime, const std::string &dateTimeFormat) |
template<typename DType > | |
void | ReadNetCDFFile (const std::string &fname, amrex::Vector< std::string > names, amrex::Vector< NDArray< DType > > &arrays) |
template<class FAB , typename DType > | |
void | fill_fab_from_arrays (int iv, amrex::Real &Latitude, amrex::Real &Longitude, std::string &Lat_var_name, std::string &Lon_var_name, 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, amrex::Real &Latitude, amrex::Real &Longitude, std::string &Lat_var_name, std::string &Lon_var_name, 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, |
amrex::Real & | Latitude, | ||
amrex::Real & | Longitude, | ||
std::string & | Lat_var_name, | ||
std::string & | Lon_var_name, | ||
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 |
int BuildFABsFromWRFBdyFile | ( | const std::string & | fname, |
amrex::Vector< amrex::Vector< amrex::FArrayBox >> & | bdy_data_xlo, | ||
amrex::Vector< amrex::Vector< amrex::FArrayBox >> & | bdy_data_xhi, | ||
amrex::Vector< amrex::Vector< amrex::FArrayBox >> & | bdy_data_ylo, | ||
amrex::Vector< amrex::Vector< amrex::FArrayBox >> & | bdy_data_yhi | ||
) |
void fill_fab_from_arrays | ( | int | iv, |
amrex::Real & | Latitude, | ||
amrex::Real & | Longitude, | ||
std::string & | Lat_var_name, | ||
std::string & | Lon_var_name, | ||
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 |
AMREX_FORCE_INLINE std::time_t getEpochTime | ( | const std::string & | dateTime, |
const std::string & | dateTimeFormat | ||
) |
void ReadNetCDFFile | ( | const std::string & | fname, |
amrex::Vector< std::string > | names, | ||
amrex::Vector< NDArray< DType > > & | arrays | ||
) |
Referenced by BuildFABsFromNetCDFFile().