Changeset 1419 for XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_input.cpp
- Timestamp:
- 02/02/18 16:26:29 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_input.cpp
r1413 r1419 264 264 if ((CDomain::type_attr::rectilinear == domain->type)) 265 265 { 266 // Ok, try to read some f..attributes such as longitude and latitude266 // Ok, try to read some attributes such as longitude and latitude 267 267 bool hasLat = SuperClassWriter::hasVariable(itMapNj->first); 268 268 if (hasLat) … … 286 286 int nj = domain->nj; 287 287 std::vector<StdSize> nBeginLatLon(2), nSizeLatLon(2); 288 nBeginLatLon[0] = 0; nBeginLatLon[1] = 0;289 nSizeLatLon[0] = domain->nj _glo.getValue(); nSizeLatLon[1] = domain->ni_glo.getValue();288 nBeginLatLon[0] = domain->jbegin.getValue(); nBeginLatLon[1] = domain->ibegin.getValue(); 289 nSizeLatLon[0] = domain->nj.getValue(); nSizeLatLon[1] = domain->ni.getValue(); 290 290 291 291 StdString latName = this->getLatCoordName(fieldId); 292 292 if (SuperClassWriter::hasVariable(latName)) 293 293 { 294 domain->latvalue_curvilinear_read_from_file.resize(domain->ni _glo,domain->nj_glo);294 domain->latvalue_curvilinear_read_from_file.resize(domain->ni,domain->nj); 295 295 readFieldVariableValue(domain->latvalue_curvilinear_read_from_file, latName, nBeginLatLon, nSizeLatLon); 296 296 } … … 298 298 if (SuperClassWriter::hasVariable(lonName)) 299 299 { 300 domain->lonvalue_curvilinear_read_from_file.resize(domain->ni _glo,domain->nj_glo);300 domain->lonvalue_curvilinear_read_from_file.resize(domain->ni,domain->nj); 301 301 readFieldVariableValue(domain->lonvalue_curvilinear_read_from_file, lonName, nBeginLatLon, nSizeLatLon); 302 302 } … … 320 320 321 321 std::vector<StdSize> nBeginBndsLatLon(3), nSizeBndsLatLon(3); 322 nBeginBndsLatLon[0] = 0; nSizeBndsLatLon[0] = domain->nj_glo.getValue();323 nBeginBndsLatLon[1] = 0; nSizeBndsLatLon[1] = domain->ni_glo.getValue();322 nBeginBndsLatLon[0] = domain->jbegin.getValue(); nSizeBndsLatLon[0] = domain->nj.getValue(); 323 nBeginBndsLatLon[1] = domain->ibegin.getValue(); nSizeBndsLatLon[1] = domain->ni.getValue(); 324 324 nBeginBndsLatLon[2] = 0; nSizeBndsLatLon[2] = nbVertex; 325 325 326 326 if (SuperClassWriter::hasVariable(boundsLatName)) 327 327 { 328 domain->bounds_latvalue_curvilinear_read_from_file.resize(nbVertex,domain->ni _glo,domain->nj_glo);328 domain->bounds_latvalue_curvilinear_read_from_file.resize(nbVertex,domain->ni,domain->nj); 329 329 readFieldVariableValue(domain->bounds_latvalue_curvilinear_read_from_file, boundsLatName, nBeginBndsLatLon, nSizeBndsLatLon); 330 330 … … 332 332 if (SuperClassWriter::hasVariable(boundsLonName)) 333 333 { 334 domain->bounds_lonvalue_curvilinear_read_from_file.resize(nbVertex,domain->ni _glo,domain->nj_glo);334 domain->bounds_lonvalue_curvilinear_read_from_file.resize(nbVertex,domain->ni,domain->nj); 335 335 readFieldVariableValue(domain->bounds_lonvalue_curvilinear_read_from_file, boundsLonName, nBeginBndsLatLon, nSizeBndsLatLon); 336 336 } … … 339 339 { 340 340 std::vector<StdSize> nBeginLatLon(1,0), nSizeLatLon(1,0); 341 n SizeLatLon[0] = domain->ni_glo.getValue();342 CArray<double,1> globalLonLat(domain->ni_glo.getValue());341 nBeginLatLon[0] = domain->ibegin; 342 nSizeLatLon[0] = domain->ni.getValue(); 343 343 344 344 StdString latName = this->getLatCoordName(fieldId); 345 345 if (SuperClassWriter::hasVariable(latName)) 346 346 { 347 domain->latvalue_unstructured_read_from_file.resize(domain->ni _glo);347 domain->latvalue_unstructured_read_from_file.resize(domain->ni); 348 348 readFieldVariableValue(domain->latvalue_unstructured_read_from_file, latName, nBeginLatLon, nSizeLatLon); 349 349 } … … 352 352 if (SuperClassWriter::hasVariable(lonName)) //(0 != lonName.compare("")) 353 353 { 354 // readFieldVariableValue(globalLonLat, lonName, nBeginLatLon, nSizeLatLon); 355 domain->lonvalue_unstructured_read_from_file.resize(domain->ni_glo); 354 domain->lonvalue_unstructured_read_from_file.resize(domain->ni); 356 355 readFieldVariableValue(domain->lonvalue_unstructured_read_from_file, lonName, nBeginLatLon, nSizeLatLon); 357 356 } … … 375 374 376 375 std::vector<StdSize> nBeginBndsLatLon(2), nSizeBndsLatLon(2); 377 nBeginBndsLatLon[0] = 0; nSizeBndsLatLon[0] = domain->ni_glo.getValue();376 nBeginBndsLatLon[0] = domain->ibegin; nSizeBndsLatLon[0] = domain->ni.getValue(); 378 377 nBeginBndsLatLon[1] = 0; nSizeBndsLatLon[1] = nbVertex; 379 378
Note: See TracChangeset
for help on using the changeset viewer.