Opened 8 years ago

Closed 21 months ago

#1529 closed enhancement (wontfix)

wcst_import pixelIsPoint:true should be applied internally for netCdf and grib files

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: Future
Component: wcst_import Version: development
Keywords: Cc: Vlad Merticariu, Dimitar Misev
Complexity: Easy

Description

With the last change in wcst_import, the only difference between ingredient with pixelIsPoint:true and pixelIsPoint:false (by default) is with pixelIsPoint:false, the regular axes in ingredient file has to add 0.5*resolution for max and subtract 0.5*resolution for min.

I don't think there is a case of using pixelIsPoint:false as it is inconvenience when users have to add these adjustment manually in ingredient file, especially for dateTime axis, e.g:

ansi": {
              "min": "${netcdf:variable:time:min} * 3600 - 62135596800.0 - 0.020833333333333332 * 3600",
              "max": "${netcdf:variable:time:max} * 3600 - 62135596800.0 + 0.020833333333333332 * 3600",
              "resolution": 0.041666666666666664,
              "gridOrder": 0
            },
            "Long": {
              "min": "30 - 0.1 / 2",
              "max": "30.1 + 0.1 / 2",
              "gridOrder": 2,
              "resolution":"0.1"
            },

and with pixelIsPoint:true, just specify the min, max of regular axes, e.g:

  "Long": {
              "min": "${grib:longitudeOfFirstGridPointInDegrees}",
              "max": "${grib:longitudeOfLastGridPointInDegrees}",
              "gridOrder": 1,
              "resolution": "${grib:iDirectionIncrementInDegrees}"
            },

So I'd suggest, the pixelIsPoint should be applied by default for netCdf and Grib. This of course might be break the ingredients from someone don't know about pixelIsPoint:true, but I think they could be "educated" to use the much easier enhancement.

Change History (13)

comment:1 by Dimitar Misev, 8 years ago

The first example looks pretty ugly, but you don't give how the ansi would look in the second example?

How often would pixelIsPoint: false make sense for netcdf/grib? If it's 0% then I'd vote to make "true" default, otherwise we should think about it (perhaps "educating" these users to use pixelIsPoint:true would also work).

comment:2 by Bang Pham Huu, 8 years ago

for the second one with pixelIsPoint:true, dateTime axis only needs as it converts hour to seconds and the origin is 0001/01/01

"${netcdf:variable:time:min} * 3600 - 62135596800.0

I don't see any cases which pixelIsPoint:false is used and I think users don't want to do the +.- resolution for regular axes manually either.

Last edited 8 years ago by Bang Pham Huu (previous) (diff)

comment:3 by Dimitar Misev, 8 years ago

what about non-netcdf/grib files like tiff?

in reply to:  3 comment:4 by Bang Pham Huu, 8 years ago

Replying to dmisev:

what about non-netcdf/grib files like tiff?

these files are not considered with pixelIsPoint.

comment:5 by Dimitar Misev, 8 years ago

ok then I don't understand, why is pixelIsPoint: false default if it's never used? This doesn't make sense.

in reply to:  5 comment:6 by Bang Pham Huu, 8 years ago

Replying to dmisev:

ok then I don't understand, why is pixelIsPoint: false default if it's never used? This doesn't make sense.

It is used by default for netcdf, grib, then Vlad created this adjustment and pixelIsPoint option was added. So these ingredients files should use pixelIsPoint:true in general.

This was a backwards compatibility, but I think now the default behavior (pixelIsPoint: false) is deprecated and no one will use it.

comment:7 by Vlad Merticariu, 8 years ago

pixelIsPoint: false is almost always the case for GeoTiffs. Same for non-cf compliant netcdfs.

The reason for which you always see pixelIsPoint: true is that our partners use cf-compliant netcdfs. Other netcdfs might not repsect this property.

So:

  1. Removing completely pixelIsPoint, and always considering it true for netcdf and grib is not an option: there are netcdfs where this doesn't hold.
  2. Changing the default is an option. Right now the default is false, we could change it to true in v10 as it would be a breaking change.

comment:8 by Bang Pham Huu, 8 years ago

Milestone: 9.410.0

ok, 2 is fine, it is better than need to remember this option by default.

comment:9 by Dimitar Misev, 6 years ago

Summary: wcst_import pixelIsPoint:true should be applied internally for netCdf, gribb filewcst_import pixelIsPoint:true should be applied internally for netCdf and grib files

comment:10 by Dimitar Misev, 6 years ago

To whom should this ticket be assigned?

comment:11 by Vlad Merticariu, 5 years ago

Owner: set to Bang Pham Huu
Status: newassigned

comment:12 by Dimitar Misev, 5 years ago

Milestone: 10.0Future

comment:13 by Bang Pham Huu, 21 months ago

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.