Opened 2 years ago

Closed 22 months ago

#2628 closed enhancement (wontfix)

NEW - wcst_import replaces the existing values in current grid domains with null values before updating

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.1
Component: wcst_import Version: 10.0
Keywords: Cc:
Complexity: Medium

Description

Usecase

The situation below is used typically for weather forecast data.

  • At time t, values t+1 are forecast and imported to rasdaman at some grid domains (e.g. [1,0:300,0:500])
  • At time t+1, values for t+1 are actual recorded and updated to these grid domains (e.g. [1,0:300,0:500])

Requirement:

  • At time t, grid domains for t+1 contain only forecast values
  • At time t+1, grid domains for t+1 must contain only the actual recorded values (no forecast values are left)

Solution:

  • At time t+1, grid domains for t+1 must be swept and filled with null values before the actual pixel values for t+1 imported.

Example

White color are null values.

  • File A imported with some red values as below:

https://i.imgur.com/OQa2yCN.png

  • File B (same grid extents as file B) has some blue values, (NOTE: blue pixels coordinates are not matched with red pixels coordinates above):

https://i.imgur.com/x7QcnRn.png

  • Then, file B is imported. It will end up like below (blue pixel values from file B cannot replaces completely the red ones from file A):

https://i.imgur.com/Rr9XPSp.png

Solution

In wcst_import, there is an optional boolean setting, called replace_imported_pixels.

  • If it is set to True, then, wcst_import sends UpdateCoverage request to petascope with the extra parameter replaceImportedPixels=True.
  • In petascope, it will run two rasql queries:
    • First (NOTE: only run when coverage has null values), update the whole grid domains for the subsets (Lat, Lon, time, height,…) from the UpdateCoverage request with the null values of the updating coverage.
      • NOTE: it uses this rasql trick, e.g. below null value is -9e+33f.
        rasql -q 'update test_weather_netcdf 
        set test_weather_netcdf[0,29,0:656,0:1376]
        assign ((marray x in [0:656,0:1376] values -9e+33f) null values [0f])' --user rasadmin --passwd rasadmin
        
    • After this update command, the grid domains [0,29,0:656,0:1376] only contains null value -9e+33f. Hence, when file B is imported, only the blue pixels will be set.

https://i.imgur.com/x7QcnRn.png

  • Then, update the coverage normally from the input file

Change History (1)

comment:1 by Bang Pham Huu, 22 months ago

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