[5105] | 1 | MODULE zdfmxl_crs |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE zdfmxl *** |
---|
| 4 | !! Ocean physics: mixed layer depth |
---|
| 5 | !!====================================================================== |
---|
| 6 | !! History : 1.0 ! 2003-08 (G. Madec) original code |
---|
| 7 | !! 3.2 ! 2009-07 (S. Masson, G. Madec) IOM + merge of DO-loop |
---|
[5601] | 8 | !! 3.7 ! 2012-03 (G. Madec) make public the density criteria for trdmxl |
---|
| 9 | !! - ! 2014-02 (F. Roquet) mixed layer depth calculated using N2 instead of rhop |
---|
[5105] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! zdf_mxl : Compute the turbocline and mixed layer depths. |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
[5601] | 13 | !USE oce ! ocean dynamics and tracers variables |
---|
| 14 | !USE dom_oce ! ocean space and time domain variables |
---|
| 15 | !USE oce_trc |
---|
[5105] | 16 | USE zdf_oce ! ocean vertical physics |
---|
| 17 | USE in_out_manager ! I/O manager |
---|
| 18 | USE prtctl ! Print control |
---|
[5601] | 19 | USE phycst ! physical constants |
---|
[5105] | 20 | USE iom ! I/O library |
---|
| 21 | USE lib_mpp ! MPP library |
---|
| 22 | USE wrk_nemo ! work arrays |
---|
| 23 | USE timing ! Timing |
---|
| 24 | USE trc_oce, ONLY : lk_offline ! offline flag |
---|
| 25 | USE crs |
---|
[6772] | 26 | USE ieee_arithmetic |
---|
[5105] | 27 | |
---|
| 28 | IMPLICIT NONE |
---|
| 29 | PRIVATE |
---|
| 30 | |
---|
| 31 | PUBLIC zdf_mxl_crs ! called by step.F90 |
---|
| 32 | |
---|
[5601] | 33 | REAL(wp) :: avt_c = 5.e-4_wp ! Kz criterion for the turbocline depth |
---|
[5105] | 34 | |
---|
| 35 | !! * Substitutions |
---|
| 36 | # include "domzgr_substitute.h90" |
---|
| 37 | !!---------------------------------------------------------------------- |
---|
| 38 | !! NEMO/OPA 4.0 , NEMO Consortium (2011) |
---|
[5601] | 39 | !! $Id: zdfmxl.F90 4990 2014-12-15 16:42:49Z timgraham $ |
---|
[5105] | 40 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 41 | !!---------------------------------------------------------------------- |
---|
| 42 | CONTAINS |
---|
| 43 | |
---|
| 44 | SUBROUTINE zdf_mxl_crs( kt ) |
---|
| 45 | !!---------------------------------------------------------------------- |
---|
| 46 | !! *** ROUTINE zdfmxl *** |
---|
| 47 | !! |
---|
| 48 | !! ** Purpose : Compute the turbocline depth and the mixed layer depth |
---|
| 49 | !! with density criteria. |
---|
| 50 | !! |
---|
| 51 | !! ** Method : The mixed layer depth is the shallowest W depth with |
---|
| 52 | !! the density of the corresponding T point (just bellow) bellow a |
---|
[5601] | 53 | !! given value defined locally as rho(10m) + rho_c |
---|
[5105] | 54 | !! The turbocline depth is the depth at which the vertical |
---|
| 55 | !! eddy diffusivity coefficient (resulting from the vertical physics |
---|
| 56 | !! alone, not the isopycnal part, see trazdf.F) fall below a given |
---|
[5601] | 57 | !! value defined locally (avt_c here taken equal to 5 cm/s2 by default) |
---|
[5105] | 58 | !! |
---|
| 59 | !! ** Action : nmln, hmld, hmlp, hmlpt |
---|
| 60 | !!---------------------------------------------------------------------- |
---|
| 61 | INTEGER, INTENT(in) :: kt ! ocean time-step index |
---|
[5601] | 62 | ! |
---|
| 63 | INTEGER :: ji, jj, jk ! dummy loop indices |
---|
| 64 | INTEGER :: iiki,iikn ! local integer |
---|
| 65 | REAL(wp) :: zN2_c ! local scalar |
---|
| 66 | INTEGER, POINTER, DIMENSION(:,:) :: imld ! 2D workspace |
---|
[5105] | 67 | !!---------------------------------------------------------------------- |
---|
| 68 | ! |
---|
[5601] | 69 | IF( nn_timing == 1 ) CALL timing_start('zdf_mxl_crs') |
---|
[5105] | 70 | ! |
---|
| 71 | CALL wrk_alloc( jpi_crs,jpj_crs, imld ) |
---|
| 72 | |
---|
| 73 | IF( kt == nit000 ) THEN |
---|
| 74 | IF(lwp) WRITE(numout,*) |
---|
[5601] | 75 | IF(lwp) WRITE(numout,*) 'zdf_mxl_crs : mixed layer depth' |
---|
[5105] | 76 | IF(lwp) WRITE(numout,*) '~~~~~~~ ' |
---|
| 77 | ENDIF |
---|
| 78 | |
---|
[5601] | 79 | ! w-level of the turbocline |
---|
| 80 | imld(:,:)=0 |
---|
| 81 | DO jk = jpkm1, nlb10, -1 ! from the bottom to nlb10 |
---|
[5105] | 82 | DO jj = 1, jpj_crs |
---|
| 83 | DO ji = 1, jpi_crs |
---|
[5601] | 84 | IF( avt_crs (ji,jj,jk) < avt_c ) imld(ji,jj) = MAX( jk, 1 ) ! Turbocline |
---|
[5105] | 85 | END DO |
---|
| 86 | END DO |
---|
| 87 | END DO |
---|
[5601] | 88 | |
---|
[5105] | 89 | ! depth of the mixing and mixed layers |
---|
[5601] | 90 | hmld_crs(:,:) = 0._wp |
---|
[7207] | 91 | hmlp_crs(:,:) = 0._wp |
---|
[5601] | 92 | hmlpt_crs(:,:) = 0._wp |
---|
[5105] | 93 | DO jj = 1, jpj_crs |
---|
| 94 | DO ji = 1, jpi_crs |
---|
[5601] | 95 | iiki = imld(ji,jj) |
---|
[5105] | 96 | iikn = nmln_crs(ji,jj) |
---|
[7207] | 97 | IF(iiki .NE. 0 ) hmld_crs (ji,jj) = ( fsdepw_crs(ji,jj,iiki ) - fsdepw_crs(ji,jj,1 ) ) * tmask_crs(ji,jj,1) ! Turbocline depth |
---|
| 98 | IF(iikn .NE. 0 ) hmlp_crs (ji,jj) = ( fsdepw_crs(ji,jj,iikn ) - fsdepw_crs(ji,jj,nla10) ) * tmask_crs(ji,jj,1) ! Mixed layer depth |
---|
| 99 | IF(iikn-1 .NE. 0 ) hmlpt_crs(ji,jj) = ( fsdept_crs(ji,jj,iikn-1) - fsdepw_crs(ji,jj,1 ) ) * tmask_crs(ji,jj,1) ! depth of the last T-point inside the mixed layer |
---|
[5105] | 100 | END DO |
---|
| 101 | END DO |
---|
| 102 | ! |
---|
| 103 | CALL wrk_dealloc( jpi_crs,jpj_crs, imld ) |
---|
| 104 | ! |
---|
[5601] | 105 | IF( nn_timing == 1 ) CALL timing_stop('zdf_mxl_crs') |
---|
[5105] | 106 | ! |
---|
| 107 | END SUBROUTINE zdf_mxl_crs |
---|
| 108 | |
---|
| 109 | !!====================================================================== |
---|
| 110 | END MODULE zdfmxl_crs |
---|