Changeset 1559 for trunk/NEMO/OPA_SRC/ZDF/zdfmxl.F90
- Timestamp:
- 2009-07-29T16:03:14+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/ZDF/zdfmxl.F90
r1482 r1559 4 4 !! Ocean physics: mixed layer depth 5 5 !!====================================================================== 6 !! History : 7 !! 9.0 ! 03-08 (G. Madec) OpenMP/autotasking optimization6 !! History : 1.0 ! 2003-08 (G. Madec) original code 7 !! 3.2 ! 2009-07 (S. Masson, G. Madec) IOM + merge of DO-loop 8 8 !!---------------------------------------------------------------------- 9 9 !! zdf_mxl : Compute the turbocline and mixed layer depths. 10 10 !!---------------------------------------------------------------------- 11 !! * Modules used12 11 USE oce ! ocean dynamics and tracers variables 13 12 USE dom_oce ! ocean space and time domain variables … … 20 19 PRIVATE 21 20 22 !! * Routine accessibility 23 PUBLIC zdf_mxl ! called by step.F90 21 PUBLIC zdf_mxl ! called by step.F90 24 22 25 !! * Shared module variables 26 INTEGER, PUBLIC, DIMENSION(jpi,jpj) :: & !: 27 nmln !: number of level in the mixed layer 28 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 29 hmld , & !: mixing layer depth (turbocline) (m) 30 hmlp , & !: mixed layer depth (rho=rho0+zdcrit) (m) 31 hmlpt !: mixed layer depth at t-points (m) 23 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] 25 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: hmlp !: mixed layer depth (rho=rho0+zdcrit) [m] 26 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: hmlpt !: mixed layer depth at t-points [m] 32 27 33 !! * module variables 34 REAL(wp) :: & 35 avt_c = 5.e-4_wp, & ! Kz criterion for the turbocline depth 36 rho_c = 0.01_wp ! density criterion for mixed layer depth 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 37 30 38 31 !! * Substitutions 39 32 # include "domzgr_substitute.h90" 40 33 !!---------------------------------------------------------------------- 41 !! OPA 9.0 , LOCEAN-IPSL (2005)34 !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 42 35 !! $Id$ 43 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt36 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 44 37 !!---------------------------------------------------------------------- 45 38 … … 51 44 !! 52 45 !! ** Purpose : Compute the turbocline depth and the mixed layer depth 53 !! with density criteria.46 !! with density criteria. 54 47 !! 55 48 !! ** Method : The turbocline depth is the depth at which the vertical … … 58 51 !! value defined locally (avt_c here taken equal to 5 cm/s2) 59 52 !! 60 !! ** Action : 53 !! ** Action : nmln, hmld, hmlp, hmlpt 54 !!---------------------------------------------------------------------- 55 INTEGER, INTENT( in ) :: kt ! ocean time-step index 61 56 !! 62 !! History :63 !! ! 94-11 (M. Imbard) Original code64 !! 8.0 ! 96-01 (E. Guilyardi) sub mixed layer temp.65 !! 8.1 ! 97-07 (G. Madec) optimization66 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module67 !!----------------------------------------------------------------------68 !! * Arguments69 INTEGER, INTENT( in ) :: kt ! ocean time-step index70 71 !! * Local declarations72 57 INTEGER :: ji, jj, jk ! dummy loop indices 73 INTEGER :: ik ! temporary integer 74 INTEGER, DIMENSION(jpi,jpj) :: & 75 imld ! temporary workspace 58 INTEGER :: iki, ikn ! temporary integer 59 INTEGER, DIMENSION(jpi,jpj) :: imld ! temporary workspace 76 60 !!---------------------------------------------------------------------- 77 61 … … 82 66 ENDIF 83 67 84 85 ! 1. Turbocline depth 86 ! ------------------- 87 ! last w-level at which avt<avt_c (starting from the bottom jk=jpk) 88 ! (since avt(.,.,jpk)=0, we have jpk=< imld =< 2 ) 89 DO jk = jpk, 2, -1 68 ! 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 90 72 DO jj = 1, jpj 91 73 DO ji = 1, jpi 92 IF( avt(ji,jj,jk) < avt_c ) imld(ji,jj) = jk 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 93 76 END DO 94 77 END DO 95 78 END DO 96 97 ! Turbocline depth and sub-turbocline temperature 79 ! depth of the mixing and mixed layers 98 80 DO jj = 1, jpj 99 81 DO ji = 1, jpi 100 ik = imld(ji,jj) 101 hmld (ji,jj) = fsdepw(ji,jj,ik) * tmask(ji,jj,1) 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 102 87 END DO 103 88 END DO 104 89 CALL iom_put( "mldturb", hmld ) ! turbocline depth 105 106 !!gm idea 107 !! 108 !!gm DO jk = jpk, 2, -1 109 !!gm DO jj = 1, jpj 110 !!gm DO ji = 1, jpi 111 !!gm IF( avt(ji,jj,jk) < avt_c ) hmld(ji,jj) = fsdepw(ji,jj,jk) * tmask(ji,jj,1) 112 !!gm END DO 113 !!gm END DO 114 !!gm END DO 115 !!gm 116 117 ! 2. Mixed layer depth 118 ! -------------------- 119 ! Initialization to the number of w ocean point mbathy 120 nmln(:,:) = mbathy(:,:) 121 122 ! Last w-level at which rhop>=rho surf+rho_c (starting from jpk-1) 123 ! (rhop defined at t-point, thus jk-1 for w-level just above) 124 DO jk = jpkm1, 2, -1 125 DO jj = 1, jpj 126 DO ji = 1, jpi 127 IF( rhop(ji,jj,jk) > rhop(ji,jj,1) + rho_c ) nmln(ji,jj) = jk 128 END DO 129 END DO 130 END DO 131 132 ! Mixed layer depth 133 DO jj = 1, jpj 134 DO ji = 1, jpi 135 ik = nmln(ji,jj) 136 hmlp (ji,jj) = fsdepw(ji,jj,ik) * tmask(ji,jj,1) 137 hmlpt(ji,jj) = fsdept(ji,jj,ik-1) 138 END DO 139 END DO 140 CALL iom_put( "mld010", hmlp ) ! mixed layer depth 90 CALL iom_put( "mld010" , hmlp ) ! mixed layer depth 141 91 142 92 IF(ln_ctl) CALL prt_ctl( tab2d_1=REAL(nmln,wp), clinfo1=' nmln : ', tab2d_2=hmld, clinfo2=' hmld : ', ovlap=1 ) 143 93 ! 144 94 END SUBROUTINE zdf_mxl 145 95
Note: See TracChangeset
for help on using the changeset viewer.