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/CRS/crsini.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/CRS/crsini.F90

    r6486 r9366  
    2525 
    2626   PUBLIC  crs_init 
     27   PRIVATE crs_namelist 
    2728 
    2829   !! * Substitutions 
     
    8586     !--------------------------------------------------------- 
    8687     ! 
    87  
    88       REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
    89       READ  ( numnam_ref, namcrs, IOSTAT = ios, ERR = 901) 
    90 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcrs in reference namelist', lwp ) 
    91  
    92       REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
    93       READ  ( numnam_cfg, namcrs, IOSTAT = ios, ERR = 902 ) 
    94 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcrs in configuration namelist', lwp ) 
     88      IF(lwm) THEN 
     89         REWIND( numnam_ref )              ! Namelist namrun in reference namelist : Parameters of the run 
     90         READ  ( numnam_ref, namcrs, IOSTAT = ios, ERR = 901) 
     91901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcrs in reference namelist', lwm ) 
     92         REWIND( numnam_cfg )              ! Namelist namrun in configuration namelist : Parameters of the run 
     93         READ  ( numnam_cfg, namcrs, IOSTAT = ios, ERR = 902 ) 
     94902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcrs in configuration namelist', lwm ) 
     95      ENDIF 
    9596      IF(lwm) WRITE ( numond, namcrs ) 
     97 
     98     CALL crs_namelist() 
    9699 
    97100     IF(lwp) THEN 
     
    254257 
    255258   END SUBROUTINE crs_init 
    256      
     259 
     260   SUBROUTINE crs_namelist() 
     261     !!--------------------------------------------------------------------- 
     262     !!                   ***  ROUTINE crs_namelist  *** 
     263     !!                      
     264     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     265     !! 
     266     !! ** Method  :   use lib_mpp 
     267     !!---------------------------------------------------------------------- 
     268#if defined key_mpp_mpi 
     269      CALL mpp_bcast(nn_factx) 
     270      CALL mpp_bcast(nn_facty) 
     271      CALL mpp_bcast(nn_binref) 
     272      CALL mpp_bcast(nn_msh_crs) 
     273      CALL mpp_bcast(nn_crs_kz) 
     274      CALL mpp_bcast(ln_crs_wn) 
     275#endif 
     276   END SUBROUTINE crs_namelist     
    257277   !!====================================================================== 
    258278 
Note: See TracChangeset for help on using the changeset viewer.