ARM-Development / ARM-Notebooks

Repository for holding notebooks related to ARM data
https://arm-development.github.io/ARM-Notebooks
8 stars 20 forks source link

ESMAC Diags tutorial #21

Closed tangshuaiqi closed 2 years ago

mgrover1 commented 2 years ago

@tangshuaiqi - could you just add an overview of how to go through this package? We would only need your https://github.com/eagles-project/ESMAC_diags/blob/main/README.md file, placed in the Open-Science-Workshop/tutorials directory

tangshuaiqi commented 2 years ago

This code is best run using a conda virtual environment. To install the required environment one can do conda env create -f environment.yml to set up a esmac_diags environment. Once the environment has been created you can activate it with conda activate esmac_diags and then this code can be installed with pip install -e . Which will install the code as editable allowing you to make changes to the codebase and it be reflected in the installed package.

Test run:

To verify the package, enter scripts/ directory and run python run_testcase.py Then go to the directory in testcase/figures/. Compare the output figure with the plot testcase/figures_verify/timeseries_organic_HISCALE.png. If the two figures look the same, the testcase is successfully run.

run tutorial examples:

enter tutorial_case/scripts directory activate the diagnostic package conda activate esmac_diags run example code: python example_*.py

mgrover1 commented 2 years ago

Can you remove all the other files, other than the readme?

tangshuaiqi commented 2 years ago

also remove environment.yml?

mgrover1 commented 2 years ago

Yup!

mgrover1 commented 2 years ago

@tangshuaiqi - I added a few cleanup items... now, the only thing that is being added, is the README which walks through those steps you highlighted.

During the tutorial, you can share your screen and walk through this process! This way, there is not a duplication of code between the content in your project, and this tutorial. Let me know what you think.

tangshuaiqi commented 2 years ago

just want to make sure the merging is correct. You merged branch "main" into "arm_tutorial_test2", the ESMAC Diags code (directories of src, scripts and tutorial_case) are not found in either here and my fork tangshuaiqi/esmac_diags/ now...

Does it mean that I will only show demo on my shared screen and people cannot do hand-on tests?

mgrover1 commented 2 years ago

Right - since the code is located in that separate repository, we want to try to avoid having to copy all the code + data into this repository...

One option would be to add a pip install git+https://github.com/eagles-project/ESMAC_diags to our environment, which would install your package, and then add the test data + scripts... we can chat about this on the call if you'd like.

tangshuaiqi commented 2 years ago

Max, can you help me adding the package ESMAC_diags pip install git+https://github.com/eagles-project/ESMAC_diags to the environment?

mgrover1 commented 2 years ago

Absolutely! I can add that here

tangshuaiqi commented 2 years ago

for adding the test data and scripts, where should I put them? should I put them under my fork location https://github.com/tangshuaiqi/esmac_diags_ARM_tutorial?

mgrover1 commented 2 years ago

You should put them under this branch of your fork - specifically in the:

Open-Science-Workshop/tutorials/ESMAC_diags

directory - I can help you create one (by placing the readme here), and you can populate that directory

mgrover1 commented 2 years ago

Okay - so go ahead and place those scripts/data in the Open-Science-Workshop-2022/tutorials/ESMAC_Diags/ directory!

tangshuaiqi commented 2 years ago

the test case is uploaded. Do you have some time to walk me through how to enable ESMAC Diags package and run the test case on JupyterHub (or other platform that other users also have access to the test case and run on their end?)

mgrover1 commented 2 years ago

Should we go ahead merge, and test this?

tangshuaiqi commented 2 years ago

Just had a few more commits. Please try merge and test it.

mgrover1 commented 2 years ago

Just had a few more commits. Please try merge and test it.

Can do!