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 13998 for NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/SWE/stpctl.F90 – NEMO

Ignore:
Timestamp:
2020-12-02T14:55:21+01:00 (3 years ago)
Author:
techene
Message:

branch updated with trunk 13787

Location:
NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3

    • Property svn:externals
      •  

        old new  
        88 
        99# SETTE 
        10 ^/utils/CI/sette@13292        sette 
         10^/utils/CI/sette@13559        sette 
  • NEMO/branches/2020/dev_r13327_KERNEL-06_2_techene_e3/src/SWE/stpctl.F90

    r13604 r13998  
    3131   INTEGER                ::   nrunid   ! netcdf file id 
    3232   INTEGER, DIMENSION(2)  ::   nvarid   ! netcdf variable id 
    33 !!SWE   INTEGER, DIMENSION(8)  ::   nvarid   ! netcdf variable id 
    3433 
    3534#  include "domzgr_substitute.h90" 
    3635   !!---------------------------------------------------------------------- 
    3736   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    38    !! $Id: stpctl.F90 12614 2020-03-26 14:59:52Z gm $ 
     37   !! $Id: stpctl.F90 13216 2020-07-02 09:25:49Z rblod $ 
    3938   !! Software governed by the CeCILL license (see ./LICENSE) 
    4039   !!---------------------------------------------------------------------- 
     
    6362      INTEGER                         ::   ji                                    ! dummy loop indices 
    6463      INTEGER                         ::   idtime, istatus 
    65 !!SWE      INTEGER , DIMENSION(9)          ::   iareasum, iareamin, iareamax 
    6664      INTEGER , DIMENSION(3)          ::   iareasum, iareamin, iareamax 
    6765      INTEGER , DIMENSION(3,4)        ::   iloc                                  ! min/max loc indices 
    6866      REAL(wp)                        ::   zzz                                   ! local real  
    69 !!SWE      REAL(wp), DIMENSION(9)          ::   zmax, zmaxlocal 
    7067      REAL(wp), DIMENSION(3)          ::   zmax, zmaxlocal 
    7168      LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns 
     
    7370      CHARACTER(len=20)               ::   clname 
    7471      !!---------------------------------------------------------------------- 
     72      IF( nstop > 0 .AND. ngrdstop > -1 )   RETURN   !   stpctl was already called by a child grid 
    7573      ! 
    7674      IF( nstop > 0 .AND. ngrdstop > -1 )   RETURN   !   stpctl was already called by a child grid 
     
    10098            istatus = NF90_DEF_VAR( nrunid, 'abs_ssh_max', NF90_DOUBLE, (/ idtime /), nvarid(1) ) 
    10199            istatus = NF90_DEF_VAR( nrunid,   'abs_u_max', NF90_DOUBLE, (/ idtime /), nvarid(2) ) 
    102 !!SWE            istatus = NF90_DEF_VAR( nrunid,       's_min', NF90_DOUBLE, (/ idtime /), nvarid(3) ) 
    103 !!SWE            istatus = NF90_DEF_VAR( nrunid,       's_max', NF90_DOUBLE, (/ idtime /), nvarid(4) ) 
    104 !!SWE            istatus = NF90_DEF_VAR( nrunid,       't_min', NF90_DOUBLE, (/ idtime /), nvarid(5) ) 
    105 !!SWE            istatus = NF90_DEF_VAR( nrunid,       't_max', NF90_DOUBLE, (/ idtime /), nvarid(6) ) 
    106 !!SWE            IF( ln_zad_Aimp ) THEN 
    107 !!SWE               istatus = NF90_DEF_VAR( nrunid,   'Cf_max', NF90_DOUBLE, (/ idtime /), nvarid(7) ) 
    108 !!SWE               istatus = NF90_DEF_VAR( nrunid,'abs_wi_max',NF90_DOUBLE, (/ idtime /), nvarid(8) ) 
    109 !!SWE            ENDIF 
    110100            istatus = NF90_ENDDEF(nrunid) 
    111101         ENDIF 
     
    121111      !                                   !==            test of local extrema           ==! 
    122112      !                                   !==  done by all processes at every time step  ==! 
    123 !!SWE      llmsk(:,:,1) = ssmask(:,:) == 1._wp 
    124 !!SWE      IF( ll_wd ) THEN 
    125 !!SWE         zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) + ssh_ref ), mask = llmsk(:,:,1) )   ! ssh max 
    126 !!SWE      ELSE 
    127 !!SWE         zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm)           ), mask = llmsk(:,:,1) )   ! ssh max 
    128 !!SWE      ENDIF 
    129113      zmax(1) = MINVAL( e3t_0(:,:,1)+ssh(:,:,Kmm)  )                              ! e3t_Kmm min 
    130 !!SWE 
    131114      llmsk(:,:,:) = umask(:,:,:) == 1._wp 
    132115      zmax(2) = MAXVAL(  ABS( uu(:,:,:,Kmm) ), mask = llmsk )                     ! velocity max (zonal only) 
    133 !!SWE      llmsk(:,:,:) = tmask(:,:,:) == 1._wp 
    134 !!SWE      zmax(3) = MAXVAL( -ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     ! minus salinity max 
    135 !!SWE      zmax(4) = MAXVAL(  ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     !       salinity max 
    136 !!SWE      IF( ll_colruns .OR. jpnij == 1 ) THEN     ! following variables are used only in the netcdf file 
    137 !!SWE         zmax(5) = MAXVAL( -ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  ! minus temperature max 
    138 !!SWE         zmax(6) = MAXVAL(  ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  !       temperature max 
    139 !!SWE         IF( ln_zad_Aimp ) THEN 
    140 !!SWE            zmax(7) = MAXVAL(   Cu_adv(:,:,:)   , mask = llmsk )                  ! partitioning coeff. max 
    141 !!SWE            llmsk(:,:,:) = wmask(:,:,:) == 1._wp 
    142 !!SWE            zmax(8) = MAXVAL(  ABS( wi(:,:,:) ) , mask = llmsk )                  ! implicit vertical vel. max 
    143 !!SWE         ELSE 
    144 !!SWE            zmax(7:8) = 0._wp 
    145 !!SWE         ENDIF 
    146 !!SWE      ELSE 
    147 !!SWE         zmax(5:8) = 0._wp 
    148 !!SWE      ENDIF 
    149 !!SWE      zmax(9) = REAL( nstop, wp )                                              ! stop indicator 
    150 !!SWE 
    151116      zmax(3) = REAL( nstop , wp )                                            ! stop indicator 
    152 !!SWE 
     117      !                                   !==               get global extrema             ==! 
     118      !                                   !==  done by all processes if writting run.stat  ==! 
     119      llmsk(Nis0:Nie0,Njs0:Nje0,1) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp         ! define only the inner domain 
     120      zmax(1) = MAXVAL(     -e3t(:,:,1,Kmm) ), mask = llmsk(:,:,1) )      ! ssh max 
     121      llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp        ! define only the inner domain 
     122      zmax(2) = MAXVAL(  ABS( uu(:,:,:,Kmm) ), mask = llmsk(:,:,:) )                     ! velocity max (zonal only) 
     123      zmax(3) = REAL( nstop, wp )                                                 ! stop indicator 
    153124      !                                   !==               get global extrema             ==! 
    154125      !                                   !==  done by all processes if writting run.stat  ==! 
     
    156127         zmaxlocal(:) = zmax(:) 
    157128         CALL mpp_max( "stpctl", zmax )          ! max over the global domain 
    158 !!SWE         nstop = NINT( zmax(9) )                 ! update nstop indicator (now sheared among all local domains) 
    159129         nstop = NINT( zmax(3) )                 ! update nstop indicator (now sheared among all local domains) 
    160130      ENDIF 
     
    162132      !                                   !==  done only by 1st subdomain at writting timestep  ==! 
    163133      IF( ll_wrtruns ) THEN 
    164 !!SWE         WRITE(numrun,9500) kt, zmax(1), zmax(2), -zmax(3), zmax(4) 
    165134         WRITE(numrun,9500) kt, zmax(1), zmax(2) 
    166135         istatus = NF90_PUT_VAR( nrunid, nvarid(1), (/ zmax(1)/), (/kt/), (/1/) ) 
    167136         istatus = NF90_PUT_VAR( nrunid, nvarid(2), (/ zmax(2)/), (/kt/), (/1/) ) 
    168 !!SWE         istatus = NF90_PUT_VAR( nrunid, nvarid(3), (/-zmax(3)/), (/kt/), (/1/) ) 
    169 !!SWE         istatus = NF90_PUT_VAR( nrunid, nvarid(4), (/ zmax(4)/), (/kt/), (/1/) ) 
    170 !!SWE         istatus = NF90_PUT_VAR( nrunid, nvarid(5), (/-zmax(5)/), (/kt/), (/1/) ) 
    171 !!SWE         istatus = NF90_PUT_VAR( nrunid, nvarid(6), (/ zmax(6)/), (/kt/), (/1/) ) 
    172 !!SWE         IF( ln_zad_Aimp ) THEN 
    173 !!SWE            istatus = NF90_PUT_VAR( nrunid, nvarid(7), (/ zmax(7)/), (/kt/), (/1/) ) 
    174 !!SWE            istatus = NF90_PUT_VAR( nrunid, nvarid(8), (/ zmax(8)/), (/kt/), (/1/) ) 
    175 !!SWE         ENDIF 
    176137         IF( kt == nitend )   istatus = NF90_CLOSE(nrunid) 
    177138      ENDIF 
     
    236197      ENDIF 
    237198      ! 
    238 !!SWE 9500  FORMAT(' it :', i8, '    |ssh|_max: ', D23.16, ' |U|_max: ', D23.16,' S_min: ', D23.16,' S_max: ', D23.16) 
    2391999500  FORMAT(' it :', i8, '      e3t_min: ', D23.16, ' |U|_max: ', D23.16) 
    240200      ! 
Note: See TracChangeset for help on using the changeset viewer.