Opened 2 years ago

Closed 8 months ago

#2113 closed Defect (fixed)

Restoring restart ability with icebergs

Reported by: acc Owned by: mathiot
Priority: normal Milestone: 2018 release-4.0
Component: OCE Version: trunk
Severity: minor Keywords: icebergs, SETTE,
Cc:

Description

Context

At some point during the 2017 merge the restart ability and reproducibility with ORCA2_ICE_PISCES was lost when icebergs were active.

Analysis

The standard SETTE tests now run over 990 time steps (with restarts at 495 time steps for the restart ability tests). The 4x8 and 8x4 reproducibility test results differ only after 883 time steps. Given the test is longer than previously performed, it is likely this is a long standing feature and may well be a consequence of compiler optimisation choices. This is not considered a priority. The restart ability differences are of more concern since they appear much sooner after the restart and need investigation.

There are several issues here to resolve:

  • iceberg restarts are generated at the restart time step AND at the previous time step. The erroneous early restarts need to be suppressed.
  • The default settings initialise with name list defined test icebergs. Currently the SETTE script does not change this for the 'SHORT', restart step so the iceberg restart files are not used and the icebergs are re-initialised.
  • The current logic when initialising with name list defined test icebergs suppresses the use of the calving data but calving data is always used when restarting (nn_test_icebergs < 0) so continuous conditions are impossible to achieve at present when initialising icebergs via the name list.

Recommendation

The first issue comes about because l_rst_oce is set true both on the restart time step and the one previous. With normal restarts this enables files to be opened and defined in advance. This is risky with iceberg data because the number of bergs could alter between time steps. Will introduce logic into ice_rst_write to only take action on the restart time step itself.

Adding set_namelist commands to sette.sh will solve the second issue.

The third issue will require a new name list parameter in the icebergs name list which can be used to force the use of calving data even with test bergs.

Commit History (6)

ChangesetAuthorTimeChangeLog
12347mathiot2020-01-28T17:13:55+01:00

