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/SBC/sbcrnf.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/SBC/sbcrnf.F90

    r8243 r9366  
    3636   PUBLIC   sbc_rnf_alloc ! routine call in sbcmod module 
    3737   PUBLIC   sbc_rnf_init  ! (PUBLIC for TAM) 
     38   PRIVATE  rnf_namelist 
    3839   !                                                     !!* namsbc_rnf namelist * 
    3940   CHARACTER(len=100)         ::   cn_dir          !: Root directory for location of rnf files 
     
    283284      ! 
    284285      ln_rnf_sio = .FALSE. 
    285       REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    286       READ  ( numnam_ref, namsbc_rnf, IOSTAT = ios, ERR = 901) 
    287 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_rnf in reference namelist', lwp ) 
    288  
    289       REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    290       READ  ( numnam_cfg, namsbc_rnf, IOSTAT = ios, ERR = 902 ) 
    291 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist', lwp ) 
     286      IF(lwm) THEN 
     287         REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
     288         READ  ( numnam_ref, namsbc_rnf, IOSTAT = ios, ERR = 901) 
     289901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_rnf in reference namelist', lwm ) 
     290         REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
     291         READ  ( numnam_cfg, namsbc_rnf, IOSTAT = ios, ERR = 902 ) 
     292902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist', lwm ) 
     293      ENDIF 
    292294      IF(lwm) WRITE ( numond, namsbc_rnf ) 
    293295      ! 
     296      CALL rnf_namelist() 
    294297      !                                         ! Control print 
    295298      IF(lwp) THEN 
     
    541544   END SUBROUTINE rnf_mouth 
    542545 
     546   SUBROUTINE rnf_namelist() 
     547     !!--------------------------------------------------------------------- 
     548     !!                   ***  ROUTINE rnf_namelist  *** 
     549     !!                      
     550     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     551     !! 
     552     !! ** Method  :   use lib_mpp 
     553     !!---------------------------------------------------------------------- 
     554#if defined key_mpp_mpi 
     555      CALL mpp_bcast(cn_dir, 100) 
     556      CALL mpp_bcast(ln_rnf_depth) 
     557      CALL mpp_bcast(ln_rnf_tem) 
     558      CALL mpp_bcast(ln_rnf_sal) 
     559      CALL fld_n_bcast(sn_rnf) 
     560      CALL fld_n_bcast(sn_cnf) 
     561      CALL fld_n_bcast(sn_s_rnf) 
     562      CALL fld_n_bcast(sn_t_rnf) 
     563      CALL fld_n_bcast(sn_dep_rnf) 
     564      CALL mpp_bcast(ln_rnf_mouth) 
     565      CALL mpp_bcast(rn_hrnf) 
     566      CALL mpp_bcast(rn_avt_rnf) 
     567      CALL mpp_bcast(rn_rfact) 
     568      CALL mpp_bcast(ln_rnf_depth_ini) 
     569      CALL mpp_bcast(rn_dep_max) 
     570      CALL mpp_bcast(rn_rnf_max) 
     571      CALL mpp_bcast(nn_rnf_depth_file) 
     572      CALL mpp_bcast(ln_rnf_sio) 
     573#endif 
     574   END SUBROUTINE rnf_namelist 
    543575   !!====================================================================== 
    544576END MODULE sbcrnf 
Note: See TracChangeset for help on using the changeset viewer.