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

    r8243 r9366  
    3030   PRIVATE 
    3131   PUBLIC   sbc_ice_if      ! routine called in sbcmod 
     32   PRIVATE  if_namelist 
    3233 
    3334   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_ice   ! structure of input ice-cover (file informations, fields read) 
     
    7475         !                                      ! ====================== ! 
    7576         ! set file information 
    76          REWIND( numnam_ref )              ! Namelist namsbc_iif in reference namelist : Ice if file 
    77          READ  ( numnam_ref, namsbc_iif, IOSTAT = ios, ERR = 901) 
    78 901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iif in reference namelist', lwp ) 
     77         IF(lwm) THEN 
     78            REWIND( numnam_ref )              ! Namelist namsbc_iif in reference namelist : Ice if file 
     79            READ  ( numnam_ref, namsbc_iif, IOSTAT = ios, ERR = 901) 
     80901         IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iif in reference namelist', lwm ) 
     81            REWIND( numnam_cfg )              ! Namelist Namelist namsbc_iif in configuration namelist : Ice if file 
     82            READ  ( numnam_cfg, namsbc_iif, IOSTAT = ios, ERR = 902 ) 
     83902         IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist', lwm ) 
     84         ENDIF 
    7985 
    80          REWIND( numnam_cfg )              ! Namelist Namelist namsbc_iif in configuration namelist : Ice if file 
    81          READ  ( numnam_cfg, namsbc_iif, IOSTAT = ios, ERR = 902 ) 
    82 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist', lwp ) 
    8386         IF(lwm) WRITE ( numond, namsbc_iif ) 
     87 
     88         CALL if_namelist(cn_dir, sn_ice) 
    8489 
    8590         ALLOCATE( sf_ice(1), STAT=ierror ) 
     
    147152   END SUBROUTINE sbc_ice_if 
    148153 
     154   SUBROUTINE if_namelist(cd_dir, sd_ice) 
     155     !!--------------------------------------------------------------------- 
     156     !!                   ***  ROUTINE if_namelist  *** 
     157     !!                      
     158     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     159     !! 
     160     !! ** Method  :   use lib_mpp 
     161     !!---------------------------------------------------------------------- 
     162      CHARACTER(len=100), INTENT(INOUT)  ::   cd_dir    ! Root directory for location of ice-if files 
     163      TYPE(FLD_N),        INTENT(INOUT)  ::   sd_ice    ! informations about the fields to be read 
     164 
     165#if defined key_mpp_mpi 
     166      CALL mpp_bcast(cd_dir, 100) 
     167      CALL fld_n_bcast(sd_ice) 
     168#endif 
     169   END SUBROUTINE if_namelist 
    149170   !!====================================================================== 
    150171END MODULE sbcice_if 
Note: See TracChangeset for help on using the changeset viewer.