Changeset 2391


Ignore:
Timestamp:
08/24/22 17:56:48 (22 months ago)
Author:
ymipsl
Message:

Solvue issue when trying to output scalar in nectdf file coming from a grid composed of multiple scalar tensor product.
YM

File:
1 edited

Legend:

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

    r2389 r2391  
    23552355                  std::vector<StdString> scalarList  = grid->getScalarList() ; 
    23562356                  int numElement = axisDomainOrder.numElements(); 
    2357                   int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1; 
     2357                  int idxDomain = domainList.size() - 1 ; 
     2358                  int idxAxis = axisList.size() - 1 ; 
     2359                  int idxScalar = scalarList.size() - 1 ; 
    23582360                  int idx = domainList.size() * 2 + axisList.size() - 1; 
    23592361 
     
    23882390                    else 
    23892391                    { 
    2390                       if (1 == axisDomainOrder.numElements()) 
     2392                      if (idx ==-1)  
    23912393                      { 
    2392                         CScalar* scalar = CScalar::get(scalarList[scalarList.size()-1]); 
     2394                        CScalar* scalar = CScalar::get(scalarList[idxScalar]); 
    23932395                        start.push_back(0); 
    23942396                        count.push_back(scalar->n); 
     2397                        idx-- ; 
    23952398                      } 
    2396                       --idx; 
     2399                      else if (idx<-1) 
     2400                      { 
     2401                        CScalar* scalar = CScalar::get(scalarList[idxScalar]); 
     2402                        count.back()*=scalar->n; 
     2403                        idx-- ; 
     2404                      } 
     2405                      --idxScalar; 
    23972406                    } 
    23982407                  } 
Note: See TracChangeset for help on using the changeset viewer.