Opened 8 years ago

Closed 8 years ago

#1536 closed defect (fixed)

WCST_Import netCDF regular axis's resolution is calculated internally

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

Description (last modified by Bang Pham Huu)

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 (8)

comment:1 by Bang Pham Huu, 8 years ago

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 by Dimitar Misev, 8 years ago

why?

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

Replying to dmisev:

why?

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

comment:4 by Dimitar Misev, 8 years ago

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

Version 0, edited 8 years ago by Dimitar Misev (next)

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

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 by Dimitar Misev, 8 years ago

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 by Bang Pham Huu, 8 years ago

Description: modified (diff)
Summary: WCST_Import regular axis's resolution is optionalWCST_Import netCDF regular axis's resolution is calculated internally

comment:8 by Bang Pham Huu, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.