Opened 5 months ago

Closed 5 months ago

#1913 closed Bug (fixed)

Compilation issue due to typo in diaar5

Reported by: Nicolas MARTIN Owned by: nemo
Priority: low Milestone:
Component: OPA Version: release-3.6
Keywords: Cc:
Severity: Workplan status:
Comments:

Description

Context


ORCA1_LIM3_PISCES cfg. monitored by trusting tool is down since 27th of May with rev. 8084.
The follow-up of ORCA2_LIM_PISCES cfg. didn't detect an issue.

Analysis


Compilation stops and complains about [ZPE] variable not declared, actually 'pe' is declared and initialised but it is 'zpe' which is used in the loop.

Extract of diaar5.F90

         zpe(:,:) = 0._wp
         IF( lk_zdfddm ) THEN
            DO jk = 2, jpk
               DO jj = 1, jpj
                  DO ji = 1, jpi
                     IF( rn2(ji,jj,jk) > 0._wp ) THEN
                        zrw =   ( fsdepw(ji,jj,jk  ) - fsdept(ji,jj,jk) )   &
                           &  / ( fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk) )
                        !
                        zaw = rab_n(ji,jj,jk,jp_tem) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_tem)* zrw
                        zbw = rab_n(ji,jj,jk,jp_sal) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_sal)* zrw
                        !
                        zpe(ji, jj) = zpe(ji, jj)            &
                           &        -  grav * (    avt(ji,jj,jk) * zaw * (tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) )  &
                           &                   - fsavs(ji,jj,jk) * zbw * (tsn(ji,jj,jk-1,jp_sal) - tsn(ji,jj,jk,jp_sal) ) )
                     ENDIF
                  END DO
               END DO
             END DO
          ELSE
            DO jk = 1, jpk
               DO ji = 1, jpi
                  DO jj = 1, jpj
                     zpe(ji,jj) = zpe(ji,jj) + avt(ji, jj, jk) * MIN(0._wp,rn2(ji, jj, jk)) * rau0 * fse3w(ji, jj, jk)
                  END DO
               END DO
            END DO
         ENDIF
         CALL lbc_lnk(zpe, 'T', 1._wp)         
         CALL iom_put( 'tnpeo', zpe  )
      ENDIF



Fix


Correct the typos

  • NEMO/OPA_SRC/DIA/diaar5.F90

     
    8080      REAL(wp) ::   zaw, zbw, zrw 
    8181      ! 
    8282      REAL(wp), POINTER, DIMENSION(:,:)     :: zarea_ssh , zbotpres       ! 2D workspace  
    83       REAL(wp), POINTER, DIMENSION(:,:)     :: pe                         ! 2D workspace  
     83      REAL(wp), POINTER, DIMENSION(:,:)     :: zpe                         ! 2D workspace  
    8484      REAL(wp), POINTER, DIMENSION(:,:,:)   :: zrhd , zrhop               ! 3D workspace 
    8585      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztsn                       ! 4D workspace 
    8686      !!-------------------------------------------------------------------- 
     
    9090      !initialisation 
    9191      IF( kt == nit000 )     CALL dia_ar5_init 
    9292  
    93       CALL wrk_alloc( jpi , jpj              , zarea_ssh , zbotpres, pe ) 
     93      CALL wrk_alloc( jpi , jpj              , zarea_ssh , zbotpres, zpe ) 
    9494      CALL wrk_alloc( jpi , jpj , jpk        , zrhd      , zrhop    ) 
    9595      CALL wrk_alloc( jpi , jpj , jpk , jpts , ztsn                 ) 
    9696 
     
    205205      ! Work done against stratification by vertical mixing 
    206206      ! Exclude points where rn2 is negative as convection kicks in here and 
    207207      ! work is not being done against stratification 
    208          pe(:,:) = 0._wp 
     208         zpe(:,:) = 0._wp 
    209209         IF( lk_zdfddm ) THEN 
    210210            DO jk = 2, jpk 
    211211               DO jj = 1, jpj 
     
    233233               END DO 
    234234            END DO 
    235235         ENDIF 
    236          CALL lbc_lnk(pe, 'T', 1._wp)          
    237          CALL iom_put( 'tnpeo', pe ) 
     236         CALL lbc_lnk(zpe, 'T', 1._wp)          
     237         CALL iom_put( 'tnpeo', zpe ) 
    238238      ENDIF 
    239239      ! 
    240       CALL wrk_dealloc( jpi , jpj              , zarea_ssh , zbotpres, pe ) 
     240      CALL wrk_dealloc( jpi , jpj              , zarea_ssh , zbotpres, zpe ) 
    241241      CALL wrk_dealloc( jpi , jpj , jpk        , zrhd      , zrhop    ) 
    242242      CALL wrk_dealloc( jpi , jpj , jpk , jpts , ztsn                 ) 
    243243      ! 

Commit History (1)

ChangesetAuthorTimeChangeLog
8187nicolasmartin2017-06-19T15:46:10+02:00

Fix for typos in diaar5.F90 [close #1913]

Change History (1)

comment:1 Changed 5 months ago by Nicolas MARTIN

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

Fix in r8187

Note: See TracTickets for help on using tickets.