[netcdf-java] RunTime coordinate axis

Dear John,

(I'm using the netcdf-java 4.3.15)
As you can see in the attached ncml,I'm defining a RunTime dimension in the Total_precipitation_surface inner than the time dimension. I'm doing this because I need to do the outer aggregation for the forecast time dimension. Also the time variable is been aggregated.

The problem is that the Total_precipitation_surface variable it's no been recognized as a Grid data type. If I permute dimensions on the time variable then the variable is recognized as Grid datatype.

This is right? or I'm forced to define as first dimension the RunTime axis on the time 2D coordinated axis?

Looking at:
ucar.nc2.dt.grid.GridCoordSys.isGridCoordSys(Formatter, CoordinateSystem, VariableEnhanced)

which it appears to be the responsible for deciding if a Variable is a Grid datatype

It appears that it could be easily fixed if we modified this part:
      if (!rt1D.getDimension(0).equals(t.getDimension(0))) {
        if (sbuff != null) {
sbuff.format("%s: Time axis must use RunTime dimension%n", cs.getName());
        }
        return false;
      }

coding also the check for the 2nd dimension:
if (!rt1D.getDimension(0).equals(t.getDimension(0)) && !rt1D.getDimension(0).equals(t.getDimension(1))) {
        if (sbuff != null) {
sbuff.format("%s: Time axis must use RunTime dimension%n", cs.getName());
        }
        return false;
      }

It's correct?

Antonio


--
--
Antonio S. Cofiño
Grupo de Meteorología de Santander
Dep. de Matemática Aplicada y
        Ciencias de la Computación
Universidad de Cantabria
http://www.meteo.unican.es

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
  <dimension name="run" length="360" />
  <dimension name="lat" length="241" />
  <dimension name="lon" length="480" />
  <dimension name="time" length="215" />
  <attribute name="Conventions" value="CF-1.4, _Coordinates" />
  <attribute name="history" value="Read using CDM IOSP Grib1Collection 
;&#xA;FMRC 2D Dataset" />
  <attribute name="featureType" value="GRID" />
  <attribute name="file_format" value="GRIB-1" />
  <attribute name="_CoordSysBuilder" 
value="ucar.nc2.dataset.conv.CF1Convention" />
  <attribute name="cdm_data_type" value="GRID" />
  <variable name="Total_precipitation_surface" shape="time run lat lon" 
type="float">
    <attribute name="units" value="m" />
    <attribute name="long_name" value="Total precipitation @ Ground or water 
surface" />
    <attribute name="missing_value" type="float" value="NaN" />
    <attribute name="grid_mapping" value="LatLon_Projection" />
    <attribute name="coordinates" value="run time lat lon " />
  </variable>
  <variable name="time" shape="run time" type="double">
    <attribute name="long_name" value="Forecast time for 
ForecastModelRunCollection" />
    <attribute name="standard_name" value="time" />
    <attribute name="units" value="hours since 1981-01-01T00:00:00Z" />
    <attribute name="missing_value" type="double" value="NaN" />
    <attribute name="_CoordinateAxisType" value="Time" />
  </variable>
  <variable name="lat" shape="lat" type="float">
    <attribute name="units" value="degrees_north" />
    <attribute name="long_name" value="" />
    <attribute name="_CoordinateAxisType" value="Lat" />
    <attribute name="standard_name" value="latitude" />
  </variable>
  <variable name="lon" shape="lon" type="float">
    <attribute name="units" value="degrees_east" />
    <attribute name="long_name" value="" />
    <attribute name="_CoordinateAxisType" value="Lon" />
    <attribute name="standard_name" value="longitude" />
  </variable>
  <variable name="run" shape="run" type="double">
    <attribute name="long_name" value="Run time for ForecastModelRunCollection" 
/>
    <attribute name="standard_name" value="forecast_reference_time" />
    <attribute name="units" value="hours since 1981-01-01T00:00:00Z" />
    <attribute name="_CoordinateAxisType" value="RunTime" />
  </variable>
  </netcdf>

  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: