Opened 12 days ago

Last modified 12 days ago

#1536 new defect

WCST_Import netCDF regular axis's resolution is calculated internally

Reported by: bphamhuu Owned by: bphamhuu
Priority: major Milestone: 9.4
Component: wcst_import Version: development
Keywords: Cc: dmisev, vmerticariu
Complexity: Medium

Description (last modified by bphamhuu)

Current, in ingredient file of General Coverage, regular axes need to put the resolution which is needed to calculate by user, especially for netCdf, Grib which does not have the offset vector attribute.

It could be changed to calculate the resolution for regular axis by min and max internally.
e.g:

                        "Long": {
                            "min": "${netcdf:variable:lon:min}",
                            "max": "${netcdf:variable:lon:max}",
                        "resolution": "${netcdf:variable:lon:resolution}",
                            "gridOrder": 2
                        },

and the resolution be calculated from the geo bound: min, max and totalnumber of grid pixels internally by the average of the distance between all geo coordinates (e.g: point0 - point1, point1 - point2,....pointn).

For GDAL recipe and Gribb, they already had the supporting variables to extract from the file natively

GDAL: "resolution": "${gdal:resolutionX}"
GRIB: "resolution": "-${grib:jDirectionIncrementInDegrees}"

Use case: don't need to update the ingredient file (ideally) for most cases and have to calculate the resolution.

Change History (7)

comment:1 Changed 12 days ago by bphamhuu

actually, the resolution must need to be specified and bound to a dimension of file, so the ingredient should be

                        "Long": {
                            "min": "${netcdf:variable:lon:min}",
                            "max": "${netcdf:variable:lon:max}",
                            "gridOrder": 2,
                            "resolution": "${netcdf:variable:lon:resolution}"
                        }

comment:2 follow-up: Changed 12 days ago by dmisev

why?

comment:3 in reply to: ↑ 2 Changed 12 days ago by bphamhuu

Replying to dmisev:

why?

because you don't know "Long" axis here is bound to any dimension.

comment:4 follow-up: Changed 12 days ago by dmisev

So binding is done by netcdf:variable:lon? Ok.

Last edited 12 days ago by dmisev (previous) (diff)

comment:5 in reply to: ↑ 4 Changed 12 days ago by bphamhuu

Replying to dmisev:

So binding is done by netcdf:variable:lon? Ok.

what do you mean? it is best to let the evaluator evaluate the expression and it needs to know what dimension is used.

comment:6 Changed 12 days ago by dmisev

Perhaps this is a better design:

"Long": {
    "dimension": "${netcdf:variable:lon}",
    "min": "${min}",
    "max": "100.5",
    "gridOrder": 2
}

But anyway, let's not complicate by simplifying.

comment:7 Changed 12 days ago by bphamhuu

  • Description modified (diff)
  • Summary changed from WCST_Import regular axis's resolution is optional to WCST_Import netCDF regular axis's resolution is calculated internally
Note: See TracTickets for help on using tickets.