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/DIA/diaptr.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/DIA/diaptr.F90

    r7923 r9366  
    4141   PUBLIC   dia_ptr        ! call in step module 
    4242   PUBLIC   dia_ptr_ohst_components        ! called from tra_ldf/tra_adv routines 
     43   PRIVATE  ptr_namelist 
    4344 
    4445   !                                  !!** namelist  namptr  ** 
     
    428429      NAMELIST/namptr/ ln_diaptr, ln_subbas 
    429430      !!---------------------------------------------------------------------- 
    430  
    431       REWIND( numnam_ref )              ! Namelist namptr in reference namelist : Poleward transport 
    432       READ  ( numnam_ref, namptr, IOSTAT = ios, ERR = 901) 
    433 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist', lwp ) 
    434  
    435       REWIND( numnam_cfg )              ! Namelist namptr in configuration namelist : Poleward transport 
    436       READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 ) 
    437 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist', lwp ) 
     431      IF(lwm) THEN 
     432         REWIND( numnam_ref )              ! Namelist namptr in reference namelist : Poleward transport 
     433         READ  ( numnam_ref, namptr, IOSTAT = ios, ERR = 901) 
     434901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist', lwm ) 
     435         REWIND( numnam_cfg )              ! Namelist namptr in configuration namelist : Poleward transport 
     436         READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 ) 
     437902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist', lwm ) 
     438      ENDIF 
     439 
    438440      IF(lwm) WRITE ( numond, namptr ) 
     441 
     442      CALL ptr_namelist() 
    439443 
    440444      IF(lwp) THEN                     ! Control print 
     
    758762   END FUNCTION ptr_sjk 
    759763 
    760  
     764   SUBROUTINE ptr_namelist() 
     765     !!--------------------------------------------------------------------- 
     766     !!                   ***  ROUTINE ptr_namelist  *** 
     767     !!                      
     768     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     769     !! 
     770     !! ** Method  :   use lib_mpp 
     771     !!---------------------------------------------------------------------- 
     772#if defined key_mpp_mpi 
     773      CALL mpp_bcast(ln_diaptr) 
     774      CALL mpp_bcast(ln_subbas) 
     775#endif 
     776   END SUBROUTINE ptr_namelist 
    761777   !!====================================================================== 
    762778END MODULE diaptr 
Note: See TracChangeset for help on using the changeset viewer.