Changeset 1391
- Timestamp:
- 01/10/18 11:37:16 (7 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/config/domain_attribute.conf
r1249 r1391 3 3 DECLARE_ATTRIBUTE(StdString , standard_name) 4 4 DECLARE_ATTRIBUTE(StdString , long_name) 5 DECLARE_ATTRIBUTE(StdString , lon_name) 6 DECLARE_ATTRIBUTE(StdString , lat_name) 5 7 6 8 /* GLOBAL */ -
XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_output.cpp
r1390 r1391 53 53 void CNc4DataOutput::writeDomain_(CDomain* domain) 54 54 { 55 StdString lonName,latName ; 56 55 57 domain->computeWrittenIndex(); 56 58 domain->computeWrittenCompressedIndex(comm_file); … … 94 96 { 95 97 case CDomain::type_attr::curvilinear : 98 99 if (domain->lon_name.isEmpty()) lonName = "nav_lon"; 100 else lonName = domain->lon_name; 101 102 if (domain->lat_name.isEmpty()) latName = "nav_lat"; 103 else latName = domain->lat_name; 104 96 105 dimXid = StdString("x").append(appendDomid); 97 106 dimYid = StdString("y").append(appendDomid); 98 107 break ; 108 99 109 case CDomain::type_attr::rectilinear : 100 dimXid = StdString("lon").append(appendDomid); 101 dimYid = StdString("lat").append(appendDomid); 110 111 if (domain->lon_name.isEmpty()) lonName = "lon"; 112 else lonName = domain->lon_name; 113 114 if (domain->lat_name.isEmpty()) latName = "lat"; 115 else latName = domain->lat_name; 116 117 dimXid = lonName.append(appendDomid); 118 dimYid = latName.append(appendDomid); 102 119 break; 103 120 } … … 195 212 case CDomain::type_attr::curvilinear : 196 213 dim0.push_back(dimYid); dim0.push_back(dimXid); 197 lonid = StdString("nav_lon").append(appendDomid);198 latid = StdString("nav_lat").append(appendDomid);214 lonid = lonName.append(appendDomid); 215 latid = latName.append(appendDomid); 199 216 break ; 200 217 case CDomain::type_attr::rectilinear : 201 lonid = StdString("lon").append(appendDomid);202 latid = StdString("lat").append(appendDomid);218 lonid = lonName.append(appendDomid); 219 latid = latName.append(appendDomid); 203 220 dim0.push_back(dimYid); 204 221 dim1.push_back(dimXid); … … 206 223 } 207 224 208 bounds_lonid = StdString("bounds_lon").append(appendDomid);209 bounds_latid = StdString("bounds_lat").append(appendDomid);225 bounds_lonid = "bounds_"+lonName+appendDomid; 226 bounds_latid = "bounds_"+latName+appendDomid; 210 227 211 228 SuperClassWriter::addDimension(dimXid, domain->zoom_ni); … … 338 355 case CDomain::type_attr::curvilinear : 339 356 dim0.push_back(dimYid); dim0.push_back(dimXid); 340 lonid = StdString("nav_lon").append(appendDomid);341 latid = StdString("nav_lat").append(appendDomid);357 lonid = lonName.append(appendDomid); 358 latid = latName.append(appendDomid); 342 359 SuperClassWriter::addVariable(latid, typePrec, dim0); 343 360 SuperClassWriter::addVariable(lonid, typePrec, dim0); … … 347 364 dim0.push_back(dimYid); 348 365 dim1.push_back(dimXid); 349 lonid = StdString("lon").append(appendDomid);350 latid = StdString("lat").append(appendDomid);366 lonid = lonName.append(appendDomid); 367 latid = latName.append(appendDomid); 351 368 SuperClassWriter::addVariable(latid, typePrec, dim0); 352 369 SuperClassWriter::addVariable(lonid, typePrec, dim1); … … 354 371 } 355 372 356 bounds_lonid = StdString("bounds_lon").append(appendDomid);357 bounds_latid = StdString("bounds_lat").append(appendDomid);373 bounds_lonid = "bounds_"+lonName+appendDomid; 374 bounds_latid = "bounds_"+latName+appendDomid; 358 375 359 376 this->writeAxisAttributes … … 934 951 StdString appendDomid = (singleDomain) ? "" : "_"+domid ; 935 952 953 StdString lonName,latName ; 954 if (domain->lon_name.isEmpty()) lonName = "lon"; 955 else lonName = domain->lon_name; 956 957 if (domain->lat_name.isEmpty()) latName = "lat"; 958 else latName = domain->lat_name; 959 936 960 StdString dimXid = StdString("cell").append(appendDomid); 937 961 StdString dimVertId = StdString("nvertex").append(appendDomid); … … 1018 1042 SuperClassWriter::addDimension(dimXid, domain->zoom_ni); 1019 1043 1020 lonid = StdString("lon").append(appendDomid);1021 latid = StdString("lat").append(appendDomid);1022 bounds_lonid = StdString("bounds_lon").append(appendDomid);1023 bounds_latid = StdString("bounds_lat").append(appendDomid);1044 lonid = lonName.append(appendDomid); 1045 latid = latName.append(appendDomid); 1046 bounds_lonid = "bounds_"+lonName+appendDomid; 1047 bounds_latid = "bounds_"+latName+appendDomid; 1024 1048 if (domain->hasLonLat) 1025 1049 { … … 1072 1096 case (ONE_FILE) : 1073 1097 { 1074 lonid = StdString("lon").append(appendDomid); 1075 latid = StdString("lat").append(appendDomid); 1076 bounds_lonid = StdString("bounds_lon").append(appendDomid); 1077 bounds_latid = StdString("bounds_lat").append(appendDomid); 1098 lonid = lonName.append(appendDomid); 1099 latid = latName.append(appendDomid); 1100 bounds_lonid = "bounds_"+lonName+appendDomid; 1101 bounds_latid = "bounds_"+latName+appendDomid; 1102 1078 1103 dim0.push_back(dimXid); 1079 1104 SuperClassWriter::addDimension(dimXid, domain->ni_glo); … … 1703 1728 StdString domId = domain->getDomainOutputName(); 1704 1729 StdString appendDomId = singleDomain ? "" : "_" + domId ; 1705 1730 StdString lonName,latName ; 1731 1732 if (domain->lon_name.isEmpty()) lonName = "lon"; 1733 else lonName = domain->lon_name; 1734 1735 if (domain->lat_name.isEmpty()) latName = "lat"; 1736 else latName = domain->lat_name; 1737 1706 1738 if (compressedOutput && domain->isCompressible() && domain->type != CDomain::type_attr::unstructured) 1707 1739 { … … 1720 1752 dimIdList.push_back(dimYid); 1721 1753 } 1722 dimCoordList.push_back( StdString("nav_lon").append(appendDomId));1723 dimCoordList.push_back( StdString("nav_lat").append(appendDomId));1754 dimCoordList.push_back(lonName.append(appendDomId)); 1755 dimCoordList.push_back(latName.append(appendDomId)); 1724 1756 break ; 1725 1757 case CDomain::type_attr::rectilinear: 1726 1758 if (!compressedOutput || !domain->isCompressible()) 1727 1759 { 1728 dimXid = StdString("lon").append(appendDomId);1760 dimXid = lonName.append(appendDomId); 1729 1761 dimIdList.push_back(dimXid); 1730 dimYid = StdString("lat").append(appendDomId);1762 dimYid = latName.append(appendDomId); 1731 1763 dimIdList.push_back(dimYid); 1732 1764 } … … 1738 1770 dimXid = StdString("cell").append(appendDomId); 1739 1771 dimIdList.push_back(dimXid); 1740 dimCoordList.push_back( StdString("lon").append(appendDomId));1741 dimCoordList.push_back( StdString("lat").append(appendDomId));1772 dimCoordList.push_back(lonName.append(appendDomId)); 1773 dimCoordList.push_back(latName.append(appendDomId)); 1742 1774 } 1743 1775 else
Note: See TracChangeset
for help on using the changeset viewer.