Ignore:
Timestamp:
03/22/18 10:43:20 (6 years ago)
Author:
yushan
Message:

branch_openmp merged with XIOS_DEV_CMIP6@1459

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/node/interpolate_domain.cpp

    r1014 r1460  
    4848    } 
    4949 
     50    bool detect_missing_value=false ; 
     51    if (!this->detect_missing_value.isEmpty()) detect_missing_value = this->detect_missing_value.getValue(); 
     52    else this->detect_missing_value.setValue(detect_missing_value); 
     53 
     54    bool renormalize=false ; 
     55    if (!this->renormalize.isEmpty()) renormalize = this->renormalize.getValue(); 
     56    else this->renormalize.setValue(renormalize); 
     57 
     58    bool quantity=false ; 
     59    if (!this->quantity.isEmpty()) quantity = this->quantity.getValue(); 
     60    else this->quantity.setValue(quantity); 
     61 
    5062    if (this->mode.isEmpty()) this->mode.setValue(mode_attr::compute); 
    5163    if (this->write_weight.isEmpty()) this->write_weight.setValue(false); 
    5264 
    53     StdString weightFile; 
    54     switch (this->mode) 
    55     { 
    56       case mode_attr::read: 
    57         if (this->weight_filename.isEmpty()) 
    58         { 
    59           if (!this->write_weight) 
    60             ERROR("void CInterpolateDomain::checkValid(CDomain* domainSrc)", 
    61                  << "Read mode is activated but there is no file specified." << std::endl 
    62                  << "Please define a correct file containing interpolation weights with option 'file'. "); 
    63         } 
    64         else 
    65         { 
    66           weightFile = this->weight_filename; 
    67           ifstream f(weightFile.c_str()); 
    68           if (!f.good()) 
    69             ERROR("void CInterpolateDomain::checkValid(CDomain* domainSrc)", 
    70                   << "Read mode is activated but file "  << weightFile << " doesn't exist." << std::endl 
    71                   << "Please check this file "); 
    72         } 
    73         break; 
    74       case mode_attr::compute: 
    75         break; 
    76       case mode_attr::read_or_compute: 
    77         if (!this->weight_filename.isEmpty() && !this->write_weight) 
    78         { 
    79           weightFile = this->weight_filename; 
    80           ifstream f(weightFile.c_str()); 
    81           if (!f.good()) 
    82             ERROR("void CInterpolateDomain::checkValid(CDomain* domainSrc)", 
    83                   << "read_or_compute mode is activated but file "  << weightFile << " doesn't exist." << std::endl 
    84                   << "Please check this file "); 
    85         } 
    86         break; 
    87       default: 
    88         break; 
    89     } 
     65    if (this->read_write_convention.isEmpty()) this->read_write_convention.setValue(read_write_convention_attr::fortran); 
    9066 
    9167  } 
Note: See TracChangeset for help on using the changeset viewer.