Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve way topographical data is retrieved #67

Open
JordiBolibar opened this issue Sep 11, 2024 · 0 comments
Open

Improve way topographical data is retrieved #67

JordiBolibar opened this issue Sep 11, 2024 · 0 comments

Comments

@JordiBolibar
Copy link
Member

I checked the way the topographical data is retrieved, and I have a couple of comments on how to improve this.

In this line :

glacier_directories = workflow.init_glacier_directories(
        rgi_ids_list,
        reset=False,
        from_prepro_level=3,
        prepro_base_url=base_url,
        prepro_border=10,
    )

the glacier directories are initialized from prepro level 3. This means that on top of the outlines and topo data, also the flowlines and the climate data are being downloaded, as explained here.

We should fix this to from_prepro_level=1 to avoid data duplication.

On top of this, this means that we are also downloading the glacier outlines twice: once at the beginning manually (producing a single .shp file) and in this step from OGGM, with an individual .shp file per glacier. In terms of workflow extension, it would be cleaner and simpler to stick to the OGGM workflow, since it's more automatic and friendlier to users. Here's an idea on how to implement this:

  • When a user wants to work in a region, initialize the gdirs by giving the RGI region ID (not the individual RGI IDs). This will download the topo data for all glaciers in that region. Since there's no climate data there, this should be quite lightweight, and that data will also be ready when later on they might want to perform regional reconstructions.
  • Then we can iterate through all the folders of gdirs in that region, and open all the .shp files with geopandas. This would be similar to the current workflow, but it we would need to load this from multiple files instead of a single file.
  • Then we can repeat the current workflow of finding the overlap of the stake coordinates with the glacier outlines.

Any comments or thoughts welcome on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant