Changeset 14372
- Timestamp:
- 2021-02-02T18:42:36+01:00 (4 years ago)
- Location:
- NEMO/releases/r4.0/r4.0-HEAD
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/releases/r4.0/r4.0-HEAD/cfgs/SHARED/namelist_ref
r13511 r14372 536 536 rn_test_box = 108.0, 116.0, -66.0, -58.0 537 537 ln_use_calving = .false. ! Use calving data even when nn_test_icebergs > 0 538 rn_speed_limit = 0. ! CFL speed limit for a berg 538 rn_speed_limit = 0. ! CFL speed limit for a berg (safe value is 0.4, see #2581) 539 539 540 540 cn_dir = './' ! root directory for the calving data location -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/ICB/icbdia.F90
r10570 r14372 86 86 INTEGER :: nbergs_start, nbergs_end, nbergs_calved 87 87 INTEGER :: nbergs_melted 88 INTEGER :: nspeeding_tickets 88 INTEGER :: nspeeding_tickets, nspeeding_tickets_all 89 89 INTEGER , DIMENSION(nclasses) :: nbergs_calved_by_class 90 90 … … 125 125 nbergs_calved_by_class(:) = 0 126 126 nspeeding_tickets = 0 127 nspeeding_tickets_all = 0 127 128 stored_heat_end = 0._wp 128 129 floating_heat_end = 0._wp … … 271 272 CALL mpp_sum( 'icbdia', nsumbuf(1:nclasses+4), nclasses+4 ) 272 273 ! 273 nbergs_end = nsumbuf(1)274 nbergs_calved = nsumbuf(2)275 nbergs_melted = nsumbuf(3)276 nspeeding_tickets = nsumbuf(4)274 nbergs_end = nsumbuf(1) 275 nbergs_calved = nsumbuf(2) 276 nbergs_melted = nsumbuf(3) 277 nspeeding_tickets_all = nsumbuf(4) 277 278 DO ik = 1,nclasses 278 279 nbergs_calved_by_class(ik)= nsumbuf(4+ik) … … 329 330 IF (nn_verbose_level > 0) THEN 330 331 WRITE( numicb, '("calved by class = ",i6,20(",",i6))') (nbergs_calved_by_class(ik),ik=1,nclasses) 331 IF( nspeeding_tickets > 0 ) WRITE( numicb, '("speeding tickets issued = ",i6)') nspeeding_tickets 332 IF( nspeeding_tickets_all > 0 ) THEN 333 WRITE( numicb, '("speeding tickets issued (this domain) = ",i6)') nspeeding_tickets 334 WRITE( numicb, '("speeding tickets issued (all domains) = ",i6)') nspeeding_tickets_all 335 END IF 332 336 ENDIF 333 337 ! … … 338 342 nbergs_calved_by_class(:) = 0 339 343 nspeeding_tickets = 0 344 nspeeding_tickets_all = 0 340 345 stored_heat_start = stored_heat_end 341 346 floating_heat_start = floating_heat_end -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/ICB/icbdyn.F90
r13263 r14372 14 14 USE dom_oce ! NEMO ocean domain 15 15 USE phycst ! NEMO physical constants 16 USE in_out_manager ! IO parameters 16 17 ! 17 18 USE icb_oce ! define iceberg arrays … … 84 85 85 86 ! !** A1 = A(X1,V1) 86 CALL icb_accel( berg , zxi1, ze1, zuvel1, zuvel1, zax1, &87 & zyj1, ze2, zvvel1, zvvel1, zay1, zdt_2 )87 CALL icb_accel( kt, berg , zxi1, ze1, zuvel1, zuvel1, zax1, & 88 & zyj1, ze2, zvvel1, zvvel1, zay1, zdt_2, 0.5_wp ) 88 89 ! 89 90 zu1 = zuvel1 / ze1 !** V1 in d(i,j)/dt … … 101 102 102 103 ! !** A2 = A(X2,V2) 103 CALL icb_accel( berg , zxi2, ze1, zuvel2, zuvel1, zax2, &104 & zyj2, ze2, zvvel2, zvvel1, zay2, zdt_2 )104 CALL icb_accel( kt, berg , zxi2, ze1, zuvel2, zuvel1, zax2, & 105 & zyj2, ze2, zvvel2, zvvel1, zay2, zdt_2, 0.5_wp ) 105 106 ! 106 107 zu2 = zuvel2 / ze1 !** V2 in d(i,j)/dt … … 113 114 zyj3 = zyj1 + zdt_2 * zv2 ; zvvel3 = zvvel1 + zdt_2 * zay2 114 115 ! 115 CALL icb_ground( zxi3, zxi1, zu 3, &116 & zyj3, zyj1, zv3, ll_bounced )116 CALL icb_ground( zxi3, zxi1, zu2, & 117 & zyj3, zyj1, zv2, ll_bounced ) 117 118 118 119 ! !** A3 = A(X3,V3) 119 CALL icb_accel( berg , zxi3, ze1, zuvel3, zuvel1, zax3, &120 & zyj3, ze2, zvvel3, zvvel1, zay3, zdt )120 CALL icb_accel( kt, berg , zxi3, ze1, zuvel3, zuvel1, zax3, & 121 & zyj3, ze2, zvvel3, zvvel1, zay3, zdt, 1._wp ) 121 122 ! 122 123 zu3 = zuvel3 / ze1 !** V3 in d(i,j)/dt … … 129 130 zyj4 = zyj1 + zdt * zv3 ; zvvel4 = zvvel1 + zdt * zay3 130 131 131 CALL icb_ground( zxi4, zxi1, zu 4, &132 & zyj4, zyj1, zv 4, ll_bounced )132 CALL icb_ground( zxi4, zxi1, zu3, & 133 & zyj4, zyj1, zv3, ll_bounced ) 133 134 134 135 ! !** A4 = A(X4,V4) 135 CALL icb_accel( berg , zxi4, ze1, zuvel4, zuvel1, zax4, &136 & zyj4, ze2, zvvel4, zvvel1, zay4, zdt )136 CALL icb_accel( kt, berg , zxi4, ze1, zuvel4, zuvel1, zax4, & 137 & zyj4, ze2, zvvel4, zvvel1, zay4, zdt, 1._wp ) 137 138 138 139 zu4 = zuvel4 / ze1 !** V4 in d(i,j)/dt … … 234 235 235 236 236 SUBROUTINE icb_accel( berg , pxi, pe1, puvel, puvel0, pax,&237 & pyj, pe2, pvvel, pvvel0, pay, pdt)237 SUBROUTINE icb_accel( kt, berg , pxi, pe1, puvel, puvel0, pax, & 238 & pyj, pe2, pvvel, pvvel0, pay, pdt, pcfl_scale ) 238 239 !!---------------------------------------------------------------------- 239 240 !! *** ROUTINE icb_accel *** … … 244 245 !!---------------------------------------------------------------------- 245 246 TYPE(iceberg ), POINTER, INTENT(in ) :: berg ! berg 247 INTEGER , INTENT(in ) :: kt ! time step 248 REAL(wp) , INTENT(in ) :: pcfl_scale 246 249 REAL(wp) , INTENT(in ) :: pxi , pyj ! berg position in (i,j) referential 247 250 REAL(wp) , INTENT(in ) :: puvel , pvvel ! berg velocity [m/s] … … 361 364 zspeed = SQRT( zuveln*zuveln + zvveln*zvveln ) ! Speed of berg 362 365 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 366 zloc_dx = MIN( pe1, pe2 ) ! minimum grid spacing 367 ! cfl scale is function of the RK4 step 368 zspeed_new = zloc_dx / pdt * rn_speed_limit * pcfl_scale ! Speed limit as a factor of dx / dt 365 369 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 370 zuveln = zuveln * ( zspeed_new / zspeed ) ! Scale velocity to reduce speed 371 zvveln = zvveln * ( zspeed_new / zspeed ) ! without changing the direction 372 pax = (zuveln - puvel0)/pdt 373 pay = (zvveln - pvvel0)/pdt 374 ! 375 ! print speeding ticket 376 IF (nn_verbose_level > 0) THEN 377 WRITE(numicb, 9200) 'icb speeding : ',kt, nknberg, zspeed, & 378 & pxi, pyj, zuo, zvo, zua, zva, zui, zvi 379 9200 FORMAT(a,i9,i6,f9.2,1x,4(1x,2f9.2)) 380 END IF 381 ! 368 382 CALL icb_dia_speed() 369 383 ENDIF -
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/ICB/icbutl.F90
r13263 r14372 428 428 IF( ij == jpj ) THEN ; ij = ij-1 ; ierr = ierr + 1 ; END IF 429 429 ! 430 IF ( ierr > 0 ) CALL ctl_stop('STOP','icb_utl_bilin_e: an icebergs coordinates is out of valid range (out of bound error)') 430 IF ( ierr > 0 ) THEN 431 CALL FLUSH(numicb) 432 CALL ctl_stop('STOP','icb_utl_bilin_e: an icebergs coordinates is out of valid range (out of bound error).' , & 433 & 'This can be fixed using rn_speed_limit=0.4 in &namberg.' , & 434 & 'More details in the corresponding iceberg.stat file (nn_verbose_level > 0).' ) 435 END IF 431 436 ! 432 437 IF( 0.0_wp <= zi .AND. zi < 0.5_wp ) THEN
Note: See TracChangeset
for help on using the changeset viewer.