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

Adding ERF driver to NoahMP #178

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

Adding ERF driver to NoahMP #178

wants to merge 36 commits into from

Conversation

akashdhruv
Copy link

@akashdhruv akashdhruv commented Feb 11, 2025

This pull request introduces driver for the ERF-model (https://github.com/erf-model/ERF). ERF is a C++ based application and we have developed a Fortran/C interoperability for NoahmpIO_type.

The interoperability layer corresponds to the latest functionality available in ERF after this PR is merged:

erf-model/ERF#2196

The Fortran part of the code is largely based on the HRLDAS driver and the C interoperability layer is available in the following files:

  • drivers/erf/NoahmpIO.H
  • drivers/erf/NoahmpIO.cpp
  • drivers/erf/NoahmIO_fi.F90

We also provide CMake interface to build this driver. Once library is installed once can access NoahmpIO interface in C/C++ by simply including the header file #include <NoahmpIO.H>. See this example here:

https://github.com/AIEADA/ERF/blob/13adcaf76948fcd801bde456011de97065eb5dc6/Source/LandSurfaceModel/NOAH/ERF_NOAH.H

We also introduced another header file:

  • drivers/erf/NoahArray.H

which casts C pointer to a Fortran style array to maintain consistency between access of array in Fortran an C++. See this example here:

https://github.com/AIEADA/ERF/blob/13adcaf76948fcd801bde456011de97065eb5dc6/Source/LandSurfaceModel/NOAH/ERF_NOAH.cpp#L203-L219

@akashdhruv akashdhruv marked this pull request as draft February 11, 2025 02:33
@akashdhruv akashdhruv marked this pull request as ready for review March 19, 2025 00:05
@akashdhruv akashdhruv changed the title DRAFT: Adding ERF driver to NoahMP Adding ERF driver to NoahMP Mar 19, 2025
@akashdhruv
Copy link
Author

Please Squash and Merge this pull request if possible. We would prefer if the history is consolidated in a single commit with the title of the PR as the commit message.

@akashdhruv
Copy link
Author

akashdhruv commented Mar 20, 2025

Attached is a result from a successful run of a Chisholm View simulation performed using ERF on a linux workstation with AMD Ryzen 9 CPU. The simulation used 10 MPI processes with GCC compilers.

figure

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.

2 participants