Re: [netcdf-java] RunTime coordinate axis

On 3/2/2013 2:44 PM, "Antonio S. Cofiño" wrote:
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



Hi Antonio:

A Grib collection should do the correct thing, so im confused as to how this dataset was generated. You are using Grib Collection or FMRC?

John



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