Greenland meltwater profiles from
- Paper: Slater (2022) http://doi.org/10.1038/s41561-022-01035-9
- Code (original): https://github.com/donaldaslater/fjords_GRL_2022/ or https://zenodo.org/doi/10.5281/zenodo.6498179
- Data: https://zenodo.org/doi/10.5281/zenodo.6498179
ncdump -h ./dat/GL_discharge.nc
netcdf GL_discharge { dimensions: time = 185 ; region = 7 ; variables: float discharge(time, region) ; discharge:_FillValue = NaNf ; discharge:long_name = "Marine discharge. Includes both calving and submarine melt. Some calvinvg is equivalent to submarine melt if using at fjord mouth" ; discharge:standard_name = "land_ice_mass_tranport" ; discharge:units = "Gt yr-1" ; float err(time, region) ; err:_FillValue = NaNf ; err:long_name = "Marine mass balance uncertainty" ; err:standard_name = "land_ice_mass_tranport" ; err:units = "Gt yr-1" ; string region(region) ; region:long_name = "Mouginot 2019 regions" ; int64 time(time) ; time:units = "days since 1840-01-01 00:00:00" ; time:calendar = "proleptic_gregorian" ; // global attributes: :featureType = "timeSeries" ; :title = "Greenland ice sheet mass balance from 1840 through next week" ; :summary = "Greenland ice sheet mass balance from 1840 through next week" ; :keywords = "Greenland; Mass; Mass balance" ; :source = "git commit: 20af941" ; :creator_name = "Ken Mankoff" ; :creator_email = "kdm@geus.dk" ; :creator_url = "http://kenmankoff.com" ; :institution = "GEUS" ; :references = "10.22008/promice/mass_balance" ; :product_version = 1. ; :DOI = "https://doi.org/10.5281/zenodo.14020895" ; }
import xarray as xr
import matplotlib.pyplot as plt
ds = xr.open_dataset('dat/GL_discharge.nc').load()
df = ds['discharge'].to_dataframe()
ax = df['discharge'].unstack().plot(drawstyle='steps-post')
_ = ax.set_ylabel('Discharge [Gt yr$^{-1}$]')
mkdir -p slater_2022
pushd slater_2022
zenodo_get https://zenodo.org/records/6498180
unzip -d . fjords_GRL_2022-v1.zip
pushd donaldaslater-fjords_GRL_2022-877eee7
popd
- Annual discharge
- Group by ROI
import xarray as xr
ds = xr.open_dataset('./tmp/greenland_discharge/MB_region.nc')
# Limit to discharge
ds = ds[['D_ROI','D_ROI_err']]
# Drop partial years
this_yr = ds['time'].to_series().iloc[-1].year
ds = ds.sel({'time':slice('1800',str(this_yr))})
# Resample by year
ds = ds.resample({'time':'YS'}).sum()
# Prior to 1986 there is no regional resolution, just one value for all of Greenland.
for r in ds['region']:
# Set regional values to the average of the first 5 years when there is regional resolution
ds['D_ROI'].sel({'region':r}).loc[{'time': slice('1840-01-01','1985-12-31')}] = \
ds['D_ROI'].sel({'region':r}).loc[{'time': slice('1986-01-01','1990-12-31')}].mean()
# Set regional uncertainty to the full range of observed values
errmax = ds['D_ROI'].sel({'region':r, 'time':slice('1986-01-01','1999-12-31')}).max()
errmin = ds['D_ROI'].sel({'region':r, 'time':slice('1986-01-01','1999-12-31')}).min()
ds['D_ROI_err'].sel({'region':r}).loc[{'time': slice('1840-01-01','1985-12-31')}] = (errmax-errmin)
ds = ds.rename({'D_ROI':'discharge','D_ROI_err':'err'})
ds['discharge'].attrs['units'] = 'Gt yr-1'
ds['err'].attrs['units'] = 'Gt yr-1'
ds['discharge'].attrs['long_name'] = 'Marine discharge. Includes both calving and submarine melt. Some calvinvg is equivalent to submarine melt if using at fjord mouth'
ds.attrs['DOI'] = 'https://doi.org/10.5281/zenodo.14020895'
!rm './dat/GL_discharge.nc'
ds.to_netcdf('./dat/GL_discharge.nc')
print(ds)
<xarray.Dataset> Size: 12kB Dimensions: (time: 185, region: 7) Coordinates: * region (region) <U2 56B 'NE' 'CE' 'SE' 'SW' 'CW' 'NW' 'NO' * time (time) datetime64[ns] 1kB 1840-01-01 1841-01-01 ... 2024-01-01 Data variables: discharge (time, region) float32 5kB 22.37 71.81 136.6 ... 46.07 10.38 err (time, region) float32 5kB 3.992 11.53 17.82 ... 9.919 1.912 Attributes: featureType: timeSeries title: Greenland ice sheet mass balance from 1840 through next... summary: Greenland ice sheet mass balance from 1840 through next... keywords: Greenland; Mass; Mass balance source: git commit: 20af941 creator_name: Ken Mankoff creator_email: kdm@geus.dk creator_url: http://kenmankoff.com institution: GEUS references: 10.22008/promice/mass_balance product_version: 1.0 DOI: https://doi.org/10.5281/zenodo.14020895