Opened 6 years ago

Closed 4 years ago

#1507 closed Defect (wontfix)

Errors in namcfg & namctl not reported correctly

Reported by: timgraham Owned by: nemo
Priority: low Milestone:
Component: OCE Version: trunk
Severity: Keywords:
Cc: Branch review:
MP ready?: Task progress:

Description

At the start of nemo_init namcfg and namctl are read from namelist_ref and namelist_cfg and if any errors occur then ctl_nam is called. This attempts to write the errors to numout but at this point in nemo_init numout has not yet been opened.

It's also not simple to just reorder the code as it the section of code that opens numout is contained in an IF statement which relies on the value of ln_ctl read in from the namelist.

lwp = (narea == 1) .OR. ln_ctl
      IF(lwp) THEN                            ! open listing units
         !
         CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea )
         !
         WRITE(numout,*)
         WRITE(numout,*) '   CNRS - NERC - Met OFFICE - MERCATOR-ocean - INGV - CMCC'
         WRITE(numout,*) '                       NEMO team'
         WRITE(numout,*) '            Ocean General Circulation Model'
         WRITE(numout,*) '                  version 3.6  (2015) '
         WRITE(numout,*)
         WRITE(numout,*)
         DO ji = 1, SIZE(cltxt)
            IF( TRIM(cltxt(ji)) /= '' )   WRITE(numout,*) cltxt(ji)      ! control print of mynode
         END DO
         WRITE(numout,cform_aaa)                                         ! Flag AAAAAAA
         !
      ENDIF

This means that an error in reading either of these namelists will stop cleanly without going into stp but there will be no message in ocean.output describing the error - just the "1 error have been found" print at the end of ocean.output. This makes debugging far more time consuming than it should be.

Do we need some sort of special case to deal with this?

Commit History (0)

(No commits)

Change History (2)

comment:1 Changed 6 years ago by acc

Looks as if the (currently redundant) ldwp argument to ctl_nam ought to be used in this case. The calls in nemo_init have this set to .TRUE. rather than lwp but it isn't used in ctl_nam nor passed onto ctl_stop/ctl_warn. Couldn't an IF( ldwp .AND. .NOT. lwp ) be used in ctl_nam to print a message to stderr at least? This is all before any MPI initialisation so only one process should report.

comment:2 Changed 4 years ago by clevy

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

Suppressing tickets opened on the trunk since more than 2 years… cleaning started!

Note: See TracTickets for help on using tickets.