Ticket #147: freq_offset.patch

File freq_offset.patch, 841 bytes (added by mdunphy, 2 years ago)

Patch to add freq_offset to netcdf variable attributes

  • src/io/nc4_data_output.cpp

    diff --git a/src/io/nc4_data_output.cpp b/src/io/nc4_data_output.cpp
    index 0b29a20..71754ac 100755
    a b namespace xios 
    21182118              freqOut.solveTimeStep(*context->calendar); 
    21192119              SuperClassWriter::addAttribute("interval_write", freqOut.toStringUDUnits(), &fieldid); 
    21202120 
     2121              CDuration freqOffset = field->freq_offset.getValue(); 
     2122              freqOffset.solveTimeStep(*context->calendar); 
     2123              SuperClassWriter::addAttribute("freq_offset", freqOffset.toStringUDUnits(), &fieldid); 
     2124 
    21212125              StdString cellMethods(cellMethodsPrefix + "time: "); 
    21222126              if (field->operation.getValue() == "instant") cellMethods += "point"; 
    21232127              else if (field->operation.getValue() == "average") cellMethods += "mean";