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.
Changeset 9257 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC – NEMO

Ignore:
Timestamp:
2018-01-18T11:14:03+01:00 (6 years ago)
Author:
frrh
Message:

Commit JP's Met Office GMED ticket 371 for trapping or notifying of
peculiar values of MEDUSA fields arising from transient temperature
spikes in the ocean.

Committed using:
svn merge: 9177:9249 svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/NERC/dev_r5518_GO6_Carb_Fail_from_GO6_9163

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/stpctl.F90

    r6487 r9257  
    5858      INTEGER  ::   ii, ij, ik              ! temporary integers 
    5959      REAL(wp) ::   zumax, zsmin, zssh2     ! temporary scalars 
     60      REAL(wp) ::   ztmax, ztmin            ! Scalar to get temperature extreme 
     61                                            ! values and warn if they're out of Range 
    6062      INTEGER, DIMENSION(3) ::   ilocu      !  
    6163      INTEGER, DIMENSION(2) ::   ilocs      !  
     
    1481509500  FORMAT (' kt=',i6,' min SSS: ',1pg11.4,', i j: ',2i5) 
    149151 
     152! ==================================================================================================== 
     153! ==================================================================================================== 
     154      !                                              !AXY (25/10/17) 
     155      !                                              !* Test max/min limits of temperature 
     156      !                                              !  ---------------------------------- 
     157      ztmax =  -5.e0  ! arbitrary  low maximum value 
     158      ztmin = 100.e0  ! arbitrary high minimum value 
     159      DO jj = 2, jpjm1 
     160         DO ji = 2, jpim1 
     161            IF( tmask(ji,jj,1) == 1) THEN 
     162               ztmax = MAX(ztmax,tsn(ji,jj,1,jp_tem))     ! find local maximum 
     163               ztmin = MIN(ztmin,tsn(ji,jj,1,jp_tem))     ! find local minimum 
     164            ENDIF 
     165         END DO 
     166      END DO 
     167      IF( lk_mpp )   CALL mpp_max( ztmax )                ! max over the global domain 
     168      IF( lk_mpp )   CALL mpp_min( ztmin )                ! min over the global domain 
     169      ! 
     170      IF( ztmax > 40.) THEN  ! we've got a problem 
     171         IF (lk_mpp) THEN 
     172            CALL mpp_maxloc ( tsn(:,:,1,jp_tem),tmask(:,:,1), ztmax, ii,ij ) 
     173         ELSE 
     174            ilocs = MAXLOC( tsn(:,:,1,jp_tem), mask = tmask(:,:,1) == 1.e0 ) 
     175            ii = ilocs(1) + nimpp - 1 
     176            ij = ilocs(2) + njmpp - 1 
     177         ENDIF 
     178         ! 
     179         IF(lwp) THEN 
     180            WRITE(numout,*) 'stp_ctl:tracer anomaly: *****    WARNING     *****' 
     181            WRITE(numout,*) 'stp_ctl:tracer anomaly: sea surface temperature > 40C' 
     182            WRITE(numout,9600) kt, ztmax, ii, ij 
     183            WRITE(numout,*) 'stp_ctl:tracer anomaly: ***** END OF WARNING *****' 
     184         ENDIF 
     185      ENDIF 
     186      ! 
     187      IF( ztmin < -3.) THEN  ! we've got a problem 
     188         IF (lk_mpp) THEN 
     189            CALL mpp_minloc ( tsn(:,:,1,jp_tem),tmask(:,:,1), ztmin, ii,ij ) 
     190         ELSE 
     191            ilocs = MINLOC( tsn(:,:,1,jp_tem), mask = tmask(:,:,1) == 1.e0 ) 
     192            ii = ilocs(1) + nimpp - 1 
     193            ij = ilocs(2) + njmpp - 1 
     194         ENDIF 
     195         ! 
     196         IF(lwp) THEN 
     197            WRITE(numout,*) 'stp_ctl:tracer anomaly: *****    WARNING     *****' 
     198            WRITE(numout,*) 'stp_ctl:tracer anomaly: sea surface temperature < -3C' 
     199            WRITE(numout,9700) kt, ztmin, ii, ij 
     200            WRITE(numout,*) 'stp_ctl:tracer anomaly: ***** END OF WARNING *****' 
     201         ENDIF 
     202      ENDIF 
     2039600  FORMAT ('stp_ctl:tracer anomaly: kt=',i6,' max SST: ',f16.10,', i j: ',2i5) 
     2049700  FORMAT ('stp_ctl:tracer anomaly: kt=',i6,' min SST: ',f16.10,', i j: ',2i5) 
     205! ==================================================================================================== 
     206! ==================================================================================================== 
    150207       
    151208      IF( lk_c1d )  RETURN          ! No log file in case of 1D vertical configuration 
Note: See TracChangeset for help on using the changeset viewer.