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

Add OASIS-coupling for CLM3.5-ParFlow-PDAF #40

Closed
wants to merge 17 commits into from
Closed

Conversation

jjokella
Copy link
Contributor

@jjokella jjokella commented Nov 21, 2024

This is a follow-up on #39

In #39, CLM3.5-PDAF / CLM3.5-ParFlow-PDAF could be compiled.

However, there were errors in executing the CLM3.5-ParFlow-PDAF Testcase clm3_pfl_pdaf_fsday4 related to the OASIS-coupler and in particular the fact that the CLM3.5-ParFlow coupling is performed with an older version of the coupler.

I try to tackle the issue with this PR. My goal: That I can perform my PDAF-testcase-suite completely in the TSMP2 framework.

This is a big step towards moving all PDAF-related users from TSMP1 to TSMP2.

Changes

These changes only work in combination with OASIS3-MCT-v2.0, pre-patched for PDAF from the branch https://icg4geo.icg.kfa-juelich.de/ModelSystems/tsmp_src/oasis3-mct/-/tree/oasis3-MCT_2.0-pdaf-patched

  • Add submodule oasis3-mct-clm35 for software OASIS3-MCT-v2 that is patched for CLM3.5-ParFlow-PDAF
  • build_tsmp2.sh: Small fix in dwn_compsrc(), regarding the condition, when to download ParFlow from parflow_pdaf or OASIS3-MCT from oasis3-mct-clm35
  • BuildCLM3.5.cmake: Add include directory for OASIS3-MCT-v2 modules
  • BuildOASIS3MCT.cmake: Add completely remodelled make.inc for OASIS3-MCT-v2 (modelled after https://github.com/HPSCTerrSys/TSMP/blob/master/bldsva/intf_oas3/oasis3-mct/arch/config/make.intel_oa3 )
  • BuildOASIS3MCT.cmake: Adapting make-target, when CLM3.5 is used

@jjokella jjokella marked this pull request as ready for review November 21, 2024 17:20
@jjokella jjokella requested a review from kvrigor November 21, 2024 17:20
@jjokella
Copy link
Contributor Author

Testcases are now reproducing results from TSMP1 👍

I think this can be merged.

Small thing bugging me: The old OASIS needs password authentication for the clone. However, I curently do not see a way around it.

@kvrigor
Copy link
Member

kvrigor commented Nov 22, 2024

I believe CLM3.5-ParFlow should compile with OASI3-MCT v5; there are specific commits in CLM3.5 and ParFlow to support this. Also we have these test cases:

@jjokella can you try compiling with the latest OASIS3-MCT? If there are compile errors I think they should be easily fixable.

file(APPEND ${OASIS_MAKE_INC} "CPPDEF = -Duse_netCDF -Duse_comm_$(CHAN) -D__VERBOSE -DTREAT_OVERLAY -DUSE_PDAF\n")


if(${CLM3.5})
Copy link
Member

Choose a reason for hiding this comment

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

You can try to disable this when compiling with OASIS3-MCT v5. I think the default make.inc should work for all component models.

@jjokella
Copy link
Contributor Author

jjokella commented Nov 22, 2024

Hey @kvrigor thanks for the review.

Actually compilation worked with CLM3.5-ParFlow-PDAF with OASI3-MCT v5 also before this PR. There were runtime errors in the PDAF-testcase clm3_pfl_pdaf_fsday4. These are then most likely in connection to PDAF-related pre-patching.

As I think we should not invest too much time into CLM3.5, what I could do is to put all conditions, where I change things for CLM3.5 to actually only change for CLM3.5+PDAF. Then my testcases run and non-DA CLM3.5-ParFlow will be compiled as before!? I did not realize there were still testcases for CLM3.5-PDAF that I interfere with!

FYI: Runtime error of clm3_pfl_pdaf_fsday4 with OASIS-MCT_v5

standard error

 (oasis_abort) ABORT: CALLING ABORT FROM OASIS LAYER NOW
 (oasis_abort) ABORT: See the log files in the run directory
application called MPI_Abort(comm=0xC4000000, 1) - process 0
p_Abort(r188): aborting on users request

oasis log file

(oasis_init_comp) OASIS RUNNING 
(oasis_init_comp) OPEN debug file for pe, unit :       0    9999
 (check_status) ERROR:  netcdf status
 (oasis_io_write_fldattr) nf90_strerror = NetCDF: Unknown file format
 (oasis_abort) ABORT: file      = mod_oasis_io.F90
 (oasis_abort) ABORT: line      =          266
 (oasis_abort) ABORT: on model  = oaspfl
 (oasis_abort) ABORT: on global rank =            0
 (oasis_abort) ABORT: on local  rank =            0
 (oasis_abort) ABORT: CALLING ABORT FROM OASIS LAYER NOW

@jjokella jjokella marked this pull request as draft November 22, 2024 13:08
@jjokella
Copy link
Contributor Author

jjokella commented Nov 22, 2024

Closing this PR as CLM3.5-ParFlow-PDAF was successfully run with OASIS3-MCT-v5 after adding $NCDFTYP input in namcouple. See https://icg4geo.icg.kfa-juelich.de/ExternalRepos/tsmp-pdaf/TSMP-PDAF-testcases/-/commit/91578ef195d6cc04c6497bae2ed8b7caf396bc22

Taking this into account, this PR boils down to the small fix presented in #41

@jjokella jjokella closed this Nov 22, 2024
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