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/trabbc.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/trabbc.F90

    r6486 r9366  
    3434   PUBLIC tra_bbc          ! routine called by step.F90 
    3535   PUBLIC tra_bbc_init     ! routine called by opa.F90 
     36   PRIVATE bbc_namelist 
    3637 
    3738   !                                 !!* Namelist nambbc: bottom boundary condition * 
     
    139140      NAMELIST/nambbc/ln_trabbc, nn_geoflx, rn_geoflx_cst, sn_qgh, cn_dir  
    140141      !!---------------------------------------------------------------------- 
    141  
    142       REWIND( numnam_ref )              ! Namelist nambbc in reference namelist : Bottom momentum boundary condition 
    143       READ  ( numnam_ref, nambbc, IOSTAT = ios, ERR = 901) 
    144 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbc in reference namelist', lwp ) 
    145  
    146       REWIND( numnam_cfg )              ! Namelist nambbc in configuration namelist : Bottom momentum boundary condition 
    147       READ  ( numnam_cfg, nambbc, IOSTAT = ios, ERR = 902 ) 
    148 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbc in configuration namelist', lwp ) 
     142      IF(lwm) THEN 
     143         REWIND( numnam_ref )              ! Namelist nambbc in reference namelist : Bottom momentum boundary condition 
     144         READ  ( numnam_ref, nambbc, IOSTAT = ios, ERR = 901) 
     145901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbc in reference namelist', lwm ) 
     146         REWIND( numnam_cfg )              ! Namelist nambbc in configuration namelist : Bottom momentum boundary condition 
     147         READ  ( numnam_cfg, nambbc, IOSTAT = ios, ERR = 902 ) 
     148902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbc in configuration namelist', lwm ) 
     149      ENDIF 
    149150      IF(lwm) WRITE ( numond, nambbc ) 
     151 
     152      call bbc_namelist(sn_qgh, cn_dir) 
    150153 
    151154      IF(lwp) THEN                     ! Control print 
     
    199202   END SUBROUTINE tra_bbc_init 
    200203 
     204   SUBROUTINE bbc_namelist(sd_qgh, cd_dir) 
     205     !!--------------------------------------------------------------------- 
     206     !!                   ***  ROUTINE bbc_namelist  *** 
     207     !!                      
     208     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     209     !! 
     210     !! ** Method  :   use lib_mpp 
     211     !!---------------------------------------------------------------------- 
     212      TYPE(FLD_N)        ::   sd_qgh    ! informations about the geotherm. field to be read 
     213      CHARACTER(len=256) ::   cd_dir    ! Root directory for location of ssr files 
     214 
     215#if defined key_mpp_mpi 
     216      CALL mpp_bcast(ln_trabbc) 
     217      CALL mpp_bcast(nn_geoflx) 
     218      CALL mpp_bcast(rn_geoflx_cst) 
     219      CALL fld_n_bcast(sd_qgh) 
     220      CALL mpp_bcast(cd_dir, 256) 
     221#endif 
     222   END SUBROUTINE bbc_namelist 
     223 
    201224   !!====================================================================== 
    202225END MODULE trabbc 
Note: See TracChangeset for help on using the changeset viewer.