leap-stc / ClimSim

An open large-scale dataset for training high-resolution physics emulators in hybrid multi-scale climate simulators.
https://leap-stc.github.io/ClimSim/
Apache License 2.0
141 stars 41 forks source link

Clean up demo notebooks #27

Open NoraLoose opened 1 year ago

NoraLoose commented 1 year ago

I think it would be a good idea to clean up the notebooks in demo_notebooks a little bit, especially because we are planning to include them on the website. A few suggestions:

I am happy to help with this, if other people agree with the suggestions above. @jerrylin96 @cisaacstern?

cisaacstern commented 1 year ago

Great suggestions, all of which make sense to me but also doesn't necessarily have to block #15 IMHO.

Moving some of the class and function definitions to modules to make the notebooks more compact.

This is definitely a good idea, and will also allow us to unit test all of these functions/classes with pytest.

To start this process, I would suggest adding a new module in the climsim_utils directory, and moving any functions / classes from the notebooks into that module. Then when the package is pip-installed, those objects will be available for import with:

from climsim_utils.new_module_name import function_a, class_b, etc

As a subsequent step, we'll want to think about how to structure these modules into function groups (xref https://github.com/leap-stc/ClimSim/issues/17). But to start just having them out of the notebooks is a good place to start.