Changeset 2507 for XIOS3/trunk/src/transformation/domain_algorithm
- Timestamp:
- 06/01/23 10:58:08 (13 months ago)
- Location:
- XIOS3/trunk/src/transformation/domain_algorithm
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS3/trunk/src/transformation/domain_algorithm/domain_algorithm_extract.cpp
r2340 r2507 76 76 domainDestination->bounds_lon_2d.reset(); 77 77 domainDestination->bounds_lat_2d.reset(); 78 domainDestination->area.reset(); 78 domainDestination->area_1d.reset(); 79 domainDestination->area_2d.reset(); 79 80 domainDestination->radius.reset(); 80 81 … … 175 176 } 176 177 } 177 if (domainSrc_->hasArea) domainDest_->area.resize(niDest,njDest); 178 178 if (domainSrc_->hasArea) 179 { 180 if (!domainSrc_->area_2d.isEmpty()) domainDest_->area_2d.resize(niDest,njDest); 181 else if (!domainSrc_->area_1d.isEmpty()) domainDest_->area_1d.resize(niDest*njDest); 182 } 179 183 // Set attributes required to define domainDestination->localElement_ and associated views, full and workflow) 180 184 CArray<size_t,1> sourceGlobalIdx = domainSource->getLocalElement()->getGlobalIndex(); … … 241 245 242 246 // area 243 if (!domainSrc_->area.isEmpty()) 244 { 245 domainDest_->area(iIdxDestLocal,jIdxDestLocal) = domainSrc_->area(iIdxSrcLocal,jIdxSrcLocal); 246 } 247 if (!domainSrc_->area_2d.isEmpty()) domainDest_->area_2d(iIdxDestLocal,jIdxDestLocal) = domainSrc_->area_2d(iIdxSrcLocal,jIdxSrcLocal); 248 else if (!domainSrc_->area_1d.isEmpty()) domainDest_->area_1d(countDest) = domainSrc_->area_1d(countSrc); 247 249 248 250 // bounds -
XIOS3/trunk/src/transformation/domain_algorithm/domain_algorithm_reorder.cpp
r2270 r2507 128 128 else if (!domainSource->lonvalue_2d.isEmpty() ) 129 129 { 130 domainDestination->latvalue_2d.resize( domainSource->latvalue_2d. numElements() );131 domainDestination->lonvalue_2d.resize( domainSource->lonvalue_2d. numElements() );130 domainDestination->latvalue_2d.resize( domainSource->latvalue_2d.shape() ); 131 domainDestination->lonvalue_2d.resize( domainSource->lonvalue_2d.shape() ); 132 132 domainDestination->latvalue_2d = domainSource->latvalue_2d; 133 133 domainDestination->lonvalue_2d = domainSource->lonvalue_2d; … … 145 145 else if (!domainSource->bounds_lon_2d.isEmpty() ) 146 146 { 147 domainDestination->bounds_lon_2d.resize( domainSource->bounds_lon_2d. numElements() );148 domainDestination->bounds_lat_2d.resize( domainSource->bounds_lat_2d. numElements() );147 domainDestination->bounds_lon_2d.resize( domainSource->bounds_lon_2d.shape() ); 148 domainDestination->bounds_lat_2d.resize( domainSource->bounds_lat_2d.shape() ); 149 149 domainDestination->bounds_lon_2d = domainSource->bounds_lon_2d; 150 150 domainDestination->bounds_lat_2d = domainSource->bounds_lat_2d; 151 151 } 152 152 // set area 153 if (!domainSource->area.isEmpty() ) 154 { 155 domainDestination->area.resize( domainSource->area.numElements() ); 156 domainDestination->area = domainSource->area; 157 } 153 if (!domainSource->area_1d.isEmpty() ) 154 { 155 domainDestination->area_1d.resize( domainSource->area_1d.numElements() ); 156 domainDestination->area_1d = domainSource->area_1d; 157 } 158 else if (!domainSource->area_2d.isEmpty() ) 159 { 160 domainDestination->area_2d.resize( domainSource->area_2d.shape() ); 161 domainDestination->area_2d = domainSource->area_2d; 162 } 163 158 164 if (!domainSource->radius.isEmpty() ) 159 165 domainDestination->radius = domainSource->radius; -
XIOS3/trunk/src/transformation/domain_algorithm/domain_algorithm_zoom.cpp
r2270 r2507 173 173 } 174 174 } 175 if (domainSrc_->hasArea) domainDest_->area.resize(niDest,njDest); 176 175 if (domainSrc_->hasArea) 176 { 177 if (!domainSrc_->area_1d.isEmpty()) domainDest_->area_1d.resize(niDest*njDest); 178 else if (!domainSrc_->area_2d.isEmpty()) domainDest_->area_2d.resize(niDest,njDest); 179 } 177 180 178 181 for (int iDest = 0; iDest < niDest; iDest++) … … 196 199 197 200 if (domainSrc_->hasArea) 198 domainDest_->area(iDest,jDest) = domainSrc_->area(iSrc,jSrc); 201 { 202 if (!domainSrc_->area_1d.isEmpty()) domainDest_->area_1d(indLocDest) = domainSrc_->area_1d(ind); 203 else if (!domainSrc_->area_2d.isEmpty()) domainDest_->area_2d(iDest,jDest) = domainSrc_->area_2d(iSrc,jSrc); 204 } 199 205 200 206 if (domainSrc_->hasLonLat)
Note: See TracChangeset
for help on using the changeset viewer.