Ignore:
Timestamp:
11/23/21 13:12:46 (3 years ago)
Author:
ymipsl
Message:

Scalar can be now distributed on server side, avoiding incorrect result coming from redondant nature of scalar grid.
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/io/onetcdf4.cpp

    r1957 r2264  
    477477         if (sizes.size()==0)  
    478478         { 
    479             array_size=1 ; 
    480             sstart.push_back(0); 
    481             scount.push_back(1); 
     479             
     480            if ((start != NULL) && (count != NULL) && start->size()==1 && count->size()==1) // pur scalar case 
     481              array_size*=(*count)[0] ; 
     482            else array_size=1 ; 
    482483         } 
    483484         else 
     
    492493             sstart.push_back(record); 
    493494             scount.push_back(1); 
    494               if ((start == NULL) && 
    495                   (count == NULL)) i++; 
    496               it++; 
     495             if ((start == NULL) && (count == NULL)) i++; 
     496             it++; 
     497             if (it==end) 
     498             { 
     499               if ((start != NULL) && (count != NULL) && start->size()==1 && count->size()==1) // pur scalar case 
     500               { 
     501                 scount[0]=(*count)[0] ; 
     502                 array_size *= (*count)[0]; 
     503               } 
     504             } 
    497505           } 
    498  
     506            
    499507           for (;it != end; it++) 
    500508           { 
     
    569577         int grpid = this->getCurrentGroup(); 
    570578         int varid = this->getVariable(name); 
     579          
    571580         StdSize array_size = 1; 
    572581         std::vector<StdSize> sstart, scount; 
Note: See TracChangeset for help on using the changeset viewer.