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.
#1788 (C1D_PAPA with TOP do not compile) – NEMO

Opened 8 years ago

Closed 8 years ago

Last modified 2 years ago

#1788 closed Bug (fixed)

C1D_PAPA with TOP do not compile

Reported by: lovato Owned by: lovato
Priority: lowest Milestone: Unscheduled
Component: TOP Version: v3.6
Severity: Keywords: C1D Miscellaneous TOP v3.6
Cc: lovato, timgraham

Description (last modified by lovato)

Context

Use the 1D configuration with OPA and TOP in NEMO3.6 (and trunk) generate compilation bug.

Analysis

The bug arise in the module trcsub, when accessing with use only instance to the memory of zdfgls

 21 #if defined key_zdfgls
 22    USE zdfgls, ONLY: en
 23 #endif

Fix

The simplest solution is to remove the use only of memory in the 3.6_stable code and also in the trunk

 21 #if defined key_zdfgls
 22    USE zdfgls
 23 #endif

In addition, also the step subroutine of C1D should be updated to properly initialize xios information

NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90

@@ -59,9 +59,9 @@ CONTAINS

       !! ---------------------------------------------------------------------

                              indic = 0                ! reset to no error condition
-      IF( kstp == nit000 )   CALL iom_init( "nemo")   ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS)
+      IF( kstp == nit000 )   CALL iom_init( cxios_context )   ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS)
       IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init)
-                             CALL iom_setkt( kstp - nit000 + 1, "nemo" )   ! say to iom that we are at time step kstp
+                             CALL iom_setkt( kstp - nit000 + 1, cxios_context )   ! say to iom that we are at time step kstp

Commit History (4)

ChangesetAuthorTimeChangeLog
7091lovato2016-10-25T16:52:34+02:00

#1788 - trunk: bugfix for memory use association in trcsub

7088lovato2016-10-25T16:35:26+02:00

#1788 - revise bugfix for memory use association in trcsub

7080lovato2016-10-24T18:37:19+02:00

#1788 - Solve compilation bug of C1D when including TOP component

7079lovato2016-10-24T18:30:30+02:00

#1788 - trunk: Solve compilation bug of C1D when including TOP component

Change History (8)

comment:1 Changed 8 years ago by lovato

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

The problem was solved at r7080 for nemo 3.6 stable and r7079 for trunk TOP developments.

The same issue was partly addressed in ticket #1752 that was also closed.

comment:2 Changed 8 years ago by timgraham

  • Cc lovato timgraham added
  • Resolution fixed deleted
  • Status changed from closed to reopened

The reason for this failure is that en is no longer defined in zdfgls but in zdf_oce instead. Therefore if en is still required then the correct fix here is to replace "USE zdf_gls" with "USE zdf_oce". If en is not required then the USE zdf_gls line should be removed.

From what I can see your fix simply imports all of the variables from zfd_gls into this routine and uses none of them.

Also r7079 is not a revision of the trunk. It's a revision of your branch.

comment:3 Changed 8 years ago by lovato

The improvement proposed by Tim to remove the "USE zdf_gls" can be extended also to "USE zdf_tke",
while the "USE zdf_oce" was already defined in the module.

I successfully tested the above changes to trcsub with C1D_PAPA+TOP tracer and ORCA2_LIM_PISCES in v3.6_stable,
so I'm going to update the 3.6 branch.

The same set of changes will be included instead in the TOP development branch that will enter the trunk in the 2016 merge.

comment:4 Changed 8 years ago by lovato

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from reopened to closed

The proposed changes were implemented in r7088 for nemo_v3_6_STABLE and in r7091 for trunk.

I think the ticket can be closed.

comment:5 Changed 6 years ago by nemo

  • Keywords changed from C1D, TOP to C1D TOP

comment:6 Changed 6 years ago by nemo

  • Keywords Misc. added

comment:7 Changed 6 years ago by nemo

  • Keywords Misc. removed

comment:8 Changed 2 years ago by nemo

  • Keywords Miscellaneous v3.6 added
Note: See TracTickets for help on using tickets.