Opened 4 years ago

Closed 4 years ago

#2356 closed defect (invalid)

Petascope - WCPS encode regular time axis shifted by 6 days with netCDF encoding

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: petascope Version: 9.8
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

To reproduce, import a 3D coverage with time series regular recipe (time axis is regular, resolution is 1 day) in a month (2015-01-01:2015-01-31) from tiff files (each tiff is a day):

{
  "config": {
    "service_url": "http://localhost:8082/rasdaman/ows",
    "default_crs": "http://abc.secore.net/def/crs/EPSG/0/4326",
    "automated": true,
    "track_files": false
  },
  "input": {
    "coverage_id": "test_encode_netcdf_daily_regular",
    "paths": [
      "SCALED*.TIFF"
    ]
  },
  "recipe": {
    "name": "time_series_regular",
    "options": {
      "time_start": "2015-01-01",
      "time_format": "auto",
      "time_crs": "http://localhost:8080/def/crs/OGC/0/AnsiDate",
      "time_step": "1 days",
      "tiling": "ALIGNED [0:0, 0:999, 0:999]"
    }
  }
}

Then run this WCPS query:

for $c in (test_encode_netcdf_daily_regular) 

return encode ( scale($c[ ansi("2015-01-06T00:00:00.000Z":"2015-01-30T00:00:00.000Z")] ,
{ansi("2015-01-06T00:00:00.000Z":"2015-01-08T00:00:00.000Z"), Lat(-90:90), Long(-180:130)}), "netcdf")

The output of netCDF with lower bound for time axis is shifted by 6 days (not according to the value for "2015-01-06T00:00:00.000Z")

Change History (2)

comment:1 by Bang Pham Huu, 4 years ago

This happens due to the fact, in petascope, it shifts by half grid pixel for netCDF encoding. After scaling, time axis's resolution changed to 12 (geo bounds don't change, grid bounds changed).

"2015-01-06T00:00:00.000Z" + 12 / 2 = shifted by 6 days

@Vlad: what is your opinion for this case?

comment:2 by Bang Pham Huu, 4 years ago

Resolution: invalid
Status: assignedclosed

The problem was about the fact "pixelIsPoint" (middle of pixel) in netCDF.

Note: See TracTickets for help on using tickets.