- Timestamp:
- 2021-01-25T14:59:12+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/ICB/icbdyn.F90
r14075 r14340 85 85 ! !** A1 = A(X1,V1) 86 86 CALL icb_accel( berg , zxi1, ze1, zuvel1, zuvel1, zax1, & 87 & zyj1, ze2, zvvel1, zvvel1, zay1, zdt_2 )87 & zyj1, ze2, zvvel1, zvvel1, zay1, zdt_2, 1 ) 88 88 ! 89 89 zu1 = zuvel1 / ze1 !** V1 in d(i,j)/dt … … 102 102 ! !** A2 = A(X2,V2) 103 103 CALL icb_accel( berg , zxi2, ze1, zuvel2, zuvel1, zax2, & 104 & zyj2, ze2, zvvel2, zvvel1, zay2, zdt_2 )104 & zyj2, ze2, zvvel2, zvvel1, zay2, zdt_2, 2 ) 105 105 ! 106 106 zu2 = zuvel2 / ze1 !** V2 in d(i,j)/dt … … 118 118 ! !** A3 = A(X3,V3) 119 119 CALL icb_accel( berg , zxi3, ze1, zuvel3, zuvel1, zax3, & 120 & zyj3, ze2, zvvel3, zvvel1, zay3, zdt )120 & zyj3, ze2, zvvel3, zvvel1, zay3, zdt, 3 ) 121 121 ! 122 122 zu3 = zuvel3 / ze1 !** V3 in d(i,j)/dt … … 134 134 ! !** A4 = A(X4,V4) 135 135 CALL icb_accel( berg , zxi4, ze1, zuvel4, zuvel1, zax4, & 136 & zyj4, ze2, zvvel4, zvvel1, zay4, zdt )136 & zyj4, ze2, zvvel4, zvvel1, zay4, zdt, 4 ) 137 137 138 138 zu4 = zuvel4 / ze1 !** V4 in d(i,j)/dt … … 235 235 236 236 SUBROUTINE icb_accel( berg , pxi, pe1, puvel, puvel0, pax, & 237 & pyj, pe2, pvvel, pvvel0, pay, pdt )237 & pyj, pe2, pvvel, pvvel0, pay, pdt, pstage ) 238 238 !!---------------------------------------------------------------------- 239 239 !! *** ROUTINE icb_accel *** … … 250 250 REAL(wp) , INTENT(inout) :: pax, pay ! berg acceleration 251 251 REAL(wp) , INTENT(in ) :: pdt ! berg time step 252 INTEGER , INTENT(in ) :: pstage ! RK4 stage (for speed limiter) 252 253 ! 253 254 REAL(wp), PARAMETER :: pp_alpha = 0._wp ! … … 265 266 REAL(wp) :: zampl, zwmod, zCr, zLwavelength, zLcutoff, zLtop 266 267 REAL(wp) :: zlambda, zdetA, zA11, zA12, zaxe, zaye, zD_hi 267 REAL(wp) :: zuveln, zvveln, zus, zvs, zspeed, zloc_dx, zspeed_new 268 REAL(wp) :: zuveln, zvveln, zus, zvs, zspeed, zloc_dx, zspeed_new, zvel_factor, zcfl_scale 268 269 !!---------------------------------------------------------------------- 269 270 … … 361 362 zspeed = SQRT( zuveln*zuveln + zvveln*zvveln ) ! Speed of berg 362 363 IF( zspeed > 0._wp ) THEN 363 zloc_dx = MIN( pe1, pe2 ) ! minimum grid spacing 364 zspeed_new = zloc_dx / pdt * rn_speed_limit ! Speed limit as a factor of dx / dt 364 zloc_dx = MIN( pe1, pe2 ) ! minimum grid spacing 365 ! cfl scale is function of the RK4 step 366 IF( pstage .le. 2 ) THEN 367 zcfl_scale=0.5 368 ELSE 369 zcfl_scale=1.0 370 ENDIF 371 zspeed_new = zloc_dx / pdt * rn_speed_limit * zcfl_scale ! Speed limit as a factor of dx / dt 365 372 IF( zspeed_new < zspeed ) THEN 366 zuveln = zuveln * ( zspeed_new / zspeed ) ! Scale velocity to reduce speed 367 zvveln = zvveln * ( zspeed_new / zspeed ) ! without changing the direction 368 CALL icb_dia_speed() 373 zvel_factor = zspeed_new / zspeed 374 zuveln = zuveln * ( zvel_factor ) ! Scale velocity to reduce speed 375 zvveln = zvveln * ( zvel_factor ) ! without changing the direction 376 pax = (zuveln - puvel0)/pdt 377 pay = (zvveln - pvvel0)/pdt 378 WRITE(numicb,*) 'speeding ticket (zspeed_new/zspeed): ',zvel_factor, pdt, zcfl_scale 379 CALL FLUSH(numicb) 380 CALL icb_dia_speed(zvel_factor,pstage) 369 381 ENDIF 370 382 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.