Main menu

Navigation

Coupling cesm (CLM) to COSMO-CLM via OASIS3

2 posts / 0 new
Last post
matthias.demuze...
Coupling cesm (CLM) to COSMO-CLM via OASIS3

Dear,

At my home institute, we use COSMO-CLM (hereafter CCLM) as an regional climate model. At present, we would like to run this atmospheric model coupled to the Community Land Model (hereafer CLandM), in order to have a more detailed representation of the land surface. This coupling is done via the Oasis3 Coupler of which most of the coupling work has been done at CERFACS, France.

Now, compiling CCLM with addition of some oasis3 files went well. Only I now experience some problems with CLandM.
In have added a few new routines and compiler options, but in the last step (compiling ccsm) things go wrong.
I have read through the buildlog file (see attach), but I can't really find why this would not be working?

Basically this is what is done:

Some new routines are developped and added in a CASE folder SourceMods/src.share and src.drv. The script to add these files automatically to the cesm folder structure is attached (compile_coupled.txt).

Some of the routines compile well, others do not. For the latter, it seems that the Depends file in /ccsm/obj/ does not take into account all the necessary modules. For example, the send_fld_2oas.F90 routine states (see attach, renamed as .txt file):

USE shr_kind_mod , only : r8 => shr_kind_r8
USE spmdMod , only : masterproc

USE oas_clm_vardef

but when looking at Depends for send_fld_2oas.F90 I can see:
send_fld_2cos.o : send_fld_2cos.F90 oas_clm_vardef.mod shr_kind_mod.mod

so it seems that here the spmdMod.o file is missing in the list?
And it is exactly this that seems to be causing the error:

mpif90 -c -I. -I/apps/netcdf/3.6.3/include/Intel -I/apps/netcdf/3.6.3/include/Intel -I. -I/short/da0/mxd565/COSMO_CLM_OASIS_CLM/cesm1_0_4/scripts/testoasclm4/SourceMods/src.drv -I/short/da0/mxd565/COSMO_CLM_OASIS_CLM/cesm1_0_4/models/drv/driver -I/short/da0/mxd565/COSMO_CLM_OASIS_CLM/cesm1_0_4/scripts/testoasclm4/lib/include -DMCT_INTERFACE -DHAVE_MPI -DLINUX -DSEQ_ -DFORTRANUNDERSCORE -DNO_R16 -DNO_SHR_VMATH -g -fp-model precise -convert big_endian -assume byterecl -ftz -traceback -O2 -DCOUP_OAS -I/short/da0/mxd565/COSMO_CLM_OASIS_CLM/oasis3/Linux_MPI1/build/lib/psmile.MPI1 -FR /short/da0/mxd565/COSMO_CLM_OASIS_CLM/cesm1_0_4/scripts/testoasclm4/SourceMods/src.drv/send_fld_2cos.F90
/short/da0/mxd565/COSMO_CLM_OASIS_CLM/cesm1_0_4/scripts/testoasclm4/SourceMods/src.drv/oas_clm_define.F90(37): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [SPMDMOD]
USE spmdMod , only : MPI_INTEGER
-------^
/short/da0/mxd565/COSMO_CLM_OASIS_CLM/cesm1_0_4/scripts/testoasclm4/SourceMods/src.drv/oas_clm_define.F90(85): error #6405: The same named entity from different modules and/or program units cannot be referenced. [MPI_INTEGER]
CALL MPI_Bcast( write_aux_files, 1, MPI_INTEGER, &
---------------------------------------^
/short/da0/mxd565/COSMO_CLM_OASIS_CLM/cesm1_0_4/scripts/testoasclm4/SourceMods/src.drv/oas_clm_define.F90(250): error #6405: The same named entity from different modules and/or program units cannot be referenced. [MPI_INTEGER]
itype = MPI_INTEGER
-----------------^
compilation aborted for /short/da0/mxd565/COSMO_CLM_OASIS_CLM/cesm1_0_4/scripts/testoasclm4/SourceMods/src.drv/oas_clm_define.F90 (code 1)
gmake: *** [oas_clm_define.o] Error 1
gmake: *** Waiting for unfinished jobs....

So as a first step I would like to find out how come that this dependency is not automatically included for this (and some of the other) routines?
I hope that once I am able to solve this issue, I will be able to solve some issues with some other modified modules as well....

Kind regards,
Matthias

Hmmm. You have seemed to have identified the problem, that the Depends file doesn't have the spmdMod.mod file in the Dependency. The Dependency generator does need the filename to match the module name, but that looks fine. I don't think the case should matter either, but even so you have the case of the letters correct.

Now, if it can't find the file in your Filepath or list of Srcfiles -- it won't put it in the Depends file either. So you should verify that part. But, that's about the only thing I can come up with that would apply...

Erik Kluzek ...............

CESM Land Model (CLM) Software Liason

CESM Software Engineering Group, NCAR

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Log in or register to post comments

Who's new

  • praveenmaniyatt@...
  • arjunbabun11@...
  • lama@...
  • sisi393@...
  • 1658093099@...