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

    r8243 r9366  
    2727 
    2828   PUBLIC sbc_flx       ! routine called by step.F90 
     29   PRIVATE flx_namelist 
    2930 
    3031   INTEGER , PARAMETER ::   jpfld   = 5   ! maximum number of files to read  
     
    9394         ! set file information 
    9495         ln_lfx_sio = .FALSE. 
    95          REWIND( numnam_ref )              ! Namelist namsbc_flx in reference namelist : Files for fluxes 
    96          READ  ( numnam_ref, namsbc_flx, IOSTAT = ios, ERR = 901) 
    97 901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_flx in reference namelist', lwp ) 
    98  
    99          REWIND( numnam_cfg )              ! Namelist namsbc_flx in configuration namelist : Files for fluxes 
    100          READ  ( numnam_cfg, namsbc_flx, IOSTAT = ios, ERR = 902 ) 
    101 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist', lwp ) 
     96         IF(lwm) THEN 
     97            REWIND( numnam_ref )              ! Namelist namsbc_flx in reference namelist : Files for fluxes 
     98            READ  ( numnam_ref, namsbc_flx, IOSTAT = ios, ERR = 901) 
     99901         IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_flx in reference namelist', lwm ) 
     100            REWIND( numnam_cfg )              ! Namelist namsbc_flx in configuration namelist : Files for fluxes 
     101            READ  ( numnam_cfg, namsbc_flx, IOSTAT = ios, ERR = 902 ) 
     102902         IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist', lwm ) 
     103         ENDIF 
    102104         IF(lwm) WRITE ( numond, namsbc_flx )  
    103105         ! 
     106         CALL flx_namelist(cn_dir, sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp) 
    104107         !                                         ! check: do we plan to use ln_dm2dc with non-daily forcing? 
    105108         IF( ln_dm2dc .AND. sn_qsr%nfreqh /= 24 )   & 
     
    180183   END SUBROUTINE sbc_flx 
    181184 
     185   SUBROUTINE flx_namelist(cd_dir, sd_utau, sd_vtau, sd_qtot, sd_qsr, sd_emp) 
     186     !!--------------------------------------------------------------------- 
     187     !!                   ***  ROUTINE flx_namelist  *** 
     188     !!                      
     189     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     190     !! 
     191     !! ** Method  :   use lib_mpp 
     192     !!---------------------------------------------------------------------- 
     193      CHARACTER(len=100), INTENT(INOUT) :: cd_dir                                     ! Root directory for location of flx files 
     194      TYPE(FLD_N), INTENT(INOUT)        :: sd_utau, sd_vtau, sd_qtot, sd_qsr, sd_emp  ! informations about the fields to be read 
     195#if defined key_mpp_mpi 
     196      CALL mpp_bcast(cd_dir, 100) 
     197      CALL fld_n_bcast(sd_utau) 
     198      CALL fld_n_bcast(sd_vtau) 
     199      CALL fld_n_bcast(sd_qtot) 
     200      CALL fld_n_bcast(sd_qsr) 
     201      CALL fld_n_bcast(sd_emp) 
     202      CALL mpp_bcast(ln_lfx_sio) 
     203#endif 
     204   END SUBROUTINE flx_namelist 
     205 
    182206   !!====================================================================== 
    183207END MODULE sbcflx 
Note: See TracChangeset for help on using the changeset viewer.