Changeset 1413 for XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp
- Timestamp:
- 01/25/18 18:35:58 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp
r1410 r1413 256 256 257 257 /*! 258 Redistribute RECTILINEAR or CURVILINEARdomain with a number of local domains.258 Redistribute RECTILINEAR domain with a number of local domains. 259 259 All attributes ni,nj,ibegin,jbegin (if defined) will be rewritten 260 260 The optional attributes lonvalue, latvalue will be added. Because this function only serves (for now) … … 531 531 void CDomain::fillInCurvilinearLonLat() 532 532 { 533 534 533 if (!lonvalue_curvilinear_read_from_file.isEmpty() && lonvalue_2d.isEmpty()) 535 534 { … … 537 536 for (int jdx = 0; jdx < nj; ++jdx) 538 537 for (int idx = 0; idx < ni; ++idx) 539 lonvalue_2d(idx,jdx) = lonvalue_curvilinear_read_from_file(idx, jdx); 540 // lonvalue_2d(idx,jdx) = lonvalue_curvilinear_read_from_file(idx+ibegin, jdx+jbegin); 538 lonvalue_2d(idx,jdx) = lonvalue_curvilinear_read_from_file(idx+ibegin, jdx+jbegin); 541 539 542 540 lonvalue_curvilinear_read_from_file.free(); … … 548 546 for (int jdx = 0; jdx < nj; ++jdx) 549 547 for (int idx = 0; idx < ni; ++idx) 550 latvalue_2d(idx,jdx) = latvalue_curvilinear_read_from_file(idx, jdx); 551 // latvalue_2d(idx,jdx) = latvalue_curvilinear_read_from_file(idx+ibegin, jdx+jbegin); 548 latvalue_2d(idx,jdx) = latvalue_curvilinear_read_from_file(idx+ibegin, jdx+jbegin); 552 549 553 550 latvalue_curvilinear_read_from_file.free(); … … 560 557 for (int idx = 0; idx < ni; ++idx) 561 558 for (int ndx = 0; ndx < nvertex; ++ndx) 562 bounds_lon_2d(ndx,idx,jdx) = bounds_lonvalue_curvilinear_read_from_file(ndx,idx, jdx); 563 // bounds_lon_2d(ndx,idx,jdx) = bounds_lonvalue_curvilinear_read_from_file(ndx,idx+ibegin, jdx+jbegin); 559 bounds_lon_2d(ndx,idx,jdx) = bounds_lonvalue_curvilinear_read_from_file(ndx,idx+ibegin, jdx+jbegin); 564 560 565 561 bounds_lonvalue_curvilinear_read_from_file.free(); … … 572 568 for (int idx = 0; idx < ni; ++idx) 573 569 for (int ndx = 0; ndx < nvertex; ++ndx) 574 bounds_lat_2d(ndx,idx,jdx) = bounds_latvalue_curvilinear_read_from_file(ndx,idx, jdx); 575 // bounds_lat_2d(ndx,idx,jdx) = bounds_latvalue_curvilinear_read_from_file(ndx,idx+ibegin, jdx+jbegin); 570 bounds_lat_2d(ndx,idx,jdx) = bounds_latvalue_curvilinear_read_from_file(ndx,idx+ibegin, jdx+jbegin); 576 571 577 572 bounds_latvalue_curvilinear_read_from_file.free(); … … 589 584 { 590 585 i_index.resize(ni); 591 //for(int idx = 0; idx < ni; ++idx) i_index(idx)=ibegin+idx;586 for(int idx = 0; idx < ni; ++idx) i_index(idx)=ibegin+idx; 592 587 } 593 588 … … 596 591 lonvalue_1d.resize(ni); 597 592 for (int idx = 0; idx < ni; ++idx) 598 // lonvalue_1d(idx) = lonvalue_unstructured_read_from_file(i_index(idx)); 599 lonvalue_1d(idx) = lonvalue_unstructured_read_from_file(idx); 593 lonvalue_1d(idx) = lonvalue_unstructured_read_from_file(i_index(idx)); 600 594 601 595 // We dont need these values anymore, so just delete them … … 607 601 latvalue_1d.resize(ni); 608 602 for (int idx = 0; idx < ni; ++idx) 609 // latvalue_1d(idx) = latvalue_unstructured_read_from_file(i_index(idx)); 610 latvalue_1d(idx) = latvalue_unstructured_read_from_file(idx); 603 latvalue_1d(idx) = latvalue_unstructured_read_from_file(i_index(idx)); 611 604 612 605 // We dont need these values anymore, so just delete them … … 620 613 for (int idx = 0; idx < ni; ++idx) 621 614 for (int jdx = 0; jdx < nbVertex; ++jdx) 622 // bounds_lon_1d(jdx,idx) = bounds_lonvalue_unstructured_read_from_file(jdx, i_index(idx)); 623 bounds_lon_1d(jdx,idx) = bounds_lonvalue_unstructured_read_from_file(jdx, idx); 615 bounds_lon_1d(jdx,idx) = bounds_lonvalue_unstructured_read_from_file(jdx, i_index(idx)); 624 616 625 617 // We dont need these values anymore, so just delete them … … 633 625 for (int idx = 0; idx < ni; ++idx) 634 626 for (int jdx = 0; jdx < nbVertex; ++jdx) 635 // bounds_lat_1d(jdx,idx) = bounds_latvalue_unstructured_read_from_file(jdx, i_index(idx)); 636 bounds_lat_1d(jdx,idx) = bounds_latvalue_unstructured_read_from_file(jdx, idx); 627 bounds_lat_1d(jdx,idx) = bounds_latvalue_unstructured_read_from_file(jdx, i_index(idx)); 637 628 638 629 // We dont need these values anymore, so just delete them
Note: See TracChangeset
for help on using the changeset viewer.