Code Monkey home page Code Monkey logo

oggm-edu's Introduction

oggm-edu's People

Contributors

antoniafritz avatar benwibm avatar dfrisinghelli avatar ehultee avatar fmaussion avatar holmgren825 avatar lennartkoe avatar lilianschuster avatar matcast avatar mathcret avatar matthiasdusch avatar nchampollion avatar pat-schmitt avatar timoroth avatar zschirmeister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oggm-edu's Issues

New documentation & notebooks !

I'm a little bit confused. If I want to create a new notebook, what should I do ? Putting into oggm-edu or oggm ? Using .rst or .ipynb files ? Putting in docs, notebooks, gen_plots, run_examples or experiments directory ? Link with the list of notebooks ? I think I understand some things but it's not super clear. A readme in the oggm-edu and oggm directories could be helpful. Or maybe adding these information into contributing.rst file ...

"Open in new tab" for certain links

All links that leave the oggm-edu namespace (e.g. the links to the apps, the links to the notebooks, etc) should open in a new tab.

How to do this in RST is unclear atm.

Install a font

It's not a big deal, but I didn't manage to install a font properly.

I am running this postbuild:

oggm-edu/postBuild

Lines 5 to 8 in 0e5729f

mkdir ~/.fonts
wget http://antiyawn.com/uploads/Humor-Sans-1.0.ttf
mv Humor-Sans-1.0.ttf ~/.fonts/Humor-Sans-1.0.ttf
fc-cache -fv -y ~/.fonts

But the build errors with:

Fontconfig error: Cannot load default config file

@TimoRoth if ever you happen to know what to do I'd be interested - not very important though.

Indicate for who the materials are

It would be good to make clear on OGGM what the target audience is of each activity, for example "post-16" for highschool students, or "university" for university students.

Discussed with @ehultee today

Non-linear bed profiles

Currently, the GlacierBed only provide a linear bed profile, with the possibility to specify the slope. A nice feature would be the ability to add non-linear bed profiles, i.e. varying slopes.

I imagine this to work similar to how one currently defines variable widths, or how one define a complex mass balance, - the user supplies a set of slopes and breakpoint altitudes which is interpolated in the constructor.

Docker Link of glacier simulator is not working

Hi @TimoRoth,

the docker link of the glacier simulator is not working and maybe you can help.

You changed the docker links here b36de29 and explained on slack that the ports I was using for the simulator were not best practice (as 0.0.0.0 just means 'any IP'). I just checked again and with docker run -e BOKEH_ALLOW_WS_ORIGIN=127.0.0.1 -p 8085:8080 oggm/bokeh:20210130 git+https://github.com/OGGM/glacier_simulator.git@stable app.ipynb and accessing with http://127.0.0.1:8085/app the app is not starting.

However the bad practice example with docker run -e BOKEH_ALLOW_WS_ORIGIN=0.0.0.0:8080 -p 8080:8080 oggm/bokeh:20210130 git+https://github.com/OGGM/glacier_simulator.git@stable app.ipynb and accessing with http://0.0.0.0:8080/app is working.

Is it only a problem on my side? (I just reinstalled and updated docker)
Do you have an idea what can cause the problem?

Move `oggm-edu python package` page to its own subheader at bottom of sidebar

The style of "oggm-edu python package" is very different from the other pages of the website. It interrupts reading flow if the reader clicks "next page" from the bottom of "Intro to interactive notebooks".

I suggest to move this page out of the "Interactive Notebooks" subheader and instead create a "Documentation" subheader at the bottom of the sidebar. If you don't want a Documentation subheader cluttering things up, I would still move the "oggm-edu python package" dropdown to the end of the sidebar, to improve reading flow.

More use cases

