ldeo-glaciology / LEAP-Cryo-planning

A repo for planning and tracking progress on the LEAP-Cryo project: Learning ice-sheet flow with physics-based and machine learning models.
2 stars 2 forks source link

ToDo: input bed data into icepack #9

Open jkingslake opened 1 year ago

jkingslake commented 1 year ago

Write a notebook that takes bed topography data from Thwaites Glacier and simulates ice flow over it.

Templar129 commented 1 year ago

Hi Jonny and Andrew, I am currently looking at the tutorial from icepack. I am trying to replicate the result in 03-larsen-ice-shelf. ipynb Then I find in the code it needs to download the bed machine of Antarctica using the following code: thickness_filename = icepack.datasets.fetch_bedmachine_antarctica()

However, when I run it, it always gives me an error, which indicates failure to connect to remote host. I think this is because the file names in the scripts are outdated. For example, from the website NSIDC where the data is hosted, they have updated the data to _v3, where in the script, icepack requires to download _v2. I think this could be a problem causing the connection failure.

I am trying to bypass these lines of scripts and make the tutorial work.

Templar129 commented 1 year ago

Update on cannot download datasets using icepack default functions: I just find this file in icepack: "\wsl.localhost\Ubuntu\home\templar\firedrake\src\icepack\icepack\registry-nsidc.txt" This file registry-nsidc.txt has all the related datasets in tutorials. It contains data name, seed, and a downloading URL.

For example. we cannot directly fetch the bed machine data using the icepack function. But we can find a line on bed machine data in the file as following: BedMachineAntarctica_2020-07-15_v02.nc 71ff97f8fb034fbfe235cd1cad044eeea2ae1543e82115afbd886a24c1e71069 https://n5eil01u.ecs.nsidc.org/MEASURES/NSIDC-0756.002/1970.01.01/BedMachineAntarctica_2020-07-15_v02.nc

Now we copy and paste the third part of the code, which is a URL can lead you to direct download. After you download the dataset, copy-paste it to the same folder as the .ipynb file, then use thickness_dataset = xarray.open_dataset('BedMachineAntarctica_2020-07-15_v02.nc') to load the dataset, then you will be fine with this problem.

Similar problems could occur to many of dataset that use default path in icepack, going to the source file and manually download the files could be helpful in most cases.