New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 9168 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90 – NEMO

Ignore:
Timestamp:
2017-12-23T13:27:17+01:00 (6 years ago)
Author:
gm
Message:

dev_merge_2017: OPA_SRC & CONFIG: remove useless warning when reading namelist_cfg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90

    r7753 r9168  
    367367      REWIND( numnam_cfg )              ! Namelist namberg in configuration namelist : Iceberg parameters 
    368368      READ  ( numnam_cfg, namberg, IOSTAT = ios, ERR = 902 ) 
    369 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist', lwp ) 
     369902   IF( ios > 0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist', lwp ) 
    370370      IF(lwm) WRITE ( numond, namberg ) 
    371371#else 
     
    387387      ENDIF 
    388388 
    389       IF( nn_test_icebergs > nclasses ) THEN 
    390           IF(lwp) WRITE(numout,*) 'Resetting nn_test_icebergs to ', nclasses 
    391           nn_test_icebergs = nclasses 
    392       ENDIF 
    393  
    394       zfact = SUM( rn_distribution ) 
    395       IF( zfact < 1._wp ) THEN 
    396          IF( zfact <= 0._wp ) THEN 
    397              
    398          ELSE 
    399             rn_distribution(:) = rn_distribution(:) / zfact 
    400             CALL ctl_warn( 'icb_nam: sum of berg input distribution not equal to one and so RESCALED' ) 
    401          ENDIF 
    402       ENDIF 
    403389 
    404390!     IF( lk_lim3 .AND. ln_icebergs ) THEN 
     
    418404         WRITE(numout,*) '   Fraction of calving to apply to this class (non-dim)         rn_distribution     =' 
    419405         DO jn = 1, nclasses 
    420             WRITE(numout,'(a,f10.2)') '                                                                ',rn_distribution(jn) 
     406            WRITE(numout,'(a,f10.4)') '                                                                ',rn_distribution(jn) 
    421407         END DO 
    422408         WRITE(numout,*) '   Ratio between effective and real iceberg mass (non-dim)      rn_mass_scaling     = ' 
     
    449435      ENDIF 
    450436      ! 
     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      ! 
    451460   END SUBROUTINE icb_nam 
    452461 
Note: See TracChangeset for help on using the changeset viewer.