Changeset 1014 for XIOS/trunk/src/transformation
- Timestamp:
- 01/04/17 17:09:50 (8 years ago)
- Location:
- XIOS/trunk/src/transformation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/domain_algorithm_interpolate.cpp
r1004 r1014 681 681 const StdSize size) 682 682 { 683 CONetCDF4::addDimension(name, size);683 return CONetCDF4::addDimension(name, size); 684 684 } 685 685 … … 687 687 const std::vector<StdString>& dim) 688 688 { 689 CONetCDF4::addVariable(name, type, dim); 689 return CONetCDF4::addVariable(name, type, dim); 690 } 691 692 void CDomainAlgorithmInterpolate::WriteNetCdf::endDefinition() 693 { 694 CONetCDF4::definition_end(); 690 695 } 691 696 … … 751 756 MPI_Scan(&localNbWeight, &startIndex, 1, MPI_LONG, MPI_SUM, client->intraComm); 752 757 758 if (0 == globalNbWeight) 759 { 760 info << "There is no interpolation weights calculated between " 761 << "domain source: " << domainSrc_->getDomainOutputName() 762 << " and domain destination: " << domainDest_->getDomainOutputName() 763 << std::endl; 764 return; 765 } 766 753 767 std::vector<StdSize> start(1, startIndex - localNbWeight); 754 768 std::vector<StdSize> count(1, localNbWeight); 755 756 WriteNetCdf netCdfWriter(filename, client->intraComm); 757 758 // netCdfWriter = CONetCDF4(filename, false, false, true, client->intraComm, false); 769 770 WriteNetCdf netCdfWriter(filename, client->intraComm); 759 771 760 772 // Define some dimensions … … 770 782 netCdfWriter.addVariableWrite("weight", NC_DOUBLE, dims); 771 783 784 // End of definition 785 netCdfWriter.endDefinition(); 786 772 787 // // Write variables 773 netCdfWriter.writeDataIndex(src_idx, "src_idx", true, 0, &start, &count); 774 netCdfWriter.writeDataIndex(dst_idx, "dst_idx", true, 0, &start, &count); 775 netCdfWriter.writeDataIndex(weights, "weight", true, 0, &start, &count); 788 if (0 != localNbWeight) 789 { 790 netCdfWriter.writeDataIndex(src_idx, "src_idx", false, 0, &start, &count); 791 netCdfWriter.writeDataIndex(dst_idx, "dst_idx", false, 0, &start, &count); 792 netCdfWriter.writeDataIndex(weights, "weight", false, 0, &start, &count); 793 } 776 794 777 795 netCdfWriter.closeFile(); -
XIOS/trunk/src/transformation/domain_algorithm_interpolate.hpp
r1004 r1014 59 59 int addVariableWrite(const StdString& name, nc_type type, 60 60 const std::vector<StdString>& dim); 61 void endDefinition(); 61 62 void writeDataIndex(const CArray<int,1>& data, const StdString& name, 62 63 bool collective, StdSize record,
Note: See TracChangeset
for help on using the changeset viewer.