Changeset 765


Ignore:
Timestamp:
10/28/15 15:58:31 (5 years ago)
Author:
ymipsl
Message:

Report bug fix of rev r705 for input field on unstructured grid.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/io/nc4_data_input.cpp

    r685 r765  
    5353      case ONE_FILE: 
    5454      { 
     55/* 
    5556        std::vector<int> nZoomBeginGlobal = grid->getDistributionServer()->getZoomBeginGlobal(); 
    5657        std::vector<int> nZoomBeginServer = grid->getDistributionServer()->getZoomBeginServer(); 
     
    6768          count[i] = nZoomSizeServer[ssize - i - 1]; 
    6869        } 
     70*/ 
    6971 
     72        std::vector<int> nZoomBeginGlobal = grid->getDistributionServer()->getZoomBeginGlobal(); 
     73        std::vector<int> nZoomBeginServer = grid->getDistributionServer()->getZoomBeginServer(); 
     74        std::vector<int> nZoomSizeServer  = grid->getDistributionServer()->getZoomSizeServer(); 
     75 
     76        std::vector<StdSize> start, count; 
     77 
     78        CArray<bool,1> axisDomainOrder = grid->axis_domain_order; 
     79        std::vector<StdString> domainList = grid->getDomainList(); 
     80        std::vector<StdString> axisList   = grid->getAxisList(); 
     81        int numElement = axisDomainOrder.numElements(); 
     82        int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1; 
     83        int idx = nZoomBeginGlobal.size() - 1; 
     84 
     85        start.reserve(nZoomBeginGlobal.size()); 
     86        count.reserve(nZoomBeginGlobal.size()); 
     87 
     88        for (int i = numElement - 1; i >= 0; --i) 
     89        { 
     90          if (axisDomainOrder(i)) 
     91          { 
     92            CDomain* domain = CDomain::get(domainList[idxDomain]); 
     93            if ((domain->type) != CDomain::type_attr::unstructured) 
     94            { 
     95              start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]); 
     96              count.push_back(nZoomSizeServer[idx]); 
     97            } 
     98            --idx ; 
     99            start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]); 
     100            count.push_back(nZoomSizeServer[idx]); 
     101            --idx ; 
     102            --idxDomain; 
     103          } 
     104          else 
     105          { 
     106            start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]); 
     107            count.push_back(nZoomSizeServer[idx]); 
     108            --idx; 
     109           } 
     110        } 
     111                   
    70112        SuperClassWriter::getData(fieldData, fieldId, isCollective, field->getNStep() - 1, &start, &count); 
    71113        break; 
Note: See TracChangeset for help on using the changeset viewer.