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 1577 – NEMO

Changeset 1577


Ignore:
Timestamp:
2009-08-04T16:56:59+02:00 (15 years ago)
Author:
smasson
Message:

update diahth and zdfmxl, see ticket:468

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/CONFIG/ORCA2_LIM/EXP00/iodef.xml

    r1482 r1577  
    1212       
    1313      <group id="grid_T" axis_ref="none" grid_ref="grid_T"> 
    14    <field id="toce"         description="temperature"                       unit="C"    axis_ref="deptht"   /> 
    15          <field id="soce"         description="salinity"                          unit="psu"  axis_ref="deptht"   /> 
    16    <field id="sst"          description="sea surface temperature"           unit="C"                        /> 
    17    <field id="sss"          description="sea surface salinity"              unit="psu"                      /> 
    18    <field id="ssh"          description="sea surface height"                unit="m"                        /> 
    19    <field id="mld010"       description="Mixed Layer Depth 0.01"            unit="m"                        /> 
    20    <field id="mldturb"      description="mixing layer depth (Turbocline)"   unit="m"                        /> 
    21    <field id="bowl"         description="Bowl Index"                        unit="W-point"                  /> 
     14   <field id="toce"         description="temperature"                               unit="degC" axis_ref="deptht"   /> 
     15         <field id="soce"         description="salinity"                                  unit="psu"  axis_ref="deptht"   /> 
     16   <field id="sst"          description="sea surface temperature"                   unit="degC"                     /> 
     17   <field id="sss"          description="sea surface salinity"                      unit="psu"                      /> 
     18   <field id="ssh"          description="sea surface height"                        unit="m"                        /> 
     19   <field id="mldr10_1"     description="Mixed Layer Depth 0.01 ref.10m"            unit="m"                        /> 
     20   <field id="bowl"         description="Bowl Index"                                unit="W-point"                  /> 
    2221   <!-- next variables available with key_diahth --> 
    23    <field id="thermod"      description="Thermocline Depth"                 unit="m"                        /> 
    24         <field id="20d"          description="Depth of 20C isotherm"             unit="m"                        /> 
    25    <field id="28d"          description="Depth of 28C isotherm"             unit="m"                        /> 
    26    <field id="hc300"        description="Heat content 300 m"                unit="W"                        /> 
     22   <field id="mldkz5"       description="mixing layer depth (Turbocline)"           unit="m"                        /> 
     23   <field id="mlddzt"       description="Thermocline Depth (max dT/dz)"             unit="m"                        /> 
     24   <field id="mldr10_3"     description="Mixed Layer Depth dr=0.03 (ref.10m)"       unit="m"                        /> 
     25   <field id="mldr0_1"      description="Mixed Layer Depth dr=0.01 (ref.surf)"      unit="m"                        /> 
     26   <field id="mldr0_1"      description="Mixed Layer Depth dr=0.01 (ref.surf)"      unit="m"                        /> 
     27   <field id="mld|dt|"      description="Mixed Layer Depth |dt|=0.2 (ref.10m)"      unit="m"                        /> 
     28   <field id="topthdep"     description="Top of the thermocline dt=-0.2 (ref.10m)"  unit="m"                        /> 
     29   <field id="pycndep"      description="Pycnocline depth dr~dt=-0.2 (ref.10m)"     unit="m"                        /> 
     30   <field id="BLT"          description="Barrier Layer Thickness"                   unit="m"                        /> 
     31   <field id="tinv"         description="Max of vertical invertion of temperature"  unit="degC"                     /> 
     32   <field id="depti"        description="Depth of max. vert. inv. of temperature"   unit="m"                        /> 
     33        <field id="20d"          description="Depth of 20C isotherm"                     unit="m"                        /> 
     34   <field id="28d"          description="Depth of 28C isotherm"                     unit="m"                        /> 
     35   <field id="hc300"        description="Heat content 300 m"                        unit="W"                        /> 
    2736     </group> 
    2837 
     
    4857   <field id="qla_oce"      description="Latent Downward Heat Flux over open ocean"                    unit="W/m2"     /> 
    4958 
    50    <field id="ice_cover"    description="Ice fraction"                                                 unit="-"        /> 
     59   <field id="ice_cover"    description="Ice fraction"                                                 unit="1"        /> 
    5160 
    5261   <field id="ioceflxb"     description="Oceanic flux at the ice base"                                 unit="W/m2"     /> 
     
    6372    
    6473   <field id="ice_pres"     description="Ice presence"                                                 unit="-"        /> 
    65    <field id="ist_ipa"      description="Ice surface temperature (ice presence average)"               unit="Celius"   />       
     74   <field id="ist_ipa"      description="Ice surface temperature (ice presence average)"               unit="degC"     />       
    6675   <field id="uice_ipa"     description="Ice velocity along i-axis at I-point (ice presence average)"  unit="m/s"      />       
    6776   <field id="vice_ipa"     description="Ice velocity along j-axis at I-point (ice presence average)"  unit="m/s"      />       
     
    7180    
    7281   <!-- icealb_cea: available key_coupled --> 
    73    <field id="icealb_cea"   description="Ice albedo (cell average)"                                    unit="-"        /> 
     82   <field id="icealb_cea"   description="Ice albedo (cell average)"                                    unit="1"        /> 
    7483      </group> 
    7584 
     
    116125   <field id="avm_evd"     description="enhanced vertical viscosity"               unit="m2/s"                 /> 
    117126   <!-- aht2d and  aht2d_eiv: available with key_traldf_eiv and key_traldf_c2d --> 
    118    <field id="aht2d"       description="lateral eddy diffusivity"                unit="m2/s" axis_ref="none" /> 
    119    <field id="aht2d_eiv"   description="EIV lateral eddy diffusivity"            unit="m2/s" axis_ref="none" /> 
     127   <field id="aht2d"       description="lateral eddy diffusivity"                 unit="m2/s" axis_ref="none" /> 
     128   <field id="aht2d_eiv"   description="EIV lateral eddy diffusivity"             unit="m2/s" axis_ref="none" /> 
    120129      </group> 
    121130       
     
    136145   <field ref="emps"         name="sowaflcd"  /> 
    137146   <field ref="qns+qsr"      name="sohefldo"  /> 
    138    <field ref="mld010"       name="somxl010"  /> 
    139    <field ref="mldturb"      name="somixhgt"  /> 
     147   <field ref="mldr10_1"     name="somxl010"  /> 
     148   <field ref="mldkz5"       name="somixhgt"  /> 
    140149   <field ref="ice_cover"    name="soicecov"  /> 
    141150   <field ref="qrp"          name="sohefldp"  /> 
  • trunk/NEMO/OPA_SRC/DIA/diahth.F90

    r1551 r1577  
    99   !!                 !  1999-07  (E. Guilyardi)  hd28 + heat content  
    1010   !!            8.5  !  2002-06  (G. Madec)  F90: Free form and module 
    11    !!   NEMO     3.2  !  2009-07  (S. Masson) hc300 bugfix + cleaning 
     11   !!   NEMO     3.2  !  2009-07  (S. Masson) hc300 bugfix + cleaning + add new diag 
    1212   !!---------------------------------------------------------------------- 
    1313 
     
    1616   !!   'key_diahth' :                              thermocline depth diag. 
    1717   !!---------------------------------------------------------------------- 
    18    !!   dia_hth      : Compute diagnostics associated with the thermocline 
     18   !!   dia_hth      : Compute varius diagnostics associated with the mixed layer 
    1919   !!---------------------------------------------------------------------- 
    2020   !! * Modules used 
    2121   USE oce             ! ocean dynamics and tracers 
    2222   USE dom_oce         ! ocean space and time domain 
     23   USE zdf_oce         ! ocean vertical physics 
    2324   USE phycst          ! physical constants 
    2425   USE in_out_manager  ! I/O manager 
     
    3233 
    3334   !! * Shared module variables 
    34    LOGICAL , PUBLIC, PARAMETER ::   lk_diahth = .TRUE.   !: thermocline-20d depths flag 
    35    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !: 
    36       hth  ,      &  !: depth of the max vertical temperature gradient (m) 
    37       hd20 ,      &  !: depth of 20 C isotherm (m) 
    38       hd28 ,      &  !: depth of 28 C isotherm (m) 
    39       htc3           !: heat content of first 300 m 
     35   LOGICAL , PUBLIC, PARAMETER          ::   lk_diahth = .TRUE.   !: thermocline-20d depths flag 
     36   ! note: following variables should move to local variables once iom_put is always used  
     37   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hmld                 !: mixing layer depth (turbocline)                [m] 
     38   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hth                  !: depth of the max vertical temperature gradient [m] 
     39   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hd20                 !: depth of 20 C isotherm                         [m] 
     40   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hd28                 !: depth of 28 C isotherm                         [m] 
     41   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   htc3                 !: heat content of first 300 m                    [W] 
    4042 
    4143   !! * Substitutions 
     
    5355      !!                  ***  ROUTINE dia_hth  *** 
    5456      !! 
    55       !! ** Purpose : 
    56       !!      Computes the depth of strongest vertical temperature gradient 
    57       !!      Computes the depth of the 20 degree isotherm 
    58       !!      Computes the depth of the 28 degree isotherm 
    59       !!      Computes the heat content of first 300 m 
     57      !! ** Purpose : Computes 
     58      !!      the mixing layer depth (turbocline): avt = 5.e-4 
     59      !!      the depth of strongest vertical temperature gradient 
     60      !!      the mixed layer depth with density     criteria: rho = rho(10m or surf) + 0.03(or 0.01) 
     61      !!      the mixed layer depth with temperature criteria: abs( tn - tn(10m) ) = 0.2        
     62      !!      the top of the thermochine: tn = tn(10m) - ztem2  
     63      !!      the pycnocline depth with density criteria equivalent to a temperature variation  
     64      !!                rho = rho10m + (dr/dT)(T,S,10m)*(-0.2 degC)  
     65      !!      the barrier layer thickness 
     66      !!      the maximal verical inversion of temperature and its depth max( 0, max of tn - tn(10m) ) 
     67      !!      the depth of the 20 degree isotherm (linear interpolation) 
     68      !!      the depth of the 28 degree isotherm (linear interpolation) 
     69      !!      the heat content of first 300 m 
    6070      !! 
    6171      !! ** Method :  
     
    6676      INTEGER                          ::   ji, jj, jk            ! dummy loop arguments 
    6777      INTEGER                          ::   iid, iif, ilevel      ! temporary integers 
    68       INTEGER, DIMENSION(jpi,jpj)      ::   ikc                   ! levels 
    69       REAL(wp)                         ::   zd, zthick_0, zcoef   ! temporary scalars 
    70       REAL(wp), DIMENSION(jpi,jpj)     ::   zthick 
    71       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zdzt 
     78      INTEGER, DIMENSION(jpi,jpj)      ::   ik20, ik28            ! levels 
     79      REAL(wp)                         ::   zavt5 = 5.e-4_wp      ! Kz criterion for the turbocline depth 
     80      REAL(wp)                         ::   zrho3 = 0.03_wp       ! density     criterion for mixed layer depth 
     81      REAL(wp)                         ::   zrho1 = 0.01_wp       ! density     criterion for mixed layer depth 
     82      REAL(wp)                         ::   ztem2 = 0.2_wp        ! temperature criterion for mixed layer depth 
     83      REAL(wp)                         ::   zthick_0, zcoef       ! temporary scalars 
     84      REAL(wp)                         ::   zztmp, zzdep          ! temporary scalars inside do loop 
     85      REAL(wp)                         ::   zu, zv, zw, zut, zvt  ! temporary workspace 
     86      REAL(wp), DIMENSION(jpi,jpj)     ::   zabs2                 ! MLD: abs( tn - tn(10m) ) = ztem2  
     87      REAL(wp), DIMENSION(jpi,jpj)     ::   ztm2                  ! Top of thermocline: tn = tn(10m) - ztem2      
     88      REAL(wp), DIMENSION(jpi,jpj)     ::   zrho10_3              ! MLD: rho = rho10m + zrho3       
     89      REAL(wp), DIMENSION(jpi,jpj)     ::   zpycn                 ! pycnocline: rho = rho10m + (dr/dT)(T,S,10m)*(-0.2 degC) 
     90      REAL(wp), DIMENSION(jpi,jpj)     ::   ztinv                 ! max of temperature inversion 
     91      REAL(wp), DIMENSION(jpi,jpj)     ::   zdepinv               ! depth of temperature inversion 
     92      REAL(wp), DIMENSION(jpi,jpj)     ::   zrho0_3               ! MLD rho = rho(surf) = 0.03 
     93      REAL(wp), DIMENSION(jpi,jpj)     ::   zrho0_1               ! MLD rho = rho(surf) = 0.01 
     94      REAL(wp), DIMENSION(jpi,jpj)     ::   zmaxdzT               ! max of dT/dz 
     95      REAL(wp), DIMENSION(jpi,jpj)     ::   zthick                ! vertical integration thickness  
     96      REAL(wp), DIMENSION(jpi,jpj)     ::   zdelr                 ! delta rho equivalent to deltaT = 0.2 
    7297      !!---------------------------------------------------------------------- 
    7398 
     
    79104      ENDIF 
    80105 
    81       ! -------------------------- ! 
    82       !  Depth of the thermocline  ! 
    83       ! -------------------------- ! 
    84       ! The depth of the thermocline is defined as the depth of the  
    85       ! strongest vertical temperature gradient 
    86       zdzt(:,:,1) = 0.e0 
    87       DO jk = 2, jpk                      ! vertical gradient of temperature 
    88          zdzt(:,:,jk) = ( tn(:,:,jk-1) - tn(:,:,jk) ) / fse3w(:,:,jk) * tmask(:,:,jk) 
    89       END DO 
     106      ! initialization 
     107      ztinv  (:,:) = 0.e0_wp   
     108      zdepinv(:,:) = 0.e0_wp   
     109      zmaxdzT(:,:) = 0.e0_wp   
    90110      DO jj = 1, jpj 
    91111         DO ji = 1, jpi 
    92             ilevel = MAXLOC( zdzt(ji,jj,:), dim= 1 )      ! level of maximum vertical temperature gradient 
    93             hth(ji,jj) = fsdepw(ji,jj,ilevel)             ! depth of the thermocline 
    94          END DO          
    95       END DO 
    96  
    97       CALL iom_put( "thermod", hth )      ! depth of the thermocline 
    98  
    99       ! ----------------------- ! 
    100       !  Depth of 20C isotherm  ! 
    101       ! ----------------------- ! 
     112            zztmp = bathy(ji,jj) 
     113            hth     (ji,jj) = zztmp 
     114            hmld    (ji,jj) = zztmp 
     115            zabs2   (ji,jj) = zztmp 
     116            ztm2    (ji,jj) = zztmp 
     117            zrho10_3(ji,jj) = zztmp 
     118            zpycn   (ji,jj) = zztmp 
     119        END DO 
     120      END DO 
     121      IF( nla10 > 1 ) THEN  
     122         DO jj = 1, jpj 
     123            DO ji = 1, jpi 
     124               zztmp = bathy(ji,jj) 
     125               zrho0_3(ji,jj) = zztmp 
     126               zrho0_1(ji,jj) = zztmp 
     127            END DO 
     128         END DO 
     129      ENDIF 
    102130       
    103       ! search last level above 20C (beware temperature is not always decreasing with depth) 
    104       ikc(:,:) = MAXLOC( fsdept(:,:,1:jpkm1), mask = tn(:,:,1:jpkm1) >= 20., dim = 3 )   !   ikc = 0 if mask always equal to false 
    105       ! Depth of 20C isotherm, linear interpolation 
     131      ! Preliminary computation 
     132      ! computation of zdelr = (dr/dT)(T,S,10m)*(-0.2 degC) 
     133      DO jj=1, jpj 
     134         DO ji=1, jpi 
     135            IF( tmask(ji,jj,nla10) == 1. ) THEN 
     136               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)   & 
     137                  &                                                           - 0.0100*tn(ji,jj,nla10)*sn(ji,jj,nla10) 
     138               zv  =  5891.00 + 38.000*tn(ji,jj,nla10) + 3.00*sn(ji,jj,nla10) - 0.3750*tn(ji,jj,nla10)*tn(ji,jj,nla10) 
     139               zut =    11.25 -  0.149*tn(ji,jj,nla10) - 0.01*sn(ji,jj,nla10) 
     140               zvt =    38.00 -  0.750*tn(ji,jj,nla10) 
     141               zw  = (zu + 0.698*zv) * (zu + 0.698*zv) 
     142               zdelr(ji,jj) = ztem2 * (1000.*(zut*zv - zvt*zu)/zw) 
     143            ELSE 
     144               zdelr(ji,jj) = 0.e0 
     145            ENDIF 
     146         END DO 
     147      END DO 
     148 
     149      ! ------------------------------------------------------------- ! 
     150      ! thermocline depth: strongest vertical gradient of temperature ! 
     151      ! turbocline depth (mixing layer depth): avt = zavt5            ! 
     152      ! MLD: rho = rho(1) + zrho3                                     ! 
     153      ! MLD: rho = rho(1) + zrho1                                     ! 
     154      ! ------------------------------------------------------------- ! 
     155      DO jk = jpkm1, 2, -1   ! loop from bottom to 2 
     156         DO jj = 1, jpj 
     157            DO ji = 1, jpi 
     158 
     159               zzdep = fsdepw(ji,jj,jk) 
     160               zztmp = ( tn(ji,jj,jk-1) - tn(ji,jj,jk) ) / zzdep * tmask(ji,jj,jk)   ! vertical gradient of temperature (dT/dz) 
     161               zzdep = zzdep * tmask(ji,jj,1) 
     162 
     163               IF( zztmp > zmaxdzT(ji,jj) ) THEN                         
     164                  zmaxdzT(ji,jj) = zztmp   ;   hth    (ji,jj) = zzdep                ! max and depth of dT/dz 
     165               ENDIF 
     166                
     167               IF( avt (ji,jj,jk) < zavt5 )    hmld   (ji,jj) = zzdep                ! avt < zavt5 
     168 
     169               IF( nla10 > 1 ) THEN  
     170                  zztmp = rhop(ji,jj,jk) - rhop(ji,jj,1)                             ! delta rho(1) 
     171                  IF( zztmp > zrho3 )          zrho0_3(ji,jj) = zzdep                ! > 0.03 
     172                  IF( zztmp > zrho1 )          zrho0_1(ji,jj) = zzdep                ! > 0.01 
     173               ENDIF 
     174 
     175            END DO 
     176         END DO 
     177      END DO 
     178       
     179      CALL iom_put( "mlddzt", hth )            ! depth of the thermocline 
     180      CALL iom_put( "mldkz5", hmld )           ! turbocline depth 
     181      IF( nla10 > 1 ) THEN  
     182         CALL iom_put( "mldr0_3", zrho0_3 )   ! MLD delta rho(surf) = 0.03 
     183         CALL iom_put( "mldr0_1", zrho0_1 )   ! MLD delta rho(surf) = 0.01 
     184      ENDIF 
     185 
     186      ! ------------------------------------------------------------- ! 
     187      ! MLD: abs( tn - tn(10m) ) = ztem2                              ! 
     188      ! Top of thermocline: tn = tn(10m) - ztem2                      ! 
     189      ! MLD: rho = rho10m + zrho3                                     ! 
     190      ! pycnocline: rho = rho10m + (dr/dT)(T,S,10m)*(-0.2 degC)       ! 
     191      ! temperature inversion: max( 0, max of tn - tn(10m) )          ! 
     192      ! depth of temperature inversion                                ! 
     193      ! ------------------------------------------------------------- ! 
     194      DO jk = jpkm1, nlb10, -1   ! loop from bottom to nlb10 
     195         DO jj = 1, jpj 
     196            DO ji = 1, jpi 
     197 
     198               zzdep = fsdepw(ji,jj,jk) * tmask(ji,jj,1) 
     199 
     200               zztmp = tn(ji,jj,nla10) - tn(ji,jj,jk)                  ! - delta T(10m) 
     201               IF( ABS(zztmp) > ztem2 )      zabs2   (ji,jj) = zzdep   ! abs > 0.2 
     202               IF(     zztmp  > ztem2 )      ztm2    (ji,jj) = zzdep   ! > 0.2 
     203               zztmp = -zztmp                                          ! delta T(10m) 
     204               IF( zztmp >  ztinv(ji,jj) ) THEN                        ! temperature inversion 
     205                  ztinv(ji,jj) = zztmp   ;   zdepinv (ji,jj) = zzdep   ! max value and depth 
     206               ENDIF 
     207 
     208               zztmp = rhop(ji,jj,jk) - rhop(ji,jj,nla10)              ! delta rho(10m) 
     209               IF( zztmp > zrho3        )    zrho10_3(ji,jj) = zzdep   ! > 0.03 
     210               IF( zztmp > zdelr(ji,jj) )    zpycn   (ji,jj) = zzdep   ! > equi. delta T(10m) - 0.2 
     211 
     212            END DO 
     213         END DO 
     214      END DO 
     215 
     216      CALL iom_put( "mld|dt|" , zabs2        )   ! MLD abs(delta t) - 0.2 
     217      CALL iom_put( "topthdep", ztm2         )   ! T(10) - 0.2 
     218      CALL iom_put( "mldr10_3", zrho10_3     )   ! MLD delta rho(10m) = 0.03 
     219      CALL iom_put( "pycndep" , zpycn        )   ! MLD delta rho equi. delta T(10m) = 0.2 
     220      CALL iom_put( "BLT"     , ztm2 - zpycn )   ! Barrier Layer Thickness 
     221      CALL iom_put( "tinv"    , ztinv        )   ! max. temp. inv. (t10 ref)  
     222      CALL iom_put( "depti"   , zdepinv      )   ! depth of max. temp. inv. (t10 ref)  
     223 
     224 
     225      ! ----------------------------------- ! 
     226      ! search deepest level above 20C/28C  ! 
     227      ! ----------------------------------- ! 
     228      ik20(:,:) = 1 
     229      ik28(:,:) = 1 
     230      DO jk = 1, jpkm1   ! beware temperature is not always decreasing with depth => loop from top to bottom 
     231         DO jj = 1, jpj 
     232            DO ji = 1, jpi 
     233               zztmp = tn(ji,jj,jk) 
     234               IF( zztmp >= 20. )   ik20(ji,jj) = jk 
     235               IF( zztmp >= 28. )   ik28(ji,jj) = jk 
     236            END DO 
     237         END DO 
     238      END DO 
     239 
     240      ! --------------------------- ! 
     241      !  Depth of 20C/28C isotherm  ! 
     242      ! --------------------------- ! 
    106243      DO jj = 1, jpj 
    107244         DO ji = 1, jpi 
    108             iid = MAX( 1, ikc(ji,jj) )    ! make sure that iid /= 0 (these points are masked later) 
    109             zd = fsdept(ji,jj,iid) + (    fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid)                           )   & 
    110                &                   * ( 20.*tmask(ji,jj,iid+1) -     tn(ji,jj,iid)                           )   & 
    111                &                   / (        tn(ji,jj,iid+1) -     tn(ji,jj,iid) + ( 1. - tmask(ji,jj,1) ) ) 
    112             ! bound by the ocean depth, minimum value, first T-point depth 
     245 
    113246            iif = mbathy(ji,jj) 
    114             hd20(ji,jj) = MIN( zd*tmask(ji,jj,1), fsdepw(ji,jj,iif) ) 
    115          END DO 
    116       END DO 
    117       WHERE(ikc == 0 )   hd20 = 0.e0      ! set to 0 points where tn is always < 20 (not very good for temporal mean...) 
    118       CALL iom_put( "20d", hd20 )         ! depth of the 20 isotherm 
    119  
    120       ! ----------------------- ! 
    121       !  Depth of 28C isotherm  !  
    122       ! ----------------------- ! 
    123        
    124       ! search last level above 28C (beware temperature is not always decreasing with depth) 
    125       ikc(:,:) = MAXLOC( fsdept(:,:,1:jpkm1), mask = tn(:,:,1:jpkm1) >= 28., dim = 3 )   !   ikc = 0 if mask always equal to false 
    126       ! Depth of 28C isotherm, linear interpolation 
    127       DO jj = 1, jpj 
    128          DO ji = 1, jpi 
    129             iid = MAX( 1, ikc(ji,jj) )    ! make sure that iid /= 0 (these points are masked later) 
    130             zd = fsdept(ji,jj,iid) + (    fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid)                           )   & 
    131                &                   * ( 28.*tmask(ji,jj,iid+1) -     tn(ji,jj,iid)                           )   & 
    132                &                   / (        tn(ji,jj,iid+1) -     tn(ji,jj,iid) + ( 1. - tmask(ji,jj,1) ) ) 
    133             ! bound by the ocean depth, minimum value, first T-point depth 
    134             iif = mbathy(ji,jj) 
    135             hd28(ji,jj) = MIN( zd*tmask(ji,jj,1), fsdepw(ji,jj,iif) ) 
    136          END DO 
    137       END DO 
    138       WHERE(ikc == 0 )   hd28 = 0.e0      ! set to 0 points where tn is always < 28 (not very good for temporal mean...) 
    139       CALL iom_put( "28d", hd28 )         ! depth of the 28 isotherm 
     247            zzdep = fsdepw(ji,jj,iif) 
     248 
     249            iid = ik20(ji,jj) 
     250            IF( iid /= 1 ) THEN  
     251               ! linear interpolation 
     252               zztmp =      fsdept(ji,jj,iid  )   & 
     253                  &  + (    fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid)                       )   & 
     254                  &  * ( 20.*tmask(ji,jj,iid+1) -     tn(ji,jj,iid)                       )   & 
     255                  &  / (        tn(ji,jj,iid+1) -     tn(ji,jj,iid) + (1.-tmask(ji,jj,1)) ) 
     256               ! bound by the ocean depth, minimum value, first T-point depth 
     257               hd20(ji,jj) = MIN( zztmp*tmask(ji,jj,1), zzdep) 
     258            ELSE  
     259               hd20(ji,jj)=0. 
     260            ENDIF 
     261 
     262            iid = ik28(ji,jj) 
     263            IF( iid /= 1 ) THEN  
     264               ! linear interpolation 
     265               zztmp =      fsdept(ji,jj,iid  )   & 
     266                  &  + (    fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid)                       )   & 
     267                  &  * ( 28.*tmask(ji,jj,iid+1) -     tn(ji,jj,iid)                       )   & 
     268                  &  / (        tn(ji,jj,iid+1) -     tn(ji,jj,iid) + (1.-tmask(ji,jj,1)) ) 
     269               ! bound by the ocean depth, minimum value, first T-point depth 
     270               hd28(ji,jj) = MIN( zztmp*tmask(ji,jj,1), zzdep ) 
     271            ELSE  
     272               hd28(ji,jj) = 0. 
     273            ENDIF 
     274 
     275         END DO 
     276      END DO 
     277      CALL iom_put( "20d", hd20 )   ! depth of the 20 isotherm 
     278      CALL iom_put( "28d", hd28 )   ! depth of the 28 isotherm 
    140279 
    141280      ! ----------------------------- ! 
     
    145284      ! find ilevel with (ilevel+1) the deepest W-level above 300m (we assume we can use e3t_0 to do this search...) 
    146285      ilevel = 0 
    147       zthick_0 = 0.e0 
     286      zthick_0 = 0.e0_wp 
    148287      DO jk = 1, jpkm1                       
    149288         zthick_0 = zthick_0 + e3t_0(jk) 
     
    151290      END DO 
    152291      ! surface boundary condition 
    153       IF( lk_vvl ) THEN   ;   zthick(:,:) = 0.e0        ;   htc3(:,:) = 0.e0                                      
     292      IF( lk_vvl ) THEN   ;   zthick(:,:) = 0.e0_wp     ;   htc3(:,:) = 0.e0_wp                                    
    154293      ELSE                ;   zthick(:,:) = sshn(:,:)   ;   htc3(:,:) = tn(:,:,jk) * sshn(:,:) * tmask(:,:,jk)    
    155294      ENDIF 
     
    169308      zcoef = rau0 * rcp 
    170309      htc3(:,:) = zcoef * htc3(:,:) 
    171       CALL iom_put( "hc300", htc3 )      ! first 300m heaat content 
     310      CALL iom_put( "hc300", htc3 )      ! first 300m heat content 
    172311 
    173312 
  • trunk/NEMO/OPA_SRC/DIA/diawri.F90

    r1567 r1577  
    304304         CALL histdef( nid_T, "somxl010", "Mixed Layer Depth 0.01"             , "m"      ,   &  ! hmlp 
    305305            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    306          CALL histdef( nid_T, "somixhgt", "Turbocline Depth"                   , "m"      ,   &  ! hmld 
    307             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    308306         CALL histdef( nid_T, "soicecov", "Ice fraction"                       , "[0,1]"  ,   &  ! fr_i 
    309307            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     
    335333            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clmx, zsto, zout ) 
    336334#if defined key_diahth 
     335         CALL histdef( nid_T, "somixhgt", "Turbocline Depth"                   , "m"      ,   &  ! hmld 
     336            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    337337         CALL histdef( nid_T, "sothedep", "Thermocline Depth"                  , "m"      ,   & ! hth 
    338338            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     
    448448      CALL histwrite( nid_T, "soshfldo", it, qsr           , ndim_hT, ndex_hT )   ! solar heat flux 
    449449      CALL histwrite( nid_T, "somxl010", it, hmlp          , ndim_hT, ndex_hT )   ! mixed layer depth 
    450       CALL histwrite( nid_T, "somixhgt", it, hmld          , ndim_hT, ndex_hT )   ! turbocline depth 
    451450      CALL histwrite( nid_T, "soicecov", it, fr_i          , ndim_hT, ndex_hT )   ! ice fraction    
    452451#if ! defined key_coupled 
     
    469468 
    470469#if defined key_diahth 
     470      CALL histwrite( nid_T, "somixhgt", it, hmld          , ndim_hT, ndex_hT )   ! turbocline depth 
    471471      CALL histwrite( nid_T, "sothedep", it, hth           , ndim_hT, ndex_hT )   ! depth of the thermocline 
    472472      CALL histwrite( nid_T, "so20chgt", it, hd20          , ndim_hT, ndex_hT )   ! depth of the 20 isotherm 
  • trunk/NEMO/OPA_SRC/DIA/diawri_dimg.h90

    r1567 r1577  
    173173       fsel(:,:,8 ) = fsel(:,:,8 ) + qrp (:,:) 
    174174       fsel(:,:,9 ) = fsel(:,:,9 ) + erp (:,:) 
     175#ifdef key_diahth    
    175176       fsel(:,:,10) = fsel(:,:,10) + hmld(:,:) 
     177#endif 
    176178       fsel(:,:,11) = fsel(:,:,11) + hmlp(:,:) 
    177179       fsel(:,:,12) = fsel(:,:,12) + fr_i(:,:) 
     
    249251          fsel(:,:,8 ) = qrp (:,:) * tmask(:,:,1) 
    250252          fsel(:,:,9 ) = erp (:,:) * tmask(:,:,1) 
     253#ifdef key_diahth            
    251254          fsel(:,:,10) = hmld(:,:) * tmask(:,:,1) 
     255#endif 
    252256          fsel(:,:,11) = hmlp(:,:) * tmask(:,:,1) 
    253257          fsel(:,:,12) = fr_i(:,:) * tmask(:,:,1) 
  • trunk/NEMO/OPA_SRC/DOM/dom_oce.F90

    r1438 r1577  
    130130      hu_0 , hv_0           !: refernce depth at u- and v-points (meters) 
    131131 
     132   INTEGER, PUBLIC            ::   nla10              !: deepest    W level Above  ~10m (nlb10 - 1) 
     133   INTEGER, PUBLIC            ::   nlb10              !: shallowest W level Bellow ~10m (nla10 + 1)  
     134 
    132135   !! z-coordinate with full steps (also used in the other cases as reference z-coordinate) 
    133136   !! =-----------------====------ 
  • trunk/NEMO/OPA_SRC/DOM/domzgr.F90

    r1566 r1577  
    160160      REAL(wp) ::   zsur, za0, za1, zkth   ! Values set from parameters in 
    161161      REAL(wp) ::   zacr, zdzmin, zhmax    ! par_CONFIG_Rxx.h90 
     162      REAL(wp) ::   zrefdep                ! depth of the reference level (~10m) 
    162163      !!---------------------------------------------------------------------- 
    163164 
     
    230231         gdepw_0(1) = 0.e0                     ! force first w-level to be exactly at zero 
    231232      ENDIF 
     233 
     234      ! deepest/shallowest W level Above/Bellow ~10m 
     235      zrefdep = 10. - ( 0.1*MINVAL(e3w_0) )                          ! ref. depth with tolerance (10% of minimum layer thickness) 
     236      nlb10 = MINLOC( gdepw_0, mask = gdepw_0 > zrefdep, dim = 1 )   ! shallowest W level Bellow ~10m 
     237      nla10 = nlb10 - 1                                              ! deepest    W level Above  ~10m 
    232238 
    233239      IF(lwp) THEN                        ! control print 
  • trunk/NEMO/OPA_SRC/ZDF/zdfmxl.F90

    r1559 r1577  
    55   !!====================================================================== 
    66   !! History :  1.0  ! 2003-08  (G. Madec)  original code 
    7    !!            3.2  ! 2009-07  (S. Masson, G. Madec)  IOM + merge of DO-loop 
     7   !!            3.2  ! 2009-07  (S. Masson, G. Madec)  IOM + 10m ref. 
    88   !!---------------------------------------------------------------------- 
    9    !!   zdf_mxl      : Compute the turbocline and mixed layer depths. 
     9   !!   zdf_mxl       : Compute mixed layer depth and level 
    1010   !!---------------------------------------------------------------------- 
    1111   USE oce             ! ocean dynamics and tracers variables 
    1212   USE dom_oce         ! ocean space and time domain variables 
    13    USE zdf_oce         ! ocean vertical physics 
    1413   USE in_out_manager  ! I/O manager 
    1514   USE prtctl          ! Print control 
     
    2221 
    2322   INTEGER , PUBLIC, DIMENSION(jpi,jpj) ::   nmln    !: number of level in the mixed layer 
    24    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hmld    !: mixing layer depth (turbocline)      [m] 
    2523   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hmlp    !: mixed layer depth  (rho=rho0+zdcrit) [m] 
    2624   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hmlpt   !: mixed layer depth at t-points        [m] 
    27  
    28    REAL(wp) ::   avt_c = 5.e-4_wp   ! Kz criterion for the turbocline depth 
    29    REAL(wp) ::   rho_c = 0.01_wp    ! density criterion for mixed layer depth 
    3025 
    3126   !! * Substitutions 
     
    4338      !!                  ***  ROUTINE zdfmxl  *** 
    4439      !!                    
    45       !! ** Purpose :   Compute the turbocline depth and the mixed layer depth 
    46       !!              with density criteria. 
     40      !! ** Purpose :   the mixed layer depth with density criteria. 
    4741      !! 
    48       !! ** Method  :   The turbocline depth is the depth at which the vertical 
    49       !!      eddy diffusivity coefficient (resulting from the vertical physics 
    50       !!      alone, not the isopycnal part, see trazdf.F) fall below a given 
    51       !!      value defined locally (avt_c here taken equal to 5 cm/s2) 
     42      !! ** Method  :   The mixed layer depth is the shallowest W depth with  
     43      !!      the density of the corresponding T point (just bellow) bellow a 
     44      !!      given value defined locally as rho(10m) + zrho_c 
    5245      !! 
    53       !! ** Action  :   nmln, hmld, hmlp, hmlpt 
     46      !! ** Action  :   nmln, hmlp, hmlpt 
    5447      !!---------------------------------------------------------------------- 
    5548      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
    5649      !! 
    57       INTEGER ::   ji, jj, jk     ! dummy loop indices 
    58       INTEGER ::   iki, ikn       ! temporary integer 
    59       INTEGER, DIMENSION(jpi,jpj) ::   imld   ! temporary workspace 
     50      INTEGER  ::   ji, jj, jk         ! dummy loop indices 
     51      INTEGER  ::   iikn               ! temporary integer within a do loop 
     52      REAL(wp) ::   zrho_c = 0.01_wp   ! density criterion for mixed layer depth 
    6053      !!---------------------------------------------------------------------- 
    6154 
     
    6760 
    6861      ! w-level of the mixing and mixed layers 
    69       nmln(:,:) = mbathy(:,:)      ! Initialization to the number of w ocean point mbathy 
    70       imld(:,:) = mbathy(:,:) 
    71       DO jk = jpkm1, 2, -1         ! from the bottom to the surface 
     62      nmln(:,:) = mbathy(:,:)          ! Initialization to the number of w ocean point mbathy 
     63      DO jk = jpkm1, nlb10, -1         ! from the bottom to nlb10 
    7264         DO jj = 1, jpj 
    7365            DO ji = 1, jpi 
    74                IF( avt (ji,jj,jk) < avt_c                 )   imld(ji,jj) = jk      ! Turbocline  
    75                IF( rhop(ji,jj,jk) > rhop(ji,jj,1) + rho_c )   nmln(ji,jj) = jk      ! Mixed layer 
     66               IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + zrho_c )   nmln(ji,jj) = jk      ! Mixed layer 
    7667            END DO 
    7768         END DO 
     
    8071      DO jj = 1, jpj 
    8172         DO ji = 1, jpi 
    82             iki = imld(ji,jj) 
    83             ikn = nmln(ji,jj) 
    84             hmld (ji,jj) = fsdepw(ji,jj,iki) * tmask(ji,jj,1)      ! Turbocline depth  
    85             hmlp (ji,jj) = fsdepw(ji,jj,ikn) * tmask(ji,jj,1)      ! Mixed layer depth 
    86             hmlpt(ji,jj) = fsdept(ji,jj,ikn-1)                     ! depth of the last T-point inside the mixed layer 
     73            iikn = nmln(ji,jj) 
     74            hmlp (ji,jj) = fsdepw(ji,jj,iikn  ) * tmask(ji,jj,1)    ! Mixed layer depth 
     75            hmlpt(ji,jj) = fsdept(ji,jj,iikn-1)                     ! depth of the last T-point inside the mixed layer 
    8776         END DO 
    8877      END DO 
    89       CALL iom_put( "mldturb", hmld )   ! turbocline depth 
    90       CALL iom_put( "mld010" , hmlp )   ! mixed layer depth 
     78      CALL iom_put( "mldr10_1" , hmlp )   ! mixed layer depth 
    9179       
    92       IF(ln_ctl)   CALL prt_ctl( tab2d_1=REAL(nmln,wp), clinfo1=' nmln : ', tab2d_2=hmld, clinfo2=' hmld : ', ovlap=1 ) 
     80      IF(ln_ctl)   CALL prt_ctl( tab2d_1=REAL(nmln,wp), clinfo1=' nmln : ', tab2d_2=hmlp, clinfo2=' hmlp : ', ovlap=1 ) 
    9381      ! 
    9482   END SUBROUTINE zdf_mxl 
Note: See TracChangeset for help on using the changeset viewer.