Opened 2 months ago

Last modified 2 months ago

#1529 new enhancement

wcst_import pixelIsPoint:true should be applied internally for netCdf, gribb file

Reported by: bphamhuu Owned by:
Priority: major Milestone: 10.0
Component: wcst_import Version: development
Keywords: Cc: vmerticariu, dmisev
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 (8)

comment:1 Changed 2 months ago by dmisev

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 Changed 2 months ago by bphamhuu

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 2 months ago by bphamhuu (previous) (diff)

comment:3 follow-up: Changed 2 months ago by dmisev

what about non-netcdf/grib files like tiff?

comment:4 in reply to: ↑ 3 Changed 2 months ago by bphamhuu

Replying to dmisev:

what about non-netcdf/grib files like tiff?

these files are not considered with pixelIsPoint.

comment:5 follow-up: Changed 2 months ago by dmisev

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

comment:6 in reply to: ↑ 5 Changed 2 months ago by bphamhuu

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 Changed 2 months ago by vmerticariu

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 Changed 2 months ago by bphamhuu

  • Milestone changed from 9.4 to 10.0

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

Note: See TracTickets for help on using tickets.