Opened 14 months ago

Closed 8 months ago

Last modified 8 months ago

#2300 closed Bug (fixed)

jcat initialisation issue in icethd_do.F90

Reported by: mathiot Owned by: systeam
Priority: low Milestone:
Component: SI3 Version: release-4.0
Severity: minor Keywords:
Cc:

Description

Context

Sette test AGRIF_DEMO_ST REPRO_4_8 failed to run on METO computer.

Analysis

Initialisation of jcat is possibly not complete. If zh_newice(ji) < hi_max(0) (for example) jcat is not initialised in icethd_do:

         DO jl = 1, jpl
            DO ji = 1, npti
               IF( zh_newice(ji) > hi_max(jl-1) .AND. zh_newice(ji) <= hi_max(jl) ) THEN
                  a_i_2d(ji,jl) = a_i_2d(ji,jl) + za_newice(ji)
                  v_i_2d(ji,jl) = v_i_2d(ji,jl) + zv_newice(ji)
                  jcat(ji) = jl
               ENDIF
            END DO
         END DO

Then the model failed when jcat is used as an array index:

         ! Heat content
         DO ji = 1, npti
            jl = jcat(ji)                                                    ! categroy in which new ice is put
            zswinew  (ji) = MAX( 0._wp , SIGN( 1._wp , - za_b(ji,jl) ) )   ! 0 if old ice
         END DO

Fix

Suggested fix: make sure jcat is initialised everywhere (what default value to use for jcat in case of zh_newice negative or equal 0 (what I have for some points), I have no idea)

AGRIF_DEMO configuration with jcat = 1 by default runs and starts to diverge after 10 time steps

Commit History (2)

ChangesetAuthorTimeChangeLog
11229clem2019-07-09T14:22:12+02:00

debug BDY-ice by allowing any number of categories as input. Ticket #2300 may also be solved

11228clem2019-07-09T14:21:55+02:00

debug BDY-ice by allowing any number of categories as input. Ticket #2300 may also be solved

Attachments (1)

icethd_do.F90 (23.7 KB) - added by clem 13 months ago.

Download all attachments as: .zip

Change History (6)

Changed 13 months ago by clem

comment:1 Changed 13 months ago by clem

the attached file should solve this issue by bounding the new sea ice thickness (though I do not know why it is mandatory for agrif only).
Pierre, could you try it and tell me if it works?

comment:2 Changed 13 months ago by clem

In 11228:

debug BDY-ice by allowing any number of categories as input. Ticket #2300 may also be solved

comment:3 Changed 13 months ago by clem

In 11229:

debug BDY-ice by allowing any number of categories as input. Ticket #2300 may also be solved

comment:4 Changed 8 months ago by clem

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

zh_newice(ji) is always ≥ 0 and hi_max(0)=0, so zh_newice(ji) cannot be lower than hi_max(0)

comment:5 Changed 8 months ago by mathiot

AGRIF_DEMO is running on our computer. Problem seems to be fix. Thank you Clem.

Note: See TracTickets for help on using tickets.