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

Upload example data for AK Glacier demo; update example notebook accordingly; adjust P_rain/snow var updates #4

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

bolotinl
Copy link
Collaborator

@bolotinl bolotinl commented Sep 27, 2024

TL;DR

  • Uploaded the example data and config files for the glacier demo notebook to GH
  • Updated the glacier demo notebook to show results using this exact example data/config files
  • Changed the code that updates to P_rain and P_snow variables to allow compatibility with both gridded and non-gridded air temp data

More Details:

Previously, the example data and config files for running the Glacier Demo notebook was hosted on Google Drive for internal use. So that users can readily replicate this demo, I uploaded the example data and configs to the examples folder. Because the time varying grid of air temperature is too large to host on GitHub, I updated the notebook to use a time series of air temperature that does not vary in space.

As briefly considered in PR#15 to the peckhams/topoflow36 repo (but later reversed), the update of the P_rain and P_snow variables as-is causes issues if input air temperature data is not gridded, so I also made a change to the line updating these variables in met_base.py. This solution does allocate the variable to new memory (not ideal), but for now may be the best solution to get TopoFlow running properly out-of-the-box for users following the demo notebook. Future development can help consider how we can reduce this potential inefficiency.

Grid stack is too large to store on GitHub
The gridded time series temp data is too large to store in GitHub, so for this example, implement the time series data that does NOT vary in space.
Previous syntax caused issues in cases where T was scalar/time series rather than grid. Yes, this allocates to new memory rather than overwriting the previous value in the same memory space (this should be improved later), but for user friendliness out-of-the-box, I think this is the best option for now.
Copy link
Collaborator

@madMatchstick madMatchstick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bolotinl - Thank you for the thorough and well organized PR. I was able to run the AK_Demo notebook via the "quick start" option. Just a few minor suggestions...

  1. from osgeo was needed to import gdal, osr in topoflow/utils/regrid.py
  2. Recommend adding some disclosure in the Run Topoflow block mentioning runtime. It doesn't need to be overly descriptive but something along the lines of "Be aware that this simulation will run through time 525,600.0 [min] and will likely take a few hours to complete."
  3. This is probably obvious to those well-versed in world of jupyter notebooks but the user will need to first activate tf36 conda environment (or similar) to run the notebook :) Probably wouldn't hurt to add that somewhere at the top.

-thanks!

10.30.2024 edit - Note I was also able to run all pre-processing steps outlined in Option 2 in the demo.ipynb

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

Successfully merging this pull request may close these issues.

2 participants