ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_Plotfile2DMetadata.H
Go to the documentation of this file.
1 #ifndef ERF_PLOTFILE2DMETADATA_H_
2 #define ERF_PLOTFILE2DMETADATA_H_
3 
4 #include <string>
5 
6 #include <AMReX_Vector.H>
7 
9 
10 // Utilities for writing machine-readable metadata for native AMReX 2D
11 // plotfiles. This layer formats the existing 2D diagnostic catalog. It must not
12 // compute diagnostics or duplicate diagnostic metadata strings.
13 
14 namespace plotfile2d
15 {
16 
17 const char* diagnostic_category_to_string (DiagnosticCategory category) noexcept;
18 const char* missing_policy_to_string (MissingPolicy policy) noexcept;
19 
20 std::string missing_value_json (MissingPolicy policy);
21 
22 std::string escape_json_string (const std::string& value);
23 
24 std::string format_2d_metadata_json (const amrex::Vector<std::string>& varnames);
25 
26 std::string metadata_json_filename (const std::string& plotfilename);
27 
28 void write_2d_metadata_json (const std::string& plotfilename,
29  const amrex::Vector<std::string>& varnames);
30 
31 } // namespace plotfile2d
32 
33 #endif
amrex::Real value
Definition: ERF_HurricaneDiagnostics.H:20
Definition: ERF_Plotfile2DCatalog.cpp:4
const char * diagnostic_category_to_string(DiagnosticCategory category) noexcept
Definition: ERF_Plotfile2DMetadata.cpp:62
std::string escape_json_string(const std::string &value)
Definition: ERF_Plotfile2DMetadata.cpp:105
void write_2d_metadata_json(const std::string &plotfilename, const amrex::Vector< std::string > &varnames)
Definition: ERF_Plotfile2DMetadata.cpp:164
DiagnosticCategory
Definition: ERF_Plotfile2DCatalog.H:41
const char * missing_policy_to_string(MissingPolicy policy) noexcept
Definition: ERF_Plotfile2DMetadata.cpp:79
std::string missing_value_json(MissingPolicy policy)
Definition: ERF_Plotfile2DMetadata.cpp:92
MissingPolicy
Definition: ERF_Plotfile2DCatalog.H:52
std::string format_2d_metadata_json(const amrex::Vector< std::string > &varnames)
Definition: ERF_Plotfile2DMetadata.cpp:137
std::string metadata_json_filename(const std::string &plotfilename)
Definition: ERF_Plotfile2DMetadata.cpp:131