Ignore:
Timestamp:
07/23/18 16:32:19 (6 years ago)
Author:
oabramkina
Message:

Bugfix on reading curvilinear and rectilinear domains.

For both domain types a user can define either 1D or 2D longitude, latitude, and bounds. If either 1D or 2D values are given by the user, then values read from a file will be ignored. Otherwise lon, lat, and bounds will be treated as 1D for rectilinear domains and as 2D for curvilinear domains.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp

    r1509 r1565  
    458458   void CDomain::fillInRectilinearLonLat() 
    459459   { 
    460      if (!lonvalue_rectilinear_read_from_file.isEmpty()) 
     460     if (!lonvalue_rectilinear_read_from_file.isEmpty() && lonvalue_2d.isEmpty() && lonvalue_1d.isEmpty()) 
    461461     { 
    462462       lonvalue_1d.resize(ni); 
     
    492492 
    493493 
    494      if (!latvalue_rectilinear_read_from_file.isEmpty()) 
     494     if (!latvalue_rectilinear_read_from_file.isEmpty() && latvalue_2d.isEmpty() && latvalue_1d.isEmpty()) 
    495495     { 
    496496       latvalue_1d.resize(nj); 
     
    532532   void CDomain::fillInCurvilinearLonLat() 
    533533   { 
    534      if (!lonvalue_curvilinear_read_from_file.isEmpty() && lonvalue_2d.isEmpty()) 
     534     if (!lonvalue_curvilinear_read_from_file.isEmpty() && lonvalue_2d.isEmpty() && lonvalue_1d.isEmpty()) 
    535535     { 
    536536       lonvalue_2d.resize(ni,nj); 
     
    542542     } 
    543543 
    544      if (!latvalue_curvilinear_read_from_file.isEmpty() && latvalue_2d.isEmpty()) 
     544     if (!latvalue_curvilinear_read_from_file.isEmpty() && latvalue_2d.isEmpty() && latvalue_1d.isEmpty()) 
    545545     { 
    546546       latvalue_2d.resize(ni,nj); 
     
    552552     } 
    553553 
    554      if (!bounds_lonvalue_curvilinear_read_from_file.isEmpty() && bounds_lon_2d.isEmpty()) 
     554     if (!bounds_lonvalue_curvilinear_read_from_file.isEmpty() && bounds_lon_2d.isEmpty() && bounds_lon_1d.isEmpty()) 
    555555     { 
    556556       bounds_lon_2d.resize(nvertex,ni,nj); 
     
    563563     } 
    564564 
    565      if (!bounds_latvalue_curvilinear_read_from_file.isEmpty() && bounds_lat_2d.isEmpty()) 
     565     if (!bounds_latvalue_curvilinear_read_from_file.isEmpty() && bounds_lat_2d.isEmpty() && bounds_lat_1d.isEmpty()) 
    566566     { 
    567567       bounds_lat_2d.resize(nvertex,ni,nj); 
Note: See TracChangeset for help on using the changeset viewer.