Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproject retruns NaN band values #516

Open
korvinos opened this issue Mar 11, 2022 · 0 comments
Open

Reproject retruns NaN band values #516

korvinos opened this issue Mar 11, 2022 · 0 comments

Comments

@korvinos
Copy link
Member

Description

Given two grids (A and B) defined in the lat and long coordinates and covering the same area in the Southern hemisphere:

  • Grid A is from a Sentinel-1 IW subswath (i.e., a small grid with a higher resolution that is rotated with respect to the true North). This grid covers an area within grid B.
  • Grid B is from a CMEMS product (i.e., bigger grid with a lower resolution that is regular with respect to true north)

Based on these two grids I created two Nansat objects (a_nsat, b_nsat) that were filled with some bands.
The goal is to reproject data from grid B to grid A.

In [105]: a_nsat
Out[105]: 
----------------------------------------
None----------------------------------------
Mapper: NoneBand : 1 lon
  dataType: 6
  name: lon
  SourceBand: 1
  SourceFilename: /vsimem/OFV4Z0QFQK.vrt
Band : 2 lat
  dataType: 6
  name: lat
  SourceBand: 1
  SourceFilename: /vsimem/2KXNJ2492Q.vrt
----------------------------------------
Domain:[110 x 233]
----------------------------------------
Projection(gcps):
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
----------------------------------------
Corners (lon, lat):
         ( 29.03, -35.67)  ( 30.03, -35.44)
         ( 28.43, -33.84)  ( 29.41, -33.61)
In [106]: b_nsat
Out[106]: 
----------------------------------------
None----------------------------------------
Mapper: NoneBand : 1 lon
  dataType: 6
  name: lon
  SourceBand: 1
  SourceFilename: /vsimem/71ODHPD5K5.vrt
Band : 2 lat
  dataType: 6
  name: lat
  SourceBand: 1
  SourceFilename: /vsimem/ALHWP9SL39.vrt
----------------------------------------
Domain:[180 x 81]
----------------------------------------
Projection(gcps):
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433]]
----------------------------------------
Corners (lon, lat):
         (  0.12, -44.87)  ( 45.12, -44.87)
         (  0.12, -24.62)  ( 45.12, -24.62)

Problem

b_nsat.reproject(a_nsat) returns NaN values for all bands in the b_nsat

Data

Lon and Lat values for both A and B grids can be accessed here https://nerscno-my.sharepoint.com/:f:/g/personal/artem_moiseev_nersc_no/EqfrdIFkqodOky_qgTfcHIIBvvq98tcagI0jTyquXdnL7Q?e=UeXiY9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant