diff --git a/src/basic/vx_config/config_file.cc b/src/basic/vx_config/config_file.cc index 0938ab9a27..441fa3a9a8 100644 --- a/src/basic/vx_config/config_file.cc +++ b/src/basic/vx_config/config_file.cc @@ -392,7 +392,7 @@ met_open(configfilein, filename); if ( ! configfilein ) { mlog << Error << "\nMetConfig::read(const char *) -> " - << "unable to open input file \"" << filename << "\". Please specify \"file_type = GrdFileType_;\" at the configration file\n\n"; + << "unable to open input file \"" << filename << "\". Please specify \"file_type = FileType_;\" at the configration file\n\n"; exit ( 1 ); diff --git a/src/basic/vx_config/config_util.cc b/src/basic/vx_config/config_util.cc index 14bdb6836f..c26cb35b77 100644 --- a/src/basic/vx_config/config_util.cc +++ b/src/basic/vx_config/config_util.cc @@ -345,8 +345,8 @@ StringArray parse_conf_string_array(Dictionary *dict, const char *conf_key, cons /////////////////////////////////////////////////////////////////////////////// -GrdFileType parse_conf_grd_file_type(Dictionary *dict) { - GrdFileType t = GrdFileType_None; +FileType parse_conf_grd_file_type(Dictionary *dict) { + FileType t = FileType_None; int v; if(!dict) { @@ -359,16 +359,16 @@ GrdFileType parse_conf_grd_file_type(Dictionary *dict) { v = dict->lookup_int(conf_key_file_type, false); if(dict->last_lookup_status()) { - // Convert integer to enumerated GrdFileType - if(v == conf_const.lookup_int(conf_val_grib1)) t = GrdFileType_Gb1; - else if(v == conf_const.lookup_int(conf_val_grib2)) t = GrdFileType_Gb2; - else if(v == conf_const.lookup_int(conf_val_netcdf_met)) t = GrdFileType_NcMet; - else if(v == conf_const.lookup_int(conf_val_netcdf_wrf)) t = GrdFileType_NcWrf; - else if(v == conf_const.lookup_int(conf_val_netcdf_pint)) t = GrdFileType_NcPinterp; - else if(v == conf_const.lookup_int(conf_val_netcdf_nccf)) t = GrdFileType_NcCF; - else if(v == conf_const.lookup_int(conf_val_netcdf_ugrid)) t = GrdFileType_UGrid; - else if(v == conf_const.lookup_int(conf_val_python_numpy)) t = GrdFileType_Python_Numpy; - else if(v == conf_const.lookup_int(conf_val_python_xarray)) t = GrdFileType_Python_Xarray; + // Convert integer to enumerated FileType + if(v == conf_const.lookup_int(conf_val_grib1)) t = FileType_Gb1; + else if(v == conf_const.lookup_int(conf_val_grib2)) t = FileType_Gb2; + else if(v == conf_const.lookup_int(conf_val_netcdf_met)) t = FileType_NcMet; + else if(v == conf_const.lookup_int(conf_val_netcdf_wrf)) t = FileType_NcWrf; + else if(v == conf_const.lookup_int(conf_val_netcdf_pint)) t = FileType_NcPinterp; + else if(v == conf_const.lookup_int(conf_val_netcdf_nccf)) t = FileType_NcCF; + else if(v == conf_const.lookup_int(conf_val_netcdf_ugrid)) t = FileType_UGrid; + else if(v == conf_const.lookup_int(conf_val_python_numpy)) t = FileType_Python_Numpy; + else if(v == conf_const.lookup_int(conf_val_python_xarray)) t = FileType_Python_Xarray; else { mlog << Error << "\nparse_conf_grd_file_type() -> " << "Unexpected config file value of " << v << " for \"" diff --git a/src/basic/vx_config/config_util.h b/src/basic/vx_config/config_util.h index ec3a92516e..e025fd752e 100644 --- a/src/basic/vx_config/config_util.h +++ b/src/basic/vx_config/config_util.h @@ -35,7 +35,7 @@ extern ConcatString parse_conf_string( Dictionary *dict, const char *, bool check_empty=true); -extern GrdFileType parse_conf_grd_file_type(Dictionary *dict); +extern FileType parse_conf_grd_file_type(Dictionary *dict); extern std::map parse_conf_output_flag( Dictionary *dict, diff --git a/src/basic/vx_config/data_file_type.h b/src/basic/vx_config/data_file_type.h index 3aa3f534c5..7b31907833 100644 --- a/src/basic/vx_config/data_file_type.h +++ b/src/basic/vx_config/data_file_type.h @@ -14,44 +14,43 @@ /////////////////////////////////////////////////////////////////////////////// // -// Enumeration of supported gridded file types +// Enumeration of supported file types // -enum GrdFileType { +enum FileType { - GrdFileType_None, // Default + FileType_None, // Default - GrdFileType_Gb1, // GRIB version 1 - GrdFileType_Gb2, // GRIB version 2 - GrdFileType_NcMet, // NetCDF MET format - GrdFileType_General_Netcdf, // NetCDF - GrdFileType_NcWrf, // NetCDF output directly from WRF-ARW - GrdFileType_NcPinterp, // NetCDF output of WRF-ARW pinterp tool - GrdFileType_NcCF, // NetCDF Climate-Forecast Convention - GrdFileType_HdfEos, // Hierarchical Data Format - Earth Observing System - GrdFileType_Bufr, // Bufr or PrepBufr format - GrdFileType_Python_Numpy, // Python script using numpy array and attributes dictionary - GrdFileType_Python_Xarray, // Python script using xarray dataplane - GrdFileType_UGrid, // Unstructured grid + FileType_Gb1, // GRIB version 1 + FileType_Gb2, // GRIB version 2 + FileType_NcMet, // NetCDF MET format + FileType_General_Netcdf, // NetCDF + FileType_NcWrf, // NetCDF output directly from WRF-ARW + FileType_NcPinterp, // NetCDF output of WRF-ARW pinterp tool + FileType_NcCF, // NetCDF Climate-Forecast Convention + FileType_HdfEos, // Hierarchical Data Format - Earth Observing System + FileType_Bufr, // Bufr or PrepBufr format + FileType_Python_Numpy, // Python script using numpy array and attributes dictionary + FileType_Python_Xarray, // Python script using xarray dataplane + FileType_UGrid, // Unstructured grid }; /////////////////////////////////////////////////////////////////////////////// -inline bool is_netcdf_grdfiletype(const GrdFileType _t) { - return(_t == GrdFileType_NcMet || - _t == GrdFileType_General_Netcdf || - _t == GrdFileType_NcWrf || - _t == GrdFileType_NcPinterp || - _t == GrdFileType_NcCF); +inline bool is_netcdf_grdfiletype(const FileType _t) { + return(_t == FileType_NcMet || + _t == FileType_General_Netcdf || + _t == FileType_NcWrf || + _t == FileType_NcPinterp || + _t == FileType_NcCF); } - /////////////////////////////////////////////////////////////////////////////// -inline bool is_python_grdfiletype(const GrdFileType _t) { - return(_t == GrdFileType_Python_Xarray || - _t == GrdFileType_Python_Numpy); +inline bool is_python_grdfiletype(const FileType _t) { + return(_t == FileType_Python_Xarray || + _t == FileType_Python_Numpy); } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/basic/vx_config/grdfiletype_to_string.cc b/src/basic/vx_config/grdfiletype_to_string.cc index cf3554cd6d..ca4bfe26b4 100644 --- a/src/basic/vx_config/grdfiletype_to_string.cc +++ b/src/basic/vx_config/grdfiletype_to_string.cc @@ -34,7 +34,7 @@ using namespace std; //////////////////////////////////////////////////////////////////////// -ConcatString grdfiletype_to_string(const GrdFileType t) +ConcatString grdfiletype_to_string(const FileType t) { @@ -42,21 +42,21 @@ const char * s = (const char *) nullptr; switch ( t ) { - case GrdFileType_None: s = "GrdFileType_None"; break; - case GrdFileType_Gb1: s = "GrdFileType_Gb1"; break; - case GrdFileType_Gb2: s = "GrdFileType_Gb2"; break; - case GrdFileType_NcMet: s = "GrdFileType_NcMet"; break; - case GrdFileType_General_Netcdf: s = "GrdFileType_General_Netcdf"; break; + case FileType_None: s = "FileType_None"; break; + case FileType_Gb1: s = "FileType_Gb1"; break; + case FileType_Gb2: s = "FileType_Gb2"; break; + case FileType_NcMet: s = "FileType_NcMet"; break; + case FileType_General_Netcdf: s = "FileType_General_Netcdf"; break; - case GrdFileType_NcWrf: s = "GrdFileType_NcWrf"; break; - case GrdFileType_NcPinterp: s = "GrdFileType_NcPinterp"; break; - case GrdFileType_NcCF: s = "GrdFileType_NcCF"; break; - case GrdFileType_HdfEos: s = "GrdFileType_HdfEos"; break; - case GrdFileType_Bufr: s = "GrdFileType_Bufr"; break; + case FileType_NcWrf: s = "FileType_NcWrf"; break; + case FileType_NcPinterp: s = "FileType_NcPinterp"; break; + case FileType_NcCF: s = "FileType_NcCF"; break; + case FileType_HdfEos: s = "FileType_HdfEos"; break; + case FileType_Bufr: s = "FileType_Bufr"; break; - case GrdFileType_Python_Numpy: s = "GrdFileType_Python_Numpy"; break; - case GrdFileType_Python_Xarray: s = "GrdFileType_Python_Xarray"; break; - case GrdFileType_UGrid: s = "GrdFileType_UGrid"; break; + case FileType_Python_Numpy: s = "FileType_Python_Numpy"; break; + case FileType_Python_Xarray: s = "FileType_Python_Xarray"; break; + case FileType_UGrid: s = "FileType_UGrid"; break; default: s = "(bad value)"; @@ -73,25 +73,25 @@ return ConcatString(s); //////////////////////////////////////////////////////////////////////// -bool string_to_grdfiletype(const char * text, GrdFileType & t) +bool string_to_grdfiletype(const char * text, FileType & t) { - if ( strcmp(text, "GrdFileType_None" ) == 0 ) { t = GrdFileType_None; return true; } -else if ( strcmp(text, "GrdFileType_Gb1" ) == 0 ) { t = GrdFileType_Gb1; return true; } -else if ( strcmp(text, "GrdFileType_Gb2" ) == 0 ) { t = GrdFileType_Gb2; return true; } -else if ( strcmp(text, "GrdFileType_NcMet" ) == 0 ) { t = GrdFileType_NcMet; return true; } -else if ( strcmp(text, "GrdFileType_General_Netcdf") == 0 ) { t = GrdFileType_General_Netcdf; return true; } - -else if ( strcmp(text, "GrdFileType_NcWrf" ) == 0 ) { t = GrdFileType_NcWrf; return true; } -else if ( strcmp(text, "GrdFileType_NcPinterp" ) == 0 ) { t = GrdFileType_NcPinterp; return true; } -else if ( strcmp(text, "GrdFileType_NcCF" ) == 0 ) { t = GrdFileType_NcCF; return true; } -else if ( strcmp(text, "GrdFileType_HdfEos" ) == 0 ) { t = GrdFileType_HdfEos; return true; } -else if ( strcmp(text, "GrdFileType_Bufr" ) == 0 ) { t = GrdFileType_Bufr; return true; } - -else if ( strcmp(text, "GrdFileType_Python_Numpy" ) == 0 ) { t = GrdFileType_Python_Numpy; return true; } -else if ( strcmp(text, "GrdFileType_Python_Xarray" ) == 0 ) { t = GrdFileType_Python_Xarray; return true; } -else if ( strcmp(text, "GrdFileType_UGrid" ) == 0 ) { t = GrdFileType_UGrid; return true; } + if ( strcmp(text, "FileType_None" ) == 0 ) { t = FileType_None; return true; } +else if ( strcmp(text, "FileType_Gb1" ) == 0 ) { t = FileType_Gb1; return true; } +else if ( strcmp(text, "FileType_Gb2" ) == 0 ) { t = FileType_Gb2; return true; } +else if ( strcmp(text, "FileType_NcMet" ) == 0 ) { t = FileType_NcMet; return true; } +else if ( strcmp(text, "FileType_General_Netcdf") == 0 ) { t = FileType_General_Netcdf; return true; } + +else if ( strcmp(text, "FileType_NcWrf" ) == 0 ) { t = FileType_NcWrf; return true; } +else if ( strcmp(text, "FileType_NcPinterp" ) == 0 ) { t = FileType_NcPinterp; return true; } +else if ( strcmp(text, "FileType_NcCF" ) == 0 ) { t = FileType_NcCF; return true; } +else if ( strcmp(text, "FileType_HdfEos" ) == 0 ) { t = FileType_HdfEos; return true; } +else if ( strcmp(text, "FileType_Bufr" ) == 0 ) { t = FileType_Bufr; return true; } + +else if ( strcmp(text, "FileType_Python_Numpy" ) == 0 ) { t = FileType_Python_Numpy; return true; } +else if ( strcmp(text, "FileType_Python_Xarray" ) == 0 ) { t = FileType_Python_Xarray; return true; } +else if ( strcmp(text, "FileType_UGrid" ) == 0 ) { t = FileType_UGrid; return true; } // // nope // diff --git a/src/basic/vx_config/grdfiletype_to_string.h b/src/basic/vx_config/grdfiletype_to_string.h index 6b44a35670..c240080c7d 100644 --- a/src/basic/vx_config/grdfiletype_to_string.h +++ b/src/basic/vx_config/grdfiletype_to_string.h @@ -38,10 +38,10 @@ //////////////////////////////////////////////////////////////////////// -extern ConcatString grdfiletype_to_string(const GrdFileType); +extern ConcatString grdfiletype_to_string(const FileType); -extern bool string_to_grdfiletype(const char *, GrdFileType &); +extern bool string_to_grdfiletype(const char *, FileType &); //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d/data_class.h b/src/libcode/vx_data2d/data_class.h index 5fbf07e266..5377bc0370 100644 --- a/src/libcode/vx_data2d/data_class.h +++ b/src/libcode/vx_data2d/data_class.h @@ -129,7 +129,7 @@ class Met2dDataFile : public Met2dData { virtual int raw_nx() const; virtual int raw_ny() const; - virtual GrdFileType file_type() const = 0; + virtual FileType file_type() const = 0; int shift_right() const; diff --git a/src/libcode/vx_data2d/var_info.cc b/src/libcode/vx_data2d/var_info.cc index ac12513e76..cd27a0a392 100644 --- a/src/libcode/vx_data2d/var_info.cc +++ b/src/libcode/vx_data2d/var_info.cc @@ -952,7 +952,7 @@ ConcatString EnsVarInfo::get_ens_member_id(int index) { /////////////////////////////////////////////////////////////////////////////// -ConcatString raw_magic_str(Dictionary i_edict, GrdFileType file_type) { +ConcatString raw_magic_str(Dictionary i_edict, FileType file_type) { ConcatString magic_str; ConcatString name = i_edict.lookup_string("name"); diff --git a/src/libcode/vx_data2d/var_info.h b/src/libcode/vx_data2d/var_info.h index eba7551b67..924cdca505 100644 --- a/src/libcode/vx_data2d/var_info.h +++ b/src/libcode/vx_data2d/var_info.h @@ -106,7 +106,7 @@ class VarInfo // get stuff // - virtual GrdFileType file_type() const = 0; + virtual FileType file_type() const = 0; ConcatString magic_str() const; ConcatString magic_time_str() const; @@ -310,7 +310,7 @@ class EnsVarInfo { //////////////////////////////////////////////////////////////////////// -ConcatString raw_magic_str(Dictionary i_edict, GrdFileType file_type); +ConcatString raw_magic_str(Dictionary i_edict, FileType file_type); bool is_req_level_match(const ConcatString &, const ConcatString &); /////////////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_factory/data2d_factory.cc b/src/libcode/vx_data2d_factory/data2d_factory.cc index ee2c06c748..48197ffa81 100644 --- a/src/libcode/vx_data2d_factory/data2d_factory.cc +++ b/src/libcode/vx_data2d_factory/data2d_factory.cc @@ -44,7 +44,7 @@ using namespace std; // //////////////////////////////////////////////////////////////////////// -Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(GrdFileType type) +Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(FileType type) { @@ -62,11 +62,11 @@ MetPythonDataFile * p = nullptr; switch(type) { - case GrdFileType_Gb1: + case FileType_Gb1: mtddf = new MetGrib1DataFile; break; - case GrdFileType_Gb2: + case FileType_Gb2: #ifdef WITH_GRIB2 mtddf = new MetGrib2DataFile; #else @@ -77,28 +77,28 @@ MetPythonDataFile * p = nullptr; #endif break; - case GrdFileType_NcMet: + case FileType_NcMet: mtddf = new MetNcMetDataFile; break; - case GrdFileType_NcWrf: - case GrdFileType_NcPinterp: + case FileType_NcWrf: + case FileType_NcPinterp: mtddf = new MetNcWrfDataFile; break; - case GrdFileType_NcCF: + case FileType_NcCF: mtddf = new MetNcCFDataFile; break; #ifdef WITH_PYTHON - case GrdFileType_Python_Numpy: + case FileType_Python_Numpy: p = new MetPythonDataFile; p->set_type(type); mtddf = p; break; - case GrdFileType_Python_Xarray: + case FileType_Python_Xarray: p = new MetPythonDataFile; p->set_type(type); mtddf = p; @@ -106,38 +106,38 @@ MetPythonDataFile * p = nullptr; #else - case GrdFileType_Python_Numpy: - case GrdFileType_Python_Xarray: + case FileType_Python_Numpy: + case FileType_Python_Xarray: python_compile_error(method_name); #endif - case GrdFileType_HdfEos: + case FileType_HdfEos: mlog << Error << "\n" << method_name - << "Support for GrdFileType = \"" << grdfiletype_to_string(type) + << "Support for FileType = \"" << grdfiletype_to_string(type) << "\" not yet implemented!\n\n"; exit(1); - case GrdFileType_Bufr: + case FileType_Bufr: mlog << Error << "\n" << method_name << "cannot use this factory to read files of type \"" << grdfiletype_to_string(type) << "\"\n\n"; exit(1); - case GrdFileType_UGrid: + case FileType_UGrid: #ifdef WITH_UGRID - // For GrdFileType_None, silently return a nullptr pointer + // For FileType_None, silently return a nullptr pointer mtddf = new MetUGridDataFile; #else ugrid_compile_error(method_name); #endif break; - case GrdFileType_None: - // For GrdFileType_None, silently return a nullptr pointer + case FileType_None: + // For FileType_None, silently return a nullptr pointer mtddf = (Met2dDataFile *) nullptr; break; @@ -160,7 +160,7 @@ MetPythonDataFile * p = nullptr; //////////////////////////////////////////////////////////////////////// Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(const char *filename) { - GrdFileType type; + FileType type; Met2dDataFile *mtddf = (Met2dDataFile *) nullptr; // @@ -177,8 +177,8 @@ Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(const char *filename) // Call open for non-python types // if(mtddf && - type != GrdFileType_Python_Numpy && - type != GrdFileType_Python_Xarray) { + type != FileType_Python_Numpy && + type != FileType_Python_Xarray) { if(!(mtddf->open(filename))) { mlog << Error << "\nMet2dDataFileFactory::new_met_2d_data_file() -> " << "error opening file \"" << filename << "\"\n\n"; @@ -191,7 +191,7 @@ Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(const char *filename) //////////////////////////////////////////////////////////////////////// -Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(const char *filename, GrdFileType type) +Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(const char *filename, FileType type) { @@ -200,7 +200,7 @@ Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(const char *filename, // // Use the file type, if valid // - if(type != GrdFileType_None) { + if(type != FileType_None) { // // Create a new data file object @@ -211,8 +211,8 @@ Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(const char *filename, // // Set MET_PYTHON_INPUT_ARG environment variable for python types // - if(type == GrdFileType_Python_Numpy || - type == GrdFileType_Python_Xarray) { + if(type == FileType_Python_Numpy || + type == FileType_Python_Xarray) { setenv(met_python_input_arg, filename, 1); } #endif @@ -221,8 +221,8 @@ Met2dDataFile * Met2dDataFileFactory::new_met_2d_data_file(const char *filename, // Call open for non-python types // if(mtddf && - type != GrdFileType_Python_Numpy && - type != GrdFileType_Python_Xarray) { + type != FileType_Python_Numpy && + type != FileType_Python_Xarray) { if(!(mtddf->open(filename))) { mlog << Error << "\nMet2dDataFileFactory::new_met_2d_data_file() -> " << "error opening file \"" << filename << "\"\n\n"; @@ -247,7 +247,7 @@ bool is_2d_data_file(const ConcatString &filename, const ConcatString &config_str) { Met2dDataFileFactory mtddf_factory; Met2dDataFile *mtddf = (Met2dDataFile *) nullptr; - GrdFileType type = GrdFileType_None; + FileType type = FileType_None; // Check for a requested file type if(config_str.nonempty()) { diff --git a/src/libcode/vx_data2d_factory/data2d_factory.h b/src/libcode/vx_data2d_factory/data2d_factory.h index 0ad9072900..a4a043931b 100644 --- a/src/libcode/vx_data2d_factory/data2d_factory.h +++ b/src/libcode/vx_data2d_factory/data2d_factory.h @@ -21,9 +21,9 @@ class Met2dDataFileFactory { public: - static Met2dDataFile *new_met_2d_data_file(GrdFileType type); + static Met2dDataFile *new_met_2d_data_file(FileType type); static Met2dDataFile *new_met_2d_data_file(const char *filename); - static Met2dDataFile *new_met_2d_data_file(const char *filename, GrdFileType type); + static Met2dDataFile *new_met_2d_data_file(const char *filename, FileType type); }; /////////////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_factory/data2d_factory_utils.cc b/src/libcode/vx_data2d_factory/data2d_factory_utils.cc index 6f794c7563..526a1003a5 100644 --- a/src/libcode/vx_data2d_factory/data2d_factory_utils.cc +++ b/src/libcode/vx_data2d_factory/data2d_factory_utils.cc @@ -49,28 +49,28 @@ static const int n_bf_file_ext = sizeof(bf_file_ext)/sizeof(*bf_file_ext); //////////////////////////////////////////////////////////////////////// -static GrdFileType file_type_by_suffix(const char * filename); +static FileType file_type_by_suffix(const char * filename); //////////////////////////////////////////////////////////////////////// -GrdFileType grd_file_type(const char * filename) +FileType grd_file_type(const char * filename) { -GrdFileType suffix_type = GrdFileType_None; -GrdFileType data_type = GrdFileType_None; +FileType suffix_type = FileType_None; +FileType data_type = FileType_None; // // first check for python strings // if ( strcasecmp(filename, conf_val_python_numpy) == 0 ) { - return GrdFileType_Python_Numpy; + return FileType_Python_Numpy; } else if ( strcasecmp(filename, conf_val_python_xarray) == 0 ) { - return GrdFileType_Python_Xarray; + return FileType_Python_Xarray; } // @@ -95,21 +95,21 @@ suffix_type = file_type_by_suffix(filename); // look inside the file // - if ( is_grib1_file (filename) ) data_type = GrdFileType_Gb1; -else if ( is_grib2_file (filename) ) data_type = GrdFileType_Gb2; -else if ( is_ncpinterp_file (filename) ) data_type = GrdFileType_NcPinterp; -else if ( is_ncwrf_file (filename) ) data_type = GrdFileType_NcWrf; -else if ( is_nccf_file (filename) ) data_type = GrdFileType_NcCF; -else if ( is_ncmet_file (filename) ) data_type = GrdFileType_NcMet; -else if ( is_bufr_file (filename) ) data_type = GrdFileType_Bufr; -else if ( is_ugrid_file (filename) ) data_type = GrdFileType_UGrid; -else data_type = GrdFileType_None; + if ( is_grib1_file (filename) ) data_type = FileType_Gb1; +else if ( is_grib2_file (filename) ) data_type = FileType_Gb2; +else if ( is_ncpinterp_file (filename) ) data_type = FileType_NcPinterp; +else if ( is_ncwrf_file (filename) ) data_type = FileType_NcWrf; +else if ( is_nccf_file (filename) ) data_type = FileType_NcCF; +else if ( is_ncmet_file (filename) ) data_type = FileType_NcMet; +else if ( is_bufr_file (filename) ) data_type = FileType_Bufr; +else if ( is_ugrid_file (filename) ) data_type = FileType_UGrid; +else data_type = FileType_None; // // print warning for inconsistent types // -if ( suffix_type != GrdFileType_None && suffix_type != data_type ) { +if ( suffix_type != FileType_None && suffix_type != data_type ) { mlog << Warning << "\ngrd_file_type() -> " << "the file type indicated by the suffix \"" @@ -120,7 +120,7 @@ if ( suffix_type != GrdFileType_None && suffix_type != data_type ) { } -if ( suffix_type != GrdFileType_None ) return suffix_type; +if ( suffix_type != FileType_None ) return suffix_type; else return data_type ; } @@ -129,7 +129,7 @@ else return data_type ; //////////////////////////////////////////////////////////////////////// -GrdFileType file_type_by_suffix(const char * filename) +FileType file_type_by_suffix(const char * filename) { @@ -137,7 +137,7 @@ int j; const ConcatString suffix = filename_suffix(filename); -if ( suffix.empty() ) return GrdFileType_None; +if ( suffix.empty() ) return FileType_None; // // grib ? @@ -145,7 +145,7 @@ if ( suffix.empty() ) return GrdFileType_None; for (j=0; j " << "File \"" << path << "\" of type " @@ -205,11 +205,11 @@ return a; //////////////////////////////////////////////////////////////////////// -GrdFileType parse_file_list_type(const StringArray& file_list) +FileType parse_file_list_type(const StringArray& file_list) { -GrdFileType ftype = GrdFileType_None; +FileType ftype = FileType_None; for ( int i=0; iset_file_type(type); @@ -103,11 +103,11 @@ VarInfo * VarInfoFactory::new_var_info(GrdFileType type) python_compile_error(method_name); #endif - case GrdFileType_NcCF: + case FileType_NcCF: vi = new VarInfoNcCF; break; - case GrdFileType_UGrid: + case FileType_UGrid: #ifdef WITH_UGRID vi = new VarInfoUGrid; break; @@ -115,9 +115,9 @@ VarInfo * VarInfoFactory::new_var_info(GrdFileType type) ugrid_compile_error(method_name); #endif - case GrdFileType_HdfEos: + case FileType_HdfEos: mlog << Error << "\n" << method_name - << "Support for GrdFileType = " << grdfiletype_to_string(type) + << "Support for FileType = " << grdfiletype_to_string(type) << " not yet implemented!\n\n"; exit(1); @@ -138,7 +138,7 @@ VarInfo * VarInfoFactory::new_var_info(GrdFileType type) /////////////////////////////////////////////////////////////////////////////// VarInfo * VarInfoFactory::new_var_info(ConcatString s) { - GrdFileType type; + FileType type; // Convert the string to a gridded data file type string_to_grdfiletype(s.c_str(), type); diff --git a/src/libcode/vx_data2d_factory/var_info_factory.h b/src/libcode/vx_data2d_factory/var_info_factory.h index eb150b39a2..42768fc7f5 100644 --- a/src/libcode/vx_data2d_factory/var_info_factory.h +++ b/src/libcode/vx_data2d_factory/var_info_factory.h @@ -23,7 +23,7 @@ class VarInfoFactory { public: - static VarInfo *new_var_info(GrdFileType t); + static VarInfo *new_var_info(FileType t); static VarInfo *new_var_info(ConcatString s); static VarInfo *new_copy(const VarInfo *); }; diff --git a/src/libcode/vx_data2d_grib/data2d_grib.h b/src/libcode/vx_data2d_grib/data2d_grib.h index 63ca8f02ca..03cd1e6056 100644 --- a/src/libcode/vx_data2d_grib/data2d_grib.h +++ b/src/libcode/vx_data2d_grib/data2d_grib.h @@ -60,7 +60,7 @@ class MetGrib1DataFile : public Met2dDataFile { // get stuff // - GrdFileType file_type() const; + FileType file_type() const; double operator () (int x, int y) const; @@ -102,8 +102,8 @@ class MetGrib1DataFile : public Met2dDataFile { //////////////////////////////////////////////////////////////////////// -inline double MetGrib1DataFile::operator () (int x, int y) const { return get(x, y); } -inline GrdFileType MetGrib1DataFile::file_type () const { return GrdFileType_Gb1; } +inline double MetGrib1DataFile::operator () (int x, int y) const { return get(x, y); } +inline FileType MetGrib1DataFile::file_type () const { return FileType_Gb1; } //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_grib/var_info_grib.h b/src/libcode/vx_data2d_grib/var_info_grib.h index b0bd2144ba..929e88a17e 100644 --- a/src/libcode/vx_data2d_grib/var_info_grib.h +++ b/src/libcode/vx_data2d_grib/var_info_grib.h @@ -76,15 +76,15 @@ class VarInfoGrib : public VarInfo // get stuff // - GrdFileType file_type() const; - int ptv() const; - int code() const; - int lvl_type() const; - int p_code() const; - int center() const; - int subcenter() const; - int field_rec() const; - int tri() const; + FileType file_type() const; + int ptv() const; + int code() const; + int lvl_type() const; + int p_code() const; + int center() const; + int subcenter() const; + int field_rec() const; + int tri() const; // // set stuff @@ -116,15 +116,15 @@ class VarInfoGrib : public VarInfo /////////////////////////////////////////////////////////////////////////////// -inline GrdFileType VarInfoGrib::file_type() const { return GrdFileType_Gb1; } -inline int VarInfoGrib::ptv() const { return PTV; } -inline int VarInfoGrib::code() const { return Code; } -inline int VarInfoGrib::lvl_type() const { return LvlType; } -inline int VarInfoGrib::p_code() const { return PCode; } -inline int VarInfoGrib::center() const { return Center; } -inline int VarInfoGrib::subcenter() const { return Subcenter; } -inline int VarInfoGrib::field_rec() const { return FieldRec; } -inline int VarInfoGrib::tri() const { return TRI; } +inline FileType VarInfoGrib::file_type() const { return FileType_Gb1; } +inline int VarInfoGrib::ptv() const { return PTV; } +inline int VarInfoGrib::code() const { return Code; } +inline int VarInfoGrib::lvl_type() const { return LvlType; } +inline int VarInfoGrib::p_code() const { return PCode; } +inline int VarInfoGrib::center() const { return Center; } +inline int VarInfoGrib::subcenter() const { return Subcenter; } +inline int VarInfoGrib::field_rec() const { return FieldRec; } +inline int VarInfoGrib::tri() const { return TRI; } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_grib2/data2d_grib2.h b/src/libcode/vx_data2d_grib2/data2d_grib2.h index 82dfae7886..716fe517f4 100644 --- a/src/libcode/vx_data2d_grib2/data2d_grib2.h +++ b/src/libcode/vx_data2d_grib2/data2d_grib2.h @@ -132,7 +132,7 @@ class MetGrib2DataFile : public Met2dDataFile { // get stuff // - GrdFileType file_type() const; + FileType file_type() const; // retrieve the first matching data plane @@ -164,7 +164,7 @@ class MetGrib2DataFile : public Met2dDataFile { //////////////////////////////////////////////////////////////////////// -inline GrdFileType MetGrib2DataFile::file_type () const { return GrdFileType_Gb2; } +inline FileType MetGrib2DataFile::file_type () const { return FileType_Gb2; } //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_grib2/var_info_grib2.h b/src/libcode/vx_data2d_grib2/var_info_grib2.h index 3ae79fb45a..cd1712d57d 100644 --- a/src/libcode/vx_data2d_grib2/var_info_grib2.h +++ b/src/libcode/vx_data2d_grib2/var_info_grib2.h @@ -81,7 +81,7 @@ class VarInfoGrib2 : public VarInfo // get stuff // - GrdFileType file_type() const; + FileType file_type() const; int record() const; int discipline() const; int m_table() const; @@ -147,35 +147,28 @@ class VarInfoGrib2 : public VarInfo /////////////////////////////////////////////////////////////////////////////// -inline GrdFileType VarInfoGrib2::file_type() const { return GrdFileType_Gb2; } -inline int VarInfoGrib2::record() const { return Record; } -inline int VarInfoGrib2::discipline() const { return Discipline; } -inline int VarInfoGrib2::m_table() const { return MTable; } -inline int VarInfoGrib2::l_table() const { return LTable; } -inline int VarInfoGrib2::parm_cat() const { return ParmCat; } -inline int VarInfoGrib2::parm() const { return Parm; } -inline int VarInfoGrib2::pdt() const { return PDTmpl; } -inline int VarInfoGrib2::process() const { return Process; } -inline int VarInfoGrib2::ens_type() const { return EnsType; } -inline int VarInfoGrib2::der_type() const { return DerType; } -inline int VarInfoGrib2::stat_type() const { return StatType; } -inline int VarInfoGrib2::perc_val() const { return PercVal; } - -inline int VarInfoGrib2::aerosol_type() const { return AerosolType; } -inline int VarInfoGrib2::aerosol_interval_type() const { return AerosolIntervalType; } -inline double VarInfoGrib2::aerosol_size_lower() const { return AerosolSizeLower; } -inline double VarInfoGrib2::aerosol_size_upper() const { return AerosolSizeUpper; } - -inline int VarInfoGrib2::n_ipdtmpl() const { - return IPDTmplIndex.n(); } -inline int VarInfoGrib2::ipdtmpl_index(int i) const { - return IPDTmplIndex[i]; } -inline int VarInfoGrib2::ipdtmpl_val(int i) const { - return IPDTmplVal[i]; } - -/////////////////////////////////////////////////////////////////////////////// - - +inline FileType VarInfoGrib2::file_type() const { return FileType_Gb2; } +inline int VarInfoGrib2::record() const { return Record; } +inline int VarInfoGrib2::discipline() const { return Discipline; } +inline int VarInfoGrib2::m_table() const { return MTable; } +inline int VarInfoGrib2::l_table() const { return LTable; } +inline int VarInfoGrib2::parm_cat() const { return ParmCat; } +inline int VarInfoGrib2::parm() const { return Parm; } +inline int VarInfoGrib2::pdt() const { return PDTmpl; } +inline int VarInfoGrib2::process() const { return Process; } +inline int VarInfoGrib2::ens_type() const { return EnsType; } +inline int VarInfoGrib2::der_type() const { return DerType; } +inline int VarInfoGrib2::stat_type() const { return StatType; } +inline int VarInfoGrib2::perc_val() const { return PercVal; } + +inline int VarInfoGrib2::aerosol_type() const { return AerosolType; } +inline int VarInfoGrib2::aerosol_interval_type() const { return AerosolIntervalType; } +inline double VarInfoGrib2::aerosol_size_lower() const { return AerosolSizeLower; } +inline double VarInfoGrib2::aerosol_size_upper() const { return AerosolSizeUpper; } + +inline int VarInfoGrib2::n_ipdtmpl() const { return IPDTmplIndex.n(); } +inline int VarInfoGrib2::ipdtmpl_index(int i) const { return IPDTmplIndex[i]; } +inline int VarInfoGrib2::ipdtmpl_val(int i) const { return IPDTmplVal[i]; } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_nc_cf/data2d_nc_cf.h b/src/libcode/vx_data2d_nc_cf/data2d_nc_cf.h index c53bf95e6f..45d1e360c2 100644 --- a/src/libcode/vx_data2d_nc_cf/data2d_nc_cf.h +++ b/src/libcode/vx_data2d_nc_cf/data2d_nc_cf.h @@ -78,7 +78,7 @@ class MetNcCFDataFile : public Met2dDataFile { // get stuff // - GrdFileType file_type() const; + FileType file_type() const; // retrieve the first matching data plane @@ -111,7 +111,7 @@ class MetNcCFDataFile : public Met2dDataFile { //////////////////////////////////////////////////////////////////////// -inline GrdFileType MetNcCFDataFile::file_type () const { return GrdFileType_NcCF; } +inline FileType MetNcCFDataFile::file_type () const { return FileType_NcCF; } //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_nc_cf/var_info_nc_cf.h b/src/libcode/vx_data2d_nc_cf/var_info_nc_cf.h index db2f78bb84..49463896e3 100644 --- a/src/libcode/vx_data2d_nc_cf/var_info_nc_cf.h +++ b/src/libcode/vx_data2d_nc_cf/var_info_nc_cf.h @@ -54,7 +54,7 @@ class VarInfoNcCF : public VarInfo // get stuff // - GrdFileType file_type() const; + FileType file_type() const; const LongArray & dimension() const; int dimension(int i) const; const NumArray & dim_value() const; @@ -86,7 +86,7 @@ class VarInfoNcCF : public VarInfo /////////////////////////////////////////////////////////////////////////////// -inline GrdFileType VarInfoNcCF::file_type() const { return GrdFileType_NcCF; } +inline FileType VarInfoNcCF::file_type() const { return FileType_NcCF; } inline const LongArray & VarInfoNcCF::dimension() const { return Dimension; } inline int VarInfoNcCF::dimension(int i) const { return Dimension[i]; } inline int VarInfoNcCF::n_dimension() const { return Dimension.n_elements(); } diff --git a/src/libcode/vx_data2d_nc_met/data2d_nc_met.h b/src/libcode/vx_data2d_nc_met/data2d_nc_met.h index cffde8fa6c..0c5f8379ba 100644 --- a/src/libcode/vx_data2d_nc_met/data2d_nc_met.h +++ b/src/libcode/vx_data2d_nc_met/data2d_nc_met.h @@ -55,7 +55,7 @@ class MetNcMetDataFile : public Met2dDataFile { // get stuff // - GrdFileType file_type() const; + FileType file_type() const; // retrieve the first matching data plane @@ -85,7 +85,7 @@ class MetNcMetDataFile : public Met2dDataFile { //////////////////////////////////////////////////////////////////////// -inline GrdFileType MetNcMetDataFile::file_type () const { return GrdFileType_NcMet; } +inline FileType MetNcMetDataFile::file_type () const { return FileType_NcMet; } //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_nc_met/var_info_nc_met.h b/src/libcode/vx_data2d_nc_met/var_info_nc_met.h index 6183fed14d..f9d0acc6c9 100644 --- a/src/libcode/vx_data2d_nc_met/var_info_nc_met.h +++ b/src/libcode/vx_data2d_nc_met/var_info_nc_met.h @@ -50,10 +50,10 @@ class VarInfoNcMet : public VarInfo // get stuff // - GrdFileType file_type() const; - const LongArray & dimension() const; - int dimension(int i) const; - int n_dimension() const; + FileType file_type() const; + const LongArray & dimension() const; + int dimension(int i) const; + int n_dimension() const; // // set stuff @@ -78,7 +78,7 @@ class VarInfoNcMet : public VarInfo /////////////////////////////////////////////////////////////////////////////// -inline GrdFileType VarInfoNcMet::file_type() const { return GrdFileType_NcMet; } +inline FileType VarInfoNcMet::file_type() const { return FileType_NcMet; } inline const LongArray & VarInfoNcMet::dimension() const { return Dimension; } inline int VarInfoNcMet::dimension(int i) const { return Dimension[i]; } inline int VarInfoNcMet::n_dimension() const { return Dimension.n_elements(); } diff --git a/src/libcode/vx_data2d_nc_wrf/data2d_nc_wrf.h b/src/libcode/vx_data2d_nc_wrf/data2d_nc_wrf.h index bda5947422..e198ad5084 100644 --- a/src/libcode/vx_data2d_nc_wrf/data2d_nc_wrf.h +++ b/src/libcode/vx_data2d_nc_wrf/data2d_nc_wrf.h @@ -57,7 +57,7 @@ class MetNcWrfDataFile : public Met2dDataFile { // get stuff // - GrdFileType file_type() const; + FileType file_type() const; // retrieve the first matching data plane @@ -87,7 +87,7 @@ class MetNcWrfDataFile : public Met2dDataFile { //////////////////////////////////////////////////////////////////////// -inline GrdFileType MetNcWrfDataFile::file_type () const { return ( GrdFileType_NcWrf ); } +inline FileType MetNcWrfDataFile::file_type () const { return ( FileType_NcWrf ); } //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_nc_wrf/var_info_nc_wrf.h b/src/libcode/vx_data2d_nc_wrf/var_info_nc_wrf.h index 2013f66cf1..976fd1eb38 100644 --- a/src/libcode/vx_data2d_nc_wrf/var_info_nc_wrf.h +++ b/src/libcode/vx_data2d_nc_wrf/var_info_nc_wrf.h @@ -213,7 +213,7 @@ class VarInfoNcWrf : public VarInfo // get stuff // - GrdFileType file_type() const; + FileType file_type() const; const LongArray & dimension() const; int dimension(int i) const; const NumArray & dim_value() const; @@ -247,7 +247,7 @@ class VarInfoNcWrf : public VarInfo /////////////////////////////////////////////////////////////////////////////// -inline GrdFileType VarInfoNcWrf::file_type() const { return GrdFileType_NcWrf; } +inline FileType VarInfoNcWrf::file_type() const { return FileType_NcWrf; } inline const LongArray & VarInfoNcWrf::dimension() const { return Dimension; } inline int VarInfoNcWrf::dimension(int i) const { return Dimension[i]; } inline int VarInfoNcWrf::n_dimension() const { return Dimension.n_elements(); } diff --git a/src/libcode/vx_data2d_python/data2d_python.cc b/src/libcode/vx_data2d_python/data2d_python.cc index 698cfc77a6..4767271d11 100644 --- a/src/libcode/vx_data2d_python/data2d_python.cc +++ b/src/libcode/vx_data2d_python/data2d_python.cc @@ -131,7 +131,7 @@ return; //////////////////////////////////////////////////////////////////////// -void MetPythonDataFile::set_type(const GrdFileType t) +void MetPythonDataFile::set_type(const FileType t) { @@ -196,11 +196,11 @@ bool use_xarray = false; switch ( Type ) { // assumes Type is already set - case GrdFileType_Python_Xarray: + case FileType_Python_Xarray: use_xarray = true; break; - case GrdFileType_Python_Numpy: + case FileType_Python_Numpy: use_xarray = false; break; diff --git a/src/libcode/vx_data2d_python/data2d_python.h b/src/libcode/vx_data2d_python/data2d_python.h index 3e6658ecf8..58f924c918 100644 --- a/src/libcode/vx_data2d_python/data2d_python.h +++ b/src/libcode/vx_data2d_python/data2d_python.h @@ -47,7 +47,7 @@ class MetPythonDataFile : public Met2dDataFile { VarInfoPython VInfo; - GrdFileType Type; // GrdFileType_Python_Xarray or GrdFileType_Python_Numpy + FileType Type; // FileType_Python_Xarray or FileType_Python_Numpy public: @@ -59,13 +59,13 @@ class MetPythonDataFile : public Met2dDataFile { // set stuff // - void set_type(const GrdFileType); + void set_type(const FileType); // // get stuff // - GrdFileType file_type() const; + FileType file_type() const; double operator () (int x, int y) const; @@ -100,8 +100,8 @@ class MetPythonDataFile : public Met2dDataFile { //////////////////////////////////////////////////////////////////////// -inline double MetPythonDataFile::operator () (int x, int y) const { return get(x, y); } -inline GrdFileType MetPythonDataFile::file_type () const { return Type; } +inline double MetPythonDataFile::operator () (int x, int y) const { return get(x, y); } +inline FileType MetPythonDataFile::file_type () const { return Type; } //////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_python/var_info_python.cc b/src/libcode/vx_data2d_python/var_info_python.cc index 97cd668344..90af0089c0 100644 --- a/src/libcode/vx_data2d_python/var_info_python.cc +++ b/src/libcode/vx_data2d_python/var_info_python.cc @@ -115,7 +115,7 @@ void VarInfoPython::clear() { VarInfo::clear(); // Initialize - Type = GrdFileType_None; + Type = FileType_None; return; } @@ -135,7 +135,7 @@ void VarInfoPython::dump(ostream &out) const { /////////////////////////////////////////////////////////////////////////////// -void VarInfoPython::set_file_type(const GrdFileType t) { +void VarInfoPython::set_file_type(const FileType t) { if ( is_python_grdfiletype(t) ) { @@ -146,7 +146,7 @@ void VarInfoPython::set_file_type(const GrdFileType t) { } mlog << Error - << "VarInfoPython::set_file_type(const GrdFileType) -> bad type ... " + << "VarInfoPython::set_file_type(const FileType) -> bad type ... " << grdfiletype_to_string(t) << "\n\n"; return; diff --git a/src/libcode/vx_data2d_python/var_info_python.h b/src/libcode/vx_data2d_python/var_info_python.h index abdfec9021..d541045610 100644 --- a/src/libcode/vx_data2d_python/var_info_python.h +++ b/src/libcode/vx_data2d_python/var_info_python.h @@ -31,7 +31,7 @@ class VarInfoPython : public VarInfo private: - GrdFileType Type; + FileType Type; void init_from_scratch(); void assign(const VarInfoPython &); @@ -50,13 +50,13 @@ class VarInfoPython : public VarInfo // get stuff // - GrdFileType file_type() const; + FileType file_type() const; // // set stuff // - void set_file_type(const GrdFileType); + void set_file_type(const FileType); void set_dict(Dictionary &); // @@ -73,7 +73,7 @@ class VarInfoPython : public VarInfo /////////////////////////////////////////////////////////////////////////////// -inline GrdFileType VarInfoPython::file_type() const { return Type; } +inline FileType VarInfoPython::file_type() const { return Type; } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/libcode/vx_data2d_ugrid/data2d_ugrid.h b/src/libcode/vx_data2d_ugrid/data2d_ugrid.h index 8c7d070c45..5daf466372 100644 --- a/src/libcode/vx_data2d_ugrid/data2d_ugrid.h +++ b/src/libcode/vx_data2d_ugrid/data2d_ugrid.h @@ -83,7 +83,7 @@ class MetUGridDataFile : public Met2dDataFile { // get stuff // - GrdFileType file_type() const; + FileType file_type() const; // retrieve the first matching data plane @@ -123,7 +123,7 @@ class MetUGridDataFile : public Met2dDataFile { //////////////////////////////////////////////////////////////////////// -inline GrdFileType MetUGridDataFile::file_type () const { return GrdFileType_UGrid; } +inline FileType MetUGridDataFile::file_type () const { return FileType_UGrid; } inline ConcatString MetUGridDataFile::coordinate_file() const { return _file->coordinate_nc(); } diff --git a/src/libcode/vx_data2d_ugrid/var_info_ugrid.h b/src/libcode/vx_data2d_ugrid/var_info_ugrid.h index 2604214dbc..b53f8f28cb 100644 --- a/src/libcode/vx_data2d_ugrid/var_info_ugrid.h +++ b/src/libcode/vx_data2d_ugrid/var_info_ugrid.h @@ -54,7 +54,7 @@ class VarInfoUGrid : public VarInfo // get stuff // - GrdFileType file_type() const; + FileType file_type() const; const LongArray & dimension() const; int dimension(int i) const; const NumArray & dim_value() const; @@ -86,7 +86,7 @@ class VarInfoUGrid : public VarInfo /////////////////////////////////////////////////////////////////////////////// -inline GrdFileType VarInfoUGrid::file_type() const { return GrdFileType_UGrid; } +inline FileType VarInfoUGrid::file_type() const { return FileType_UGrid; } inline const LongArray & VarInfoUGrid::dimension() const { return Dimension; } inline int VarInfoUGrid::dimension(int i) const { return Dimension[i]; } inline int VarInfoUGrid::n_dimension() const { return Dimension.n_elements(); } diff --git a/src/libcode/vx_series_data/series_data.cc b/src/libcode/vx_series_data/series_data.cc index b2396bff3b..2218720f8f 100644 --- a/src/libcode/vx_series_data/series_data.cc +++ b/src/libcode/vx_series_data/series_data.cc @@ -22,16 +22,16 @@ using namespace std; //////////////////////////////////////////////////////////////////////// -static bool read_single_entry(VarInfo*, const ConcatString&, const GrdFileType, +static bool read_single_entry(VarInfo*, const ConcatString&, const FileType, DataPlane&, Grid&); -static bool read_all_entries(vector&, const ConcatString&, const GrdFileType, +static bool read_all_entries(vector&, const ConcatString&, const FileType, vector&, Grid&); //////////////////////////////////////////////////////////////////////// bool get_series_entry(int i_series, VarInfo* data_info, - const StringArray& search_files, const GrdFileType type, + const StringArray& search_files, const FileType type, DataPlane& dp, Grid& grid, bool error_out, bool print_warning) { int i; @@ -80,7 +80,7 @@ bool get_series_entry(int i_series, VarInfo* data_info, //////////////////////////////////////////////////////////////////////// bool read_single_entry(VarInfo* info, const ConcatString& filename, - const GrdFileType type, DataPlane& dp, Grid& grid) { + const FileType type, DataPlane& dp, Grid& grid) { Met2dDataFileFactory mtddf_factory; Met2dDataFile* mtddf = (Met2dDataFile*) nullptr; @@ -110,7 +110,7 @@ bool read_single_entry(VarInfo* info, const ConcatString& filename, //////////////////////////////////////////////////////////////////////// bool get_series_entries(int i_series, vector &vi_list, - const StringArray &search_files, const GrdFileType type, + const StringArray &search_files, const FileType type, vector &dp_list, Grid &grid, bool error_out, bool print_warning) { int i; @@ -162,7 +162,7 @@ bool get_series_entries(int i_series, vector &vi_list, //////////////////////////////////////////////////////////////////////// bool read_all_entries(vector &vi_list, const ConcatString &filename, - const GrdFileType type, vector &dp_list, Grid &grid) { + const FileType type, vector &dp_list, Grid &grid) { Met2dDataFileFactory mtddf_factory; Met2dDataFile* mtddf = (Met2dDataFile*) nullptr; diff --git a/src/libcode/vx_series_data/series_data.h b/src/libcode/vx_series_data/series_data.h index bd92238440..fa9b9eb8f3 100644 --- a/src/libcode/vx_series_data/series_data.h +++ b/src/libcode/vx_series_data/series_data.h @@ -24,12 +24,12 @@ //////////////////////////////////////////////////////////////////////// bool get_series_entry(int, VarInfo*, const StringArray&, - const GrdFileType, DataPlane&, Grid&, + const FileType, DataPlane&, Grid&, bool error_out=true, bool print_warning=true); bool get_series_entries(int, std::vector&, const StringArray&, - const GrdFileType, std::vector&, Grid&, + const FileType, std::vector&, Grid&, bool error_out=true, bool print_warning=true); diff --git a/src/libcode/vx_shapedata/mode_conf_info.cc b/src/libcode/vx_shapedata/mode_conf_info.cc index 4016f6bee2..95d19891a6 100644 --- a/src/libcode/vx_shapedata/mode_conf_info.cc +++ b/src/libcode/vx_shapedata/mode_conf_info.cc @@ -298,7 +298,7 @@ void ModeConfInfo::read_config(const char * default_file_name, const char * user //////////////////////////////////////////////////////////////////////// -void ModeConfInfo::process_config_traditional(GrdFileType ftype, GrdFileType otype) +void ModeConfInfo::process_config_traditional(FileType ftype, FileType otype) { process_config_except_fields(); process_config_field (ftype, otype, ModeDataType::Traditional, 0); @@ -507,7 +507,7 @@ void ModeConfInfo::process_config_except_fields() //////////////////////////////////////////////////////////////////////// -void ModeConfInfo::process_config_field(GrdFileType ftype, GrdFileType otype, +void ModeConfInfo::process_config_field(FileType ftype, FileType otype, ModeDataType dt, int field_index) { @@ -530,7 +530,7 @@ void ModeConfInfo::process_config_field(GrdFileType ftype, GrdFileType otype, //////////////////////////////////////////////////////////////////////// -void ModeConfInfo::process_config_both(GrdFileType ftype, GrdFileType otype, +void ModeConfInfo::process_config_both(FileType ftype, FileType otype, int field_index) { int j, k, n; @@ -604,7 +604,7 @@ void ModeConfInfo::process_config_both(GrdFileType ftype, GrdFileType otype, //////////////////////////////////////////////////////////////////////// -void ModeConfInfo::process_config_fcst(GrdFileType ftype, int field_index) +void ModeConfInfo::process_config_fcst(FileType ftype, int field_index) { int j, k, n; @@ -641,7 +641,7 @@ void ModeConfInfo::process_config_fcst(GrdFileType ftype, int field_index) //////////////////////////////////////////////////////////////////////// -void ModeConfInfo::process_config_obs(GrdFileType otype, int field_index) +void ModeConfInfo::process_config_obs(FileType otype, int field_index) { int j, k, n; @@ -916,7 +916,7 @@ void ModeConfInfo::evaluate_obs_settings(int j) //////////////////////////////////////////////////////////////////////// -void ModeConfInfo::read_fields_0 (Mode_Field_Info * & info_array, Dictionary * dict, GrdFileType type, char _fo) +void ModeConfInfo::read_fields_0 (Mode_Field_Info * & info_array, Dictionary * dict, FileType type, char _fo) { @@ -995,7 +995,7 @@ return; //////////////////////////////////////////////////////////////////////// -void ModeConfInfo::read_fields_1 (Mode_Field_Info * & info_array, Dictionary * dict, GrdFileType type, char _fo, +void ModeConfInfo::read_fields_1 (Mode_Field_Info * & info_array, Dictionary * dict, FileType type, char _fo, int field_index) { @@ -1588,7 +1588,7 @@ void ModeConfInfo::set_data_type(ModeDataType type) //////////////////////////////////////////////////////////////////////// -GrdFileType ModeConfInfo::file_type_for_field(bool isFcst, int field_index) +FileType ModeConfInfo::file_type_for_field(bool isFcst, int field_index) { // look at the dictionary for the obs or forecast at index, with // parents diff --git a/src/libcode/vx_shapedata/mode_conf_info.h b/src/libcode/vx_shapedata/mode_conf_info.h index 08f61ff3df..a00fcbba8b 100644 --- a/src/libcode/vx_shapedata/mode_conf_info.h +++ b/src/libcode/vx_shapedata/mode_conf_info.h @@ -149,21 +149,21 @@ class ModeConfInfo { void read_config (const char * default_filename, const char * user_filename); - void process_config_traditional(GrdFileType ftype, GrdFileType otype); + void process_config_traditional(FileType ftype, FileType otype); void process_config_except_fields(); - void process_config_field (GrdFileType ftype, GrdFileType otype, ModeDataType dt, int field_index); + void process_config_field (FileType ftype, FileType otype, ModeDataType dt, int field_index); void config_set_all_percentile_thresholds(const std::vector &fdata, const std::vector &odata); PercThreshType perctype(const Mode_Field_Info &f) const; // deal with zeroth field - void read_fields_0 (Mode_Field_Info * &, Dictionary * dict, GrdFileType, char _fo); + void read_fields_0 (Mode_Field_Info * &, Dictionary * dict, FileType, char _fo); // deal with non-zeroth field - void read_fields_1 (Mode_Field_Info * &, Dictionary * dict, GrdFileType, char _fo, int field_index); + void read_fields_1 (Mode_Field_Info * &, Dictionary * dict, FileType, char _fo, int field_index); PiecewiseLinear * parse_interest_function(Dictionary * dict, const char * conf_key_if); @@ -295,14 +295,14 @@ class ModeConfInfo { void set_data_type(ModeDataType type); - GrdFileType file_type_for_field(bool isFcst, int field_index); + FileType file_type_for_field(bool isFcst, int field_index); private: // some private methods - void process_config_both(GrdFileType ftype, GrdFileType otype, int field_index=0); - void process_config_fcst(GrdFileType ftype, int field_index=0); - void process_config_obs(GrdFileType otype, int field_index=0); + void process_config_both(FileType ftype, FileType otype, int field_index=0); + void process_config_fcst(FileType ftype, int field_index=0); + void process_config_obs(FileType otype, int field_index=0); void evaluate_fcst_settings(int); void evaluate_obs_settings(int); diff --git a/src/libcode/vx_shapedata/mode_field_info.cc b/src/libcode/vx_shapedata/mode_field_info.cc index bc27d937ae..47cc7211b4 100644 --- a/src/libcode/vx_shapedata/mode_field_info.cc +++ b/src/libcode/vx_shapedata/mode_field_info.cc @@ -145,7 +145,7 @@ dict = 0; // not allocated, so don't delete conf = 0; // not allocated, so don't delete -gft = GrdFileType_None; +gft = FileType_None; Multivar = false; @@ -169,7 +169,7 @@ merge_thresh.clear(); merge_flag = MergeType::Engine; -file_type = GrdFileType_None; +file_type = FileType_None; // raw_pi.clear(); @@ -193,7 +193,7 @@ return; //////////////////////////////////////////////////////////////////////// -void Mode_Field_Info::set (const bool _multivar, int _index, Dictionary * _dict, MetConfig * _conf, GrdFileType type, char _fo, bool do_clear) +void Mode_Field_Info::set (const bool _multivar, int _index, Dictionary * _dict, MetConfig * _conf, FileType type, char _fo, bool do_clear) { diff --git a/src/libcode/vx_shapedata/mode_field_info.h b/src/libcode/vx_shapedata/mode_field_info.h index fe0509ff36..ae276ae25b 100644 --- a/src/libcode/vx_shapedata/mode_field_info.h +++ b/src/libcode/vx_shapedata/mode_field_info.h @@ -46,7 +46,7 @@ class Mode_Field_Info { MetConfig * conf; // not allocated, based on reading the config file - GrdFileType gft; + FileType gft; char FO; // 'F' or 'O', for fcst or obs @@ -62,7 +62,7 @@ class Mode_Field_Info { void clear(); - void set (const bool _multivar, int _index, Dictionary *, MetConfig *, GrdFileType, char _fo, bool do_clear = false); + void set (const bool _multivar, int _index, Dictionary *, MetConfig *, FileType, char _fo, bool do_clear = false); int index; @@ -85,7 +85,7 @@ class Mode_Field_Info { PlotInfo raw_pi; // Raw forecast plotting info - GrdFileType file_type; // each field can have a configured file type + FileType file_type; // each field can have a configured file type // // member functions diff --git a/src/libcode/vx_statistics/apply_mask.cc b/src/libcode/vx_statistics/apply_mask.cc index e2f8a01285..6b2a25125b 100644 --- a/src/libcode/vx_statistics/apply_mask.cc +++ b/src/libcode/vx_statistics/apply_mask.cc @@ -418,7 +418,7 @@ void parse_poly_2d_data_mask(const ConcatString &mask_poly_str, } // Parse the requested file type - GrdFileType type = parse_conf_grd_file_type(&config); + FileType type = parse_conf_grd_file_type(&config); // 2D Data file Met2dDataFileFactory mtddf_factory; @@ -573,7 +573,7 @@ DataPlane parse_geog_data(Dictionary *dict, const Grid &vx_grid, DataPlane dp; StringArray geog_files; RegridInfo regrid_info; - GrdFileType ftype; + FileType ftype; Dictionary *field_dict = (Dictionary *) nullptr; bool found = false; int i; diff --git a/src/libcode/vx_statistics/pair_data_ensemble.cc b/src/libcode/vx_statistics/pair_data_ensemble.cc index de8c723f5b..0d80abce1a 100644 --- a/src/libcode/vx_statistics/pair_data_ensemble.cc +++ b/src/libcode/vx_statistics/pair_data_ensemble.cc @@ -1173,7 +1173,7 @@ void VxPairDataEnsemble::add_point_obs(float *hdr_arr, int *hdr_typ_arr, const Grid &gr, const char *var_name) { // Check the observation VarInfo file type - if(obs_info->file_type() != GrdFileType_Gb1) { + if(obs_info->file_type() != FileType_Gb1) { mlog << Error << "\nVxPairDataEnsemble::add_point_obs() -> " << "when processing point observations, the observation " << "VarInfo type must be GRIB.\n\n"; diff --git a/src/libcode/vx_statistics/read_climo.cc b/src/libcode/vx_statistics/read_climo.cc index 7d0f5afe3b..ac17bced72 100644 --- a/src/libcode/vx_statistics/read_climo.cc +++ b/src/libcode/vx_statistics/read_climo.cc @@ -27,7 +27,7 @@ using namespace std; //////////////////////////////////////////////////////////////////////// static void read_climo_file( - const char *, GrdFileType, Dictionary *, unixtime, + const char *, FileType, Dictionary *, unixtime, int, int, const Grid &, const RegridInfo &, DataPlaneArray &dpa, const char *); @@ -170,7 +170,7 @@ DataPlaneArray read_climo_data_plane_array(Dictionary *dict, nint(hour_interval * sec_per_hour)); // Check if file_type was specified - GrdFileType ctype = parse_conf_grd_file_type(&i_dict); + FileType ctype = parse_conf_grd_file_type(&i_dict); // Search the files for the requested records for(int i=0; iget_var_info(); // Read the gridded data from the mean file - found = get_data_plane(ens_mean_file.c_str(), GrdFileType_None, + found = get_data_plane(ens_mean_file.c_str(), FileType_None, info, emn_dp, true); if(!found) { diff --git a/src/tools/core/ensemble_stat/ensemble_stat.h b/src/tools/core/ensemble_stat/ensemble_stat.h index baa4519ddc..0caec58e7b 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat.h +++ b/src/tools/core/ensemble_stat/ensemble_stat.h @@ -83,7 +83,7 @@ static IntArray n_vx_vld; // Number of members with valid data for each static StringArray ens_file_list; // Array of ensemble input files static IntArray ens_file_vld; // Array of ensemble file valid status -static GrdFileType etype = GrdFileType_None; +static FileType etype = FileType_None; static ConcatString ens_mean_file; // User-specified ensemble mean data file static ConcatString ctrl_file; // Control member file @@ -96,7 +96,7 @@ static bool grid_obs_flag = false; static StringArray point_obs_file_list; static bool point_obs_flag = false; -static GrdFileType otype = GrdFileType_None; +static FileType otype = FileType_None; // Input Config file static EnsembleStatConfInfo conf_info; diff --git a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc index c218975d6b..ccd6fbb920 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc +++ b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc @@ -115,8 +115,8 @@ void EnsembleStatConfInfo::read_config(const ConcatString default_file_name, //////////////////////////////////////////////////////////////////////// -void EnsembleStatConfInfo::process_config(GrdFileType etype, - GrdFileType otype, +void EnsembleStatConfInfo::process_config(FileType etype, + FileType otype, bool grid_vx, bool point_vx, StringArray * ens_files, bool use_ctrl) { @@ -637,8 +637,8 @@ void EnsembleStatVxOpt::clear() { //////////////////////////////////////////////////////////////////////// -void EnsembleStatVxOpt::process_config(GrdFileType ftype, Dictionary &fdict, - GrdFileType otype, Dictionary &odict, +void EnsembleStatVxOpt::process_config(FileType ftype, Dictionary &fdict, + FileType otype, Dictionary &odict, gsl_rng *rng_ptr, bool grid_vx, bool point_vx, StringArray ens_member_ids, StringArray * ens_files, diff --git a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h index 36d6cf5f95..f5eaaf0f01 100644 --- a/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h +++ b/src/tools/core/ensemble_stat/ensemble_stat_conf_info.h @@ -142,8 +142,8 @@ class EnsembleStatVxOpt { void clear(); - void process_config(GrdFileType, Dictionary &, - GrdFileType, Dictionary &, + void process_config(FileType, Dictionary &, + FileType, Dictionary &, gsl_rng *, bool, bool, StringArray, StringArray *, bool, ConcatString); @@ -245,7 +245,7 @@ class EnsembleStatConfInfo { void clear(); void read_config (const ConcatString , const ConcatString); - void process_config(GrdFileType, GrdFileType, bool, bool, + void process_config(FileType, FileType, bool, bool, StringArray *, bool); void process_grib_codes(); void process_flags (); diff --git a/src/tools/core/grid_stat/grid_stat.cc b/src/tools/core/grid_stat/grid_stat.cc index deb41b3718..6cdb206796 100644 --- a/src/tools/core/grid_stat/grid_stat.cc +++ b/src/tools/core/grid_stat/grid_stat.cc @@ -233,7 +233,7 @@ const string get_tool_name() void process_command_line(int argc, char **argv) { CommandLine cline; - GrdFileType ftype, otype; + FileType ftype, otype; ConcatString default_config_file; DataPlane dp; const char *method_name = "process_command_line() -> "; @@ -290,14 +290,14 @@ void process_command_line(int argc, char **argv) { // Read forecast file if(!(fcst_mtddf = mtddf_factory.new_met_2d_data_file(fcst_file.c_str(), ftype))) { mlog << Error << "\nTrouble reading forecast file \"" - << fcst_file << "\". Override the FileType with \"file_type = GrdFileType_;\"\n\n"; + << fcst_file << "\". Override the FileType with \"file_type = FileType_;\"\n\n"; exit(1); } // Read observation file if(!(obs_mtddf = mtddf_factory.new_met_2d_data_file(obs_file.c_str(), otype))) { mlog << Error << "\nTrouble reading observation file \"" - << obs_file << "\". Override the FileType with \"file_type = GrdFileType_;\"\n\n"; + << obs_file << "\". Override the FileType with \"file_type = FileType_;\"\n\n"; exit(1); } @@ -308,14 +308,14 @@ void process_command_line(int argc, char **argv) { // Process the configuration conf_info.process_config(ftype, otype); - if (GrdFileType_UGrid == ftype || GrdFileType_UGrid == otype) { + if (FileType_UGrid == ftype || FileType_UGrid == otype) { #ifdef WITH_UGRID ConcatString ugrid_dataset = conf_info.ugrid_dataset; if (0 < ugrid_dataset.length()) { double max_distance_km = conf_info.ugrid_max_distance_km; ConcatString ugrid_nc = conf_info.ugrid_nc; ConcatString ugrid_map_config_filename = conf_info.ugrid_map_config; - if (GrdFileType_UGrid == ftype) { + if (FileType_UGrid == ftype) { MetUGridDataFile *ugrid_mtddf = (MetUGridDataFile *)fcst_mtddf; ugrid_mtddf->set_ugrid_configs(ugrid_dataset, max_distance_km, ugrid_map_config_filename); @@ -328,7 +328,7 @@ void process_command_line(int argc, char **argv) { << "FCST: ugrid_coordinates_nc: " << ugrid_nc << " ugrid_max_distance_km: " << conf_info.ugrid_max_distance_km << "\n"; } - if (GrdFileType_UGrid == otype) { + if (FileType_UGrid == otype) { MetUGridDataFile *ugrid_mtddf = (MetUGridDataFile *)obs_mtddf; ugrid_mtddf->set_ugrid_configs(ugrid_dataset, max_distance_km, ugrid_map_config_filename); diff --git a/src/tools/core/grid_stat/grid_stat_conf_info.cc b/src/tools/core/grid_stat/grid_stat_conf_info.cc index d334804850..4c3035a489 100644 --- a/src/tools/core/grid_stat/grid_stat_conf_info.cc +++ b/src/tools/core/grid_stat/grid_stat_conf_info.cc @@ -137,8 +137,8 @@ void GridStatConfInfo::read_ugrid_configs(StringArray ugrid_config_names, const //////////////////////////////////////////////////////////////////////// -void GridStatConfInfo::process_config(GrdFileType ftype, - GrdFileType otype) { +void GridStatConfInfo::process_config(FileType ftype, + FileType otype) { int i, j, n_fvx, n_ovx; Dictionary *fdict = (Dictionary *) nullptr; Dictionary *odict = (Dictionary *) nullptr; @@ -655,8 +655,8 @@ void GridStatVxOpt::clear() { //////////////////////////////////////////////////////////////////////// void GridStatVxOpt::process_config( - GrdFileType ftype, Dictionary &fdict, - GrdFileType otype, Dictionary &odict) { + FileType ftype, Dictionary &fdict, + FileType otype, Dictionary &odict) { int i, n; VarInfoFactory info_factory; mapoutput_map; diff --git a/src/tools/core/grid_stat/grid_stat_conf_info.h b/src/tools/core/grid_stat/grid_stat_conf_info.h index c3e72ee3a4..f1abfb1bc3 100644 --- a/src/tools/core/grid_stat/grid_stat_conf_info.h +++ b/src/tools/core/grid_stat/grid_stat_conf_info.h @@ -203,8 +203,8 @@ class GridStatVxOpt { void clear(); - void process_config(GrdFileType, Dictionary &, - GrdFileType, Dictionary &); + void process_config(FileType, Dictionary &, + FileType, Dictionary &); void parse_nc_info(Dictionary &); bool is_uv_match(const GridStatVxOpt &) const; @@ -305,7 +305,7 @@ class GridStatConfInfo { #ifdef WITH_UGRID void read_ugrid_configs(StringArray ugrid_config_names, const char * user_config); #endif - void process_config(GrdFileType, GrdFileType); + void process_config(FileType, FileType); void process_flags (); void process_masks (const Grid &); diff --git a/src/tools/core/mode/mode_exec.h b/src/tools/core/mode/mode_exec.h index 184a2e0a74..35ad7549a8 100644 --- a/src/tools/core/mode/mode_exec.h +++ b/src/tools/core/mode/mode_exec.h @@ -137,7 +137,7 @@ class ModeExecutive { ShapeData Fcst_sd, Obs_sd; // not used by multivar - GrdFileType ftype, otype; + FileType ftype, otype; // set into execs's conf varInfo object, only for multivar intensity comparisons // for trad it's read in from the config diff --git a/src/tools/core/mode/multivar_frontend.cc b/src/tools/core/mode/multivar_frontend.cc index 7a40e71ce3..460162c40d 100644 --- a/src/tools/core/mode/multivar_frontend.cc +++ b/src/tools/core/mode/multivar_frontend.cc @@ -67,14 +67,14 @@ int MultivarFrontEnd::run(const StringArray & Argv) int shift = config.shift_right; for (int i=0; igrid(); - GrdFileType ft = f->file_type(); + FileType ft = f->file_type(); //? f->set_shift_right(shift); diff --git a/src/tools/core/mode/multivar_frontend.h b/src/tools/core/mode/multivar_frontend.h index f4c78c243d..65711f04af 100644 --- a/src/tools/core/mode/multivar_frontend.h +++ b/src/tools/core/mode/multivar_frontend.h @@ -76,7 +76,7 @@ class MultivarFrontEnd { static void set_compress (const StringArray &); void read_input(const std::string &name, int index, ModeDataType type, - GrdFileType f_t, GrdFileType other_t, int shift); + FileType f_t, FileType other_t, int shift); void create_verif_grid(void); diff --git a/src/tools/core/pair_stat/pair_stat.cc b/src/tools/core/pair_stat/pair_stat.cc index 815a58e232..37d3e4b186 100644 --- a/src/tools/core/pair_stat/pair_stat.cc +++ b/src/tools/core/pair_stat/pair_stat.cc @@ -141,7 +141,7 @@ const string get_tool_name() { void process_command_line(int argc, char **argv) { int i; CommandLine cline; - GrdFileType ftype; + FileType ftype; ConcatString default_config_file; const char *method_name = "process_command_line() -> "; diff --git a/src/tools/core/pair_stat/pair_stat_conf_info.cc b/src/tools/core/pair_stat/pair_stat_conf_info.cc index cd9d36b7e1..2b53b544aa 100644 --- a/src/tools/core/pair_stat/pair_stat_conf_info.cc +++ b/src/tools/core/pair_stat/pair_stat_conf_info.cc @@ -135,7 +135,7 @@ void PairStatConfInfo::read_ugrid_configs(StringArray ugrid_config_names, const //////////////////////////////////////////////////////////////////////// -void PairStatConfInfo::process_config(GrdFileType ftype) { +void PairStatConfInfo::process_config(FileType ftype) { int i, j, n_fvx, n_ovx; Dictionary *fdict = (Dictionary *) nullptr; Dictionary *odict = (Dictionary *) nullptr; @@ -839,7 +839,7 @@ bool PairStatVxOpt::is_uv_match(const PairStatVxOpt &v) const { //////////////////////////////////////////////////////////////////////// -void PairStatVxOpt::process_config(GrdFileType ftype, +void PairStatVxOpt::process_config(FileType ftype, Dictionary &fdict, Dictionary &odict) { int n; VarInfoFactory info_factory; diff --git a/src/tools/core/pair_stat/pair_stat_conf_info.h b/src/tools/core/pair_stat/pair_stat_conf_info.h index 73446bb915..f074c03911 100644 --- a/src/tools/core/pair_stat/pair_stat_conf_info.h +++ b/src/tools/core/pair_stat/pair_stat_conf_info.h @@ -163,7 +163,7 @@ class PairStatVxOpt { void clear(); - void process_config(GrdFileType, Dictionary &, Dictionary &); + void process_config(FileType, Dictionary &, Dictionary &); void set_vx_pd(PairStatConfInfo *); bool is_uv_match(const PairStatVxOpt &) const; @@ -272,7 +272,7 @@ class PairStatConfInfo { void read_ugrid_configs(StringArray ugrid_config_names, const char * user_config); #endif - void process_config(GrdFileType); + void process_config(FileType); void process_grib_codes(); void process_flags(); void process_masks(const Grid &); diff --git a/src/tools/core/pcp_combine/pcp_combine.cc b/src/tools/core/pcp_combine/pcp_combine.cc index d978eb0417..13677ce491 100644 --- a/src/tools/core/pcp_combine/pcp_combine.cc +++ b/src/tools/core/pcp_combine/pcp_combine.cc @@ -151,7 +151,7 @@ static ConcatString pcp_reg_exp = (string)default_reg_exp; // Variables for the derive command static StringArray file_list; -static GrdFileType file_list_type = GrdFileType_None; +static FileType file_list_type = FileType_None; static StringArray field_list; static StringArray derive_list; @@ -1213,7 +1213,7 @@ bool get_field(const char *filename, const char *cur_field, Grid & grid, DataPlane & plane, bool error_out) { Met2dDataFileFactory factory; Met2dDataFile *mtddf = nullptr; - GrdFileType ftype; + FileType ftype; VarInfoFactory var_fac; VarInfo *cur_var = nullptr; const char *method_name = "get_field() -> "; @@ -1245,7 +1245,7 @@ bool get_field(const char *filename, const char *cur_field, // // If not set by the config string, use the file list type. // - if(ftype == GrdFileType_None) ftype = file_list_type; + if(ftype == FileType_None) ftype = file_list_type; // // Check for missing non-python input files. diff --git a/src/tools/core/point_stat/point_stat.cc b/src/tools/core/point_stat/point_stat.cc index e90ab4863b..2b28be518c 100644 --- a/src/tools/core/point_stat/point_stat.cc +++ b/src/tools/core/point_stat/point_stat.cc @@ -232,7 +232,7 @@ const string get_tool_name() { void process_command_line(int argc, char **argv) { int i; CommandLine cline; - GrdFileType ftype; + FileType ftype; ConcatString default_config_file; const char *method_name = "process_command_line() -> "; @@ -303,7 +303,7 @@ void process_command_line(int argc, char **argv) { // Read forecast file if(!(fcst_mtddf = mtddf_factory.new_met_2d_data_file(fcst_file.c_str(), ftype))) { mlog << Error << "\n" << method_name << "Trouble reading forecast file \"" - << fcst_file << "\". Override the FileType with \"file_type = GrdFileType_;\"\n\n"; + << fcst_file << "\". Override the FileType with \"file_type = FileType_;\"\n\n"; exit(1); } @@ -316,7 +316,7 @@ void process_command_line(int argc, char **argv) { // Set the model name shc.set_model(conf_info.model.c_str()); - if (GrdFileType_UGrid == ftype) { + if (FileType_UGrid == ftype) { #ifdef WITH_UGRID ConcatString ugrid_dataset = conf_info.ugrid_dataset; if (0 < ugrid_dataset.length()) { diff --git a/src/tools/core/point_stat/point_stat_conf_info.cc b/src/tools/core/point_stat/point_stat_conf_info.cc index cfd5e10432..fe9e6a9f45 100644 --- a/src/tools/core/point_stat/point_stat_conf_info.cc +++ b/src/tools/core/point_stat/point_stat_conf_info.cc @@ -135,7 +135,7 @@ void PointStatConfInfo::read_ugrid_configs(StringArray ugrid_config_names, const //////////////////////////////////////////////////////////////////////// -void PointStatConfInfo::process_config(GrdFileType ftype) { +void PointStatConfInfo::process_config(FileType ftype) { int i, j, n_fvx, n_ovx; Dictionary *fdict = (Dictionary *) nullptr; Dictionary *odict = (Dictionary *) nullptr; @@ -839,7 +839,7 @@ bool PointStatVxOpt::is_uv_match(const PointStatVxOpt &v) const { //////////////////////////////////////////////////////////////////////// -void PointStatVxOpt::process_config(GrdFileType ftype, +void PointStatVxOpt::process_config(FileType ftype, Dictionary &fdict, Dictionary &odict) { int n; VarInfoFactory info_factory; diff --git a/src/tools/core/point_stat/point_stat_conf_info.h b/src/tools/core/point_stat/point_stat_conf_info.h index 9db3081dd7..66425e12d7 100644 --- a/src/tools/core/point_stat/point_stat_conf_info.h +++ b/src/tools/core/point_stat/point_stat_conf_info.h @@ -163,7 +163,7 @@ class PointStatVxOpt { void clear(); - void process_config(GrdFileType, Dictionary &, Dictionary &); + void process_config(FileType, Dictionary &, Dictionary &); void set_vx_pd(PointStatConfInfo *); bool is_uv_match(const PointStatVxOpt &) const; @@ -272,7 +272,7 @@ class PointStatConfInfo { void read_ugrid_configs(StringArray ugrid_config_names, const char * user_config); #endif - void process_config(GrdFileType); + void process_config(FileType); void process_grib_codes(); void process_flags(); void process_masks(const Grid &); diff --git a/src/tools/core/series_analysis/series_analysis.cc b/src/tools/core/series_analysis/series_analysis.cc index e0715c9248..1b85e571f2 100644 --- a/src/tools/core/series_analysis/series_analysis.cc +++ b/src/tools/core/series_analysis/series_analysis.cc @@ -71,17 +71,17 @@ static void process_command_line(int, char **); static void process_grid (const Grid &, const Grid &); static Met2dDataFile *get_mtddf(const StringArray &, - const GrdFileType); + const FileType); static bool file_is_ok(const ConcatString &, - const GrdFileType); + const FileType); static void get_series_data(int, VarInfo *, VarInfo *, DataPlane &, DataPlane &); static void get_series_entry(int, VarInfo *, const StringArray &, - const GrdFileType, StringArray &, + const FileType, StringArray &, DataPlane &, Grid &); static bool read_single_entry(VarInfo *, const ConcatString &, - const GrdFileType, DataPlane &, Grid &); + const FileType, DataPlane &, Grid &); static void open_aggr_file(); static DataPlane read_aggr_data_plane(const ConcatString &, @@ -427,7 +427,7 @@ void process_grid(const Grid &fcst_grid, const Grid &obs_grid) { //////////////////////////////////////////////////////////////////////// Met2dDataFile *get_mtddf(const StringArray &file_list, - const GrdFileType type) { + const FileType type) { int i; Met2dDataFile *mtddf = (Met2dDataFile *) nullptr; @@ -454,7 +454,7 @@ Met2dDataFile *get_mtddf(const StringArray &file_list, //////////////////////////////////////////////////////////////////////// -bool file_is_ok(const ConcatString &file_name, const GrdFileType t) { +bool file_is_ok(const ConcatString &file_name, const FileType t) { return(file_exists(file_name.c_str()) || is_python_grdfiletype(t)); } @@ -624,7 +624,7 @@ void get_series_data(int i_series, void get_series_entry(int i_series, VarInfo *info, const StringArray &search_files, - const GrdFileType type, + const FileType type, StringArray &found_files, DataPlane &dp, Grid &cur_grid) { bool found = false; @@ -699,7 +699,7 @@ void get_series_entry(int i_series, VarInfo *info, //////////////////////////////////////////////////////////////////////// bool read_single_entry(VarInfo *info, const ConcatString &cur_file, - const GrdFileType type, DataPlane &dp, + const FileType type, DataPlane &dp, Grid &cur_grid) { Met2dDataFile *mtddf = (Met2dDataFile *) nullptr; bool found = false; diff --git a/src/tools/core/series_analysis/series_analysis.h b/src/tools/core/series_analysis/series_analysis.h index bc88916d8d..1b46ac7c33 100644 --- a/src/tools/core/series_analysis/series_analysis.h +++ b/src/tools/core/series_analysis/series_analysis.h @@ -74,8 +74,8 @@ static const char * total_name = "TOTAL"; // Input files static StringArray fcst_files, found_fcst_files; static StringArray obs_files, found_obs_files; -static GrdFileType ftype = GrdFileType_None; -static GrdFileType otype = GrdFileType_None; +static FileType ftype = FileType_None; +static FileType otype = FileType_None; static ConcatString aggr_file; static bool paired = false; static int compress_level = -1; diff --git a/src/tools/core/series_analysis/series_analysis_conf_info.cc b/src/tools/core/series_analysis/series_analysis_conf_info.cc index fd19bf61bc..eebd36508e 100644 --- a/src/tools/core/series_analysis/series_analysis_conf_info.cc +++ b/src/tools/core/series_analysis/series_analysis_conf_info.cc @@ -129,8 +129,8 @@ void SeriesAnalysisConfInfo::read_config(const char *default_file_name, //////////////////////////////////////////////////////////////////////// -void SeriesAnalysisConfInfo::process_config(GrdFileType ftype, - GrdFileType otype) { +void SeriesAnalysisConfInfo::process_config(FileType ftype, + FileType otype) { int i, n; ConcatString s; StringArray sa; diff --git a/src/tools/core/series_analysis/series_analysis_conf_info.h b/src/tools/core/series_analysis/series_analysis_conf_info.h index 01aff16098..c850d69eed 100644 --- a/src/tools/core/series_analysis/series_analysis_conf_info.h +++ b/src/tools/core/series_analysis/series_analysis_conf_info.h @@ -89,7 +89,7 @@ class SeriesAnalysisConfInfo { void clear(); void read_config (const char *, const char *); - void process_config(GrdFileType, GrdFileType); + void process_config(FileType, FileType); void process_masks (const Grid &); int get_compression_level(); diff --git a/src/tools/core/wavelet_stat/wavelet_stat.cc b/src/tools/core/wavelet_stat/wavelet_stat.cc index 4e36bd7734..027e9dc15b 100644 --- a/src/tools/core/wavelet_stat/wavelet_stat.cc +++ b/src/tools/core/wavelet_stat/wavelet_stat.cc @@ -166,7 +166,7 @@ const string get_tool_name() { void process_command_line(int argc, char **argv) { CommandLine cline; - GrdFileType ftype, otype; + FileType ftype, otype; ConcatString default_config_file; DataPlane dp; diff --git a/src/tools/core/wavelet_stat/wavelet_stat_conf_info.cc b/src/tools/core/wavelet_stat/wavelet_stat_conf_info.cc index 2c51c68857..61b09ae42c 100644 --- a/src/tools/core/wavelet_stat/wavelet_stat_conf_info.cc +++ b/src/tools/core/wavelet_stat/wavelet_stat_conf_info.cc @@ -134,8 +134,8 @@ void WaveletStatConfInfo::read_config(const char *default_file_name, //////////////////////////////////////////////////////////////////////// -void WaveletStatConfInfo::process_config(GrdFileType ftype, - GrdFileType otype) { +void WaveletStatConfInfo::process_config(FileType ftype, + FileType otype) { int i, j, n; VarInfoFactory info_factory; mapoutput_map; diff --git a/src/tools/core/wavelet_stat/wavelet_stat_conf_info.h b/src/tools/core/wavelet_stat/wavelet_stat_conf_info.h index 11bdf93f90..a13cbca1f7 100644 --- a/src/tools/core/wavelet_stat/wavelet_stat_conf_info.h +++ b/src/tools/core/wavelet_stat/wavelet_stat_conf_info.h @@ -121,7 +121,7 @@ class WaveletStatConfInfo { void clear(); void read_config (const char *, const char *); - void process_config(GrdFileType, GrdFileType); + void process_config(FileType, FileType); void process_tiles (const Grid &); void center_tiles (int, int); void pad_tiles (int, int); diff --git a/src/tools/dev_utils/gen_climo_bin.cc b/src/tools/dev_utils/gen_climo_bin.cc index 7019f34f00..23b002b389 100644 --- a/src/tools/dev_utils/gen_climo_bin.cc +++ b/src/tools/dev_utils/gen_climo_bin.cc @@ -333,7 +333,7 @@ void write_nc_bin(const DataPlane &dp, int i_cdf, double cdf_y) { //////////////////////////////////////////////////////////////////////// void get_field(const char *file, const char *config_str, DataPlane &dp) { - GrdFileType ftype; + FileType ftype; Met2dDataFile * mtddf_ptr = (Met2dDataFile * ) nullptr; Met2dDataFileFactory m_factory; VarInfo * vi_ptr = (VarInfo * ) nullptr; diff --git a/src/tools/other/gen_ens_prod/gen_ens_prod.cc b/src/tools/other/gen_ens_prod/gen_ens_prod.cc index 56c791a43d..162ef8933a 100644 --- a/src/tools/other/gen_ens_prod/gen_ens_prod.cc +++ b/src/tools/other/gen_ens_prod/gen_ens_prod.cc @@ -62,7 +62,7 @@ static void process_ensemble(); static void get_climo_mean_stdev(GenEnsProdVarInfo *, int, bool, int, DataPlane &, DataPlane &); static void get_ens_mean_stdev(GenEnsProdVarInfo *, DataPlane &, DataPlane &); -static bool get_data_plane(const char *, GrdFileType, VarInfo *, DataPlane &); +static bool get_data_plane(const char *, FileType, VarInfo *, DataPlane &); static void clear_counts(); static void track_counts(GenEnsProdVarInfo *, const DataPlane &, bool, @@ -189,12 +189,12 @@ void process_command_line(int argc, char **argv) { etype = parse_conf_grd_file_type(conf_info.conf.lookup_dictionary(conf_key_ens)); // Get the ensemble file type from the files - if(etype == GrdFileType_None) { + if(etype == FileType_None) { etype = parse_file_list_type(ens_files); } // UGrid not supported - if(etype == GrdFileType_UGrid) { + if(etype == FileType_UGrid) { mlog << Error << "\n" << method_name << grdfiletype_to_string(etype) << " ensemble files are not supported\n\n"; @@ -624,7 +624,7 @@ void get_ens_mean_stdev(GenEnsProdVarInfo *ens_info, //////////////////////////////////////////////////////////////////////// -bool get_data_plane(const char *infile, GrdFileType ftype, +bool get_data_plane(const char *infile, FileType ftype, VarInfo *info, DataPlane &dp) { bool found; Met2dDataFile *mtddf = (Met2dDataFile *) nullptr; diff --git a/src/tools/other/gen_ens_prod/gen_ens_prod.h b/src/tools/other/gen_ens_prod/gen_ens_prod.h index d80e1e910d..a9d9d96d02 100644 --- a/src/tools/other/gen_ens_prod/gen_ens_prod.h +++ b/src/tools/other/gen_ens_prod/gen_ens_prod.h @@ -66,7 +66,7 @@ static const char * default_config_filename = static StringArray ens_files; static IntArray ens_file_vld; -static GrdFileType etype = GrdFileType_None; +static FileType etype = FileType_None; static int n_ens_files; static GenEnsProdConfInfo conf_info; static ConcatString config_file; diff --git a/src/tools/other/gen_ens_prod/gen_ens_prod_conf_info.cc b/src/tools/other/gen_ens_prod/gen_ens_prod_conf_info.cc index 52281061fd..c37d49e9cf 100644 --- a/src/tools/other/gen_ens_prod/gen_ens_prod_conf_info.cc +++ b/src/tools/other/gen_ens_prod/gen_ens_prod_conf_info.cc @@ -101,7 +101,7 @@ void GenEnsProdConfInfo::read_config(const ConcatString default_file_name, //////////////////////////////////////////////////////////////////////// -void GenEnsProdConfInfo::process_config(GrdFileType etype, StringArray * ens_files, bool use_ctrl) { +void GenEnsProdConfInfo::process_config(FileType etype, StringArray * ens_files, bool use_ctrl) { int i, j; VarInfoFactory info_factory; Dictionary *edict = (Dictionary *) nullptr; diff --git a/src/tools/other/gen_ens_prod/gen_ens_prod_conf_info.h b/src/tools/other/gen_ens_prod/gen_ens_prod_conf_info.h index bb76ce0c63..d6d42b6229 100644 --- a/src/tools/other/gen_ens_prod/gen_ens_prod_conf_info.h +++ b/src/tools/other/gen_ens_prod/gen_ens_prod_conf_info.h @@ -99,7 +99,7 @@ class GenEnsProdConfInfo { void clear(); void read_config (const ConcatString, const ConcatString); - void process_config(GrdFileType, StringArray *, bool); + void process_config(FileType, StringArray *, bool); GenEnsProdNcOutInfo parse_nc_info(Dictionary *); diff --git a/src/tools/other/gen_vx_mask/gen_vx_mask.cc b/src/tools/other/gen_vx_mask/gen_vx_mask.cc index 00aad7afff..0892f0dc34 100644 --- a/src/tools/other/gen_vx_mask/gen_vx_mask.cc +++ b/src/tools/other/gen_vx_mask/gen_vx_mask.cc @@ -389,7 +389,7 @@ void get_data_plane(const ConcatString &file_name, bool read_gen_vx_mask_output, DataPlane &dp, Grid &dp_grid) { ConcatString local_cs = config_str; - GrdFileType ftype = GrdFileType_None; + FileType ftype = FileType_None; // Initialize to the global configuration MetConfig local_config = global_config; @@ -412,7 +412,7 @@ void get_data_plane(const ConcatString &file_name, // Read gen_vx_mask output from a previous run if(read_gen_vx_mask_output && local_cs.length() == 0 && - mtddf_ptr->file_type() == GrdFileType_NcMet) { + mtddf_ptr->file_type() == FileType_NcMet) { if(get_gen_vx_mask_config_str((MetNcMetDataFile *) mtddf_ptr, local_cs)) { local_config.read_string(local_cs.c_str()); } diff --git a/src/tools/other/grid_diag/grid_diag.cc b/src/tools/other/grid_diag/grid_diag.cc index 70050e7b6e..a9fae02300 100644 --- a/src/tools/other/grid_diag/grid_diag.cc +++ b/src/tools/other/grid_diag/grid_diag.cc @@ -245,7 +245,7 @@ void process_series(void) { DataPlane data_dp[conf_info.get_n_data()]; double min, max; StringArray *cur_files; - GrdFileType *cur_ftype; + FileType *cur_ftype; Grid cur_grid; ConcatString i_var_str, j_var_str, ij_var_str; @@ -752,7 +752,7 @@ Met2dDataFile *get_mtddf(const StringArray &file_list, Met2dDataFile *mtddf = (Met2dDataFile *) nullptr; Dictionary *dict = (Dictionary *) nullptr; Dictionary i_dict; - GrdFileType file_type; + FileType file_type; int i; // Conf: data.field diff --git a/src/tools/other/grid_diag/grid_diag.h b/src/tools/other/grid_diag/grid_diag.h index 663bb70e7f..e21ebf9f84 100644 --- a/src/tools/other/grid_diag/grid_diag.h +++ b/src/tools/other/grid_diag/grid_diag.h @@ -68,7 +68,7 @@ static const char * default_config_filename = // Input files static std::vector data_files; -static std::vector file_types; +static std::vector file_types; static int compress_level = -1; // Output file diff --git a/src/tools/other/grid_diag/grid_diag_conf_info.cc b/src/tools/other/grid_diag/grid_diag_conf_info.cc index 149145a622..cd7b4e26fa 100644 --- a/src/tools/other/grid_diag/grid_diag_conf_info.cc +++ b/src/tools/other/grid_diag/grid_diag_conf_info.cc @@ -121,13 +121,13 @@ void GridDiagConfInfo::set_n_data() { //////////////////////////////////////////////////////////////////////// -void GridDiagConfInfo::process_config(vector file_types) { +void GridDiagConfInfo::process_config(vector file_types) { ConcatString s; StringArray sa; VarInfoFactory info_factory; Dictionary *dict = (Dictionary *) nullptr; Dictionary i_dict; - GrdFileType file_type; + FileType file_type; // Dump the contents of the config file if(mlog.verbosity_level() >= 5) conf.dump(cout); diff --git a/src/tools/other/grid_diag/grid_diag_conf_info.h b/src/tools/other/grid_diag/grid_diag_conf_info.h index 5a4a2f1a13..6a87f8efdd 100644 --- a/src/tools/other/grid_diag/grid_diag_conf_info.h +++ b/src/tools/other/grid_diag/grid_diag_conf_info.h @@ -58,7 +58,7 @@ class GridDiagConfInfo { void read_config(const char *, const char *); void set_n_data(); - void process_config(std::vector); + void process_config(std::vector); void process_masks(const Grid &); int get_n_data() const; diff --git a/src/tools/other/mode_time_domain/mtd.cc b/src/tools/other/mode_time_domain/mtd.cc index 851c4704cb..72b662ba5e 100644 --- a/src/tools/other/mode_time_domain/mtd.cc +++ b/src/tools/other/mode_time_domain/mtd.cc @@ -164,13 +164,13 @@ config.read_config(default_config_filename.c_str(), local_config_filename.c_str( if ( single_filenames.n() > 0 ) { - GrdFileType stype; + FileType stype; stype = parse_conf_grd_file_type(config.conf.lookup_dictionary(conf_key_fcst)); // use the "fcst" dictionary single_filenames = parse_file_list(single_filenames); - if ( stype == GrdFileType_None ) stype = grd_file_type(single_filenames[0].c_str()); + if ( stype == FileType_None ) stype = grd_file_type(single_filenames[0].c_str()); config.process_config(stype, stype); @@ -187,13 +187,13 @@ if ( single_filenames.n() > 0 ) { fcst_filenames = parse_file_list(fcst_filenames); obs_filenames = parse_file_list(obs_filenames); -GrdFileType ftype, otype; +FileType ftype, otype; ftype = parse_conf_grd_file_type(config.conf.lookup_dictionary(conf_key_fcst)); otype = parse_conf_grd_file_type(config.conf.lookup_dictionary(conf_key_obs)); -if ( ftype == GrdFileType_None ) ftype = grd_file_type(fcst_filenames[0].c_str()); -if ( otype == GrdFileType_None ) otype = grd_file_type(obs_filenames[0].c_str()); +if ( ftype == FileType_None ) ftype = grd_file_type(fcst_filenames[0].c_str()); +if ( otype == FileType_None ) otype = grd_file_type(obs_filenames[0].c_str()); config.process_config(ftype, otype); diff --git a/src/tools/other/mode_time_domain/mtd_config_info.cc b/src/tools/other/mode_time_domain/mtd_config_info.cc index c23af5a638..d35a672802 100644 --- a/src/tools/other/mode_time_domain/mtd_config_info.cc +++ b/src/tools/other/mode_time_domain/mtd_config_info.cc @@ -202,7 +202,7 @@ return; //////////////////////////////////////////////////////////////////////// -void MtdConfigInfo::process_config(GrdFileType ftype, GrdFileType otype) +void MtdConfigInfo::process_config(FileType ftype, FileType otype) { diff --git a/src/tools/other/mode_time_domain/mtd_config_info.h b/src/tools/other/mode_time_domain/mtd_config_info.h index fd38779b3a..29a931bceb 100644 --- a/src/tools/other/mode_time_domain/mtd_config_info.h +++ b/src/tools/other/mode_time_domain/mtd_config_info.h @@ -73,7 +73,7 @@ class MtdConfigInfo { void read_config (const char * default_filename, const char * user_filename); - void process_config (GrdFileType ftype, GrdFileType otype); + void process_config (FileType ftype, FileType otype); void parse_nc_info (); void parse_txt_info (); diff --git a/src/tools/other/plot_data_plane/plot_data_plane.cc b/src/tools/other/plot_data_plane/plot_data_plane.cc index 7fa5edf527..7a16a03d82 100644 --- a/src/tools/other/plot_data_plane/plot_data_plane.cc +++ b/src/tools/other/plot_data_plane/plot_data_plane.cc @@ -98,7 +98,7 @@ int met_main(int argc, char * argv[]) { VarInfoFactory v_factory; DataPlane data_plane; Grid grid; - GrdFileType ftype; + FileType ftype; ColorTable color_table; double data_min, data_max; bool status = false; @@ -145,7 +145,7 @@ int met_main(int argc, char * argv[]) { exit(1); } - if (GrdFileType_UGrid == met_ptr->file_type()) { + if (FileType_UGrid == met_ptr->file_type()) { mlog << Error << "\n" << program_name << " -> filetype " << grdfiletype_to_string(met_ptr->file_type()) << " is not supported\n\n"; exit(1); diff --git a/src/tools/other/plot_point_obs/plot_point_obs.cc b/src/tools/other/plot_point_obs/plot_point_obs.cc index 2a45fea050..0fb0b69222 100644 --- a/src/tools/other/plot_point_obs/plot_point_obs.cc +++ b/src/tools/other/plot_point_obs/plot_point_obs.cc @@ -197,7 +197,7 @@ void process_point_obs(const char *point_obs_filename) { if(is_ugrid_file(point_obs_filename)) { mlog << Error << "\n" << program_name << " -> filetype " - << grdfiletype_to_string(GrdFileType_UGrid) << " is not supported\n\n"; + << grdfiletype_to_string(FileType_UGrid) << " is not supported\n\n"; exit(1); } diff --git a/src/tools/other/plot_point_obs/plot_point_obs_conf_info.cc b/src/tools/other/plot_point_obs/plot_point_obs_conf_info.cc index 58fbb5658d..b6c5382806 100644 --- a/src/tools/other/plot_point_obs/plot_point_obs_conf_info.cc +++ b/src/tools/other/plot_point_obs/plot_point_obs_conf_info.cc @@ -429,7 +429,7 @@ void PlotPointObsConfInfo::process_config( dict = conf.lookup_dictionary(conf_key_grid_data); // Conf: grid_data.file_type, if present - GrdFileType ftype = parse_conf_grd_file_type(dict); + FileType ftype = parse_conf_grd_file_type(dict); // Conf: field fdict = dict->lookup_array(conf_key_field); diff --git a/src/tools/other/point2grid/point2grid.cc b/src/tools/other/point2grid/point2grid.cc index d3ca1a4c86..05440acfb2 100644 --- a/src/tools/other/point2grid/point2grid.cc +++ b/src/tools/other/point2grid/point2grid.cc @@ -335,7 +335,7 @@ static void process_command_line(int argc, char **argv) { MetConfig config; ConcatString vname; StringArray var_names; - VarInfo *vinfo = VarInfoFactory::new_var_info(GrdFileType_NcMet); + VarInfo *vinfo = VarInfoFactory::new_var_info(FileType_NcMet); for(int i=0; iclear(); // Populate the VarInfo object using the config string @@ -379,7 +379,7 @@ static void process_command_line(int argc, char **argv) { static void process_data_file() { Grid fr_grid; - GrdFileType ftype; + FileType ftype; ConcatString run_cs; auto nc_in = (NcFile *) nullptr; static const char *method_name = "process_data_file() -> "; @@ -425,7 +425,7 @@ static void process_data_file() { // Get the obs type before opening NetCDF obs_type = get_obs_type(nc_in); goes_data = (obs_type == TYPE_GOES || obs_type == TYPE_GOES_ADP); - if (obs_type == TYPE_UNKNOWN && ftype == GrdFileType_NcCF) obs_type = TYPE_NCCF; + if (obs_type == TYPE_UNKNOWN && ftype == FileType_NcCF) obs_type = TYPE_NCCF; if (obs_type == TYPE_NCCF) setenv(nc_att_met_point_nccf, "yes", 1); // Read the input data file @@ -603,7 +603,7 @@ static int get_obs_type(NcFile *nc) { static const char *method_name = "get_obs_type() -> "; bool has_attr_grid = false; - auto vinfo = VarInfoFactory::new_var_info(GrdFileType_NcCF); + auto vinfo = VarInfoFactory::new_var_info(FileType_NcCF); for(int i=0; iclear(); // Populate the VarInfo object using the config string diff --git a/src/tools/other/regrid_data_plane/regrid_data_plane.cc b/src/tools/other/regrid_data_plane/regrid_data_plane.cc index d3edffa986..2c0b63e170 100644 --- a/src/tools/other/regrid_data_plane/regrid_data_plane.cc +++ b/src/tools/other/regrid_data_plane/regrid_data_plane.cc @@ -215,7 +215,7 @@ void process_command_line(int argc, char **argv) { void process_data_file() { DataPlane fr_dp, to_dp; Grid fr_grid, to_grid; - GrdFileType ftype; + FileType ftype; double dmin, dmax; ConcatString run_cs, vname; //Variables for GOES diff --git a/src/tools/other/shift_data_plane/shift_data_plane.cc b/src/tools/other/shift_data_plane/shift_data_plane.cc index fa6591df75..fd9eea2558 100644 --- a/src/tools/other/shift_data_plane/shift_data_plane.cc +++ b/src/tools/other/shift_data_plane/shift_data_plane.cc @@ -85,7 +85,7 @@ static ConcatString shift_cs; static void process_command_line(int, char **); static void process_data_file(); static void write_netcdf(const DataPlane &dp, const Grid &grid, - const VarInfo *vinfo, const GrdFileType& ftype); + const VarInfo *vinfo, const FileType& ftype); static void usage(); static void set_from(const StringArray &); static void set_to(const StringArray &); @@ -170,7 +170,7 @@ void process_command_line(int argc, char **argv) { void process_data_file() { DataPlane dp_in, dp_shift; Grid grid; - GrdFileType ftype; + FileType ftype; double fr_x, fr_y, to_x, to_y, dx, dy, v; int x, y; @@ -286,7 +286,7 @@ void process_data_file() { //////////////////////////////////////////////////////////////////////// void write_netcdf(const DataPlane &dp, const Grid &grid, - const VarInfo *vinfo, const GrdFileType &ftype) { + const VarInfo *vinfo, const FileType &ftype) { ConcatString cs; NcDim lat_dim, lon_dim; diff --git a/src/tools/tc_utils/rmw_analysis/rmw_analysis_conf_info.cc b/src/tools/tc_utils/rmw_analysis/rmw_analysis_conf_info.cc index 2f88e6b40d..3f004834b8 100644 --- a/src/tools/tc_utils/rmw_analysis/rmw_analysis_conf_info.cc +++ b/src/tools/tc_utils/rmw_analysis/rmw_analysis_conf_info.cc @@ -119,7 +119,7 @@ void RMWAnalysisConfInfo::process_config() { VarInfoFactory info_factory; Dictionary *fdict = (Dictionary *) nullptr; ConcatString poly_file; - GrdFileType ftype = GrdFileType_NcCF; + FileType ftype = FileType_NcCF; // Conf: Version Version = Conf.lookup_string(conf_key_version); diff --git a/src/tools/tc_utils/tc_diag/tc_diag.cc b/src/tools/tc_utils/tc_diag/tc_diag.cc index c810e6468e..e0a510f973 100644 --- a/src/tools/tc_utils/tc_diag/tc_diag.cc +++ b/src/tools/tc_utils/tc_diag/tc_diag.cc @@ -258,7 +258,7 @@ void get_file_type() { } // Get data file type from config - GrdFileType conf_file_type = + FileType conf_file_type = parse_conf_grd_file_type(conf_info.conf.lookup_dictionary(conf_key_data)); // Find the first file that actually exists diff --git a/src/tools/tc_utils/tc_diag/tc_diag.h b/src/tools/tc_utils/tc_diag/tc_diag.h index 729465d81e..fbe18a65e0 100644 --- a/src/tools/tc_utils/tc_diag/tc_diag.h +++ b/src/tools/tc_utils/tc_diag/tc_diag.h @@ -91,7 +91,7 @@ static std::map data_opt_map; static StringArray deck_source, deck_model_suffix; static ConcatString config_file; static TCDiagConfInfo conf_info; -static GrdFileType file_type = GrdFileType_None; +static FileType file_type = FileType_None; // Optional arguments static ConcatString out_dir; diff --git a/src/tools/tc_utils/tc_diag/tc_diag_conf_info.cc b/src/tools/tc_utils/tc_diag/tc_diag_conf_info.cc index 0ef7d137b7..bb446714bc 100644 --- a/src/tools/tc_utils/tc_diag/tc_diag_conf_info.cc +++ b/src/tools/tc_utils/tc_diag/tc_diag_conf_info.cc @@ -224,7 +224,7 @@ void TCDiagConfInfo::read_config(const char *default_file_name, //////////////////////////////////////////////////////////////////////// -void TCDiagConfInfo::process_config(GrdFileType file_type, +void TCDiagConfInfo::process_config(FileType file_type, map dmap) { int i, j; StringArray sa; diff --git a/src/tools/tc_utils/tc_diag/tc_diag_conf_info.h b/src/tools/tc_utils/tc_diag/tc_diag_conf_info.h index 7d0db17ad2..00bce278e7 100644 --- a/src/tools/tc_utils/tc_diag/tc_diag_conf_info.h +++ b/src/tools/tc_utils/tc_diag/tc_diag_conf_info.h @@ -144,7 +144,7 @@ class TCDiagConfInfo { void clear(); void read_config(const char *, const char *); - void process_config(GrdFileType, + void process_config(FileType, std::map); void parse_domain_info(std::map); diff --git a/src/tools/tc_utils/tc_rmw/tc_rmw.cc b/src/tools/tc_utils/tc_rmw/tc_rmw.cc index 5de4a525c6..52d262bc29 100644 --- a/src/tools/tc_utils/tc_rmw/tc_rmw.cc +++ b/src/tools/tc_utils/tc_rmw/tc_rmw.cc @@ -61,8 +61,8 @@ using namespace netCDF; static void usage(); static void process_command_line(int, char**); -static GrdFileType get_file_type(const StringArray &, const GrdFileType); -static bool file_is_ok(const ConcatString &, const GrdFileType); +static FileType get_file_type(const StringArray &, const FileType); +static bool file_is_ok(const ConcatString &, const FileType); static void process_rmw(); static void process_tracks(TrackInfoArray&); @@ -210,12 +210,12 @@ void process_command_line(int argc, char **argv) { //////////////////////////////////////////////////////////////////////// -GrdFileType get_file_type(const StringArray &file_list, - const GrdFileType in_ftype) { +FileType get_file_type(const StringArray &file_list, + const FileType in_ftype) { int i; Met2dDataFileFactory mtddf_factory; Met2dDataFile *mtddf = (Met2dDataFile *) nullptr; - GrdFileType out_ftype; + FileType out_ftype; // Find the first file that actually exists for(i=0; i