Changeset 503 for trunk/NEMO/OPA_SRC/DYN/dynldf.F90
- Timestamp:
- 2006-09-27T10:52:29+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/DYN/dynldf.F90
r474 r503 4 4 !! Ocean physics: lateral diffusivity trends 5 5 !!===================================================================== 6 !! History : 9.0 ! 05-11 (G. Madec) Original code (new step architecture) 7 !!---------------------------------------------------------------------- 6 8 7 9 !!---------------------------------------------------------------------- … … 9 11 !! dyn_ldf_ctl : initialization, namelist read, and parameters control 10 12 !!---------------------------------------------------------------------- 11 !! * Modules used 12 USE oce ! ocean dynamics and tracers 13 USE dom_oce ! ocean space and time domain 14 USE phycst ! physical constants 15 USE ldfdyn_oce ! ocean dynamics lateral physics 16 USE ldfslp ! ??? 17 USE dynldf_bilapg ! lateral mixing (dyn_ldf_bilapg routine) 18 USE dynldf_bilap ! lateral mixing (dyn_ldf_bilap routine) 19 USE dynldf_iso ! lateral mixing (dyn_ldf_iso routine) 20 USE dynldf_lap ! lateral mixing (dyn_ldf_lap routine) 21 USE trdmod ! ocean dynamics and tracer trends 22 USE trdmod_oce ! ocean variables trends 23 USE prtctl ! Print control 24 USE in_out_manager ! I/O manager 25 USE lib_mpp ! distribued memory computing library 26 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 13 USE oce ! ocean dynamics and tracers 14 USE dom_oce ! ocean space and time domain 15 USE phycst ! physical constants 16 USE ldfdyn_oce ! ocean dynamics lateral physics 17 USE ldfslp ! lateral mixing: slopes of mixing orientation 18 USE dynldf_bilapg ! lateral mixing (dyn_ldf_bilapg routine) 19 USE dynldf_bilap ! lateral mixing (dyn_ldf_bilap routine) 20 USE dynldf_iso ! lateral mixing (dyn_ldf_iso routine) 21 USE dynldf_lap ! lateral mixing (dyn_ldf_lap routine) 22 USE trdmod ! ocean dynamics and tracer trends 23 USE trdmod_oce ! ocean variables trends 24 USE prtctl ! Print control 25 USE in_out_manager ! I/O manager 26 USE lib_mpp ! distribued memory computing library 27 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 27 28 28 29 IMPLICIT NONE 29 30 PRIVATE 30 31 31 !! * Routine accessibility 32 PUBLIC dyn_ldf ! called by step.F90 32 PUBLIC dyn_ldf ! called by step module 33 33 34 !! * module variables 35 INTEGER :: & 36 nldf = 0 ! type of lateral diffusion used 37 ! ! defined from ln_dynldf_... namlist logicals) 34 INTEGER :: nldf = 0 ! type of lateral diffusion used defined from ln_dynldf_... namlist logicals) 38 35 39 36 !! * Substitutions … … 42 39 !!--------------------------------------------------------------------------------- 43 40 !! OPA 9.0 , LOCEAN-IPSL (2005) 44 !!--------------------------------------------------------------------------------- 41 !! $Header$ 42 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 43 !!---------------------------------------------------------------------- 45 44 46 45 CONTAINS … … 51 50 !! 52 51 !! ** Purpose : compute the lateral ocean dynamics physics. 52 !!---------------------------------------------------------------------- 53 INTEGER, INTENT(in) :: kt ! ocean time-step index 53 54 !! 54 !!---------------------------------------------------------------------- 55 !! * Arguments 56 INTEGER, INTENT( in ) :: kt ! ocean time-step index 57 58 !! * local declarations 59 REAL(wp), DIMENSION(jpi,jpj,jpk) :: & 60 ztrdu, ztrdv ! 3D temporary workspace 55 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztrdu, ztrdv ! 3D workspace 61 56 !!---------------------------------------------------------------------- 62 57 … … 69 64 70 65 SELECT CASE ( nldf ) ! compute lateral mixing trend and add it to the general trend 66 ! 67 CASE ( 0 ) ; CALL dyn_ldf_lap ( kt ) ! iso-level laplacian 68 CASE ( 1 ) ; CALL dyn_ldf_iso ( kt ) ! rotated laplacian (except dk[ dk[.] ] part) 69 CASE ( 2 ) ; CALL dyn_ldf_bilap ( kt ) ! iso-level bilaplacian 70 CASE ( 3 ) ; CALL dyn_ldf_bilapg ( kt ) ! s-coord. horizontal bilaplacian 71 ! 71 72 CASE ( -1 ) ! esopa: test all possibility with control print 72 CALL dyn_ldf_lap ( kt ) 73 IF(ln_ctl) THEN ! print sum trends (used for debugging) 74 CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf0 - Ua: ', mask1=umask, & 75 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 76 ENDIF 77 CALL dyn_ldf_iso ( kt ) 78 IF(ln_ctl) THEN ! print sum trends (used for debugging) 79 CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf1 - Ua: ', mask1=umask, & 80 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 81 ENDIF 82 CALL dyn_ldf_bilap ( kt ) 83 IF(ln_ctl) THEN ! print sum trends (used for debugging) 84 CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf2 - Ua: ', mask1=umask, & 85 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 86 ENDIF 87 CALL dyn_ldf_bilapg ( kt ) 88 IF(ln_ctl) THEN ! print sum trends (used for debugging) 89 CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf3 - Ua: ', mask1=umask, & 90 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 91 ENDIF 92 93 CASE ( 0 ) ! iso-level laplacian 94 CALL dyn_ldf_lap ( kt ) 95 CASE ( 1 ) ! rotated laplacian (except dk[ dk[.] ] part) 96 CALL dyn_ldf_iso ( kt ) 97 CASE ( 2 ) ! iso-level bilaplacian 98 CALL dyn_ldf_bilap ( kt ) 99 CASE ( 3 ) ! s-coord. horizontal bilaplacian 100 CALL dyn_ldf_bilapg ( kt ) 73 ; CALL dyn_ldf_lap ( kt ) 74 ; CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf0 - Ua: ', mask1=umask, & 75 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 76 ; CALL dyn_ldf_iso ( kt ) 77 ; CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf1 - Ua: ', mask1=umask, & 78 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 79 ; CALL dyn_ldf_bilap ( kt ) 80 ; CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf2 - Ua: ', mask1=umask, & 81 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 82 ; CALL dyn_ldf_bilapg ( kt ) 83 ; CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf3 - Ua: ', mask1=umask, & 84 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 101 85 END SELECT 102 86 103 ! ! save the horizontal diffusive trends for further diagnostics 104 IF( l_trddyn ) THEN 87 IF( l_trddyn ) THEN ! save the horizontal diffusive trends for further diagnostics 105 88 ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:) 106 89 ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) 107 CALL trd_mod( ztrdu, ztrdv, jpd tdldf, 'DYN', kt )90 CALL trd_mod( ztrdu, ztrdv, jpdyn_trd_ldf, 'DYN', kt ) 108 91 ENDIF 109 110 IF(ln_ctl) THEN ! print mean trends (used for debugging) 111 CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf - Ua: ', mask1=umask, & 112 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 113 ENDIF 114 92 ! ! print sum trends (used for debugging) 93 IF(ln_ctl) CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf - Ua: ', mask1=umask, & 94 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 95 ! 115 96 END SUBROUTINE dyn_ldf 116 97 … … 121 102 !! 122 103 !! ** Purpose : initializations of the horizontal ocean dynamics physics 123 !!124 !! ** Method :125 !!126 !! History :127 !! 9.0 ! 05-11 (G. Madec) Original code128 104 !!---------------------------------------------------------------------- 129 !! * Local declarations130 105 INTEGER :: ioptio, ierr ! temporary integers 131 106 !!---------------------------------------------------------------------- 107 108 ! ! Namelist nam_dynldf: already read in ldfdyn module 132 109 133 ! Define the lateral dynamics physics parameters 134 ! ============================================= 135 136 ! Namelist nam_dynldf already read in ldfdyn module 137 138 IF(lwp) THEN 110 IF(lwp) THEN ! Namelist print 139 111 WRITE(numout,*) 140 WRITE(numout,*) 'dyn :ldf_ctl : Choice of the lateral diffusive operator on dynamics'112 WRITE(numout,*) 'dyn_ldf_ctl : Choice of the lateral diffusive operator on dynamics' 141 113 WRITE(numout,*) '~~~~~~~~~~~' 142 WRITE(numout,*) ' 143 WRITE(numout,*) ' 144 WRITE(numout,*) ' 145 WRITE(numout,*) ' 146 WRITE(numout,*) ' 147 WRITE(numout,*) ' 114 WRITE(numout,*) ' Namelist nam_dynldf : set lateral mixing parameters (type, direction, coefficients)' 115 WRITE(numout,*) ' laplacian operator ln_dynldf_lap = ', ln_dynldf_lap 116 WRITE(numout,*) ' bilaplacian operator ln_dynldf_bilap = ', ln_dynldf_bilap 117 WRITE(numout,*) ' iso-level ln_dynldf_level = ', ln_dynldf_level 118 WRITE(numout,*) ' horizontal (geopotential) ln_dynldf_hor = ', ln_dynldf_hor 119 WRITE(numout,*) ' iso-neutral ln_dynldf_iso = ', ln_dynldf_iso 148 120 ENDIF 149 121 150 ! control the consistency122 ! ! control the consistency 151 123 ioptio = 0 152 124 IF( ln_dynldf_lap ) ioptio = ioptio + 1 … … 159 131 IF( ioptio /= 1 ) CALL ctl_stop( ' use only ONE direction (level/hor/iso)' ) 160 132 161 ! defined the type of lateral diffusionfrom ln_dynldf_... logicals133 ! ! Set nldf, the type of lateral diffusion, from ln_dynldf_... logicals 162 134 ierr = 0 163 135 IF ( ln_dynldf_lap ) THEN ! laplacian operator … … 196 168 ENDIF 197 169 ENDIF 170 171 IF( lk_esopa ) nldf = -1 ! esopa test 198 172 199 IF( ierr == 1 ) & 200 & CALL ctl_stop( ' iso-level in z-coordinate - partial step, not allowed' ) 201 IF( ierr == 2 ) & 202 & CALL ctl_stop( ' isoneutral bilaplacian operator does not exist' ) 173 IF( ierr == 1 ) CALL ctl_stop( 'iso-level in z-coordinate - partial step, not allowed' ) 174 IF( ierr == 2 ) CALL ctl_stop( 'isoneutral bilaplacian operator does not exist' ) 203 175 IF( nldf == 1 .OR. nldf == 3 ) THEN ! rotation 204 IF( .NOT.lk_ldfslp ) & 205 & CALL ctl_stop( ' the rotation of the diffusive tensor require key_ldfslp' ) 206 ENDIF 207 208 IF( lk_esopa ) THEN 209 IF(lwp ) WRITE(numout,*) ' esopa test: use all lateral physics options' 210 nldf = -1 176 IF( .NOT.lk_ldfslp ) CALL ctl_stop( 'the rotation of the diffusive tensor require key_ldfslp' ) 211 177 ENDIF 212 178 … … 219 185 IF( nldf == 3 ) WRITE(numout,*) ' Rotated bilaplacian' 220 186 ENDIF 221 187 ! 222 188 END SUBROUTINE dyn_ldf_ctl 223 189
Note: See TracChangeset
for help on using the changeset viewer.