Changeset 2825 for branches/2011/dev_r2787_NOCS_NEPTUNE/NEMOGCM/NEMO
- Timestamp:
- 2011-08-09T16:35:03+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2011/dev_r2787_NOCS_NEPTUNE/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90
r2808 r2825 8 8 !! - horizontal diffusion for Neptune 9 9 !! - vertical diffusion for gm in momentum eqns 10 !! - option to use neptune in Coriolis eqn11 !! 2011-0 7(Jeff Blundell, NOCS) Simplified form for temporally invariant u*, v*10 !! - option to use Neptune in Coriolis eqn 11 !! 2011-08 (Jeff Blundell, NOCS) Simplified form for temporally invariant u*, v* 12 12 !! Horizontal and vertical diffusivity formulations removed 13 13 !! Dynamic allocation of storage added 14 !! Option of ramping Neptune vel. down 15 !! to zero added in shallow depths added 14 16 !!---------------------------------------------------------------------- 15 17 !! dyn_nept_init : … … 48 50 49 51 LOGICAL :: ln_smoothtopo = .FALSE. ! yes/no smooth zunep, zvnep 50 REAL(wp) :: rn_tslse = 1.2e4 ! value of L at the equator 51 REAL(wp) :: rn_tslsp = 3.0e3 ! value of L at the pole 52 REAL(wp) :: rn_tslse = 1.2e4 ! value of lengthscale L at the equator 53 REAL(wp) :: rn_tslsp = 3.0e3 ! value of lengthscale L at the pole 54 !! Specify whether to ramp down the Neptune velocity in shallow 55 !! water, and the depth range controlling such ramping down 56 LOGICAL :: ln_neptramp = .FALSE. ! ramp down Neptune velocity in shallow water 57 REAL(wp) :: rn_htrmin = 100.0 ! min. depth of transition range 58 REAL(wp) :: rn_htrmax = 200.0 ! max. depth of transition range 52 59 53 60 !! * Module variables … … 89 96 !! ! Simplified form for temporally invariant u*, v* 90 97 !! ! Horizontal and vertical diffusivity formulations removed 98 !! ! Includes optional tapering-off in shallow depths 91 99 !!---------------------------------------------------------------------- 92 100 USE iom … … 102 110 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: hu_n ! temporary 2D workspace 103 111 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: hv_n ! temporary 2D workspace 104 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: znmask ! temporary 3D array for nmask 105 REAL(wp) :: unemin,unemax,vnemin,vnemax ! extrema of (u*, v*) fields 106 !! 107 NAMELIST/nam_dynnept/ ln_neptsimp, & 108 ln_smoothtopo, & 109 rn_tslse, & 110 rn_tslsp 112 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: znmask ! temporary 3D array for nmask 113 REAL(wp) :: unemin,unemax,vnemin,vnemax ! extrema of (u*, v*) fields 114 REAL(wp) :: zhdivmin,zhdivmax ! extrema of horizontal divergence of (u*, v*) fields 115 REAL(wp) :: zmrotmin,zmrotmax ! extrema of the curl of the (u*, v*) fields 116 REAL(wp) :: ustar,vstar ! (u*, v*) before tapering in shallow water 117 REAL(wp) :: hramp ! depth over which Neptune vel. is ramped down 118 !! 119 NAMELIST/nam_dynnept/ ln_neptsimp, & 120 ln_smoothtopo, & 121 rn_tslse, & 122 rn_tslsp, & 123 ln_neptramp, & 124 rn_htrmin, & 125 rn_htrmax 111 126 !!---------------------------------------------------------------------- 112 127 … … 132 147 WRITE(numout,*) ' rn_tslsp = ', rn_tslsp 133 148 WRITE(numout,*) 149 WRITE(numout,*) ' ln_neptramp = ', ln_neptramp 150 WRITE(numout,*) ' rn_htrmin = ', rn_htrmin 151 WRITE(numout,*) ' rn_htrmax = ', rn_htrmax 152 WRITE(numout,*) 134 153 CALL FLUSH(numout) 135 154 ENDIF … … 146 165 IF(lwp) WRITE(numout,*) ' --> ln_neptsimp disabled' 147 166 RETURN 167 ENDIF 168 169 IF( ln_neptramp ) THEN 170 IF(lwp) WRITE(numout,*) ' --> ln_neptramp enabled, ramp down Neptune' 171 IF(lwp) WRITE(numout,*) ' --> velocity components in shallow water' 172 ELSE 173 IF(lwp) WRITE(numout,*) ' --> ln_neptramp disabled' 148 174 ENDIF 149 175 … … 247 273 vnemin = 1.0e35 248 274 vnemax = -1.0e35 275 hramp = rn_htrmax - rn_htrmin 249 276 DO jj = 2, jpj-1 250 277 DO ji = 2, jpi-1 251 278 if ( umask(ji,jj,1) /= 0.0_wp ) then 252 zunep(ji,jj) =-1.0_wp/e2u(ji,jj) * hur_n(ji,jj) * ( tsp(ji,jj)-tsp(ji,jj-1) ) * umask(ji,jj,1) 279 ustar =-1.0_wp/e2u(ji,jj) * hur_n(ji,jj) * ( tsp(ji,jj)-tsp(ji,jj-1) ) * umask(ji,jj,1) 280 if ( ln_neptramp ) then 281 !! Apply ramp down to velocity component 282 if ( hu_n(ji,jj) <= rn_htrmin ) then 283 zunep(ji,jj) = 0.0_wp 284 else if ( hu_n(ji,jj) >= rn_htrmax ) then 285 zunep(ji,jj) = ustar 286 else if ( hramp > 0.0_wp ) then 287 zunep(ji,jj) = ( hu_n(ji,jj) - rn_htrmin) * ustar/hramp 288 endif 289 else 290 zunep(ji,jj) = ustar 291 endif 253 292 else 254 293 zunep(ji,jj) = 0.0_wp 255 294 endif 256 295 if ( vmask(ji,jj,1) /= 0.0_wp ) then 257 zvnep(ji,jj) = 1.0_wp/e1v(ji,jj) * hvr_n(ji,jj) * ( tsp(ji,jj)-tsp(ji-1,jj) ) * vmask(ji,jj,1) 296 vstar = 1.0_wp/e1v(ji,jj) * hvr_n(ji,jj) * ( tsp(ji,jj)-tsp(ji-1,jj) ) * vmask(ji,jj,1) 297 if ( ln_neptramp ) then 298 !! Apply ramp down to velocity component 299 if ( hv_n(ji,jj) <= rn_htrmin ) then 300 zvnep(ji,jj) = 0.0_wp 301 else if ( hv_n(ji,jj) >= rn_htrmax ) then 302 zvnep(ji,jj) = vstar 303 else if ( hramp > 0.0_wp ) then 304 zvnep(ji,jj) = ( hv_n(ji,jj) - rn_htrmin) * vstar/hramp 305 endif 306 else 307 zvnep(ji,jj) = vstar 308 endif 258 309 else 259 310 zvnep(ji,jj) = 0.0_wp … … 274 325 !! and the curl (zmrotnep) of the Neptune velocity field (zunep, zvnep) 275 326 CALL div_cur_nept_init 327 328 !! Check the ranges of the computed divergence & vorticity 329 zhdivmin = 1.0e35 330 zhdivmax = -1.0e35 331 zmrotmin = 1.0e35 332 zmrotmax = -1.0e35 333 hramp = rn_htrmax - rn_htrmin 334 DO jk = 1, jpkm1 ! Horizontal slab 335 DO jj = 2, jpj-1 336 DO ji = 2, jpi-1 337 zhdivmin = min( zhdivmin, zhdivnep(ji,jj,jk) ) 338 zhdivmax = max( zhdivmax, zhdivnep(ji,jj,jk) ) 339 zmrotmin = min( zmrotmin, zmrotnep(ji,jj,jk) ) 340 zmrotmax = max( zmrotmax, zmrotnep(ji,jj,jk) ) 341 END DO 342 END DO 343 END DO 344 WRITE(numout,*) ' zhdivnep: min, max = ', zhdivmin,zhdivmax 345 WRITE(numout,*) ' zmrotnep: min, max = ', zmrotmin,zmrotmax 346 WRITE(numout,*) 276 347 277 348 !! Deallocate temporary workspace arrays, which are all local to
Note: See TracChangeset
for help on using the changeset viewer.