At the end of this notebook, I wrote a list of possible exercises:

  • more maritime conditions lead to steeper mass balance gradients. Vary the mass balance gradient and examine the response time and equilibrium glacier profiles for various values of the mass balance gradient.
  • apply a periodically varying mass balance forcing. How long does the period T need to be chosen to let the glacier get close to equilibrium with the prescribed climate? Make a plot of the ELA versus glacier length or volume. Can you explain the hysteresis?
  • study a glacier with an overdeepening in the bed profile. Find equilibrium lengths and profiles by stepwise or slow linear changes in the mass balance forcing. Can you find two different equilibrium glaciers which are subject to the same mass balance forcing? Can you explain what is going on?
  • A surging glacier can be represented by the model by periodically (typically every 100 years for a period of 10 years) increasing the sliding factor (by a factor of 10 or so). Study the effect of a varying sliding parameter on the glacier geometry. Compare the mean equilibrium length and volume of surging and non-surging glaciers under the same climatic conditions.
  • Apply a random white-noise perturbation to the mass balance profile. What is the relation between the standard deviation of the noise and the variability of volume and length for different glaciers (e.g. steep and flat glaciers)?
  • ...

And more!

Remove baseline images

@Holmgren825 I've been a bit quick in merging haha

I really appreciate the effort to use baseline images for the tests, but I'd rather not have them. They are a real pain to maintain, and one day you will be gone and it will fall back to me ;-)

Furthermore, it will make many things painful to change, since each change to the plot will also change the tests, etc.

Tests are good, but here I really think we should keep tests as slick and simple as possible.

Who are the "future improvements" sections for?

On the Glacier Gallery page, "Future Improvements" encourages readers to contribute glacier info and describes how. On the World Glacier Explorer page, the "Future Improvements" header reads a bit more like notes to the team of what could be tackled next--like a GitHub issue that isn't in the repo. None of the other pages on the site have these "Future Improvements" sections.

Do you want to clarify the purpose and audience of these sections?

Convert class activites to RST and tranlaste them to German

We recently added two class activities to a US based platform:

These activities should be readily applicable to a german high school class. I suggest to create a new rst file in this folder: https://github.com/OGGM/oggm-edu/tree/master/docs/activity_sheets that we will link to from the main page.

For example:

  • oggm_edu_lab_1_de.rst for a german translation of lab 1
  • oggm_edu_lab_2_de.rst for a german translation of lab 2

The links to teaching materials on the SERC platform have to be replaced by german translations as well, but this can be done in a second step.

Translate MB Simulator experiments into SERC-documented activities

Similar to Glacier Simulator issue: the experiments are great. I think they could be better communicated as one or more lab activities, together with the other materials we have been developing for SERC. In the current ordering this would probably become OGGM-Edu Lab 4, unless we make multiple activities of the Glacier Simulator experiments.

Indicate glacier type in the collection

Representation/plots of collections with mixed glacier types (Glacier, SurgingGlacier) don't clearly indicate what type the different glaciers are. One could look at attributes that distinguish them, but including the glacier type in representation and legend of the plots would be nice.

Update the glacier explorer app

I prepared the data for a number of improvements to the app.

The data is available here, as hdf for faster reading. You can read the data with:

df = pd.read_hdf('rgi62_era5_itmix_df.h5', 'df')

This is a full RGI dataframe, allowing the following improvements to the app:

  • Thanks to ERA5 as source we now have the Antarctic glaciers as well
  • There is data from the consensus volume estimate paper: with this, there could be a vertical or horizontal bar plot somewhere, showing how much sea-level-rise the selected glaciers represent
  • At the risk of making the app more complex: there is also a new climate column called "trend" with the 40-yr temperature trend from ERA for each glacier (https://fabienmaussion.info/2019/08/29/era5/). This could form a third informative histogram for "where are glaciers warming faster"
  • There are several glacier categories: marine terminating, land-terminating, ice caps. There could be a drop-down selection bar to take only these

@pat-schmitt and/or @zschirmeister , would you have time to tackle these? I suggest to start from the existing app here: https://github.com/OGGM/bokeh-apps/tree/master/glaciers-explorer , move it to a new repository and update it step by step. This would be awesome!

Add name attribute to 'Glacier' and 'GlacierCollection' objects

After last year's updates, the workflow to make an experiment (like the simple bed slope comparison that can be compared with goo) has changed.

Students modifying the new workflow noticed that it would be helpful to add a 'Name' attribute to Glacier and GlacierCollection objects. This would help with bookkeeping when there are several idealized glaciers that the students are supposed to compare with one another.

Long term concept for the bokeh apps

We currently have a dash server (https://github.com/pyviz-demos/glaciers) which is not linked anywhere but can continue to run as a "legacy" app.

We have one single bokeh app, which doesn't work currently: https://dash.klima.uni-bremen.de/bokeh/app . The code of this app is, as far as I know, not hosted on github. @TimoRoth made a script out of the notebook I wrote in https://github.com/OGGM/bokeh-apps and is serving it somewhere (a VM in Bremen?).

It looks like we are going to move towards the Bokeh/Holoviz/Panel ecosystem altogether (Patrick started to develop a new app already). We are going to have at least three apps by the end of the year, so we need a system to serve these apps (and update them) without too much burden for @TimoRoth and all involved.

The optimal way for me would be a model like panel does: https://panel.pyviz.org/ . Each app has a given url: e.g. https://gapminder.pyviz.demo.anaconda.com/app, https://glaciers.pyviz.demo.anaconda.com, etc., and each app has a github repository: https://github.com/pyviz-demos/

This way, we have the server, and a possible fallback would be to run the apps on mybinder as well if the server doesn't work (e.g. the binder link om glaciers).

@TimoRoth - I know it was a bit of a mess to serve the current app, and also to debug the "white screen" issue. Do you thing that it would make sense to reach out to the panel devs to ask for their set-up? They are very responsive in general!

Use a dockerfile on mybinder?

See https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html

Currently we have an environment which looks like this:

name: oggm_env
channels:
- oggm
- conda-forge
dependencies:
- python=3.6
- oggm-deps
- numpy>=1.15.1
- rasterio>=1.0
- ipython
- ipympl
- pyviz::param
- pyviz::pyviz_comms
- pyviz::datashader
- bokeh::bokeh
- pyviz::holoviews
- pyviz::panel
- pyviz::parambokeh
- pip:
- git+https://github.com/OGGM/oggm.git

This not only takes a lot of time, but it also builds images which are huge, and I'm quite sure this also slows down firing up the VM when opening mybinder.

cc @TimoRoth

Create a proper oggm-edu package

Currently the repository is just a collection of notebooks accessing OGGM core directly.

The idea of an oggm-edu package is to abstract the complexity of OGGM in order to make the experiments simpler to design and conduct for new users. For example, removing the call to classes and replace the interface with functions instead.

This is going to be easier to do once we have more use cases and a better overview of what is needed. But we can still start with a package structure ;-)

Translate the most important pages

Adding api reference to docs

It is probably a good idea to add a reference of the full API to the docs. Even though notebooks cover most of the functionality, it is a bit tedious to use them as reference. Not sure how much work this would be, but it would raise the quality even more I believe.

Add a documentation on Read The Docs

We should build a RTD documentation to explain the purpose of this repository, and link people to the right tutorial depending on their level.

Google gives oggm-edu link that does not work

Hi,

when "googling" mass balance gradient glaciers, the second entry (for me) is from OGGM-edu :-) . However it is a broken link (https://edu.oggm.org/en/latest/notebooks/mass_balance_gradient.html). I think it links to the old webpage and does not work anymore. Maybe we can link the old links to the new webpage? By the way, the fourth entry in google links to the correct new webpage, (https://oggm.org/oggm-edu-notebooks/oggm-edu/mass_balance_gradients.html).

Translate Glacier Simulator experiments into SERC-documented activities

The list of possible experiments in the Glacier Simulator page is fantastic. The web page formatting may not be the most effective way of putting them across for instructors. I suggest pulling most of the detailed experiments into one or more SERC labs -- probably Lab 3 in the current numbering? -- and streamlining the web page to link out to them, with just a brief description of the science questions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.