- Timestamp:
- 2017-12-23T13:27:17+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90
r7753 r9168 367 367 REWIND( numnam_cfg ) ! Namelist namberg in configuration namelist : Iceberg parameters 368 368 READ ( numnam_cfg, namberg, IOSTAT = ios, ERR = 902 ) 369 902 IF( ios /=0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist', lwp )369 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist', lwp ) 370 370 IF(lwm) WRITE ( numond, namberg ) 371 371 #else … … 387 387 ENDIF 388 388 389 IF( nn_test_icebergs > nclasses ) THEN390 IF(lwp) WRITE(numout,*) 'Resetting nn_test_icebergs to ', nclasses391 nn_test_icebergs = nclasses392 ENDIF393 394 zfact = SUM( rn_distribution )395 IF( zfact < 1._wp ) THEN396 IF( zfact <= 0._wp ) THEN397 398 ELSE399 rn_distribution(:) = rn_distribution(:) / zfact400 CALL ctl_warn( 'icb_nam: sum of berg input distribution not equal to one and so RESCALED' )401 ENDIF402 ENDIF403 389 404 390 ! IF( lk_lim3 .AND. ln_icebergs ) THEN … … 418 404 WRITE(numout,*) ' Fraction of calving to apply to this class (non-dim) rn_distribution =' 419 405 DO jn = 1, nclasses 420 WRITE(numout,'(a,f10. 2)') ' ',rn_distribution(jn)406 WRITE(numout,'(a,f10.4)') ' ',rn_distribution(jn) 421 407 END DO 422 408 WRITE(numout,*) ' Ratio between effective and real iceberg mass (non-dim) rn_mass_scaling = ' … … 449 435 ENDIF 450 436 ! 437 IF( nn_test_icebergs > nclasses ) THEN 438 IF(lwp) WRITE(numout,*) ' ==>>> Resetting of nn_test_icebergs to ', nclasses 439 nn_test_icebergs = nclasses 440 ENDIF 441 442 ! ensure that the sum of berg input distribution is equal to one 443 zfact = SUM( rn_distribution ) 444 IF( zfact /= 1._wp .AND. 0_wp /= zfact ) THEN 445 rn_distribution(:) = rn_distribution(:) / zfact 446 IF(lwp) THEN 447 WRITE(numout,*) 448 WRITE(numout,*) ' ==>>> CAUTION: sum of berg input distribution = ', zfact 449 WRITE(numout,*) ' ******* redistribution has been rescaled' 450 WRITE(numout,*) ' updated berg distribution is :' 451 DO jn = 1, nclasses 452 WRITE(numout,'(a,f10.4)') ' ',rn_distribution(jn) 453 END DO 454 ENDIF 455 ENDIF 456 IF( MINVAL( rn_distribution(:) ) < 0._wp ) THEN 457 CALL ctl_stop( 'icb_nam: a negative rn_distribution value encountered ==>> change your namelist namberg' ) 458 ENDIF 459 ! 451 460 END SUBROUTINE icb_nam 452 461
Note: See TracChangeset
for help on using the changeset viewer.