- Introduction
- Greenland
- Mankoff 2021
- Most of the anomaly is SMB
- Fetch historical observations
- Compare Mankoff 2021 & Slater 2021
- Greenlandic Peripheral glaciers
- Greenlandic icebergs vs. (runoff & submarine melt)
- [[#greenland-mass-loss-by-roi-gt-yr-1][Greenland mass loss by ROI [Gt yr-1]]]
- Greenland mass loss by ROI
- Greenland mass balance (annual)
- Greenland mass balance (monthly)
- Comments on previous slide
- [[#stream-discharge-baseline-gtmonth-1960–1989][Stream discharge: baseline [Gt/month] (1960–1989)]]
- [[#stream-discharge-anomaly-gtmonth-1990–2019-base][Stream discharge: anomaly [Gt/month] ((1990–2019)-base)]]
- [[#stream-discharge-anomaly–anom—basebase][Stream discharge: anomaly[(anom - base)/base]]]
- Summary
- Output
- Output only positive values: notes
- Output only positive values: results
- Antarctica
- Freshwater distribution mask
- Summary
- Appendix
- LaTeX Header
- Local Variables
This workbook computes freshwater anomaly from Greenland and Antarctica for the NASA GISS ModelE.
- Anomaly is defined as mass loss since 1990
- Spatially, ModelE distributes a single value according to a ‘distribution field’ - a floating point mask that sums to 1.
- 1 Gt = 1 km3 (freshwater)
- 360 Gt \(≈\) 1 mm SLR
- 1 Sv = 31556 km3 yr-1 (\(∼\) π 104 km3 yr-1)
import xarray as xr
ds = xr.open_dataset('/home/kdm/data/Mankoff_2021/461/MB_region.nc')\
.sum(dim='region')\
.resample({'time':'YS'})\
.sum()['MB']
dd = ds.sel({'time':slice('1990-01-01','1999-12-31')}).mean(dim='time')
print('1990-1999: ', dd.data, dd.data/-362)
dd = ds.sel({'time':slice('1990-01-01','2019-12-31')}).mean(dim='time')
print('1990-2019: ', dd.data, dd.data/-362)
dd = ds.sel({'time':slice('2000-01-01','2019-12-31')}).mean(dim='time')
print('2000-2019: ', dd.data, dd.data/-362)
dd = ds.sel({'time':slice('2010-01-01','2019-12-31')}).mean(dim='time')
print('2010-2019: ', dd.data, dd.data/-362)
dd = ds.sel({'time':slice('2010-01-01','2019-12-31')}).resample({'time':'YS'}).mean()
dd = dd.where((dd.time.dt.year != 2019) & (dd.time.dt.year != 2012)).mean()
print('2010-2019 (excl 2012 & 2019): ', dd.data, dd.data/-362)
- Greenland net ice mass loss citep:mankoff_2021
- \(∼\)160 Gt yr-1 (0.44 mm yr-1) since 1990
- \(∼\)200 Gt yr-1 (0.55 mm yr-1) since 2000
- \(∼\)245 Gt yr-1 (0.68 mm yr-1) since 2010
{{{SKIPLINE}}}
- \(∼\)500 Gt yr-1 is dynamic (outlet glacier discharge; citet:mankoff_2020_solid)
- Distributed \(∼\)50 % ±40 % between submarine melt & icebergs citep:enderlin_2013
- Fairly steady intra- and inter- annual
- \(∼\)300–500 Gt yr-1 is surface melt and runoff citep:mankoff_2017_VHD,mankoff_2020_liquid
- Some surface rivers, most submarine
- Highly seasonal (most in summer)
- Highly variable interannual
{{{SKIPLINE}}}
- From the above, ice sheet mass gain (snowfall) should be \(∼\)600–800 Gt yr-1
- Another \(∼\)120 Gt yr-1 land runoff (rain/snow on non-ice-sheet land) citep:mankoff_2020_liquid
citet:slater_2021 provides global ice mass change. This includes ice shelf mass loss, something not detected by GRACE and excluded from most mass change products. We use citet:slater_2021 in Antarctica.
{{{SKIPLINE}}}
In Greenland, we use citet:mankoff_2021 because it begins earlier, is continually updating, and ice shelf melting and thinning is negligible in Greenland relative to the other freshwater terms.
S2021_kw = {'parse_dates':True, 'index_col':0}
SH_ice = pd.read_csv('~/data/Slater_2021/SH_seaice_cumul_1994_2017_annual.csv', **S2021_kw)\
.rename(columns={"Cumulative mass change (Gt)":"Antarctic Sea Ice"})
NH_ice = pd.read_csv('~/data/Slater_2021/NH_seaice_cumul_1994_2017_annual.csv', **S2021_kw)\
.rename(columns={"Cumulative mass change (Gt)":"Arctic Sea Ice"})
shelf_calving = pd.read_csv('~/data/Slater_2021/iceshelves_calving_cumul_1994_2017_annual.csv', **S2021_kw)\
.rename(columns={"Cumulative mass change (Gt)":"Ice Shelf Calving"})
shelf_thinning = pd.read_csv('~/data/Slater_2021/iceshelves_thinning_cumul_1994_2017_annual.csv', **S2021_kw)\
.rename(columns={"Cumulative mass change (Gt)":"Ice Shelf Thinning"})
AQ = pd.read_csv('~/data/Slater_2021/AIS_cumul_1994_2017_annual.csv', **S2021_kw)\
.rename(columns={"Cumulative mass change (Gt)":"Antarctica"})
GL = pd.read_csv('~/data/Slater_2021/GrIS_cumul_1994_2017_annual.csv', **S2021_kw)\
.rename(columns={"Cumulative mass change (Gt)":"Greenland"})
glacier = pd.read_csv('~/data/Slater_2021/Glacier_cumul_1994_2017_annual.csv', **S2021_kw)\
.rename(columns={"Cumulative mass change (Gt)":"Glaciers"})
S2021_kw = {'left_index':True, 'right_index':True, 'how':'outer'}
S2021 = SH_ice.merge(NH_ice, **S2021_kw)\
.merge(shelf_calving, **S2021_kw)\
.merge(shelf_thinning, **S2021_kw)\
.merge(AQ, **S2021_kw)\
.merge(GL, **S2021_kw)\
.merge(glacier, **S2021_kw)
S2021.index.name = 'Date'
- Although citet:slater_2021 provide global ice mass change, the data is only from 1994 through 2017
- We will use other products with longer records where possible, but use citet:slater_2021 for QC
- We will extrapolate citet:slater_2021 forward and backward if no other product exists
- i.e., Antarctic ice shelves
citet:mankoff_2021 provide main ice sheet mass loss from 1840 through next week.
{{{SKIPLINE}}}
- Paper: https://doi.org/10.5194/essd-13-5001-2021
- Data: https://doi.org/10.22008/FK2/OHI23Z v439
citet:mankoff_2021
mkdir input
wget -nc https://dataverse.geus.dk/api/access/datafile/:persistentId?persistentId=doi:10.22008/FK2/OHI23Z/NBMCEK -O ./input/mankoff_2021.csv
wget -nc https://dataverse.geus.dk/api/access/datafile/:persistentId?persistentId=doi:10.22008/FK2/OHI23Z/XQHQOB -O ./input/mankoff_2021.nc
- Upper panel: annual change (and difference between two products [dashed gray])
- Lower panel: cumulative
- Need to determine where Greenlandic peripheral glaciers are in the citet:slater_2021 data
- [ ] Greenland?
- [ ] Glaciers?
- Presumably they’re included in the Greenland ice mass, because citet:slater_2021 uses GRACE, which cannot distinguish main ice from peripheral
- citet:mankoff_2021 do not include peripheral glaciers, but can via a scaling factor
- Note on previous slide - differences due to peripheral glacier treatment not detectable
- Surface melt and submarine melt should be introduced at the coast
- Icebergs may melt farther away
- However, icebergs in Greenland generally do not travel far
- https://sentinel.esa.int/web/success-stories/-/greenland-iceberg-chart
- http://polarportal.dk/en/sea-ice-and-icebergs/icebergs/
#+RESULTS[(2023-02-21 12:13:20) 3fac654a4b73926e98be6a010a19f62289822a8c]: mb_roi
region | Mass |
---|---|
NE | 24.8409 |
CE | 3.15127 |
SE | 11.7459 |
SW | 23.1003 |
CW | 50.554 |
NW | 60.4492 |
NO | 36.0279 |
#+RESULTS[(2023-01-27 07:27:02) 67c3d0752fd16cd80ef00bbf168408a6e595a5b9]: iceberg_roi
region | Discharge |
---|---|
CE | 74.5944 |
CW | 79.8808 |
NE | 25.0692 |
NO | 24.1457 |
NW | 99.2541 |
SE | 148.667 |
SW | 20.5418 |
#+RESULTS[(2023-01-27 07:27:27) af0b8342115f1512478aac53eac87a5db1f49271]: stream_roi
region | Runoff |
---|---|
CE | 56.8306 |
CW | 43.505 |
NE | 49.1332 |
NO | 40.4823 |
NW | 50.519 |
SE | 74.169 |
SW | 118.234 |
region | Mass | Discharge | Runoff |
---|---|---|---|
NE | 25 | 25 | 49 |
CE | 1 | 75 | 57 |
SE | 11 | 149 | 74 |
SW | 23 | 21 | 118 |
CW | 50 | 80 | 44 |
NW | 60 | 99 | 51 |
NO | 36 | 24 | 40 |
TOTAL | 206 | 472 | 433 |
- Recall: \(∼\)50 % discharge is submarine melt (runoff)
- Distance from coast is all \(∼\)0 (from previous slide)
region | Mass | Discharge | Runoff |
---|---|---|---|
CE | 1 | 16 | 13 |
CW | 24 | 17 | 10 |
NE | 12 | 5 | 11 |
NO | 17 | 5 | 9 |
NW | 29 | 21 | 12 |
SE | 5 | 31 | 17 |
SW | 11 | 4 | 27 |
TOTAL | 99 | 99 | 99 |
time | MB |
---|---|
1990 | -137.596 |
1991 | -76.7293 |
1992 | 87.1372 |
1993 | -90.7483 |
1994 | -113.819 |
1995 | -211.913 |
1996 | 132.208 |
1997 | 7.60407 |
1998 | -241.779 |
1999 | -47.0087 |
2000 | -77.1367 |
2001 | -26.1103 |
2002 | -142.517 |
2003 | -167.223 |
2004 | -165.81 |
2005 | -168.432 |
2006 | -239.821 |
2007 | -257.306 |
2008 | -201.225 |
2009 | -242.975 |
2010 | -376.771 |
2011 | -336.25 |
2012 | -429.338 |
2013 | -107.915 |
2014 | -184.639 |
2015 | -213.906 |
2016 | -255.964 |
2017 | -102.566 |
2018 | -75.8065 |
2019 | -425.994 |
2020 | -188.184 |
2021 | -211.337 |
2022 | -65.4334 |
2023 | 9.32125 |
MB | |
---|---|
1990-01 | 4.72 |
1990-02 | -5.66418 |
1990-03 | -6.43677 |
1990-04 | 4.86196 |
1990-05 | 20.2296 |
1990-06 | -78.8659 |
1990-07 | -155.311 |
1990-08 | -70.179 |
1990-09 | 28.6134 |
1990-10 | 29.0614 |
1990-11 | 45.0175 |
1990-12 | 46.3573 |
1991-01 | 30.9776 |
1991-02 | 37.0555 |
1991-03 | 8.78264 |
1991-04 | -10.715 |
1991-05 | 30.2405 |
1991-06 | -70.9794 |
1991-07 | -170.2 |
1991-08 | -41.12 |
1991-09 | 9.11271 |
1991-10 | 50.9149 |
1991-11 | 6.70501 |
1991-12 | 42.4959 |
1992-01 | 44.4852 |
MB | |
---|---|
1990-01 | 0 |
1990-02 | -5.66418 |
1990-03 | -6.43677 |
1990-04 | 0 |
1990-05 | 0 |
1990-06 | -78.8659 |
1990-07 | -155.311 |
1990-08 | -70.179 |
1990-09 | 0 |
1990-10 | 0 |
1990-11 | 0 |
1990-12 | 0 |
1991-01 | 0 |
1991-02 | 0 |
1991-03 | 0 |
1991-04 | -10.715 |
1991-05 | 0 |
1991-06 | -70.9794 |
1991-07 | -170.2 |
1991-08 | -41.12 |
1991-09 | 0 |
1991-10 | 0 |
1991-11 | 0 |
1991-12 | 0 |
1992-01 | 0 |
- Doesn’t make sense to estimate from total mass balance
- Feb and March with mass loss (probably) comes from steady ice discharge and low snowfall
- Solid discharge roughly steady intra-annual
- Better to estimate FW anomaly from stream discharge product
- Need to define some monthly baseline
- Then consider anomaly from baseline
Month | CE | CW | NE | NO | NW | SE | SW | TOTAL |
---|---|---|---|---|---|---|---|---|
1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5 | 1 | 1 | 0 | 0 | 0 | 1 | 2 | 5 |
6 | 9 | 7 | 4 | 3 | 5 | 11 | 16 | 54 |
7 | 20 | 15 | 20 | 15 | 18 | 24 | 42 | 155 |
8 | 12 | 9 | 7 | 5 | 9 | 18 | 26 | 86 |
9 | 2 | 1 | 0 | 0 | 1 | 5 | 5 | 12 |
10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
11 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
TOTAL | 43 | 33 | 31 | 24 | 33 | 60 | 91 | 314 |
Month | CE | CW | NE | NO | NW | SE | SW | TOTAL |
---|---|---|---|---|---|---|---|---|
1 | -0 | 0 | 0 | 0 | 0 | 0 | -0 | -0 |
2 | -0 | -0 | 0 | 0 | 0 | 0 | 0 | 0 |
3 | 0 | -0 | 0 | 0 | 0 | 0 | -0 | 0 |
4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5 | 0 | 0 | -0 | 0 | 0 | 1 | 1 | 2 |
6 | 3 | 4 | 5 | 4 | 5 | 3 | 8 | 33 |
7 | 5 | 4 | 10 | 10 | 8 | 3 | 7 | 48 |
8 | 3 | 2 | 3 | 2 | 3 | 4 | 8 | 25 |
9 | 2 | 0 | 0 | -0 | 0 | 2 | 1 | 5 |
10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
11 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
12 | 0 | 0 | 0 | 0 | -0 | 0 | 0 | 0 |
TOTAL | 13 | 11 | 18 | 16 | 17 | 13 | 26 | 114 |
Month | CE | CW | NE | NO | NW | SE | SW |
---|---|---|---|---|---|---|---|
1 | nan | nan | nan | nan | nan | nan | nan |
2 | nan | nan | nan | nan | nan | nan | nan |
3 | nan | nan | nan | nan | nan | nan | nan |
4 | nan | nan | nan | nan | nan | nan | nan |
5 | nan | 23 | nan | nan | nan | 53 | 49 |
6 | 38 | 61 | 114 | 126 | 89 | 31 | 54 |
7 | 24 | 28 | 51 | 64 | 47 | 14 | 17 |
8 | 21 | 22 | 48 | 47 | 37 | 20 | 31 |
9 | 115 | 5 | nan | nan | nan | 42 | 23 |
10 | nan | nan | nan | nan | nan | nan | nan |
11 | nan | nan | nan | nan | nan | nan | nan |
12 | nan | nan | nan | nan | nan | nan | nan |
- Some increase in solid ice discharge (10 %)
- …of which 50 % is submarine melt
- Most increase in liquid runoff
- Only summer in JJA
{{{SKIPLINE}}}
- Can build baseline distribution maps for solid & liquid
- Can build anomaly distribution maps for solid & liquid
- Can provide annual or monthly solid and liquid forcing
# Contact: Ken Mankoff <ken.mankoff@nasa.gov> # Code: https://github.com/NASA-GISS/freshwater-anomaly # Data: Mankoff /et al./ (2021) # Summary: Annual mass change from Greenland. # Year Gt/yr 1990 137.6 1991 76.7 1992 -87.1 1993 90.7 1994 113.8 1995 211.9 1996 -132.2 1997 -7.6 1998 241.8 1999 47.0 2000 77.1 2001 26.1 2002 142.5 2003 167.2 2004 165.8 2005 168.4 2006 239.8 2007 257.3 2008 201.2 2009 243.0 2010 376.8 2011 336.2 2012 429.3 2013 107.9 2014 184.6 2015 213.9 2016 256.0 2017 102.6 2018 75.8 2019 426.0
- Use uncertainty from citet:mankoff_2021 published with data
- Use published (1 σ) uncertainty because that uncertainty treatment is already conservative and if using 2 σ, mass gain occurs most year for
lo
estimates.
time | MB_lo | MB | MB_hi | MB_err |
---|---|---|---|---|
1990 | 53.6 | 137.6 | 221.6 | 84 |
1991 | 0 | 76.7 | 164.7 | 87.9 |
1992 | 0 | 0 | 0 | 77.6 |
1993 | 0 | 3.6 | 167 | 85.8 |
1994 | 0 | 113.8 | 187.2 | 73.4 |
1995 | 4.8 | 211.9 | 288.5 | 76.5 |
1996 | 0 | 0 | 0 | 84.3 |
1997 | 0 | 0 | 25 | 80.5 |
1998 | 0 | 102 | 323.6 | 81.9 |
1999 | 0 | 47 | 132.3 | 85.3 |
2000 | 0 | 77.1 | 154.9 | 77.8 |
2001 | 0 | 26.1 | 111 | 84.9 |
2002 | 0 | 142.5 | 225.7 | 83.2 |
2003 | 0 | 167.2 | 261.9 | 94.7 |
2004 | 0 | 165.8 | 249.6 | 83.8 |
2005 | 44.9 | 168.4 | 263.4 | 95 |
2006 | 163.1 | 239.8 | 316.5 | 76.7 |
2007 | 161.9 | 257.3 | 352.7 | 95.4 |
2008 | 104 | 201.2 | 298.4 | 97.2 |
2009 | 157.7 | 243 | 328.3 | 85.3 |
2010 | 283.2 | 376.8 | 470.3 | 93.6 |
2011 | 242.2 | 336.2 | 430.3 | 94.1 |
2012 | 319.5 | 429.3 | 539.2 | 109.8 |
2013 | 19.4 | 107.9 | 196.4 | 88.5 |
2014 | 91 | 184.6 | 278.3 | 93.7 |
2015 | 118.5 | 213.9 | 309.3 | 95.4 |
2016 | 154.2 | 256 | 357.8 | 101.8 |
2017 | 11.7 | 102.6 | 193.4 | 90.9 |
2018 | 0 | 75.8 | 158.4 | 82.6 |
2019 | 319.5 | 426 | 525.7 | 99.7 |
TOTAL | 2249.2 | 4890.1 | 7531.4 | 2641.3 |
- IMBIE citep:imbie_2018 has a longer records: 1992 through 2018 (and ongoing updates)
- http://imbie.org/data-downloads/
{{{SKIPLINE}}}
However, IMBIE does not have ice shelf thinning or calving
Bottom panel: Blue line is repeated from middle panel (Slater 2021)
md5sum ~/data/IMBIE/*
- [X] https://www.scp.byu.edu/data/iceberg/ citep:budge_2018
- 1978 through 2018
- [-] https://www.scar.org/resources/iceberg-database/ citep:orheim_2022
- Biased by method: ship observations
import pandas as pd
import glob
root = '/home/kdm/data/Budge_2018/consol'
csvs = glob.glob(root + '/*.csv')
lon,lat = [],[]
for csv in csvs:
df = pd.read_csv(csv, parse_dates=True, index_col='date')
for i,c in enumerate(df.columns):
if df[c].min() == df[c].max():
continue
if np.all(df[c] < 0):
alat = df[c]
alon = df[df.columns[i+1]]
break
lon = lon + list(alon)
lat = lat + list(alat)
# plt.scatter(lon,lat)
pd.DataFrame(np.vstack((lon,lat)).T).to_csv('./tmp/lonlat.csv', index=False, header=None)
EPSG 3031
grass -c epsg:3031 ./G_AQ
eval $(m.proj -i input=tmp/lonlat.csv separator=comma,pipe |r.in.xyz input=- -sg)
g.region -pa n=$n s=-$n e=$(echo -1*$w|bc) w=$w res=100000 -s
m.proj -i input=tmp/lonlat.csv sep=comma,pipe | v.in.ascii input=- output=pts
# d.mon wx0
# d.vect pts
m.proj -i input=tmp/lonlat.csv sep=comma,pipe | r.in.xyz input=- output=bin method=n
r.mapcalc "bin10 = log(10,bin)"
# d.rast bin
EPSG 3031
grass -c epsg:4326 ./G_AQ
# g.region -pas res=0.125 s=-90 n=-45 e=-180 w=180
g.region -pas res=0.5 s=-90 n=-45 e=-180 w=180
v.in.ascii -n input=tmp/lonlat.csv sep=comma output=pts
cat tmp/lonlat.csv | sed 's/$/,1/' | r.in.xyz input=- separator=comma output=bin method=n
r.mapcalc "bin10 = log(10,bin)"
# d.rast bin
- AQ solids
- Spatial distribution of solid FW forcing may be unnecessary detail
- Where icebergs are seen may be where they are not melting (survivorship bias)
- Can distribute evenly around continent, or evenly where observed, or based on observation density
- AQ liquids
- Should be pegged to ice shelf edge
- Do not have by shelf, only total for the continent
\(dM\) is anomaly including gains; does not distinguish calving vs. melt Baseline period is 14*360 = 5040 Gt or 5040/(2017-1979+1) = 130 Gt yr-1
citet:rignot_2019
citet:rignot_2019
From citet:slater_2021 Table 1, uncertainties for Antarctica are:
Component | Uncertainty [Gt yr-1 |
---|---|
Ice shelf calving | 36 |
Ice shelf thinning | 39 |
Antarctic land ice | 24 |
MEAN | 33 |
- Assume these are 1 σ uncertainty
- hi/lo estimates use the mean (33), max (39) or sum(99)
# Contact: Ken Mankoff <ken.mankoff@nasa.gov> # Code: https://github.com/NASA-GISS/freshwater-anomaly # Data: Slater /et al./ (2021) # Summary: Annual mass loss from Antarctica. # Year Gt/yr 1990 115.8 1991 115.8 1992 115.8 1993 115.8 1994 115.8 1995 110.2 1996 82.9 1997 154.4 1998 187.8 1999 499.9 2000 428.1 2001 430.4 2002 276.9 2003 424.6 2004 488.2 2005 453.6 2006 547.1 2007 679.5 2008 600.6 2009 534.7 2010 585.4 2011 416.6 2012 443.8 2013 499.6 2014 456.9 2015 381.3 2016 157.2 2017 331.8 2018 331.8 2019 331.8
- ModelE distributes Greenlandic melt via a fractional mask (sums to 1)
- We can use the same mask to distribute the freshwater anomaly
- However, the anomaly is distributed differently than the baseline
- For example, Fig. 1 of citet:mankoff_2021 shows the SE (included below) has no net mass loss, and no change from <1990 baseline. However, SE should still have an annual baseline meltwater volume flow rate, because winter snowfall is offset by summer melt.
- Source : https://portal.nccs.nasa.gov/GISS_modelE/modelE_input_data/
- 4x5 :
GLMELT_4X5.OCN.nc
- 2.5x2 :
GLMELT_144X90_gas.OCN.nc
{{{SKIPLINE}}}
Land classification mask (could be useful when creating new mask)
- 2.5x2 :
Z2HX2fromZ1QX1N.BS1.nc
- 1x1 :
OZ1QX1N.BS1.nc
- 1/60 :
etopo_ice_g1m.nc
netcdf GLMELT_144X90_gas.OCN { dimensions: lon = 144 ; lat = 90 ; variables: float lon(lon) ; lon:units = "degrees_east" ; float lat(lat) ; lat:units = "degrees_north" ; float mask(lat, lon) ; data: lon = -178.75, -176.25, -173.75, -171.25, -168.75, -166.25, -163.75, -161.25, -158.75, -156.25, -153.75, -151.25, -148.75, -146.25, -143.75, -141.25, -138.75, -136.25, -133.75, -131.25, -128.75, -126.25, -123.75, -121.25, -118.75, -116.25, -113.75, -111.25, -108.75, -106.25, -103.75, -101.25, -98.75, -96.25, -93.75, -91.25, -88.75, -86.25, -83.75, -81.25, -78.75, -76.25, -73.75, -71.25, -68.75, -66.25, -63.75, -61.25, -58.75, -56.25, -53.75, -51.25, -48.75, -46.25, -43.75, -41.25, -38.75, -36.25, -33.75, -31.25, -28.75, -26.25, -23.75, -21.25, -18.75, -16.25, -13.75, -11.25, -8.75, -6.25, -3.75, -1.25, 1.25, 3.75, 6.25, 8.75, 11.25, 13.75, 16.25, 18.75, 21.25, 23.75, 26.25, 28.75, 31.25, 33.75, 36.25, 38.75, 41.25, 43.75, 46.25, 48.75, 51.25, 53.75, 56.25, 58.75, 61.25, 63.75, 66.25, 68.75, 71.25, 73.75, 76.25, 78.75, 81.25, 83.75, 86.25, 88.75, 91.25, 93.75, 96.25, 98.75, 101.25, 103.75, 106.25, 108.75, 111.25, 113.75, 116.25, 118.75, 121.25, 123.75, 126.25, 128.75, 131.25, 133.75, 136.25, 138.75, 141.25, 143.75, 146.25, 148.75, 151.25, 153.75, 156.25, 158.75, 161.25, 163.75, 166.25, 168.75, 171.25, 173.75, 176.25, 178.75 ; lat = -89, -87, -85, -83, -81, -79, -77, -75, -73, -71, -69, -67, -65, -63, -61, -59, -57, -55, -53, -51, -49, -47, -45, -43, -41, -39, -37, -35, -33, -31, -29, -27, -25, -23, -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89 ; mask = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [...]
- Cannot do, currently, with 4x5.
import xarray as xr
fname = "GLMELT_144X90_gas.OCN.nc"
ds = xr.open_dataset("./dat/" + fname)
ds["crs"] = True
ds["crs"].attrs["grid_mapping_name"] = "latitude_longitude"
ds["mask"].attrs["grid_mapping"] = "crs"
ds["mask"].attrs["_FillValue"] = 0 # optional
ds.to_netcdf("./dat/" + fname[:-3] + ".crs.nc")
ncap2 -h -O -s 'crs=1B' ./dat/GLMELT_144X90_gas.OCN.nc ./dat/GLMELT_144X90_gas.OCN.v2.nc
ncatted -h -O \
-a grid_mapping_name,crs,c,c,'latitude_longitude' \
-a grid_mapping,mask,c,c,'crs' \
-a _FillValue,mask,c,c,0 \
./dat/GLMELT_144X90_gas.OCN.v2.nc
ncdump -chs ./dat/GLMELT_144X90_gas.OCN.crs.nc
import xarray as xr
ds = xr.open_dataset('./dat/GLMELT_4X5.OCN.nc')
ds = ds.where((ds['mask'] == 1) & (ds['lat'] > 0))
da_stacked = ds['mask'].stack(notnull=['lat','lon'])
dd = da_stacked[da_stacked.notnull()]
# print(dd)
df = pd.DataFrame([_ for _ in zip(dd['lat'].values,dd['lon'].values,dd.values)],
columns=['lat','lon','mask'])
# df.set_index(['lat','lon'])
df
lat | lon | mask | |
---|---|---|---|
0 | 62 | -52.5 | 1 |
1 | 62 | -37.5 | 1 |
2 | 66 | -57.5 | 1 |
3 | 66 | -37.5 | 1 |
4 | 66 | -32.5 | 1 |
5 | 66 | -27.5 | 1 |
6 | 70 | -57.5 | 1 |
7 | 70 | -22.5 | 1 |
8 | 74 | -57.5 | 1 |
9 | 74 | -17.5 | 1 |
import xarray as xr
melt = xr.open_dataset('./dat/GLMELT_4X5.OCN.nc')
cl = xr.open_dataset('./dat/Z2HX2fromZ1QX1N.BS1.nc')
ds = melt.merge(cl)
ds = ds.where((ds['mask'] == 1) & (ds['lat'] > 0))
st = ds.stack(notnull=['lat','lon'])
da_stacked = ds['mask'].stack(notnull=['lat','lon'])
dd = da_stacked[da_stacked.notnull()]
# print(dd)
df = pd.DataFrame([_ for _ in zip(dd['lat'].values,dd['lon'].values,dd.values)],
columns=['lat','lon','mask'])
# df.set_index(['lat','lon'])
df
lat | lon | mask | |
---|---|---|---|
0 | 62 | -52.5 | 1 |
1 | 62 | -37.5 | 1 |
2 | 66 | -57.5 | 1 |
3 | 66 | -37.5 | 1 |
4 | 66 | -32.5 | 1 |
5 | 66 | -27.5 | 1 |
6 | 70 | -57.5 | 1 |
7 | 70 | -22.5 | 1 |
8 | 74 | -57.5 | 1 |
9 | 74 | -17.5 | 1 |
- Generate on 1/8 ° (lat,lon) grid grid
- Can then be resampled as needed
grass -c epsg:4326 ./G
g.region n=90 s=-90 w=-180 e=180 res=0.125 -pas # 1/8 = 0.125
mkdir -p tmp
ogr2ogr -f KML tmp/M2019.kml ${DATADIR}/Mouginot_2019/Greenland_Basins_PS_v1.4.2.shp
# d.mon wx0
# d.vect M2019
v.in.ogr input=tmp/M2019.kml output=M2019
# db.select table=M2019 | head
v.db.addcolumn map=M2019 columns="REGION, INT"
# Encode using clock face numerics
db.execute sql='UPDATE M2019 SET REGION=1 where SUBREGION1 = "NE"'
db.execute sql='UPDATE M2019 SET REGION=12 where SUBREGION1 = "NO"'
db.execute sql='UPDATE M2019 SET REGION=11 where SUBREGION1 = "NW"'
db.execute sql='UPDATE M2019 SET REGION=3 where SUBREGION1 = "CE"'
db.execute sql='UPDATE M2019 SET REGION=9 where SUBREGION1 = "CW"'
db.execute sql='UPDATE M2019 SET REGION=5 where SUBREGION1 = "SE"'
db.execute sql='UPDATE M2019 SET REGION=7 where SUBREGION1 = "SW"'
v.to.rast input=M2019 output=M2019 type=area use=attr attribute_column=REGION
# d.mon wx0
# d.rast M2019
r.grow.distance -m input=M2019 value=M2019_grow distance=distance metric=geodesic
# r.mapcalc "ocean5km = if((distance > 0) & (distance < 50000), M2019_grow, null())"
r.mapcalc "ocean_gl_500 = if((distance > 0) & (distance < 500000), M2019_grow, null())"
r.mapcalc "ocean_gl_250 = if((distance > 0) & (distance < 250000), M2019_grow, null())"
r.mapcalc "ocean_gl_100 = if((distance > 0) & (distance < 100000), M2019_grow, null())"
r.mapcalc "ocean_gl_050 = if((distance > 0) & (distance < 50000), M2019_grow, null())"
# r.out.gdal format=netCDF input=ocean5km output=tmp/ocean5km.nc
r.out.gdal format=netCDF input=ocean_gl_500 output=tmp/ocean_gl_500.nc
r.out.gdal format=netCDF input=ocean_gl_250 output=tmp/ocean_gl_250.nc
r.out.gdal format=netCDF input=ocean_gl_100 output=tmp/ocean_gl_100.nc
r.out.gdal format=netCDF input=ocean_gl_050 output=tmp/ocean_gl_050.nc
# grass ./G/PERMANENT
ogr2ogr -f KML tmp/aq.kml ${DATADIR}/NSIDC/NSIDC-0709.002/1992.02.07/IceBoundaries_Antarctica_v02.shp
v.in.ogr input=tmp/aq.kml output=boundary
ogr2ogr -f KML tmp/shelf.kml ${DATADIR}/NSIDC/NSIDC-0709.002/1992.02.07/IceShelf_Antarctica_v02.shp
# v.in.ogr input=tmp/shelf.kml output=shelf_all
# v.db.droprow input=shelf_all where='Name == "Filchner" OR Name == "Ross_West" OR Name == "Ross_East"' output=shelf
v.in.ogr input=tmp/shelf.kml output=shelf
v.to.rast input=shelf output=shelf type=area use=val val=1 # attr attribute_column=REGION
v.to.rast input=boundary output=boundary type=area use=val val=1
r.grow.distance -m input=shelf value=shelf_grow distance=distance_aq metric=geodesic
r.mapcalc "ocean_aq_500 = if((distance_aq > 0) & (distance_aq < 500000) & isnull(boundary) & (y() > -80), shelf_grow, null())"
r.mapcalc "ocean_aq_250 = if((distance_aq > 0) & (distance_aq < 250000) & isnull(boundary) & (y() > -80), shelf_grow, null())"
r.mapcalc "ocean_aq_100 = if((distance_aq > 0) & (distance_aq < 100000) & isnull(boundary) & (y() > -80), shelf_grow, null())"
r.mapcalc "ocean_aq_050 = if((distance_aq > 0) & (distance_aq < 50000) & isnull(boundary) & (y() > -80), shelf_grow, null())"
r.out.gdal format=netCDF input=ocean_aq_500 output=tmp/ocean_aq_500.nc
r.out.gdal format=netCDF input=ocean_aq_250 output=tmp/ocean_aq_250.nc
r.out.gdal format=netCDF input=ocean_aq_100 output=tmp/ocean_aq_100.nc
r.out.gdal format=netCDF input=ocean_aq_050 output=tmp/ocean_aq_050.nc
From citet:rignot_2019 Table 2, 2009 to 2017
Loc | Mass | % |
---|---|---|
W dM + dD | -159-132 = -291 | 291/466 = 0.624463519313 |
P dM + dD | -42 - 45 = -87 | 87/466 = 0.18669527897 |
E dM + dD | -51 - 37 = -88 | 88/466 = 0.188841201717 |
Total | -291 - 87 - 88 = -466 | 62+19+19 = 100 |
Experiment
Location | Amount |
---|---|
West | 70 |
East | 15 |
Peninsula | 15 |
Solid and liquid discharge combined by sector
From [[id:20230127T114208][Greenland mass loss by ROI [%]]]
region | Discharge | Runoff |
---|---|---|
CE | 16 | 13 |
CW | 17 | 10 |
NE | 5 | 11 |
NO | 5 | 9 |
NW | 21 | 12 |
SE | 31 | 17 |
SW | 4 | 27 |
TOTAL | 99 | 99 |
import numpy as np
import pandas as pd
dr = np.array(dr)
df = pd.DataFrame(data=dr[1:-1,1:].astype(int), columns=dr[0,1:], index=dr[1:-1,0])
df['Sum'] = df['Discharge'] + df['Runoff']
df['Sum'] = (df['Sum']/df['Sum'].sum()*100).round()
df.loc['Total'] = df.sum()
print(df)
Discharge Runoff Sum CE 16.0 13.0 15.0 CW 17.0 10.0 14.0 NE 5.0 11.0 8.0 NO 5.0 9.0 7.0 NW 21.0 12.0 17.0 SE 31.0 17.0 24.0 SW 4.0 27.0 16.0 Total 99.0 99.0 101.0
# grass ./G/PERMANENT
ogr2ogr -f KML tmp/aq.kml ${DATADIR}/NSIDC/NSIDC-0709.002/1992.02.07/IceBoundaries_Antarctica_v02.shp
v.in.ogr input=tmp/aq.kml output=boundary
r.mapcalc "peninsula = if((x() > -80) & (x() < -62) & (ocean_aq_100 == 1), 1.0, 0)"
eval $(r.univar -g peninsula)
P=$(echo 15/${sum} | bc -l) # peninsula percent, spread over number of peninsula cells
r.mapcalc "peninsula = if(peninsula == 1, ${P})"
r.mapcalc "east = if((x() > 20) & (x() < 180) & (ocean_aq_100 == 1), 1.0, 0)"
eval $(r.univar -g east)
E=$(echo 15/${sum} | bc -l) # east percent, spread over number of east cells
r.mapcalc "east = if(east == 1, ${E})"
r.mapcalc "west = if((x() > -150) & (x() < -90) & (ocean_aq_100 == 1), 1.0, 0)"
eval $(r.univar -g west)
W=$(echo 70/${sum} | bc -l) # west percent, spread over number of west cells
r.mapcalc "west = if(west == 1, ${W})"
r.mapcalc "CE = if(ocean_gl_100 == 3, 1.0, 0)"
eval $(r.univar -g CE)
x=$(echo 15/${sum} | bc -l)
r.mapcalc "CE = if(CE == 1, ${x})"
r.mapcalc "CW = if(ocean_gl_100 == 9, 1.0, 0)"
eval $(r.univar -g CW)
x=$(echo 14/${sum} | bc -l)
r.mapcalc "CW = if(CW == 1, ${x})"
r.mapcalc "NE = if(ocean_gl_100 == 1, 1.0, 0)"
eval $(r.univar -g NE)
x=$(echo 8/${sum} | bc -l)
r.mapcalc "NE = if(NE == 1, ${x})"
r.mapcalc "NO = if(ocean_gl_100 == 12, 1.0, 0)"
eval $(r.univar -g NO)
x=$(echo 9/${sum} | bc -l)
r.mapcalc "NO = if(NO == 1, ${x})"
r.mapcalc "NW = if(ocean_gl_100 == 11, 1.0, 0)"
eval $(r.univar -g NW)
x=$(echo 17/${sum} | bc -l)
r.mapcalc "NW = if(NW == 1, ${x})"
r.mapcalc "SE = if(ocean_gl_100 == 5, 1.0, 0)"
eval $(r.univar -g SE)
x=$(echo 24/${sum} | bc -l)
r.mapcalc "SE = if(SE == 1, ${x})"
r.mapcalc "SW = if(ocean_gl_100 == 7, 1.0, 0)"
eval $(r.univar -g SW)
x=$(echo 16/${sum} | bc -l)
r.mapcalc "SW = if(SW == 1, ${x})"
r.mapcalc "ocean_aq_rignot = (east + west + peninsula)"
r.mapcalc "ocean_gl_mankoff = (CE + CW + SE + SW + NE + NW + NO)"
r.null map=ocean_aq_rignot null=0
r.null map=ocean_gl_mankoff null=0
r.mapcalc "ocean_aq_gl = ocean_aq_rignot + ocean_gl_mankoff"
r.null map=ocean_aq_gl setnull=0
r.report -n ocean_aq_gl units=k
r.univar ocean_aq_gl # sum = 200
r.out.gdal format=netCDF input=ocean_aq_gl output=tmp/ocean_aq_gl_nonuniform.nc
ncrename -v Band1,mask tmp/ocean_aq_gl_nonuniform.nc tmp.nc
mv tmp.nc out/ocean_aq_gl_nonuniform.nc
Scale to 288x144
import numpy as np
import xarray as xr
ds = xr.open_dataset('./out/ocean_aq_gl_nonuniform.nc')
ds['lon'].attrs['units'] = 'degrees_east'
ds['lat'].attrs['units'] = 'degrees_north'
ds['crs'] = True
ds['crs'].attrs['grid_mapping_name'] = 'latitude_longitude'
ds['mask'].attrs['grid_mapping'] = 'crs'
ds['mask'].attrs['_FillValue'] = 0
ds.attrs = {}
ds.attrs['Creator'] = 'Ken Mankoff'
ds.attrs['email'] = 'ken.mankoff@nasa.gov'
ds.attrs['source'] = 'https://github.com/NASA-GISS/freshwater-anomaly'
latbins = np.arange(-90,90+1)
lonbins = np.arange(-180+0.625, 180+0.625*2, 1.25)
ds2 = ds.groupby_bins('lat', latbins, labels=latbins[:-1]+0.5)\
.max()\
.groupby_bins('lon', lonbins, labels=lonbins[:-1])\
.max()\
.rename({'lat_bins':'lat','lon_bins':'lon'})\
.transpose() # Model expects variables to be (lat,lon)
# ds2 = ds2.rename({'ones':'mask'})
ds2['lon'].attrs['units'] = 'degrees_east'
ds2['lat'].attrs['units'] = 'degrees_north'
ds2['mask'].attrs['_FillValue'] = 0
ds2 = ds2.fillna(0)
ds2.to_netcdf('./out/fw_nonuniform_288x180.nc', format='NETCDF3_CLASSIC')
# Trickier: non-uniform lat bins
# ds['ones'].coarsen(lat=int(4/(1/8))).mean().coarsen(lon=int(5/(1/8))).mean().to_netcdf('./dat/fw_4x5.nc')
print(ds2)
- See slides above for [[id:20230127T114208][Greenland mass loss by ROI [%]]]
WARNING: This spreads the distribution per sector over the number of grid cells. Because I’m working on my own map of Greenland at high res, some of these grid cells will be land-cells in ModelE. The relative number of land cells per sector should be similar between sectors (large sectors means long coastline meaning many land cells, vs. small sector short coast few cells), meaning this error may not be significant to final results.
import numpy as np
import xarray as xr
ds = xr.open_dataset('./tmp/ocean_gl_050.nc')
ds['lon'].attrs['units'] = 'degrees_east'
ds['lat'].attrs['units'] = 'degrees_north'
# record the RIO for each cell
ROI = np.empty(ds['Band1'].data.shape, dtype='U2')
b1 = ds['Band1'].values
ROI[b1 == 12] = 'NO' # cloc face
ROI[b1 == 1] = 'NE'
ROI[b1 == 3] = 'CE'
ROI[b1 == 5] = 'SE'
ROI[b1 == 7] = 'SW'
ROI[b1 == 9] = 'CW'
ROI[b1 == 11] = 'NW'
ROI[b1 == b1[0,0]] = ''
ds['ROI'] = (('lat','lon'), ROI)
ds['ROI'].attrs['ROI_source'] = 'Mouginot /et al./ (2019); https://doi.org/10.7280/D1WT11'
ds = ds.drop_vars('Band1')
for dist in ['050', '100', '250', '500']:
gl = xr.open_dataset('./tmp/ocean_gl_'+dist+'.nc')
aq = xr.open_dataset('./tmp/ocean_aq_'+dist+'.nc')
ds['ones_'+dist] = (gl['Band1'].notnull()+aq['Band1'].notnull()).astype(np.int32)
ds['ones_'+dist].attrs['description'] = 'Grid cells w/in '+dist+' km of coast with freshwater runoff, submarine melt, or iceberg forcing'
# ds['base'] = ds['ones']
# ds['base'].attrs['description'] = 'Baseline freshwater runoff, submarine melt, or iceberg forcing, scaled by sector contribution'
# ds['base_solid'] = ds['ones']
# ds['base_solid'].attrs['description'] = 'Baseline iceberg forcing, scaled by sector contribution'
# ds['base_liquid'] = ds['ones']
# ds['base_liquid'].attrs['description'] = 'Baseline freshwater runoff and submarine melt scaled by sector contribution'
# ds['anom'] = ds['ones'].astype(np.float32)
# ds['anom'].attrs['description'] = 'Anomaly freshwater runoff, submarine melt, or iceberg forcing, scaled by sector contribution'
# contrib = {'CE':1, 'CW':24, 'NO':12, 'NE':17, 'NW':29, 'SE':5, 'SW':11}
# ds['anom'].attrs['distribution_pct'] = str(contrib)
# # ds['anom'] = ds['anom'].where(ds['ROI'] != 'CE', other=(1 / ds['ones'].where(ds['ROI'] == 'CE').sum().data))
# # ds['anom'] = ds['anom'].where(ds['ROI'] != 'CW', other=(24 / ds['ones'].where(ds['ROI'] == 'CW').sum().data))
# # ds['anom'] = ds['anom'].where(ds['ROI'] != 'NO', other=(12 / ds['ones'].where(ds['ROI'] == 'NO').sum().data))
# # ds['anom'] = ds['anom'].where(ds['ROI'] != 'NE', other=(17 / ds['ones'].where(ds['ROI'] == 'NE').sum().data))
# # ds['anom'] = ds['anom'].where(ds['ROI'] != 'NW', other=(29 / ds['ones'].where(ds['ROI'] == 'NW').sum().data))
# # ds['anom'] = ds['anom'].where(ds['ROI'] != 'SE', other=(5 / ds['ones'].where(ds['ROI'] == 'SE').sum().data))
# # ds['anom'] = ds['anom'].where(ds['ROI'] != 'SW', other=(11 / ds['ones'].where(ds['ROI'] == 'SW').sum().data))
# for k,v in contrib.items():
# ds['anom'] = ds['anom'].where(ds['ROI'] != k, other=(v / ds['ones'].where(ds['ROI'] == k).sum().data))
# ds['anom_solid'] = ds['ones'].astype(np.float32)
# ds['anom_solid'].attrs['description'] = 'Anomaly iceberg forcing, scaled by sector contribution'
# contrib = {'CE':16, 'CW':17, 'NO':5, 'NE':5, 'NW':21, 'SE':31, 'SW':4}
# ds['anom_solid'].attrs['distribution_pct'] = str(contrib)
# for k,v in contrib.items():
# ds['anom_solid'] = ds['anom_solid'].where(ds['ROI'] != k, other=(v / ds['ones'].where(ds['ROI'] == k).sum().data))
# ds['anom_liquid'] = ds['ones'].astype(np.float32)
# ds['anom_liquid'].attrs['description'] = 'Anomaly freshwater runoff and submarine melt scaled by sector contribution'
# contrib = {'CE':13, 'CW':10, 'NO':11, 'NE':9, 'NW':12, 'SE':17, 'SW':27}
# ds['anom_liquid'].attrs['distribution_pct'] = str(contrib)
# for k,v in contrib.items():
# ds['anom_liquid'] = ds['anom_liquid'].where(ds['ROI'] != k, other=(v / ds['ones'].where(ds['ROI'] == k).sum().data))
ds['crs'] = True
ds['crs'].attrs['grid_mapping_name'] = 'latitude_longitude'
for v in ds.data_vars:
ds[v].attrs['grid_mapping'] = 'crs'
if (v != 'crs') and (v != 'ROI'):
ds[v].attrs['_FillValue'] = 0
ds.attrs = {}
ds.attrs['Creator'] = 'Ken Mankoff'
ds.attrs['email'] = 'ken.mankoff@nasa.gov'
ds.attrs['source'] = 'https://github.com/NASA-GISS/freshwater-anomaly'
ds.to_netcdf('./out/fw.nc')
# current resolution: 1/8
latbins = np.arange(-90,90+1)
lonbins = np.arange(-180+0.625, 180+0.625*2, 1.25)
ds2 = ds.groupby_bins('lat', latbins, labels=latbins[:-1]+0.5)\
.max()\
.groupby_bins('lon', lonbins, labels=lonbins[:-1])\
.max()\
.rename({'lat_bins':'lat','lon_bins':'lon'})\
.transpose() # Model expects variables to be (lat,lon)
# ds2 = ds2.rename({'ones':'mask'})
ds2['lon'].attrs['units'] = 'degrees_east'
ds2['lat'].attrs['units'] = 'degrees_north'
ds2.to_netcdf('./out/fw_288x180.nc', format='NETCDF3_CLASSIC')
# Trickier: non-uniform lat bins
# ds['ones'].coarsen(lat=int(4/(1/8))).mean().coarsen(lon=int(5/(1/8))).mean().to_netcdf('./dat/fw_4x5.nc')
print(ds2)
cdo chname,ones_100,mask fw.nc fw_100.nc
ncrename -v ones_100,mask fw.nc fw_100.nc
ds = xr.Dataset()
step = 1/60
ds['lon'] = np.arange(-180 + (step/2),180, step, dtype=np.float64)
ds['lon'].attrs['units'] = 'degrees_north'
ds['lat'] = np.arange(-90 + (step/2), 90, step, dtype=np.float64)
ds['lat'].attrs['units'] = 'degrees_east'
ds['crs'] = True
ds['crs'].attrs['grid_mapping_name'] = 'latitude_longitude'
ds['ROI'] = (('lon','lat'), np.zeros((ds['lon'].size, ds['lat'].size), dtype='U2'))
# ds['ROI'].attrs['_FillValue'] = ''
ds['ROI'].attrs['grid_mapping'] = 'crs'
ds['ROI'].attrs['ROI_source'] = 'Mouginot /et al./ (2019); https://doi.org/10.7280/D1WT11'
## Example: Can set fields with:
# ds['ROI'][:,np.where(ds['lat'] == 80)[0][0]:np.where(ds['lat'] == 90)[0][0]] = 'NO'
## Let's create a small function to help with that.
def lati(val): return np.where(ds['lat'] == val)[0][0] # lat index
def loni(val): return np.where(ds['lon'] == val)[0][0]
# use like: ds['ROI'][:,lati(80):lati(90)+1] = 'NO'
ds['ROI'][loni(ds.isel(27,38] = 'SW'
# ds['ROI'][ds.isel(27,38] = 'SW'
# ds['region'][26,39] = 'SW'
# ds['region'][25,40] = 'SW'
# ds['region'][27,38] = 'SE'
# ds['region'][27,38] = 'SE'
# ds['region'][27,38] = 'SE'
ds.attrs['Creator'] = 'Ken Mankoff'
ds.attrs['email'] = 'ken.mankoff@nasa.gov'
ds.to_netcdf('icesheet_runoff_mask.nc')
print(ds)
ones
: All 1 within 100 km of Greenland coastanom
: MB anomaly by ROIanom_liquid
SMB anomaly by ROIanom_solid
Discharge anomaly by ROI
Even distribution w/in 500 km of coast
- Solid discharge at ice shelf fronts
- Scaled by ice shelf area??
- Ice shelf melting at ice shelf fronts
- Scaled by ice shelf area??
{{{SKIPLINE}}}
Doesn’t reflect reality - most of the mass loss from small shelves, not Ross and Filchner-Ronne (mass gain).
- Exclude Ross and Filchner-Ronne?
{{{SKIPLINE}}}
citet:NSIDC_0709,rignot_2013 See https://nsidc.org/data/nsidc-0709
- [ ] Updated baseline mask
- [ ] Include N. Greenland
- [ ] Treat spatial variability
- [ ] Separate (liquid runoff & submarine melt) v. solid discharge
- [ ] Anomaly: determine regional distribution of
- [ ] Liquid runoff & submarine melt
- [ ] Solid ice discharge
- [ ] Build anomaly distribution masks for each of these
\printbibliography[heading=none]
This document is an Emacs Org Mode plain-text file with code and text embedded. If you are viewing:
- A PDF, HTML, or DOC file, then it was generated by exporting from Org. Not all of the Org parts (code, results, comments, etc.) were exported. The Org source file is available upon request, and may be embedded in the PDF. You can access files embedded in PDF files with from within your PDF viewer.
- A file with an
org
extension in something other than Emacs, then you are seeing the canonical version and the full source, but without any syntax highlighting, document structure, or the ability to execute the code blocks. - An
Org
file within Emacs, then this is the canonical version. You should be able to fully interact and reproduce the contents of this document, although it may require 3rd-party applications (Python, etc.) and a similar Emacs configuration. This is available upon request.