Changeset 2274 for XIOS/dev/dev_ym/XIOS_COUPLING/src/io
- Timestamp:
- 12/09/21 12:28:20 (3 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src/io
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/io/inetcdf4.cpp
r1639 r2274 763 763 { 764 764 StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &(*itList), path); 765 if (CCFConvention::XIOS_CF_Longitude_units .end() != CCFConvention::XIOS_CF_Longitude_units.find(unit))765 if (CCFConvention::XIOS_CF_Longitude_units().end() != CCFConvention::XIOS_CF_Longitude_units().find(unit)) 766 766 { 767 767 lonName = *itList; … … 785 785 { 786 786 StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &(*itList), path); 787 if (CCFConvention::XIOS_CF_Latitude_units .end() != CCFConvention::XIOS_CF_Latitude_units.find(unit))787 if (CCFConvention::XIOS_CF_Latitude_units().end() != CCFConvention::XIOS_CF_Latitude_units().find(unit)) 788 788 { 789 789 latName = *itList; … … 811 811 { 812 812 StdString unit = this->getAttributeValue(CCFKeywords::XIOS_CF_units, &varname, path); 813 return (CCFConvention::XIOS_CF_Latitude_units .end() != CCFConvention::XIOS_CF_Latitude_units.find(unit)814 || CCFConvention::XIOS_CF_Longitude_units .end() != CCFConvention::XIOS_CF_Longitude_units.find(unit));813 return (CCFConvention::XIOS_CF_Latitude_units().end() != CCFConvention::XIOS_CF_Latitude_units().find(unit) 814 || CCFConvention::XIOS_CF_Longitude_units().end() != CCFConvention::XIOS_CF_Longitude_units().find(unit)); 815 815 } 816 816 else return false ; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/io/netCdf_cf_constant.hpp
r782 r2274 7 7 namespace xios 8 8 { 9 const StdString CFLatUnits[] = {"degrees_north", "degree_north", "degree_N", "degrees_N", "degreeN", "degreesN"};10 const StdString CFLonUnits[] = {"degrees_east", "degree_east", "degree_E", "degrees_E", "degreeE", "degreesE"};9 //const StdString CFLatUnits[] = {"degrees_north", "degree_north", "degree_N", "degrees_N", "degreeN", "degreesN"}; 10 //const StdString CFLonUnits[] = {"degrees_east", "degree_east", "degree_E", "degrees_E", "degreeE", "degreesE"}; 11 11 12 12 struct CCFKeywords … … 17 17 static const StdString XIOS_CF_bounds; 18 18 }; 19 const StdString CCFKeywords::XIOS_CF_units("units");20 const StdString CCFKeywords::XIOS_CF_standard_name("standard_name");21 const StdString CCFKeywords::XIOS_CF_coordinates("coordinates");22 const StdString CCFKeywords::XIOS_CF_bounds("bounds");23 19 24 20 struct CCFConvention 25 21 { 26 static const std::set<StdString> XIOS_CF_Latitude_units; 27 static const std::set<StdString> XIOS_CF_Longitude_units; 22 static const std::set<StdString>& XIOS_CF_Latitude_units() 23 { 24 if (XIOS_CF_Longitude_units_.empty()) XIOS_CF_Latitude_units_= {"degrees_north", "degree_north", "degree_N", "degrees_N", "degreeN", "degreesN"}; 25 return XIOS_CF_Latitude_units_ ; 26 } 28 27 28 static const std::set<StdString>& XIOS_CF_Longitude_units() 29 { 30 if (XIOS_CF_Longitude_units_.empty()) XIOS_CF_Longitude_units_= {"degrees_east", "degree_east", "degree_E", "degrees_E", "degreeE", "degreesE"}; 31 return XIOS_CF_Longitude_units_ ; 32 } 33 static void releaseStaticAllocation(void) { XIOS_CF_Latitude_units_.clear() ; XIOS_CF_Longitude_units_.clear() ; } 29 34 private: 30 35 CCFConvention(); 36 static std::set<StdString> XIOS_CF_Latitude_units_; 37 static std::set<StdString> XIOS_CF_Longitude_units_; 31 38 }; 32 33 const std::set<StdString> CCFConvention::XIOS_CF_Latitude_units(CFLatUnits, CFLatUnits+sizeof(CFLatUnits)/sizeof(CFLatUnits[0]));34 const std::set<StdString> CCFConvention::XIOS_CF_Longitude_units(CFLonUnits, CFLonUnits+sizeof(CFLonUnits)/sizeof(CFLonUnits[0]));35 39 36 40 } // namespace xios
Note: See TracChangeset
for help on using the changeset viewer.