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/DYN/dynnept.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/DYN/dynnept.F90

    r6486 r9366  
    4040   !! dyn_nept_div_cur_init   is called only by dyn_nept_init, within this module 
    4141   !! dyn_nept_vel            is called only by dyn_nept_cor,  within this module 
     42   PRIVATE nept_namelist 
    4243 
    4344   !! * Shared module variables 
     
    118119      ! Define the (simplified) Neptune parameters 
    119120      ! ========================================== 
    120  
    121       REWIND( numnam_ref )              ! Namelist namdyn_nept in reference namelist : Simplified Neptune 
    122       READ  ( numnam_ref, namdyn_nept, IOSTAT = ios, ERR = 901) 
    123 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_nept in reference namelist', lwp ) 
    124  
    125       REWIND( numnam_cfg )              ! Namelist namdyn_nept in reference namelist : Simplified Neptune 
    126       READ  ( numnam_cfg, namdyn_nept, IOSTAT = ios, ERR = 902 ) 
    127 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_nept in configuration namelist', lwp ) 
     121      IF(lwm) THEN 
     122         REWIND( numnam_ref )              ! Namelist namdyn_nept in reference namelist : Simplified Neptune 
     123         READ  ( numnam_ref, namdyn_nept, IOSTAT = ios, ERR = 901) 
     124901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_nept in reference namelist', lwm ) 
     125         REWIND( numnam_cfg )              ! Namelist namdyn_nept in reference namelist : Simplified Neptune 
     126         READ  ( numnam_cfg, namdyn_nept, IOSTAT = ios, ERR = 902 ) 
     127902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_nept in configuration namelist', lwm ) 
     128      ENDIF 
     129 
    128130      IF(lwm) WRITE ( numond, namdyn_nept ) 
     131 
     132      CALL nept_namelist() 
    129133 
    130134      IF(lwp) THEN                      ! Control print 
     
    595599   END SUBROUTINE dyn_nept_smooth_vel 
    596600 
     601   SUBROUTINE nept_namelist() 
     602     !!--------------------------------------------------------------------- 
     603     !!                   ***  ROUTINE nept_namelist  *** 
     604     !!                      
     605     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     606     !! 
     607     !! ** Method  :   use lib_mpp 
     608     !!---------------------------------------------------------------------- 
     609#if defined key_mpp_mpi 
     610      CALL mpp_bcast(ln_neptsimp) 
     611      CALL mpp_bcast(ln_smooth_neptvel) 
     612      CALL mpp_bcast(rn_tslse) 
     613      CALL mpp_bcast(rn_tslsp) 
     614      CALL mpp_bcast(ln_neptramp) 
     615      CALL mpp_bcast(rn_htrmin) 
     616      CALL mpp_bcast(rn_htrmax) 
     617#endif 
     618   END SUBROUTINE nept_namelist 
    597619END MODULE dynnept 
Note: See TracChangeset for help on using the changeset viewer.