Opened 6 years ago

Closed 6 years ago

#1363 closed Bug (fixed)

Uninitialised diaptr variables in offline pisces

Reported by: timgraham Owned by: timgraham
Priority: low Milestone:
Component: OFF Version: release-3.6
Severity: Keywords:
Cc:

Description

In the offline Pisces SETTE test the traadv_muscl.F90 module is called. In this module there are references to ln_diaptr and nn_fptr within IF statements. Both of these are diaptr namelist variables. These are not initialised in this configuration because dia_ptr_init is not called in nemogcm.F90. This causes this configuration to crash (with coredumps) on our system.

An easy fix is to add USE diaptr and CALL dia_ptr_init to nemogcm in OFF although this seems a bit strange because diaptr is not used in this configuration. Does anyone have any thoughts for a better fix?

Commit History (1)

ChangesetAuthorTimeChangeLog
4749timgraham2014-08-18T12:15:26+02:00

Added call to initialise diaptr in OFF_SRC/nemogcm.F90 so that if statements based on diaptr variables don't cause failures. See ticket #1363

Change History (4)

comment:1 Changed 6 years ago by cetlod

There is a parameter defined in trc_oce.F90 named lk_offline which is set to TRUE for offline configurations.

Since USE trc_oce is already done in all traadv_* and traldf_* modules, another fix could be to replace in all these modules, the lines

IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN
   IF( jn  == jp_tem)   htr_ldf(:) = ptr_vj( ztv(:,:,:) )
   IF( jn  == jp_sal)   str_ldf(:) = ptr_vj( ztv(:,:,:) )
ENDIF

with

IF( .NOT.lk_offline ) THEN
   IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN
       IF( jn  == jp_tem)   htr_ldf(:) = ptr_vj( ztv(:,:,:) )
       IF( jn  == jp_sal)   str_ldf(:) = ptr_vj( ztv(:,:,:) )
   ENDIF
ENDIF

comment:2 Changed 6 years ago by timgraham

  • Owner changed from NEMO team to timgraham
  • Status changed from new to assigned

Thanks for that idea. I think that seems like a neater solution than calling dia_ptr_init. I'll leave the ticket open for a couple of days before applying a fix in case anyone else has an opinion on the best option.

Thanks,

Tim

comment:3 Changed 6 years ago by timgraham

I will fix this using the method I originally proposed as it would require changes in a lot of places to apply cetlod's suggested solution.

comment:4 Changed 6 years ago by timgraham

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

Change committed at r4749.

Note: See TracTickets for help on using tickets.