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

Extract velocity fields from ITS_live/GoLIVE at annual/monthly step to the OGGM-glacier grid #1599

Open
Ruitangtang opened this issue Jun 21, 2023 · 5 comments

Comments

@Ruitangtang
Copy link

Ruitangtang commented Jun 21, 2023

Dear OGGM,

I am planning to extract the ITS_live/GoLIVE at an annual/monthly step to the OGGM-glacier grid. At the moment, the default one in OGGM is the average velocity from 1985-2018. Is there a possible and easy way to do this based on its_live.py or millan22.py? Appreciate any suggestions and comments. Thanks always.

@fmaussion
Copy link
Member

Hello - this is currently hardcoded in OGGM but fairly easy to extend. The lines are here:

base_url = ('http://its-live-data.jpl.nasa.gov.s3.amazonaws.com/'
'velocity_mosaic/landsat/v00.0/static/cog/')
regions = ['HMA', 'ANT', 'PAT', 'ALA', 'CAN', 'GRE', 'ICE', 'SRA']
region_files = {}
for reg in regions:
d = {}
for var in ['vx', 'vy', 'vy_err', 'vx_err']:
d[var] = base_url + '{}_G0120_0000_{}.tif'.format(reg, var)
region_files[reg] = d

Basically including any month / year from ITS live would involve adapting the URL to get the data from (probably the G0120_0000 part). The way to do that would be to go to ITSLIVE and check in which format they provide the monthly files, and add an argument to the task to use monthly files instead. The rest of the code should be the same.

@Ruitangtang
Copy link
Author

Thanks for your suggestions. I will check and try.

@fmaussion
Copy link
Member

My recommendation would be to run these tests (or a script that works with average velocity and does what you want) and use a debugger to explore the state of region_files at run time, then decide how to adapt to use monthly files.

@fmaussion
Copy link
Member

Actually probably best not to run the tests but a script which works for you - then use the debugger to understand what the code is doing

@Ruitangtang
Copy link
Author

Thanks, Fabien. Considering only the time-series of velocity along the centerline is useful to me, I also think it might be quicker and easier to get the coordinates of points on the centerlines, then extract the velocity through itslive-widget (one of the ITS_LIVE tools) by the interactive way (which might be better if just by code, but have not to figure out), than download the whole velocity fields. What do you think? By the way, if extracting the coordinates of the main centerline(the longest one) during each run, I tried (model_New.fls[-1]).line.coords.xy[0])``, which will generate the lon. and [1] for lat, right? Or actually, the coords of points, as well as the number of points on the centerline, didn't change, but the corresponding surface_h, width_m of each point change over time? Thanks again

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

2 participants