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

Update write.config.FATES.R _ New Version #3372

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Hhh-hyc
Copy link
Contributor

@Hhh-hyc Hhh-hyc commented Sep 6, 2024

Motivation and Context

This pull request is ultimately for running fates in the dockerized container in PEcAn, which is currently running in the container of noresm-land-sites-platform and thus would be updated to adapt PEcAn later.

The goal would be achieved by three steps:

  1. basically generate template.job with machine configurations first updated in write.config.FATES.R file.
  2. update default domain file, meteorological forcing data.
  3. update parameters used in the latest version of fates model.

Description

  • As the first step, lines related to parameters and domain files were uncommented to only basically generate 'template.job' for successfully running fates. Some arguments were pre-provided due to the incapability to use BETY Database locally.

  • Notably, the update has not been completed yet and opening this PR is just for better interaction.

  • There was an old PR for this work but should be closed for missing the recent contributions of the community, but some comments may still be useful for proceeding the work, which could be found in Update write.configs.FATES.R #3360.

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@github-actions github-actions bot added the Models label Sep 6, 2024
@Hhh-hyc
Copy link
Contributor Author

Hhh-hyc commented Sep 16, 2024

@mdietze @serbinsh @istfer @rosiealice : Hi, after simply testing job.sh with a lot uncomments on the original code, I'm ready to make full modification for this write.config.FATES.R file. However, it requires addresses of indir, binary, casedir, etc, which is dependant on how and where we're going to install fates in PEcAn.

At the moment, we (with @huitang-earth) are thinking to use fates container provided by noresm-land-sites-platfom. I'm wondering will this container fit to PEcAn in the future or do you have any other suggestions on where I should expect fates to be implemented in PEcAn, so that I could proceed modifying the write.config.FATES.R file?

Thanks for your comments in advance!

@rosiealice
Copy link

Hi!
Thanks for this promising initiative @Hhh-hyc :)
I guess I have concerns about the maintenance of the FATES container on the NorESMhub, since both Hui and Lasse are not working on it actively as fast as I know. I imagine that Greg Lemieux (@glemieux , or email glemieux at lbl.gov. Not sure I can tag him here) is the best person to ask about FATES container efforts as I know he has been keeping on top of the various NCAR and DoE containerisation projects....

@mdietze
Copy link
Member

mdietze commented Sep 16, 2024

To build on @rosiealice comment, I'll bring up that I'm pretty sure that NCAR's container effort started in part from own efforts at containerizing FATES from the first time we tried to couple FATES and CLM to PEcAn many years ago (all the way back to when Andy Fox was working remotely with Dave Moore at UA and then during his time at NCAR).

On a practical level, regardless of which container you use, I suspect you can't use it "as is" but will instead have to build a PEcAn specific container that takes an existing FATES container and adds in the subset of PEcAn R packages that would be required for the interfaces, as well as the rabbitmq libraries required to pass jobs from the PEcAn containers into a FATES container. But I think doing that would be preferable to our team trying to revive our own outdated FATES container. Even better would be if we can convince one of these FATES container efforts to just install the PEcAn libraries by default.

@huitang-earth
Copy link

huitang-earth commented Sep 16, 2024

Thanks @mdietze and @rosiealice for your quick comment.

Following @mdietze 's idea, I am wondering if it is possible to find the "outdated FATES container" or a prototype of PEcAn-enabled "FATES" container somewhere, so that we could already follow its folder structure to revise the "write.config.FATES.R"?

Another alternative that just came to my mind is:

@istfer mentioned to me that SIPNET has been containerized and well-updated with PEcAn. Would it be simpler to build a PEcAn-Enabled FATES container by using the existing SIPNET container with some additional libraries being installed there for running FATES?

The required libraries needed for running FATES have been clearly listed in this docker file. These libraries only need to be updated occasionally when there is a major update in CLM-FATES that require newer version of some libraries (e.g., ESMF).

@glemieux
Copy link

glemieux commented Sep 16, 2024

Hi all. Coincidentally we just ran a week-long NGEE-Tropics tutorial the last week using an updated version of the tutorial container developed for the NGEE-Arctic E3SM workshop back in 2022. While the tutorial used ELM, if you trace the chain of forks back @huitang-earth and @Hhh-hyc, you can find a CTSM (CLM 5.0) dockerfile that Shawn Serbin created: https://github.com/FASSt-simulation/simulation_containers/blob/main/docker/ctsm/release-clm5.0.35/Dockerfile. I'm not sure about the maintenance status of that repo.

Note that the FATES team doesn't have funding to provide much in the way of containerization development or maintenance outside of what we've done for this past tutorial. As such, we can only really provide support in that regard, although we are definitely willing to provide guidance and troubleshooting with FATES specific setups.

My expectation for long-term containerization support for FATES is that it will be largely funded and driven by the various host land model specific container efforts (i.e. E3SM containers, CESM containers). Note, I hadn't been aware that there was also a NorESM container effort (i.e. the land sites platform), which is great to see!

@Hhh-hyc
Copy link
Contributor Author

Hhh-hyc commented Sep 24, 2024

Dear all,

Many thanks to your prompt responses and suggestions!

We just explored all the suggested options together with @huitang-earth. Just to start with, we are thinking to first create a new Dockerfile for fates in PEcAn that loads image from pecan/models in Dockerhub similar to spinet and basgra. Then, we will add libraries and packages required by FATES (according to the Dockerfile for noresm-landsite-platform) into this base image to create a new pecan-fates image. Compared to the other dockerfiles mentioned by @glemieux, we find the dockerfile for noresm-landsite-platform includes newer versions of libraries (e.g., ESMF version 8.2) that are compatible with the most recent versions of CLM-FATES.

In line with these thoughts, I have created and pushed a template Dockerfile and model_info.json to our PR as the next task for me to do. I will try to install CLM-FATES in the "pecan/model" container in the following days.

Please let me know if you think this is a proper way to move forward at the moment. Any better ideas or suggestions are always very much welcomed!

I will keep updating the PR here, please feel free to comment on our progress at any point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants