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

Sectors & regions disagree when summed. #20

Open
mankoff opened this issue Nov 10, 2021 · 1 comment
Open

Sectors & regions disagree when summed. #20

mankoff opened this issue Nov 10, 2021 · 1 comment

Comments

@mankoff
Copy link
Member

mankoff commented Nov 10, 2021

Exhibits in v90 (and earlier).

wget 'https://dataverse01.geus.dk/api/access/datafile/:persistentId?persistentId=doi:10.22008/FK2/OHI23Z/LOC1JC' -O ~/tmp/MB_region.nc
wget 'https://dataverse01.geus.dk/api/access/datafile/:persistentId?persistentId=doi:10.22008/FK2/OHI23Z/ZRDZLS' -O ~/tmp/MB_sector.nc
import xarray as xr
r = xr.open_dataset('~/tmp/MB_region.nc')
s = xr.open_dataset('~/tmp/MB_sector.nc')

# print('Scale of raw data: ', r.sum(dim='region').sum())

print('\n\nDiff:')
print((r.sum(dim='region') - s.sum(dim='sector')).sum())
Diff:
<xarray.Dataset>
Dimensions:      ()
Data variables:
    MB           float32 0.0
    MB_err       float32 0.0
    MB_ROI       float32 -41.11
    MB_ROI_err   float32 -85.06
    SMB          float32 0.0
    SMB_err      float32 0.0
    SMB_ROI      float32 -2.582e-05
    SMB_ROI_err  float32 -2.526e-06
    D            float32 0.0
    D_err        float32 0.0
    D_ROI        float32 0.000224
    D_ROI_err    float32 -2.205e-06
    BMB          float32 0.0
    BMB_err      float32 0.0
    BMB_ROI      float32 9.164e-07
    BMB_ROI_err  float32 -3.067
    MB_HIRHAM    float32 -223.3
    MB_MAR       float32 116.8
    MB_RACMO     float32 -6.387
@mankoff
Copy link
Member Author

mankoff commented Nov 12, 2021

Cause: Splitting into different products (sectors, regions) and then performing operations (such as interpolation) leads to diverging products.

Solution: Operate on highest resolution product (e.g. discharge at gate level), then split into sectors and regions.

Note that sectors here are Zwally (2012) sectors. Sectors in the discharge product are Mouginot (2019) sectors.

mankoff added a commit that referenced this issue Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant