Changeset 1266


Ignore:
Timestamp:
09/15/17 14:37:50 (3 years ago)
Author:
ymipsl
Message:

Add new axis attribute : formula, formula_term, formula_bounds, formula_term_bounds (string). It will be written as metadata in netcdf file.

YM

Location:
XIOS/dev/XIOS_DEV_CMIP6/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/config/axis_attribute.conf

    r1158 r1266  
    44 
    55DECLARE_ATTRIBUTE(StdString, unit) 
     6DECLARE_ATTRIBUTE(StdString, formula) 
     7DECLARE_ATTRIBUTE(StdString, formula_term) 
     8DECLARE_ATTRIBUTE(StdString, formula_bounds) 
     9DECLARE_ATTRIBUTE(StdString, formula_term_bounds) 
    610 
    711DECLARE_ATTRIBUTE(int,       n_glo) 
  • XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_output.cpp

    r1249 r1266  
    11891189            } 
    11901190 
     1191            if (!axis->formula.isEmpty()) 
     1192              SuperClassWriter::addAttribute("formula", axis->formula.getValue(), &axisid); 
     1193 
     1194            if (!axis->formula_term.isEmpty()) 
     1195              SuperClassWriter::addAttribute("formula_term", axis->formula_term.getValue(), &axisid); 
     1196               
    11911197            StdString axisBoundsId = axisid + "_bounds"; 
    11921198            if (!axis->bounds.isEmpty() && axis->label.isEmpty()) 
     
    11951201              SuperClassWriter::addVariable(axisBoundsId, typePrec, dims); 
    11961202              SuperClassWriter::addAttribute("bounds", axisBoundsId, &axisid); 
     1203              if (!axis->formula_bounds.isEmpty()) 
     1204                SuperClassWriter::addAttribute("formula", axis->formula_bounds.getValue(), &axisid); 
     1205 
     1206              if (!axis->formula_term_bounds.isEmpty()) 
     1207                SuperClassWriter::addAttribute("formula_term", axis->formula_bounds.getValue(), &axisid); 
    11971208            } 
    11981209 
     1210               
    11991211            SuperClassWriter::definition_end(); 
    12001212 
Note: See TracChangeset for help on using the changeset viewer.