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/ZDF/zdfddm.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/ZDF/zdfddm.F90

    r6498 r9366  
    3434   PUBLIC   zdf_ddm_init  ! called by opa.F90 
    3535   PUBLIC   zdf_ddm_alloc ! called by nemogcm.F90 
     36   PRIVATE  ddm_namelist 
    3637 
    3738   LOGICAL , PUBLIC, PARAMETER ::   lk_zdfddm = .TRUE.  !: double diffusive mixing flag 
     
    239240      !!---------------------------------------------------------------------- 
    240241      ! 
    241       REWIND( numnam_ref )              ! Namelist namzdf_ddm in reference namelist : Double diffusion mixing scheme 
    242       READ  ( numnam_ref, namzdf_ddm, IOSTAT = ios, ERR = 901) 
    243 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ddm in reference namelist', lwp ) 
    244  
    245       REWIND( numnam_cfg )              ! Namelist namzdf_ddm in configuration namelist : Double diffusion mixing scheme 
    246       READ  ( numnam_cfg, namzdf_ddm, IOSTAT = ios, ERR = 902 ) 
    247 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ddm in configuration namelist', lwp ) 
     242      IF(lwm) THEN 
     243         REWIND( numnam_ref )              ! Namelist namzdf_ddm in reference namelist : Double diffusion mixing scheme 
     244         READ  ( numnam_ref, namzdf_ddm, IOSTAT = ios, ERR = 901) 
     245901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ddm in reference namelist', lwm ) 
     246         REWIND( numnam_cfg )              ! Namelist namzdf_ddm in configuration namelist : Double diffusion mixing scheme 
     247         READ  ( numnam_cfg, namzdf_ddm, IOSTAT = ios, ERR = 902 ) 
     248902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ddm in configuration namelist', lwm ) 
     249      ENDIF 
     250 
    248251      IF(lwm) WRITE ( numond, namzdf_ddm ) 
    249252      ! 
     253 
     254      CALL ddm_namelist() 
     255 
    250256      IF(lwp) THEN                    ! Parameter print 
    251257         WRITE(numout,*) 
     
    264270   END SUBROUTINE zdf_ddm_init 
    265271 
     272   SUBROUTINE ddm_namelist() 
     273     !!--------------------------------------------------------------------- 
     274     !!                   ***  ROUTINE ddm_namelist  *** 
     275     !!                      
     276     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     277     !! 
     278     !! ** Method  :   use lib_mpp 
     279     !!---------------------------------------------------------------------- 
     280#if defined key_mpp_mpi 
     281      CALL mpp_bcast(rn_avts) 
     282      CALL mpp_bcast(rn_hsbfr) 
     283#endif 
     284   END SUBROUTINE ddm_namelist 
    266285#else 
    267286   !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.