Closed tangshuaiqi closed 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.
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.
enter tutorial_case/scripts directory
activate the diagnostic package
conda activate esmac_diags
run example code:
python example_*.py
Can you remove all the other files, other than the readme?
also remove environment.yml?
Yup!
@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.
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?
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.
Max, can you help me adding the package ESMAC_diags pip install git+https://github.com/eagles-project/ESMAC_diags
to the environment?
Absolutely! I can add that here
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?
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
Okay - so go ahead and place those scripts/data in the Open-Science-Workshop-2022/tutorials/ESMAC_Diags/
directory!
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?)
Should we go ahead merge, and test this?
Just had a few more commits. Please try merge and test it.
Just had a few more commits. Please try merge and test it.
Can do!
@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 theOpen-Science-Workshop/tutorials
directory