Changeset 2579


Ignore:
Timestamp:
09/25/23 12:06:20 (8 months ago)
Author:
jderouillat
Message:

Fix NetCDF chunking in case of many domains in the same file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/io/onetcdf4.cpp

    r2532 r2579  
    99#include "netCdfException.hpp" 
    1010#include "timer.hpp" 
     11#include "file.hpp" 
    1112 
    1213namespace xios 
     
    391392            std::vector<CDomain*> domains = grid->getDomains(); 
    392393            std::vector<CAxis*> axis = grid->getAxis(); 
     394            bool singleDomain = (field->getRelFile()->nbDomains == 1); 
    393395 
    394396            std::vector<double> userChunkingWeights; // store chunking coefficients defined by users 
     
    426428                  if (dom->type==CDomain::type_attr::rectilinear)  axisDim="lon"; 
    427429                } 
     430                if (!singleDomain) axisDim+="_"+dom->getDomainOutputName(); 
    428431                if (axisDim == *itId) 
    429432                { 
     
    440443                  if (dom->type==CDomain::type_attr::rectilinear)  axisDim="lat"; 
    441444                } 
     445                if (!singleDomain) axisDim+="_"+dom->getDomainOutputName(); 
    442446                if (axisDim == *itId) 
    443447                { 
Note: See TracChangeset for help on using the changeset viewer.