Opened 6 years ago

Closed 6 years ago

#1365 closed Bug (fixed)

domvvl restart logic faulty for cases when both fse3t_b and fse3t_n are not present in the restart file

Reported by: acc Owned by: acc
Priority: low Milestone:
Component: OCE Version: release-3.6
Severity: Keywords:
Cc:

Description

The restart logic for vvl cases when both the fse3t_b and fse3t_n fields are not present in the restart files appears faulty. The current logic has:

            ELSE IF( id1 > 0 ) THEN
               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : fse3t_b not found in restart files'
               IF(lwp) write(numout,*) 'fse3t_b set equal to fse3t_n.'
               IF(lwp) write(numout,*) 'neuler is forced to 0'
               fse3t_b(:,:,:) = fse3t_n(:,:,:)
               neuler = 0

There are two problems here:

  1. id1 is the varid returned from a iom_varid call for fse3t_b. If fse3t_b is not present its id will be ⇐ 0.
  2. fse3t_n is not actually read.

However, if both time-levels are not present, isn't it more likely that fse3t_b is there but fse3t_n is not?
In which case the logic ought to be:

            ELSE IF( id1 > 0 ) THEN
               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : fse3t_n not found in restart files'
               IF(lwp) write(numout,*) 'fse3t_n set equal to fse3t_b.'
               IF(lwp) write(numout,*) 'neuler is forced to 0'
               CALL iom_get( numror, jpdom_autoglo, 'fse3t_b', fse3t_b(:,:,:) )
               fse3t_n(:,:,:) = fse3t_b(:,:,:)
               neuler = 0

To cover all cases we could have:

            ELSE IF( id1 > 0 ) THEN
               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : fse3t_n not found in restart files'
               IF(lwp) write(numout,*) 'fse3t_n set equal to fse3t_b.'
               IF(lwp) write(numout,*) 'neuler is forced to 0'
               CALL iom_get( numror, jpdom_autoglo, 'fse3t_b', fse3t_b(:,:,:) )
               fse3t_n(:,:,:) = fse3t_b(:,:,:)
               neuler = 0
            ELSE IF( id2 > 0 ) THEN
               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : fse3t_b not found in restart files'
               IF(lwp) write(numout,*) 'fse3t_b set equal to fse3t_n.'
               IF(lwp) write(numout,*) 'neuler is forced to 0'
               CALL iom_get( numror, jpdom_autoglo, 'fse3t_n', fse3t_n(:,:,:) )
               fse3t_b(:,:,:) = fse3t_n(:,:,:)
               neuler = 0

but is this necessary?

Commit History (1)

ChangesetAuthorTimeChangeLog
4968acc2014-12-03T15:41:09+01:00

Branch dev_MERGE_2014. Correct logic deciding initialisation of fse3t_n or fse3t_b in dom_vvl_rst if one or the other is not present in the restart file (#1365)

Change History (1)

comment:1 Changed 6 years ago by acc

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

Fix submitted to merge development branch dev_MERGE_2014 @ revision 4968

Note: See TracTickets for help on using tickets.