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 9366 for branches/UKMO/test_moci_test_suite_namelist_read/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90 – NEMO

Ignore:
Timestamp:
2018-02-28T16:29:13+01:00 (6 years ago)
Author:
andmirek
Message:

#2050 first version. Compiled OK in moci test suite

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/test_moci_test_suite_namelist_read/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90

    r6793 r9366  
    5353   IMPLICIT NONE 
    5454   PRIVATE 
     55   PRIVATE bn2_namelist 
    5556 
    5657   !                   !! * Interface 
     
    12321233      !!---------------------------------------------------------------------- 
    12331234      ! 
    1234       REWIND( numnam_ref )              ! Namelist nameos in reference namelist : equation of state 
    1235       READ  ( numnam_ref, nameos, IOSTAT = ios, ERR = 901 ) 
    1236 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nameos in reference namelist', lwp ) 
    1237       ! 
    1238       REWIND( numnam_cfg )              ! Namelist nameos in configuration namelist : equation of state 
    1239       READ  ( numnam_cfg, nameos, IOSTAT = ios, ERR = 902 ) 
    1240 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nameos in configuration namelist', lwp ) 
     1235      IF(lwm) THEN 
     1236         REWIND( numnam_ref )              ! Namelist nameos in reference namelist : equation of state 
     1237         READ  ( numnam_ref, nameos, IOSTAT = ios, ERR = 901 ) 
     1238901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nameos in reference namelist', lwm ) 
     1239         REWIND( numnam_cfg )              ! Namelist nameos in configuration namelist : equation of state 
     1240         READ  ( numnam_cfg, nameos, IOSTAT = ios, ERR = 902 ) 
     1241902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nameos in configuration namelist', lwm ) 
     1242      ENDIF 
    12411243      IF(lwm) WRITE( numond, nameos ) 
    12421244      ! 
     
    12441246      rcp         = 3991.86795711963_wp      !: heat capacity     [J/K] 
    12451247      ! 
     1248      call bn2_namelist() 
     1249 
    12461250      IF(lwp) THEN                ! Control print 
    12471251         WRITE(numout,*) 
     
    16751679   END SUBROUTINE eos_init 
    16761680 
     1681   SUBROUTINE bn2_namelist() 
     1682     !!--------------------------------------------------------------------- 
     1683     !!                   ***  ROUTINE bn2_namelist  *** 
     1684     !!                      
     1685     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     1686     !! 
     1687     !! ** Method  :   use lib_mpp 
     1688     !!---------------------------------------------------------------------- 
     1689#if defined key_mpp_mpi 
     1690      CALL mpp_bcast(nn_eos) 
     1691      CALL mpp_bcast(ln_useCT) 
     1692      CALL mpp_bcast(rn_a0) 
     1693      CALL mpp_bcast(rn_b0) 
     1694      CALL mpp_bcast(rn_lambda1) 
     1695      CALL mpp_bcast(rn_mu1) 
     1696      CALL mpp_bcast(rn_lambda2) 
     1697      CALL mpp_bcast(rn_mu2) 
     1698      CALL mpp_bcast(rn_nu) 
     1699#endif 
     1700   END SUBROUTINE bn2_namelist 
    16771701   !!====================================================================== 
    16781702END MODULE eosbn2 
Note: See TracChangeset for help on using the changeset viewer.