|
Extension: Json and NetCDF utilities
#include "dg/file/file.h"
|
#include <netcdf.h>#include "thrust/host_vector.h"#include "dg/runge_kutta.h"#include "dg/topology/grid.h"#include "dg/topology/gridX.h"#include "dg/topology/evaluation.h"#include "dg/topology/mpi_grid.h"#include "dg/topology/mpi_evaluation.h"#include "nc_error.h"#include "easy_atts.h"Go to the source code of this file.
Namespaces | |
| namespace | dg |
| namespace | dg::file |
| Namespace for Json and NetCDF I/O related classes and functions. | |
Functions | |
| template<class T > | |
| bool | dg::file::check_real_time (int ncid, const char *name, int *dimID, int *tvarID) |
DEPRECATED Check if an unlimited dimension exists as if define_real_time was called. | |
| template<class T > | |
| int | dg::file::define_real_time (int ncid, const char *name, int *dimID, int *tvarID, bool full_check=false) |
| DEPRECATED Define an unlimited time dimension and coordinate variable. | |
| int | dg::file::define_time (int ncid, const char *name, int *dimID, int *tvarID) |
DEPRECATED An alias for define_real_time<double> | |
| int | dg::file::define_limited_time (int ncid, const char *name, int size, int *dimID, int *tvarID) |
| DEPRECATED Define a limited time dimension and coordinate variable. | |
| template<class T > | |
| bool | dg::file::check_dimension (int ncid, int *dimID, const dg::RealGrid1d< T > &g, std::string name_dim="x", std::string="X") |
DEPRECATED Check if a dimension exists as if define_dimension was called. | |
| template<class T > | |
| int | dg::file::define_dimension (int ncid, int *dimID, const dg::RealGrid1d< T > &g, std::string name_dim="x", std::string axis="X", bool full_check=false) |
| DEPRECATED Define a 1d dimension and associated coordinate variable. | |
| template<class Topology , std::enable_if_t< dg::is_vector_v< typename Topology::host_vector, dg::SharedVectorTag >, bool > = true> | |
| int | dg::file::define_dimensions (int ncid, int *dimsIDs, const Topology &g, std::vector< std::string > name_dims={}, bool full_check=false) |
| DEPRECATED Define dimensions and associated coordiante variables. | |
| template<class Topology , std::enable_if_t< dg::is_vector_v< typename Topology::host_vector, dg::SharedVectorTag >, bool > = true> | |
| int | dg::file::define_dimensions (int ncid, int *dimsIDs, int *tvarID, const Topology &g, std::vector< std::string > name_dims={}, bool full_check=false) |
| DEPRECATED Define an unlimited time and grid dimensions together with their coordinate variables. | |
| template<class Topology , std::enable_if_t< dg::is_vector_v< typename Topology::host_vector, dg::SharedVectorTag >, bool > = true> | |
| bool | dg::file::check_dimensions (int ncid, int *dimsIDs, const Topology &g, std::vector< std::string > name_dims={}) |
DEPRECATED Check if dimensions exist as if define_dimensions was called. | |
| template<class Topology , std::enable_if_t< dg::is_vector_v< typename Topology::host_vector, dg::SharedVectorTag >, bool > = true> | |
| bool | dg::file::check_dimensions (int ncid, int *dimsIDs, int *tvarID, const Topology &g, std::vector< std::string > name_dims={}) |
DEPRECATED Check if dimensions exist as if define_dimensions was called. | |
| template<class T > | |
| int | dg::file::define_limtime_xy (int ncid, int *dimsIDs, int size, int *tvarID, const dg::aRealTopology2d< T > &g, std::vector< std::string > name_dims={"time", "y", "x"}) |
| DEPRECATED Define a limited time and 2 dimensions and associated coordinate variables. | |
| template<class MPITopology , std::enable_if_t< dg::is_vector_v< typename MPITopology::host_vector, dg::MPIVectorTag >, bool > = true> | |
| int | dg::file::define_dimensions (int ncid, int *dimsIDs, const MPITopology &g, std::vector< std::string > name_dims={}, bool full_check=false) |
| DEPRECATED All processes may call this but only master process has to and will execute!! Convenience function that just calls the corresponding serial version with the global grid. | |
| template<class MPITopology , std::enable_if_t< dg::is_vector_v< typename MPITopology::host_vector, dg::MPIVectorTag >, bool > = true> | |
| int | dg::file::define_dimensions (int ncid, int *dimsIDs, int *tvarID, const MPITopology &g, std::vector< std::string > name_dims={}, bool full_check=false) |
| DEPRECATED All processes may call this but only master process has to and will execute!! Convenience function that just calls the corresponding serial version with the global grid. | |
| template<class MPITopology , std::enable_if_t< dg::is_vector_v< typename MPITopology::host_vector, dg::MPIVectorTag >, bool > = true> | |
| bool | dg::file::check_dimensions (int ncid, int *dimsIDs, const MPITopology &g, std::vector< std::string > name_dims={}) |
| DEPRECATED All processes may call this and all will execute!! Convenience function that just calls the corresponding serial version with the global grid. | |
| template<class MPITopology , std::enable_if_t< dg::is_vector_v< typename MPITopology::host_vector, dg::MPIVectorTag >, bool > = true> | |
| bool | dg::file::check_dimensions (int ncid, int *dimsIDs, int *tvarID, const MPITopology &g, std::vector< std::string > name_dims={}) |
| DEPRECATED All processes may call this and all will execute!! Convenience function that just calls the corresponding serial version with the global grid. | |
The define_dimensions functions