change comments about lbc_lnk for icb (#2113)

12346mathiot2020-01-28T17:08:32+01:00

change comments about lbc_lnk for icb (#2113)

9941acc2018-07-13T12:37:02+02:00

Final act of ticket: #2113 . Reactivate USE_ICEBERGS by default in sette.sh now that restartability and reproducibility are restored.

9940acc2018-07-13T12:18:14+02:00

Changes to restore restartability and reproducibility with ORCA2_ICE_PISCES SETTE tests with active icebergs. Changes to icbthm.F90 are purely cosmetic or improvements to code efficiency. The key change is the reintroduction of an lbc_lnk for emp in sbcmod after icb_stp. Icebergs that advect into haloes during icb_stp can melt and alter emp (if ln_passive_mode is .false.). These changes are lost across restarts without the halo exchange. This solution is not ideal but no alterantive is apparent with the current icb algorithm. This change restores both restartability and reproducibility with a 990 timestep (495 timestep restart) set of tests. See #2113 for details

9933acc2018-07-11T18:20:02+02:00

small change in sette.sh to enable use of new ln_use_calving option when running tests with icebergs. Details on ticket #2113

9932acc2018-07-11T18:12:44+02:00

Some necessary (but not yet sufficient) changes to iceberg code to reinstate restartability. Details on ticket #2113

Change History (12)

comment:1 Changed 2 years ago by acc

In 9932:

Some necessary (but not yet sufficient) changes to iceberg code to reinstate restartability. Details on ticket #2113

comment:2 Changed 2 years ago by acc

In 9933:

small change in sette.sh to enable use of new ln_use_calving option when running tests with icebergs. Details on ticket #2113

comment:3 Changed 2 years ago by acc

Changesets 9932 and 9933 address the three points mentioned in the ticket. Changes to icbrst.F90 now suppress the production of spurious restarts at the time step prior to that intended. Changes to sette.sh ensure that continuous conditions are possible with SETTE tests starting with namelist defined test bergs. This is achieved by two actions: firstly by ensuring that nn_test_icebergs is set to -1 for the SHORT, restart step and, secondly, by ensuring that a new logical: ln_use_calving is set true for the initial, LONG step. Internally, this logical is forced true when nn_test_bergs < 0. Changes to icb_oce.F90, icbini.F90 and the SHARED/namelist_ref introduce and use the new logical. Other changes are minor, cosmetic changes or support for the ongoing attempt to recover full restart ability. None of this will affect other users since USE_ICEBERGS is still set to "no" in the default sette.sh. With active icebergs, ORCA2_ICE_PISCES is restartable after 60 time steps but not after 90. The differences seem to be associated with icebergs reaching the EW cyclic boundary. Investigations continue.

comment:4 Changed 2 years ago by acc

In 9940:

Changes to restore restartability and reproducibility with ORCA2_ICE_PISCES SETTE tests with active icebergs. Changes to icbthm.F90 are purely cosmetic or improvements to code efficiency. The key change is the reintroduction of an lbc_lnk for emp in sbcmod after icb_stp. Icebergs that advect into haloes during icb_stp can melt and alter emp (if ln_passive_mode is .false.). These changes are lost across restarts without the halo exchange. This solution is not ideal but no alterantive is apparent with the current icb algorithm. This change restores both restartability and reproducibility with a 990 timestep (495 timestep restart) set of tests. See #2113 for details

comment:5 Changed 2 years ago by acc

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

Changeset 9940. introduces a fix for the restart ability and reproducibility issue. Changes to icbthm.F90 are purely cosmetic or improvements to code efficiency; namely moving static declarations and calculations from within the main loop and making all constants an explicit precision.

The key change is the reintroduction of an lbc_lnk for emp in sbcmod after icb_stp. Icebergs that advect into haloes during icb_stp can melt and alter emp (if ln_passive_mode is .false.). These changes are lost across restarts without the halo exchange. This solution is not ideal but no alternative is apparent with the current icb algorithm:

      IF( ln_icebergs    )   THEN
                                     CALL icb_stp( kt )           ! compute icebergs
         ! icebergs may advect into haloes during the icb step and alter emp.
         ! A lbc_lnk is necessary here to ensure restartability (#2113)
         IF( .NOT. ln_passive_mode ) CALL lbc_lnk( emp, 'T', 1. ) ! ensure restartability with icebergs
      ENDIF

This change restores both restartability and reproducibility with a 990 timestep (495 timestep restart) set of tests:

SETTE validation report : utils @ r9939  ( last change @ r9933 )

!!---------------1st pass------------------!!

   !----restart----!   

WORCA2_ICE_PISCES_ST         run.stat    restartability  passed :  20180713
WORCA2_ICE_PISCES_ST         tracer.stat restartability  passed :  20180713

   !----repro----!   

WORCA2_ICE_PISCES_ST         run.stat    reproducibility passed :  20180713
WORCA2_ICE_PISCES_ST         tracer.stat reproducibility passed :  20180713

This ticket will be closed but may be reopened if a better solution presents itself.

Last edited 2 years ago by nemo (previous) (diff)

comment:6 Changed 2 years ago by acc

In 9941:

Final act of ticket: #2113 . Reactivate USE_ICEBERGS by default in sette.sh now that restartability and reproducibility are restored.

comment:7 Changed 8 months ago by mathiot

  • Resolution fixed deleted
  • Status changed from closed to reopened

I don't understand how icbergs can affect emp over the haloes as before the thermodynamics we call icb_lbc in icbstp.F90.

       IF( lk_mpp ) THEN   ;          CALL icb_lbc_mpp()       ! Send bergs to other PEs
       ELSE                ;          CALL icb_lbc()           ! Deal with any cyclic boundaries in non-mpp case
       ENDIF

       IF( ASSOCIATED(first_berg) )   CALL icb_thm( kt )       ! Ice berg thermodynamics (melting) + rolling

comment:8 Changed 8 months ago by mathiot

  • Owner changed from acc to mathiot
  • Status changed from reopened to assigned

comment:9 Changed 8 months ago by mathiot

After investigation, the lbc_lnk is needed. As far as I understood, no changes are lost across restart/domain boundary as mentioned above BUT icebergs don't melt over the haloes and to be restartable and reproducible 'emp' variable needs to have correct value over the haloes (it feed in ssh then hpg), therefore a lbc_lnk is unavoidable.

suggestion replace:

       IF( ln_icebergs    )   THEN
                                      CALL icb_stp( kt )           ! compute icebergs
          ! icebergs may advect into haloes during the icb step and alter emp.
          ! A lbc_lnk is necessary here to ensure restartability (#2113)
          IF( .NOT. ln_passive_mode ) CALL lbc_lnk( 'sbcmod', emp, 'T', 1. ) ! ensure restartability with icebergs
       ENDIF

by

       IF( ln_icebergs    )   THEN
                                      CALL icb_stp( kt )           ! compute icebergs
          ! Icebergs do not melt over the haloes. 
          ! So emp values over the haloes are no more consistent with the inner domain values. 
          ! A lbc_lnk is therefore needed to ensure reproducibility and restartability.
          ! see ticket #2113 for discussion about this lbc_lnk.
          IF( .NOT. ln_passive_mode ) CALL lbc_lnk( 'sbcmod', emp, 'T', 1. )
       ENDIF

comment:10 Changed 8 months ago by mathiot

In 12346:

change comments about lbc_lnk for icb (#2113)

comment:11 Changed 8 months ago by mathiot

In 12347:

change comments about lbc_lnk for icb (#2113)

comment:12 Changed 8 months ago by mathiot

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