New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1096 (Missing subroutines for C1D case in lbclnk) – NEMO

Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#1096 closed Bug (fixed)

Missing subroutines for C1D case in lbclnk

Reported by: hadcv Owned by: nemo
Priority: low Milestone:
Component: C1D Version: trunk
Severity: Keywords: C1D LBC
Cc:

Description

Compilation of the C1D configuration at version 3.5 beta fails due to missing dummy subroutines lbc_bdy_lnk_3d, lbc_bdy_lnk_2d and lbc_lnk_2d_e in lbclnk.F90.

These need to be specified for the 'key_c1d' case in addition to the 'else' case.

Commit History (2)

ChangesetAuthorTimeChangeLog
4145hadcv2013-11-01T18:47:40+01:00

Ticket #1157 (C1D fixes): redo the fix for #1096 to work for XIOS detached mode and add xios_context_finalize.

3971cbricaud2013-07-12T11:31:43+02:00

Correction for 1D configuration ; see ticket #1096

Change History (7)

comment:1 follow-up: Changed 10 years ago by rbourdal

Hi,

The problem comes from the addition of new lbc routines.
This problem can be solve just by changing the order of soubroutines and cpp_key

at this time the order is:
#if defined key_mpp_mpi
...
#else
# if defined key_c1d

SUBROUTINE lbc_lnk_3d_gather
SUBROUTINE lbc_lnk_3d
SUBROUTINE lbc_lnk_2d

#else

SUBROUTINE lbc_lnk_3d_gather
SUBROUTINE lbc_lnk_3d
SUBROUTINE lbc_bdy_lnk_3d
SUBROUTINE lbc_bdy_lnk_2d
SUBROUTINE lbc_lnk_2d
SUBROUTINE lbc_lnk_2d_e

#endif
#endif

You erase this problem by changing in this way:
#if defined key_mpp_mpi
...
#else
# if defined key_c1d

SUBROUTINE lbc_lnk_3d_gather
SUBROUTINE lbc_lnk_3d
SUBROUTINE lbc_lnk_2d

#else

SUBROUTINE lbc_lnk_3d_gather
SUBROUTINE lbc_lnk_3d
SUBROUTINE lbc_lnk_2d

#endif

SUBROUTINE lbc_bdy_lnk_3d
SUBROUTINE lbc_bdy_lnk_2d
SUBROUTINE lbc_lnk_2d_e

#endif

But I don't close this ticket because:
This modification is OK for NEMO's trunk before the modification of iom/xio interface in the trunk (Ticket #1122).
But with the new version of the trunk (NEMO revision 3956) et the xios associated (rev 445 and more) there is a conflict with the key_mpp_mpi:
The 1D configuration sould NOT use the key_mpp_mpi to apply the 1D-specific lbclnk routines and 1D configuration must use key_iomput (line 490 of
nemogcm.F90) for the outputs. The problem is that the new xios serveur (rev445) and NEMO (with key_iomput) must be compiled with the key_mpp_mpi !
Maybe a good solution is remplementing the lbc 1D-specific routines in the mpp case... ?

Regards,
Romain

comment:2 in reply to: ↑ 1 Changed 10 years ago by hadcv

Hi Romain,

When you say that XIOS requires compilation with key_mpp_mpi, are you referring to the following line in iom.F90?

CALL xios_context_initialize(TRIM(clname), mpi_comm_opa)

This is also a block to running C1D in version 3.5 since mpi_comm_opa isn't defined without key_mpp_mpi. I have fixed this in my working copy by replacing with:

#if defined key_mpp_mpi

CALL xios_context_initialize(TRIM(clname), mpi_comm_opa)

#else

CALL xios_context_initialize(TRIM(clname), 0)

#endif

This and a definition of the lbc_bdy subroutines outside the C1D cpp key allow the model to run, and I have tested it with the recent XIOS changes. What do you think?

Daley

comment:3 follow-up: Changed 10 years ago by rbourdal

Hi Daley,

My first idea was to be able running also with key_mpp_mpi but I think you're right.
In a first step, we should be able running with "classical" option (without key_mpp_mpi).
I purpose you the following modifications:

domzgr.F90 fix to compile with check bounds option (pb of write in s-coord case !)
iom.F90 Correct the call to xio if not key_mpp_mpi (your solution)
lbclnk.F90 change the order of routines to be OK in 1D case.
solmat.F90 add lbclnk in 1D case (just pb at initialization) because bmask=/0 everywhere and gcdmat not defined everywhere (pb can be correct also with creation of nemo_init_1d with just the usefull init. !)
step_c1d.F90 Add iom_init like in step.F90

It's OK for you ?

Romain

comment:4 in reply to: ↑ 3 Changed 10 years ago by hadcv

Hi Romain,

That seems ok to me, it covers the three bugs I addressed in my local copy (lbclnk, step_c1d and iom). In step_c1d.F90, should we also change:

CALL iom_setkt( kstp )

to

CALL iom_setkt ( kstp - nit000 + 1 )

for consistency with step.F90?

Daley

comment:5 Changed 10 years ago by rbourdal

Yes I have changed also this modified call.
I have also added a call to diahth to access at more MLD diagnotics...

Romain

comment:6 Changed 10 years ago by rbourdal

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 7 years ago by nicolasmartin

  • Keywords LBC added; lbclnk removed
Note: See TracTickets for help on using tickets.