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

    r8243 r9366  
    2525 
    2626   PUBLIC   sbc_apr    ! routine called in sbcmod 
     27   PRIVATE  sio_namelist 
    2728    
    2829   !                                !!* namsbc_apr namelist (Atmospheric PRessure) * 
     
    8081         !                                      ! -------------------- ! 
    8182         ln_apr_sio = .FALSE. 
    82          REWIND( numnam_ref )              ! Namelist namsbc_apr in reference namelist : File for atmospheric pressure forcing 
    83          READ  ( numnam_ref, namsbc_apr, IOSTAT = ios, ERR = 901) 
    84 901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in reference namelist', lwp ) 
     83         IF(lwm) THEN 
     84            REWIND( numnam_ref )              ! Namelist namsbc_apr in reference namelist : File for atmospheric pressure forcing 
     85            READ  ( numnam_ref, namsbc_apr, IOSTAT = ios, ERR = 901) 
     86901         IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in reference namelist', lwm ) 
     87            REWIND( numnam_cfg )              ! Namelist namsbc_apr in configuration namelist : File for atmospheric pressure forcing 
     88            READ  ( numnam_cfg, namsbc_apr, IOSTAT = ios, ERR = 902 ) 
     89902         IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist', lwm ) 
     90         ENDIF 
    8591 
    86          REWIND( numnam_cfg )              ! Namelist namsbc_apr in configuration namelist : File for atmospheric pressure forcing 
    87          READ  ( numnam_cfg, namsbc_apr, IOSTAT = ios, ERR = 902 ) 
    88 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist', lwp ) 
    8992         IF(lwm) WRITE ( numond, namsbc_apr ) 
     93 
     94         CALL sio_namelist(cn_dir, sn_apr) 
    9095         ! 
    9196         ALLOCATE( sf_apr(1), STAT=ierror )           !* allocate and fill sf_sst (forcing structure) with sn_sst 
     
    168173      ! 
    169174   END SUBROUTINE sbc_apr 
     175 
     176   SUBROUTINE sio_namelist(cd_dir, sd_apr) 
     177     !!--------------------------------------------------------------------- 
     178     !!                   ***  ROUTINE sio_namelist  *** 
     179     !!                      
     180     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     181     !! 
     182     !! ** Method  :   use lib_mpp 
     183     !!---------------------------------------------------------------------- 
     184      CHARACTER(len=100) ::  cd_dir   ! Root directory for location of ssr files 
     185      TYPE(FLD_N)        ::  sd_apr   ! informations about the fields to be read 
     186 
     187#if defined key_mpp_mpi 
     188      CALL mpp_bcast(cd_dir, 100) 
     189      CALL fld_n_bcast(sd_apr) 
     190      CALL mpp_bcast(ln_ref_apr) 
     191      CALL mpp_bcast(rn_pref) 
     192      CALL mpp_bcast(ln_apr_obc) 
     193#endif 
     194   END SUBROUTINE sio_namelist 
    170195       
    171196   !!====================================================================== 
Note: See TracChangeset for help on using the changeset viewer.