HPSCTerrSys / eCLM

Fork of Community Land Model v5.0
https://hpscterrsys.github.io/eCLM/
Other
8 stars 13 forks source link

PDAF support #23

Closed kvrigor closed 10 months ago

kvrigor commented 11 months ago

We can even simplify the eCLM-ParFlow-PDAF workflow by consolidating all PDAF developments to master. Things to do:

jjokella commented 10 months ago

Hey @kvrigor, I have implemented the first point

* [ ]  Add new CMake option `COUP_OAS_PDAF`  which encapsulates all changes specific to PDAF

except that I have used USE_PDAF instead of COUP_OAS_PDAF to highlight that PDAF is not a component model coupled via OASIS. Otherwise I have followed your suggestion.

My proposal: We merge this PR, as this eCLM should now safely work with and without PDAF. I propose turn the two leftover points into their own issues/PRs as I do not have a solution readily available for them.

kvrigor commented 10 months ago

thanks @jjokella. For the last 2 items I have an idea how to do them; just give me time this week to implement them.

kvrigor commented 10 months ago

Also, for USE_PDAF to take effect it should be added as a compile definition to csm_share library like this: target_compile_definitions(${PROJECT_NAME} PUBLIC USE_PDAF). As a reference you can see how the COUP_OAS_* definitions were added:

https://github.com/HPSCTerrSys/eCLM/blob/fe2d6ed636a9f9978cf6fd0025b254f14525e1e1/src/csm_share/CMakeLists.txt#L115-L129

jjokella commented 10 months ago

I have added the commit https://github.com/HPSCTerrSys/eCLM/commit/66c5e8f99fb05863a05819900b61f187d11ceca0 that should add the compile definition.

kvrigor commented 10 months ago

All include files are now exported to ${CMAKE_INSTALL_PREFIX}/include. For the PDAF linking issue we can live for the libmct2.a workaround for now; I realized that the "proper fix" would be costly since this requires re-verifying that the standard eCLM coupled runs still work.

We can merge this branch once the eCLM-ParFlow-PDAF build works.