Skip to content

Conversation

@weiji14
Copy link
Owner

@weiji14 weiji14 commented Apr 19, 2019

Closes #133.

Part of #133. Releasing code to reproduce some of the result figures in my DeepBedMap poster at the EGU 2019 General Assembly. The 3D figure uses a test area over Pine Island Glacier that combines the extent of 2007tx, 2010tr and istarxx (instead of just 2007tx before). The elevation error histogram uses only the 2007tx file. Font sizes of the titles, axes labels and so on have been increased, and the resulting figures were saved in a pdf format before being imported to Gravit Designer for poster production.

Also fixed a bug in the bicubic BEDMAP2 figure which had a slightly wrong size before compared to the predicted DeepBedMap image. Graham et al., 2017's synthetic grid was also compared with, but note that I have not actually published the downloading code. The original synthetic NetCDF file can be found at https://doi.org/10.4225/15/57464ADE22F50, and I have converted it to a 16-bit GeoTIFF using xarray.open_dataset, flipping it on the y-axis, and saving it with rasterio.
@weiji14 weiji14 added the enhancement ✨ New feature or request label Apr 19, 2019
@weiji14 weiji14 added this to the v0.8.0 milestone Apr 19, 2019
@weiji14 weiji14 self-assigned this Apr 19, 2019
@review-notebook-app
Copy link

Check out this pull request on ReviewNB: https://app.reviewnb.com/weiji14/deepbedmap/pull/136

Visit www.reviewnb.com to know how we simplify your Jupyter Notebook workflows.

weiji14 added 6 commits May 2, 2019 15:13
Adding LISA to gapfill MEASURES Ice Velocity later on. The actual file downloaded is a tar.gz archive which is quite large (882MB), but we only need one of the files inside the archive. More code to come later.

Also, to support download of FTP files, I've replaced requests with urllib in the data_prep.download_to_path function. Requests library unpinned from Pipfile.
Extract the one specific geotiff file we want after downloading the big .tgz/.tar.gz archive file! Implementation is a bit hacky, and it feels as though now would be a good time to switch to using DVC but why learn an existing wheel when I can make one?

Anyhow, this hack allows us to continue using the same data_list.yml file structure, and most of our download workflow remains the same. Surprisingly, even the complicated BAS ramadda URLs should work! Could extend this code to support .zip files in the future.
Allow MEASURES Ice Velocity to be properly gapfilled by LISA by converting the latter from metres/day to metres/year through multiplying by 365.25. Using Rasterio rio command-line for this...

Note that actual Ice Velocity training tiles remain the same, as there is nothing to gapfill (yet). Tweaked the selective_tile function to print "... done!" when tiling is finished, and raise an error if there are still NaN values after gapfilling. Also made other small tweaks like using the correct MEaSUREs Antarctic Ice Flow doi and switched jupytext format from py:percent to py:hydrogen.
Closes #138 Add Landsat 8 Ice Speed of Antarctica (LISA), Version 1.
Full Antarctica-wide bed DEM prediction! Added new section in deepbedmap.ipynb to do this, separate from the small area prediction code. Loosen gapfill checks in data_prep.selective_tile function by allowing NaN/missing data to exist, necessary when predicting continent-wide on Antarctica (we don't have velocity data everywhere).

I'll be honest, the DEM produced for EGU used a non-converted LISA to gapfill MEASURES Ice Velocity, and although it is wrong to mix m/day with m/year, I reproduce the figure here anyway in this commit. The next commit will have a DEM using the proper standardized LISA with m/year units to gapfill MEASURES.

Note that the geotiff produced has int16 precision instead of float32 to keep the file small, and there's some extra code in the save_array_to_grid function to allow for this. Also added some extra/optional code to make comparisons with the Synthetic High Resolution dataset.
Using LISA converted from m/day to m/year units, as mentioned in 7a5d223. Looks a bit different over the Southern Ocean, and there are some white coloured data gaps around the South Pole hole region and Antarctic coastline. But hey, you do know DeepBedMap only works on grounded ice right?
@weiji14 weiji14 marked this pull request as ready for review May 9, 2019 15:31
@weiji14 weiji14 merged commit 58d8ebd into master May 9, 2019
weiji14 added a commit that referenced this pull request May 9, 2019
Closes #136 Reproduce figures in EGU2019 DeepBedMap poster.
@weiji14 weiji14 deleted the egu2019_poster_figs branch May 9, 2019 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EGU2019 DeepBedMap Poster

1 participant