Opened 5 months ago

Closed 3 months ago

#2413 closed Bug (fixed)

DOMAINcfg write domcfg.nc even if nstop /= 0

Reported by: mathiot Owned by: mathiot
Priority: low Milestone:
Component: DOM Version: trunk
Severity: minor Keywords: TOOLS, DOMAINcfg,
Cc:

Description

Context

The DOMAINcfg tool writes the domcfg.nc output file even if nstop /= 0. In the case you forgot the coordinates, domcfg.nc will have 0 for the coordinates part (glam, gphi, e1 and e2) and correct value for e3, and top/bottom lvl. If not spot (because you forgot to read ocean.output, you only check the bottom_level variable …), this can lead to NaN in NEMO and failure in XIOS at the end of the first month in some case.

It affects the trunk and probably v4.

Analysis


Fix

Do not write any domcfg.nc file if nstop /= 0 before the call to cfg_write.

I suggest to add in dom_ctl this bit of code:

      ! check that all process are still there... If some process have an error,
      ! they will never enter in cfg_write
      IF( lk_mpp )   CALL mpp_max( 'nemogcm',nstop )
      IF (nstop /= 0) THEN
         WRITE(numout,*) ''
         WRITE(numout,*) '========================================================'
         WRITE(numout,*) 'E R R O R : ',nstop, ' error have been found'
         WRITE(numout,*) '========================================================'
         WRITE(numout,*) ''
         IF ( lk_mpp ) THEN
            CALL mppstop()
         ELSE
            STOP 123
         END IF
      END IF

Commit History (5)

ChangesetAuthorTimeChangeLog
12873mathiot2020-05-05T18:11:35+02:00

ticket #2413: remove ticket branch

12870mathiot2020-05-05T17:48:36+02:00

ticket #2413: merge tools_ticket2413 into tools

12865mathiot2020-05-04T19:15:11+02:00

ticket #2413: add check on nstop in dom_ctl.

12864mathiot2020-05-04T18:33:13+02:00

ticket #2413: branch to fix minor issue in tools (stop domcfg before writing file if issue detected)

12863mathiot2020-05-04T18:32:59+02:00

ticket #2413: fix minor issue in tools (stop domcfg before writing file if issue detected)

Change History (8)

comment:1 Changed 3 months ago by mathiot

In 12863:

ticket #2413: fix minor issue in tools (stop domcfg before writing file if issue detected)

comment:2 Changed 3 months ago by mathiot

In 12864:

ticket #2413: branch to fix minor issue in tools (stop domcfg before writing file if issue detected)

comment:3 Changed 3 months ago by mathiot

In 12865:

ticket #2413: add check on nstop in dom_ctl.

comment:4 Changed 3 months ago by davestorkey

I've reviewed this and I think it looks OK.

comment:5 Changed 3 months ago by mathiot

Reply to Dave: I tested it on WED025 with a missing coordinates file and it catch the error.

comment:6 Changed 3 months ago by mathiot

In 12870:

ticket #2413: merge tools_ticket2413 into tools

comment:7 Changed 3 months ago by mathiot

In 12873:

ticket #2413: remove ticket branch

comment:8 Changed 3 months ago by mathiot

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.