New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#2300 (jcat initialisation issue in icethd_do.F90) – NEMO

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#2300 closed Bug (fixed)

jcat initialisation issue in icethd_do.F90

Reported by: mathiot Owned by: systeam
Priority: low Milestone:
Component: SI3 Version: v4.0
Severity: minor Keywords: v4.0
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 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by clem

comment:1 Changed 5 years 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 5 years ago by clem

In 11228:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:3 Changed 5 years ago by clem

In 11229:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:4 Changed 5 years 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 5 years ago by mathiot

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

comment:6 Changed 3 years ago by nemo

  • Keywords v4.0 added
Note: See TracTickets for help on using tickets.