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 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90 – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (14 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90

    • Property svn:eol-style deleted
    r1585 r2528  
    1111   !!   NEMO     3.2  !  2009-07  (S. Masson) hc300 bugfix + cleaning + add new diag 
    1212   !!---------------------------------------------------------------------- 
    13  
    1413#if   defined key_diahth   ||   defined key_esopa 
    1514   !!---------------------------------------------------------------------- 
     
    1817   !!   dia_hth      : Compute varius diagnostics associated with the mixed layer 
    1918   !!---------------------------------------------------------------------- 
    20    !! * Modules used 
    2119   USE oce             ! ocean dynamics and tracers 
    2220   USE dom_oce         ! ocean space and time domain 
    2321   USE phycst          ! physical constants 
    2422   USE in_out_manager  ! I/O manager 
    25    USE iom 
     23   USE iom             ! I/O library 
    2624 
    2725   IMPLICIT NONE 
    2826   PRIVATE 
    2927 
    30    !! * Routine accessibility 
    31    PUBLIC dia_hth    ! routine called by step.F90 
    32  
    33    !! * Shared module variables 
     28   PUBLIC   dia_hth    ! routine called by step.F90 
     29 
    3430   LOGICAL , PUBLIC, PARAMETER          ::   lk_diahth = .TRUE.   !: thermocline-20d depths flag 
    3531   ! note: following variables should move to local variables once iom_put is always used  
     
    4238#  include "domzgr_substitute.h90" 
    4339   !!---------------------------------------------------------------------- 
    44    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
     40   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    4541   !! $Id$  
    46    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    47    !!---------------------------------------------------------------------- 
    48  
     42   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     43   !!---------------------------------------------------------------------- 
    4944CONTAINS 
    5045 
     
    6863      !! 
    6964      !! ** Method :  
    70       !! 
    7165      !!------------------------------------------------------------------- 
    7266      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    7367      !! 
    7468      INTEGER                          ::   ji, jj, jk            ! dummy loop arguments 
    75       INTEGER                          ::   iid, iif, ilevel      ! temporary integers 
     69      INTEGER                          ::   iid, ilevel           ! temporary integers 
    7670      INTEGER, DIMENSION(jpi,jpj)      ::   ik20, ik28            ! levels 
    7771      REAL(wp)                         ::   zavt5 = 5.e-4_wp      ! Kz criterion for the turbocline depth 
     
    10397 
    10498      ! initialization 
    105       ztinv  (:,:) = 0.e0_wp   
    106       zdepinv(:,:) = 0.e0_wp   
    107       zmaxdzT(:,:) = 0.e0_wp   
     99      ztinv  (:,:) = 0._wp   
     100      zdepinv(:,:) = 0._wp   
     101      zmaxdzT(:,:) = 0._wp   
    108102      DO jj = 1, jpj 
    109103         DO ji = 1, jpi 
     
    128122      ! Preliminary computation 
    129123      ! computation of zdelr = (dr/dT)(T,S,10m)*(-0.2 degC) 
    130       DO jj=1, jpj 
    131          DO ji=1, jpi 
     124      DO jj = 1, jpj 
     125         DO ji = 1, jpi 
    132126            IF( tmask(ji,jj,nla10) == 1. ) THEN 
    133127               zu  =  1779.50 + 11.250*tn(ji,jj,nla10) - 3.80*sn(ji,jj,nla10) - 0.0745*tn(ji,jj,nla10)*tn(ji,jj,nla10)   & 
     
    139133               zdelr(ji,jj) = ztem2 * (1000.*(zut*zv - zvt*zu)/zw) 
    140134            ELSE 
    141                zdelr(ji,jj) = 0.e0 
     135               zdelr(ji,jj) = 0._wp 
    142136            ENDIF 
    143137         END DO 
     
    153147         DO jj = 1, jpj 
    154148            DO ji = 1, jpi 
    155  
     149               ! 
    156150               zzdep = fsdepw(ji,jj,jk) 
    157151               zztmp = ( tn(ji,jj,jk-1) - tn(ji,jj,jk) ) / zzdep * tmask(ji,jj,jk)   ! vertical gradient of temperature (dT/dz) 
     
    189183         DO jj = 1, jpj 
    190184            DO ji = 1, jpi 
    191  
     185               ! 
    192186               zzdep = fsdepw(ji,jj,jk) * tmask(ji,jj,1) 
    193  
     187               ! 
    194188               zztmp = tn(ji,jj,nla10) - tn(ji,jj,jk)                  ! - delta T(10m) 
    195189               IF( ABS(zztmp) > ztem2 )      zabs2   (ji,jj) = zzdep   ! abs > 0.2 
     
    203197               IF( zztmp > zrho3        )    zrho10_3(ji,jj) = zzdep   ! > 0.03 
    204198               IF( zztmp > zdelr(ji,jj) )    zpycn   (ji,jj) = zzdep   ! > equi. delta T(10m) - 0.2 
    205  
     199               ! 
    206200            END DO 
    207201         END DO 
     
    237231      DO jj = 1, jpj 
    238232         DO ji = 1, jpi 
    239  
    240             iif = mbathy(ji,jj) 
    241             zzdep = fsdepw(ji,jj,iif) 
    242  
     233            ! 
     234            zzdep = fsdepw(ji,jj,mbkt(ji,jj)+1)       ! depth of the oean bottom 
     235            ! 
    243236            iid = ik20(ji,jj) 
    244237            IF( iid /= 1 ) THEN  
    245                ! linear interpolation 
    246                zztmp =      fsdept(ji,jj,iid  )   & 
     238               zztmp =      fsdept(ji,jj,iid  )   &                     ! linear interpolation 
    247239                  &  + (    fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid)                       )   & 
    248240                  &  * ( 20.*tmask(ji,jj,iid+1) -     tn(ji,jj,iid)                       )   & 
    249241                  &  / (        tn(ji,jj,iid+1) -     tn(ji,jj,iid) + (1.-tmask(ji,jj,1)) ) 
    250                ! bound by the ocean depth, minimum value, first T-point depth 
    251                hd20(ji,jj) = MIN( zztmp*tmask(ji,jj,1), zzdep) 
     242               hd20(ji,jj) = MIN( zztmp , zzdep) * tmask(ji,jj,1)       ! bound by the ocean depth 
    252243            ELSE  
    253                hd20(ji,jj)=0. 
     244               hd20(ji,jj) = 0._wp 
    254245            ENDIF 
    255  
     246            ! 
    256247            iid = ik28(ji,jj) 
    257248            IF( iid /= 1 ) THEN  
    258                ! linear interpolation 
    259                zztmp =      fsdept(ji,jj,iid  )   & 
     249               zztmp =      fsdept(ji,jj,iid  )   &                     ! linear interpolation 
    260250                  &  + (    fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid)                       )   & 
    261251                  &  * ( 28.*tmask(ji,jj,iid+1) -     tn(ji,jj,iid)                       )   & 
    262252                  &  / (        tn(ji,jj,iid+1) -     tn(ji,jj,iid) + (1.-tmask(ji,jj,1)) ) 
    263                ! bound by the ocean depth, minimum value, first T-point depth 
    264                hd28(ji,jj) = MIN( zztmp*tmask(ji,jj,1), zzdep ) 
     253               hd28(ji,jj) = MIN( zztmp , zzdep ) * tmask(ji,jj,1)      ! bound by the ocean depth 
    265254            ELSE  
    266                hd28(ji,jj) = 0. 
     255               hd28(ji,jj) = 0._wp 
    267256            ENDIF 
    268257 
     
    277266 
    278267      ! find ilevel with (ilevel+1) the deepest W-level above 300m (we assume we can use e3t_0 to do this search...) 
    279       ilevel = 0 
    280       zthick_0 = 0.e0_wp 
     268      ilevel   = 0 
     269      zthick_0 = 0._wp 
    281270      DO jk = 1, jpkm1                       
    282271         zthick_0 = zthick_0 + e3t_0(jk) 
     
    284273      END DO 
    285274      ! surface boundary condition 
    286       IF( lk_vvl ) THEN   ;   zthick(:,:) = 0.e0_wp     ;   htc3(:,:) = 0.e0_wp                                    
     275      IF( lk_vvl ) THEN   ;   zthick(:,:) = 0._wp       ;   htc3(:,:) = 0._wp                                    
    287276      ELSE                ;   zthick(:,:) = sshn(:,:)   ;   htc3(:,:) = tn(:,:,jk) * sshn(:,:) * tmask(:,:,jk)    
    288277      ENDIF 
     
    303292      htc3(:,:) = zcoef * htc3(:,:) 
    304293      CALL iom_put( "hc300", htc3 )      ! first 300m heat content 
    305  
    306  
     294      ! 
    307295   END SUBROUTINE dia_hth 
    308296 
Note: See TracChangeset for help on using the changeset viewer.