Changeset 1436
- Timestamp:
- 02/21/18 11:10:56 (6 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/config/scalar_attribute.conf
r1435 r1436 8 8 DECLARE_ATTRIBUTE(double, value) 9 9 DECLARE_ATTRIBUTE(StdString, bounds_name) 10 DECLARE_A TTRIBUTE(double, bounds)10 DECLARE_ARRAY(double, 1 , bounds) 11 11 12 12 DECLARE_ATTRIBUTE(StdString, scalar_ref) -
XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_output.cpp
r1435 r1436 1531 1531 if (!scalar->bounds.isEmpty() && scalar->label.isEmpty()) 1532 1532 { 1533 dims.clear(); 1534 dims.push_back("axis_nbounds"); 1533 1535 boundsId = (scalar->bounds_name.isEmpty()) ? (scalaId + "_bounds") : scalar->bounds_name.getValue(); 1534 SuperClassWriter::addAttribute("bounds_name", boundsId, &scalaId);1535 SuperClassWriter::addDimension(boundsId, 1);1536 1536 SuperClassWriter::addVariable(boundsId, typePrec, dims); 1537 SuperClassWriter::addAttribute("bounds", boundsId, &scalaId); 1537 1538 } 1538 1539 … … 1545 1546 CArray<double,1> scalarValue(scalarSize); 1546 1547 CArray<string,1> scalarLabel(scalarSize); 1548 CArray<double,1> scalarBounds(scalarSize*2); 1547 1549 1548 1550 if (!scalar->value.isEmpty() && scalar->label.isEmpty()) … … 1554 1556 if (!scalar->bounds.isEmpty() && scalar->label.isEmpty()) 1555 1557 { 1556 scalarValue(0) = scalar->bounds; 1557 SuperClassWriter::writeData(scalarValue, boundsId, isCollective, 0); 1558 scalarBounds(0) = scalar->bounds(0); 1559 scalarBounds(1) = scalar->bounds(1); 1560 SuperClassWriter::writeData(scalarBounds, boundsId, isCollective, 0); 1558 1561 } 1559 1562 … … 1572 1575 CArray<double,1> scalarValue(scalarSize); 1573 1576 CArray<string,1> scalarLabel(scalarSize); 1577 CArray<double,1> scalarBounds(scalarSize*2); 1574 1578 1575 1579 std::vector<StdSize> start(1); … … 1584 1588 if (!scalar->bounds.isEmpty() && scalar->label.isEmpty()) 1585 1589 { 1586 scalarValue(0) = scalar->bounds; 1587 SuperClassWriter::writeData(scalarValue, boundsId, isCollective, 0, &start, &count); 1590 scalarBounds(0) = scalar->bounds(0); 1591 scalarBounds(1) = scalar->bounds(1); 1592 count[0] = 2; 1593 SuperClassWriter::writeData(scalarBounds, boundsId, isCollective, 0, &start, &count); 1588 1594 } 1589 1595 if (!scalar->label.isEmpty()) -
XIOS/dev/XIOS_DEV_CMIP6/src/node/scalar.hpp
r1158 r1436 10 10 #include "attribute_enum.hpp" 11 11 #include "attribute_enum_impl.hpp" 12 #include "attribute_array.hpp" 12 13 #include "transformation.hpp" 13 14 #include "transformation_enum.hpp"
Note: See TracChangeset
for help on using the changeset viewer.