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

Replace ncar_pylib because it is deprecated and will disappear soon #1925

Closed
wants to merge 1 commit into from

Conversation

slevis-lmwg
Copy link
Contributor

Description of changes

In fsurdatmodifyctsm.py prepare conda environment before running the fsurdat_modifier tool instead of using ncar_pylib.

Specific notes

Contributors other than yourself, if any:
@ekluzek

CTSM Issues Fixed (include github issue #):
addresses #1786 (fixes?)

Are answers expected to change (and if so in what way)?
No, and we'll see...

Any User Interface Changes (namelist or namelist defaults changes)?
Not visible to user.

Testing performed, if any:
Goal is for test
FSURDATMODIFYCTSM_D_Mmpi-serial_Ld1.5x5_amazon.I2000Clm50SpRs.cheyenne_intel
to continue working without relying on ncar_pylib.

@slevis-lmwg slevis-lmwg self-assigned this Dec 13, 2022
# >>> conda activate ctsm_py
# >>> cd tools/modify_input_files
# >>> ./fsurdat_modifier islas_examples/modify_fsurdat/fill_indian_ocean/modify_slevis_16pft.cfg
# 3) Execute those here
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ekluzek @billsacks
Running the plan by you before I spend time on it because I think I remember Bill having hesitations about implementing the new commands inside the test:

  • I have removed references to python_path.
  • I will have the test execute the module load, module unload, py_env_create, and conda activate before running the tool.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Another way to do it would be to just ensure that python and conda are in the users path. And that the ctsm_py environment is active for conda. This would expect the user to execute those things outside of the system test itself.

Copy link
Member

Choose a reason for hiding this comment

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

I forget the details, but I remember having issues in the past with loading and unloading python modules from within a system test, since CIME does its own module load of python. It may have been that it worked when running a single system test, but messed things up when running a whole test suite... but again, I forget the details.

There is some additional discussion in #1798.

I guess I'd say go ahead and try it, and as long as it works even when running a whole test suite, then it's fine by me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to remind myself what @ekluzek had already accomplished in #1798.

@billsacks thanks for the reminder of the existence of #1798!

Copy link
Collaborator

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

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

The one question I have is should the test script run ./py_env_create and conda activate ctsm_py? Here it documents what to do, which might be sufficient. But, it does mean the user has to know to those steps.

@slevis-lmwg
Copy link
Contributor Author

#1798 is close to getting merged to main.
The present PR #1925 is obsolete, so I'm closing it.

@slevis-lmwg slevis-lmwg closed this Feb 4, 2023
@slevis-lmwg slevis-lmwg deleted the replace_ncar_pylib branch February 4, 2023 01:11
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.

3 participants