- Timestamp:
- 2020-10-01T13:33:30+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/ICE/icectl.F90
r13295 r13553 350 350 !! *** ROUTINE ice_ctl *** 351 351 !! 352 !! ** Purpose : Alerts in case of model crash352 !! ** Purpose : control checks 353 353 !!------------------------------------------------------------------- 354 354 INTEGER, INTENT(in) :: kt ! ocean time step 355 INTEGER :: ji, jj, jk, jl ! dummy loop indices 356 INTEGER :: inb_altests ! number of alert tests (max 20) 357 INTEGER :: ialert_id ! number of the current alert 358 REAL(wp) :: ztmelts ! ice layer melting point 355 INTEGER :: ja, ji, jj, jk, jl ! dummy loop indices 356 INTEGER :: ialert_id ! number of the current alert 357 REAL(wp) :: ztmelts ! ice layer melting point 359 358 CHARACTER (len=30), DIMENSION(20) :: cl_alname ! name of alert 360 359 INTEGER , DIMENSION(20) :: inb_alp ! number of alerts positive 361 360 !!------------------------------------------------------------------- 362 363 inb_altests = 10 364 inb_alp(:) = 0 365 366 ! Alert if incompatible volume and concentration 367 ialert_id = 2 ! reference number of this alert 368 cl_alname(ialert_id) = ' Incompat vol and con ' ! name of the alert 361 inb_alp(:) = 0 362 ialert_id = 0 363 364 ! Alert if very high salinity 365 ialert_id = ialert_id + 1 ! reference number of this alert 366 cl_alname(ialert_id) = ' Very high salinity ' ! name of the alert 369 367 DO jl = 1, jpl 370 368 DO_2D( 1, 1, 1, 1 ) 371 IF( v_i(ji,jj,jl) /= 0._wp .AND. a_i(ji,jj,jl) == 0._wp ) THEN 372 WRITE(numout,*) ' ALERTE 2 : Incompatible volume and concentration ' 373 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 369 IF( v_i(ji,jj,jl) > epsi10 ) THEN 370 IF( sv_i(ji,jj,jl) / v_i(ji,jj,jl) > rn_simax ) THEN 371 WRITE(numout,*) ' ALERTE : Very high salinity ',sv_i(ji,jj,jl)/v_i(ji,jj,jl) 372 WRITE(numout,*) ' at i,j,l = ',ji,jj,jl 373 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 374 ENDIF 374 375 ENDIF 375 376 END_2D 376 377 END DO 377 378 378 ! Alerte if very thick ice 379 ialert_id = 3 ! reference number of this alert 380 cl_alname(ialert_id) = ' Very thick ice ' ! name of the alert 381 jl = jpl 382 DO_2D( 1, 1, 1, 1 ) 383 IF( h_i(ji,jj,jl) > 50._wp ) THEN 384 WRITE(numout,*) ' ALERTE 3 : Very thick ice' 385 !CALL ice_prt( kt, ji, jj, 2, ' ALERTE 3 : Very thick ice ' ) 386 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 387 ENDIF 388 END_2D 389 390 ! Alert if very fast ice 391 ialert_id = 4 ! reference number of this alert 392 cl_alname(ialert_id) = ' Very fast ice ' ! name of the alert 393 DO_2D( 1, 1, 1, 1 ) 394 IF( MAX( ABS( u_ice(ji,jj) ), ABS( v_ice(ji,jj) ) ) > 2. .AND. & 395 & at_i(ji,jj) > 0._wp ) THEN 396 WRITE(numout,*) ' ALERTE 4 : Very fast ice' 397 !CALL ice_prt( kt, ji, jj, 1, ' ALERTE 4 : Very fast ice ' ) 398 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 399 ENDIF 400 END_2D 401 402 ! Alert on salt flux 403 ialert_id = 5 ! reference number of this alert 404 cl_alname(ialert_id) = ' High salt flux ' ! name of the alert 405 DO_2D( 1, 1, 1, 1 ) 406 IF( ABS( sfx (ji,jj) ) > 1.0e-2 ) THEN ! = 1 psu/day for 1m ocean depth 407 WRITE(numout,*) ' ALERTE 5 : High salt flux' 408 !CALL ice_prt( kt, ji, jj, 3, ' ALERTE 5 : High salt flux ' ) 409 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 410 ENDIF 411 END_2D 412 413 ! Alert if there is ice on continents 414 ialert_id = 6 ! reference number of this alert 415 cl_alname(ialert_id) = ' Ice on continents ' ! name of the alert 416 DO_2D( 1, 1, 1, 1 ) 417 IF( tmask(ji,jj,1) <= 0._wp .AND. at_i(ji,jj) > 0._wp ) THEN 418 WRITE(numout,*) ' ALERTE 6 : Ice on continents' 419 !CALL ice_prt( kt, ji, jj, 1, ' ALERTE 6 : Ice on continents ' ) 420 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 421 ENDIF 422 END_2D 423 424 ! 425 ! ! Alert if very fresh ice 426 ialert_id = 7 ! reference number of this alert 427 cl_alname(ialert_id) = ' Very fresh ice ' ! name of the alert 379 ! Alert if very low salinity 380 ialert_id = ialert_id + 1 ! reference number of this alert 381 cl_alname(ialert_id) = ' Very low salinity ' ! name of the alert 428 382 DO jl = 1, jpl 429 383 DO_2D( 1, 1, 1, 1 ) 430 IF( s_i(ji,jj,jl) < 0.1 .AND. a_i(ji,jj,jl) > 0._wp ) THEN 431 WRITE(numout,*) ' ALERTE 7 : Very fresh ice' 432 ! CALL ice_prt(kt,ji,jj,1, ' ALERTE 7 : Very fresh ice ' ) 433 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 384 IF( v_i(ji,jj,jl) > epsi10 ) THEN 385 IF( sv_i(ji,jj,jl) / v_i(ji,jj,jl) < rn_simin ) THEN 386 WRITE(numout,*) ' ALERTE : Very low salinity ',sv_i(ji,jj,jl),v_i(ji,jj,jl) 387 WRITE(numout,*) ' at i,j,l = ',ji,jj,jl 388 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 389 ENDIF 434 390 ENDIF 435 391 END_2D 436 392 END DO 437 ! 438 ! Alert if qns very big 439 ialert_id = 8 ! reference number of this alert 440 cl_alname(ialert_id) = ' fnsolar very big ' ! name of the alert 441 DO_2D( 1, 1, 1, 1 ) 442 IF( ABS( qns(ji,jj) ) > 1500._wp .AND. at_i(ji,jj) > 0._wp ) THEN 443 ! 444 WRITE(numout,*) ' ALERTE 8 : Very high non-solar heat flux' 445 !CALL ice_prt( kt, ji, jj, 2, ' ') 446 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 447 ! 448 ENDIF 449 END_2D 450 !+++++ 451 452 ! ! Alert if too old ice 453 ialert_id = 9 ! reference number of this alert 454 cl_alname(ialert_id) = ' Very old ice ' ! name of the alert 455 DO jl = 1, jpl 456 DO_2D( 1, 1, 1, 1 ) 457 IF ( ( ( ABS( o_i(ji,jj,jl) ) > rDt_ice ) .OR. & 458 ( ABS( o_i(ji,jj,jl) ) < 0._wp) ) .AND. & 459 ( a_i(ji,jj,jl) > 0._wp ) ) THEN 460 WRITE(numout,*) ' ALERTE 9 : Wrong ice age' 461 !CALL ice_prt( kt, ji, jj, 1, ' ALERTE 9 : Wrong ice age ') 462 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 463 ENDIF 464 END_2D 465 END DO 466 467 ! Alert if very warm ice 468 ialert_id = 10 ! reference number of this alert 469 cl_alname(ialert_id) = ' Very warm ice ' ! name of the alert 470 inb_alp(ialert_id) = 0 393 394 ! Alert if very cold ice 395 ialert_id = ialert_id + 1 ! reference number of this alert 396 cl_alname(ialert_id) = ' Very cold ice ' ! name of the alert 471 397 DO jl = 1, jpl 472 398 DO_3D( 1, 1, 1, 1, 1, nlay_i ) 473 399 ztmelts = -rTmlt * sz_i(ji,jj,jk,jl) + rt0 474 IF( t_i(ji,jj,jk,jl) > ztmelts .AND. v_i(ji,jj,jl) > 1.e-10 &475 & .AND. a_i(ji,jj,jl) > 0._wp ) THEN476 WRITE(numout,*) ' ALERTE 10 : Very warm ice'400 IF( t_i(ji,jj,jk,jl) < -50.+rt0 .AND. v_i(ji,jj,jl) > epsi10 ) THEN 401 WRITE(numout,*) ' ALERTE : Very cold ice ',(t_i(ji,jj,jk,jl)-rt0) 402 WRITE(numout,*) ' at i,j,k,l = ',ji,jj,jk,jl 477 403 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 478 404 ENDIF 479 405 END_3D 480 406 END DO 407 408 ! Alert if very warm ice 409 ialert_id = ialert_id + 1 ! reference number of this alert 410 cl_alname(ialert_id) = ' Very warm ice ' ! name of the alert 411 DO jl = 1, jpl 412 DO_3D( 1, 1, 1, 1, 1, nlay_i ) 413 ztmelts = -rTmlt * sz_i(ji,jj,jk,jl) + rt0 414 IF( t_i(ji,jj,jk,jl) > ztmelts .AND. v_i(ji,jj,jl) > epsi10 ) THEN 415 WRITE(numout,*) ' ALERTE : Very warm ice',(t_i(ji,jj,jk,jl)-rt0) 416 WRITE(numout,*) ' at i,j,k,l = ',ji,jj,jk,jl 417 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 418 ENDIF 419 END_3D 420 END DO 421 422 ! Alerte if very thick ice 423 ialert_id = ialert_id + 1 ! reference number of this alert 424 cl_alname(ialert_id) = ' Very thick ice ' ! name of the alert 425 jl = jpl 426 DO_2D( 1, 1, 1, 1 ) 427 IF( h_i(ji,jj,jl) > 50._wp ) THEN 428 WRITE(numout,*) ' ALERTE : Very thick ice ',h_i(ji,jj,jl) 429 WRITE(numout,*) ' at i,j,l = ',ji,jj,jl 430 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 431 ENDIF 432 END_2D 433 434 ! Alerte if very thin ice 435 ialert_id = ialert_id + 1 ! reference number of this alert 436 cl_alname(ialert_id) = ' Very thin ice ' ! name of the alert 437 jl = 1 438 DO_2D( 1, 1, 1, 1 ) 439 IF( h_i(ji,jj,jl) < rn_himin ) THEN 440 WRITE(numout,*) ' ALERTE : Very thin ice ',h_i(ji,jj,jl) 441 WRITE(numout,*) ' at i,j,l = ',ji,jj,jl 442 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 443 ENDIF 444 END_2D 445 446 ! Alert if very fast ice 447 ialert_id = ialert_id + 1 ! reference number of this alert 448 cl_alname(ialert_id) = ' Very fast ice ' ! name of the alert 449 DO_2D( 1, 1, 1, 1 ) 450 IF( MAX( ABS( u_ice(ji,jj) ), ABS( v_ice(ji,jj) ) ) > 2. ) THEN 451 WRITE(numout,*) ' ALERTE : Very fast ice ',MAX( ABS( u_ice(ji,jj) ), ABS( v_ice(ji,jj) ) ) 452 WRITE(numout,*) ' at i,j = ',ji,jj 453 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 454 ENDIF 455 END_2D 456 457 ! Alert if there is ice on continents 458 ialert_id = ialert_id + 1 ! reference number of this alert 459 cl_alname(ialert_id) = ' Ice on continents ' ! name of the alert 460 DO_2D( 1, 1, 1, 1 ) 461 IF( tmask(ji,jj,1) == 0._wp .AND. ( at_i(ji,jj) > 0._wp .OR. vt_i(ji,jj) > 0._wp ) ) THEN 462 WRITE(numout,*) ' ALERTE : Ice on continents ',at_i(ji,jj),vt_i(ji,jj) 463 WRITE(numout,*) ' at i,j = ',ji,jj 464 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 465 ENDIF 466 END_2D 467 468 ! Alert if incompatible ice concentration and volume 469 ialert_id = ialert_id + 1 ! reference number of this alert 470 cl_alname(ialert_id) = ' Incompatible ice conc and vol ' ! name of the alert 471 DO_2D( 1, 1, 1, 1 ) 472 IF( ( vt_i(ji,jj) == 0._wp .AND. at_i(ji,jj) > 0._wp ) .OR. & 473 & ( vt_i(ji,jj) > 0._wp .AND. at_i(ji,jj) == 0._wp ) ) THEN 474 WRITE(numout,*) ' ALERTE : Incompatible ice conc and vol ',at_i(ji,jj),vt_i(ji,jj) 475 WRITE(numout,*) ' at i,j = ',ji,jj 476 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 477 ENDIF 478 END_2D 481 479 482 480 ! sum of the alerts on all processors 483 481 IF( lk_mpp ) THEN 484 DO ialert_id = 1, inb_altests485 CALL mpp_sum('icectl', inb_alp( ialert_id))482 DO ja = 1, ialert_id 483 CALL mpp_sum('icectl', inb_alp(ja)) 486 484 END DO 487 485 ENDIF … … 489 487 ! print alerts 490 488 IF( lwp ) THEN 491 ialert_id = 1 ! reference number of this alert492 cl_alname(ialert_id) = ' NO alerte 1 ' ! name of the alert493 489 WRITE(numout,*) ' time step ',kt 494 490 WRITE(numout,*) ' All alerts at the end of ice model ' 495 DO ialert_id = 1, inb_altests496 WRITE(numout,*) ialert_id, cl_alname(ialert_id)//' : ', inb_alp(ialert_id), ' times ! '491 DO ja = 1, ialert_id 492 WRITE(numout,*) ja, cl_alname(ja)//' : ', inb_alp(ja), ' times ! ' 497 493 END DO 498 494 ENDIF … … 543 539 WRITE(numout,*) ' v_ice(i ,j) : ', v_ice(ji,jj) 544 540 WRITE(numout,*) ' strength : ', strength(ji,jj) 545 WRITE(numout,*)546 541 WRITE(numout,*) ' - Cell values ' 547 542 WRITE(numout,*) ' ~~~~~~~~~~~ ' … … 552 547 DO jl = 1, jpl 553 548 WRITE(numout,*) ' - Category (', jl,')' 549 WRITE(numout,*) ' ~~~~~~~~~~~ ' 554 550 WRITE(numout,*) ' a_i : ', a_i(ji,jj,jl) 555 551 WRITE(numout,*) ' h_i : ', h_i(ji,jj,jl) … … 588 584 WRITE(numout,*) ' v_ice(i ,j) : ', v_ice(ji,jj) 589 585 WRITE(numout,*) ' strength : ', strength(ji,jj) 590 WRITE(numout,*) ' u_ice_b : ', u_ice_b(ji,jj) , ' v_ice_b : ', v_ice_b(ji,jj)591 586 WRITE(numout,*) 592 587 … … 605 600 WRITE(numout,*) ' e_snow : ', e_s(ji,jj,1,jl) , ' e_snow_b : ', e_s_b(ji,jj,1,jl) 606 601 WRITE(numout,*) ' sv_i : ', sv_i(ji,jj,jl) , ' sv_i_b : ', sv_i_b(ji,jj,jl) 607 WRITE(numout,*) ' oa_i : ', oa_i(ji,jj,jl) , ' oa_i_b : ', oa_i_b(ji,jj,jl)608 602 END DO !jl 609 603 … … 713 707 CALL prt_ctl(tab2d_1=v_i (:,:,jl) , clinfo1= ' v_i : ') 714 708 CALL prt_ctl(tab2d_1=v_s (:,:,jl) , clinfo1= ' v_s : ') 715 CALL prt_ctl(tab2d_1=e_i (:,:,1,jl) , clinfo1= ' e_i1 : ')716 709 CALL prt_ctl(tab2d_1=e_s (:,:,1,jl) , clinfo1= ' e_snow : ') 717 710 CALL prt_ctl(tab2d_1=sv_i (:,:,jl) , clinfo1= ' sv_i : ') … … 721 714 CALL prt_ctl_info(' - Layer : ', ivar=jk) 722 715 CALL prt_ctl(tab2d_1=t_i(:,:,jk,jl) , clinfo1= ' t_i : ') 716 CALL prt_ctl(tab2d_1=e_i(:,:,jk,jl) , clinfo1= ' e_i : ') 723 717 END DO 724 718 END DO
Note: See TracChangeset
for help on using the changeset viewer.