Changeset 1549 for XIOS/trunk/src/node/domain.cpp
- Timestamp:
- 06/25/18 12:12:42 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/domain.cpp
r1542 r1549 77 77 m["expand_domain"] = TRANS_EXPAND_DOMAIN; 78 78 m["reorder_domain"] = TRANS_REORDER_DOMAIN; 79 m["extract_domain"] = TRANS_EXTRACT_DOMAIN; 79 80 } 80 81 … … 1212 1213 1213 1214 /* 1214 Fill in longitude and latitude value from clients (or models) into internal values lonvalue, latvalue which1215 w ill be used by XIOS.1215 Fill in longitude, latitude, bounds, and area into internal values (lonvalue, latvalue, bounds_lonvalue, bounds_latvalue, areavalue) 1216 which will be used by XIOS. 1216 1217 */ 1217 1218 void CDomain::completeLonLatClient(void) … … 1219 1220 bool lonlatValueExisted = (0 != lonvalue.numElements()) || (0 != latvalue.numElements()); 1220 1221 checkBounds() ; 1222 checkArea() ; 1223 1221 1224 if (!lonvalue_2d.isEmpty() && !lonlatValueExisted) 1222 1225 { … … 1313 1316 } 1314 1317 } 1318 1319 if (!area.isEmpty() && areavalue.isEmpty()) 1320 { 1321 areavalue.resize(ni*nj); 1322 for (int j = 0; j < nj; ++j) 1323 { 1324 for (int i = 0; i < ni; ++i) 1325 { 1326 int k = j * ni + i; 1327 areavalue(k) = area(i,j); 1328 } 1329 } 1330 } 1315 1331 } 1316 1332 … … 1455 1471 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1456 1472 << "'bounds_lon_1d' dimension is not compatible with 'nvertex'." << std::endl 1457 << "'bounds_lon_1d' dimension is " << bounds_lon_1d.extent( 1)1473 << "'bounds_lon_1d' dimension is " << bounds_lon_1d.extent(0) 1458 1474 << " but nvertex is " << nvertex.getValue() << "."); 1459 1475 … … 1462 1478 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1463 1479 << "'bounds_lon_2d' dimension is not compatible with 'nvertex'." << std::endl 1464 << "'bounds_lon_2d' dimension is " << bounds_lon_2d.extent( 2)1480 << "'bounds_lon_2d' dimension is " << bounds_lon_2d.extent(0) 1465 1481 << " but nvertex is " << nvertex.getValue() << "."); 1466 1482 … … 1479 1495 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1480 1496 << "'bounds_lat_1d' dimension is not compatible with 'nvertex'." << std::endl 1481 << "'bounds_lat_1d' dimension is " << bounds_lat_1d.extent( 1)1497 << "'bounds_lat_1d' dimension is " << bounds_lat_1d.extent(0) 1482 1498 << " but nvertex is " << nvertex.getValue() << "."); 1483 1499 … … 1486 1502 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1487 1503 << "'bounds_lat_2d' dimension is not compatible with 'nvertex'." << std::endl 1488 << "'bounds_lat_2d' dimension is " << bounds_lat_2d.extent( 2)1504 << "'bounds_lat_2d' dimension is " << bounds_lat_2d.extent(0) 1489 1505 << " but nvertex is " << nvertex.getValue() << "."); 1490 1506 … … 1525 1541 << "Area size is " << area.extent(0) << " x " << area.extent(1) << "."); 1526 1542 } 1527 if (areavalue.isEmpty())1528 {1529 areavalue.resize(ni*nj);1530 for (int j = 0; j < nj; ++j)1531 {1532 for (int i = 0; i < ni; ++i)1533 {1534 int k = j * ni + i;1535 areavalue(k) = area(i,j);1536 }1537 }1538 }1543 // if (areavalue.isEmpty()) 1544 // { 1545 // areavalue.resize(ni*nj); 1546 // for (int j = 0; j < nj; ++j) 1547 // { 1548 // for (int i = 0; i < ni; ++i) 1549 // { 1550 // int k = j * ni + i; 1551 // areavalue(k) = area(i,j); 1552 // } 1553 // } 1554 // } 1539 1555 } 1540 1556 }
Note: See TracChangeset
for help on using the changeset viewer.