geus-glaciology-and-climate / freshwater Goto Github PK
View Code? Open in Web Editor NEWGreenland liquid water runoff from 1958 through 2019
Home Page: https://doi.org/10.5194/essd-12-2811-2020
License: GNU Lesser General Public License v3.0
Greenland liquid water runoff from 1958 through 2019
Home Page: https://doi.org/10.5194/essd-12-2811-2020
License: GNU Lesser General Public License v3.0
After discussions with @tarynblack and Twila Moon I realize that land runoff can occur at elevations << 0.
In the first version of the paper, Figure 18 (below) is accompanied by the following text:
Here we provide one example of incorrect metadata. [...] It is easier to validate the land-terminating basins, which should in theory all have an outlet elevation of 0 m. That is not the case (Fig. 18). It is possible for land outlets to be correctly assigned an elevation > 0 m, if a land basin outlet occurs at a waterfall off a cliff (as might occur the edges of Petermann fjord) or due to DEM discretization of steep cells. However, most of the land outlets at elevations other than 0 are likely due to mask misalignment placing a section of coastline in a fjord (negative land elevation) or inland (positive land elevation
Through discussions we've realized that land runoff << 0 is possible when runoff is sourced from land, and then enters the subglacial system. This is common when runoff is sourced from a nunatuk, but can also occur when runoff falls on land outside the boundary of the ice sheet, and then flows back under the ice sheet, and is eventually discharged subglacially. This situation also creates land runoff outlets that are not within any land basins.
Therefore, land runoff with outlet elevations << 0 (or land outlets that are outside of land basins) could be considered as ice runoff because it presumably traveled through the subglacial environment.
Make realtime / operational?
Now have RACMO 1958 -> 2019.
See Karlsson 2020 (in prep)
Basal water budget (from frictional heat, geothermal heat, and viscous heat dissipation) adds ~10-15 %
The current dataset is a bit overwhelming to use. A reasonable downstream (pun intended) product could provide discharge by basin (e.g. the basins from Mouginot (2019)). This would also make it easier to combine this product with the Mankoff (2020) solid ice discharge product.
(for @nbkglaciology)
Color catchments by runoff increase %. Does pattern emerge? f(lat)?
Determine if regime shift and color code year of shift into figure?
Currently using GIMP 0714 DEM surface. There may be better surface to use? Or a temporally homogeneous surface instead of the temporally diverse GIMP surface?
However, this is likely not a major issue as shown by the sensitivity study about outlet displacement with different routing options.
Any issues relating to subglacial routing are related to this.
Annual discharge not a data product - it is only displayed in Fig. 4 of the paper. However, data values and axes do not match.
Fig. 3 shows daily discharge in m^3/s. Discharge occurs for ~100 day/year, and it appears that values scale by ~100 when displayed in Fig. 4. Values should be averaged rather than summed and then units (axis labels) should be m^3 s^-1
, or values should be scaled by 86400 and summed and then units (axis labels) should be m^3 yr^-1
(or, more accurately, m^3 discharge summed over the observed days
, which may not be a full year).
We updated to v4 just last week.
See https://nsidc.org/data/idbmg4/versions/5 and GEUS-Glaciology-and-Climate/ice_discharge#37 for discussion of expected changes. Changing fjord bathymetry may updated the reported depth of discharge that is provided by this product.
Can't until that data comes with DOI and metadata specifies location where it was collected.
The following query causes a crash. Found by @annesol26
from discharge import discharge
ds = discharge(base="/home/kdm/data/Mankoff_2020/water/", roi="-29.0253,81.3588 -28.811,81.316 -28.308,81.315 -28.673,81.386", quiet=False, upstream=False).discharge()
The output and error message is:
Using '/home/kdm/data/Mankoff_2020/water/` as base folder
Loading discharge data...
Loading MAR_land
Loading MAR_ice
Loading RACMO_land
Loading RACMO_ice
Loading outlets and basins...
Loading land
Loading ice
Subsetting data by ROI...
Parsing ROI...
ROI appears to be boundary (from points) in EPSG:4326 coordinates
ROI is geometry... finding all points inside geometry
Selecting discharge at outlets...
Selecting from: MAR_land
Selecting from: MAR_ice
Selecting from: RACMO_land
Selecting from: RACMO_ice
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-7-b9dc2f17a1d4> in <module>
----> 1 ds = discharge(base=".", roi="-29.0253,81.3588 -28.811,81.316 -28.308,81.315 -28.673,81.386 -29.0253,81.3588", quiet=False, upstream=False).discharge()
~/data/Mankoff_2020/water/discharge.py in discharge(self)
149 key="MAR_land"; geo_key='_'.join(key.split("_")[1:])
150 rtmp = self._discharge[key]; rtmp.columns.name = geo_key
--> 151 r = xr.DataArray(rtmp.values, dims=('time',geo_key),
152 coords={'time':rtmp.index, geo_key:rtmp.columns}).to_dataset(name=key)
153 for key in self._discharge.keys():
~/local/miniconda3/envs/freshwater/lib/python3.8/site-packages/xarray/core/dataarray.py in __init__(self, data, coords, dims, name, attrs, indexes, fastpath)
342 data = _check_data_shape(data, coords, dims)
343 data = as_compatible_data(data)
--> 344 coords, dims = _infer_coords_and_dims(data.shape, coords, dims)
345 variable = Variable(dims, data, attrs, fastpath=True)
346 indexes = dict(
~/local/miniconda3/envs/freshwater/lib/python3.8/site-packages/xarray/core/dataarray.py in _infer_coords_and_dims(shape, coords, dims)
163 )
164
--> 165 assert_unique_multiindex_level_names(new_coords)
166
167 return new_coords, dims
~/local/miniconda3/envs/freshwater/lib/python3.8/site-packages/xarray/core/variable.py in assert_unique_multiindex_level_names(variables)
2410 if duplicate_names:
2411 conflict_str = "\n".join([", ".join(v) for v in duplicate_names])
-> 2412 raise ValueError("conflicting MultiIndex level name(s):\n%s" % conflict_str)
2413 # Check confliction between level names and dimensions GH:2299
2414 for k, v in variables.items():
ValueError: conflicting MultiIndex level name(s):
'time' (time), (time)
> /home/kdm/local/miniconda3/envs/freshwater/lib/python3.8/site-packages/xarray/core/variable.py(2412)assert_unique_multiindex_level_names()
2410 if duplicate_names:
2411 conflict_str = "\n".join([", ".join(v) for v in duplicate_names])
-> 2412 raise ValueError("conflicting MultiIndex level name(s):\n%s" % conflict_str)
2413 # Check confliction between level names and dimensions GH:2299
2414 for k, v in variables.items():
Example of issue when trying to select outlets draining into Nuup Kangerlua (Godthåbsfjord)
inner = "-51.1718012293,64.5954097819 -50.8995227396,64.7789139579 -50.7568514676,64.9690431810 -50.6205715677,64.9672444555 -49.9467555209,64.8768047686 -49.8123778359,64.7739501055 -50.0154180367,64.5952961037 -49.8201210605,64.5287387754 -49.5609562477,64.4456142290 -49.4558752722,64.2992513874 -49.6238144661,64.1894411729 -49.9241965492,64.3146965705 -50.1440899067,64.4149063742 -50.2144415328,64.4768524875 -50.2997227411,64.5239074388 -50.3760762760,64.6017670313 -50.7044602133,64.5918252334 -50.7847956749,64.6027696576 -50.9381946911,64.5670016850 -51.0451477217,64.5691532462"
df = discharge(base="/home/kdm/data/Mankoff_2020/", roi=inner).outlets()
df.set_geometry("basin").drop(columns="outlet").to_file("inner_basins.gpkg", driver="GPKG")
Then open inner_basins.gpkg
and view it over the basins.gpkg
from this product, and there are missing basins:
Looks like it might be related to the clean up duplicates
code on L90: https://github.com/mankoff/freshwater
https://github.com/mankoff/freshwater/blob/834cd9744ebcffcaface21ae3a1935e425e5e456/discharge.py#L190-L198
Tagging @nlbeaird
NetCDF files are probably not optimal - may contain bugs.
Check w/ CF compliance checker http://cfconventions.org/compliance-checker.html
Was using 3.0. v4.1 exists...
If data is open
It's at 5.5 km not 1 km resolution, but can still be run through the pipeline.
Include data from https://doi.pangaea.de/10.1594/PANGAEA.876357 when it is publicly available
Most water routs subglacially. This model should also route subglacially. Justification for surface routing provided in the text, but that justification may be incorrect or become incorrect as data change.
DOI: https:/dx.doi.org/10.1038/s41598-020-60261-6
Abstract
Deglaciation has accelerated the transport of minerals as well as modern and ancient organic matter from land to fjord sediments in Spitsbergen, Svalbard, in the European Arctic Ocean. Consequently, such sediments may contain significant levels of total mercury (THg) bound to terrestrial organic matter. The present study compared THg contents in surface sediments from three fjord settings in Spitsbergen: Hornsund in the southern Spitsbergen, which has high annual volume of loss glacier and receives sediment from multiple tidewater glaciers, Dicksonfjorden in the central Spitsbergen, which receives sediment from glacifluvial rivers, and Wijdefjorden in the northern Spitsbergen, which receive sediments from a mixture of tidewater glaciers and glacifluvial rivers. Our results showed that the THg (52 ± 15 ng g−1) bound to organic matter (OM) was the highest in the Hornsund surface sediments, where the glacier loss (0.44 km3 yr−1) and organic carbon accumulation rates (9.3 ~ 49.4 g m−2 yr−1) were elevated compared to other fjords. Furthermore, the δ13C (–27 ~ –24‰) and δ34S values (–10 ~ 15‰) of OM indicated that most of OM were originated from terrestrial sources. Thus, the temperature-driven glacial melting could release more OM originating from the meltwater or terrestrial materials, which are available for THg binding in the European Arctic fjord ecosystems.
Comment
Related process, but in Svalbard, not Greenalnd.
Runoff includes everything. Need to decompose to, for example, generate something that can be used in a mass balance equation.
I am attempting to work through the provided examples for the Python API, and have found that the example for "Polygon covering multiple land and ice outlets" fails silently at this line:
ds = discharge(base="./freshwater", roi="-51.50,66.93 -51.21,66.74 -49.44,66.91 -49.84,67.18", quiet=False, upstream=True).discharge()
The output makes it this far:
Loading discharge data...
Loading MAR_land
Loading MAR_ice
Loading RACMO_land
Loading RACMO_ice
Loading outlets and basins...
Loading land
Loading ice
Subsetting data by ROI...
Parsing ROI...
ROI appears to be boundary (from points) in EPSG:4326 coordinates
ROI is geometry... finding all points inside geometry
Finding basins upstream of land basins within ROI
ice
I added some print statements to discharge.py
and it appears that it is failing in subset_to_ROI
between lines 197-211 (when subsetting data to be within the provided polygon). The example also fails when upstream=False
.
I am running this in a Jupyter notebook in VS Code with Python v3.8.5. Let me know if I can provide any other information - this is my first time submitting an issue!
Find algorithm that recreates Watson catchment to better match van As (2018) observations.
Hello,
I am trying to run the given examples. So far, everything worked until specifying the discharge option:
python ./discharge.py --base ./freshwater --roi=-50.5,67.2 -q -d | (head -n1; grep -A9 "^2012-06-01")
I have an error with xarrray that I do not manage to solve:
...
line 141, in discharge
self._discharge[key] = xr.open_mfdataset(file_list, combine="by_coords").rename({"runoff": key})
...
raise MergeError(
xarray.core.merge.MergeError: conflicting values for variable 'lat' on objects to be combined. You can skip this check by specifying compat='override'.
I attempted to add compat='override' in line 141, but id does not work with the combine option.
Have you already met this error?
Can I provide any additional pieces of information?
Sentia
Now using "discharge" terminology in most places, but not yet the released data - I don't want to issue an entirely new dataset version and DOI just to change the word "runoff" to "discharge". But this should be implemented in a future update.
Reason: runoff
is an RCM product. This is different, and should use a different term.
Hi,
I suggest adding a LICENSE file to the repository, so that people know how they are allowed to use the script and how they can collaborate. My suggestion would be to use the MIT license. Another popular choice is GNU GPL.
Thanks!
Markus
Fjord surface freshwater input (rain and snow) is << runoff on GIS scale. But a local study near the mouth of a large fjord that has small catchments emptying into it may benefit from this data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.