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

    r7923 r9366  
    6262   PUBLIC   sbc_cpl_ice_flx    ! routine called by sbc_ice_lim(_2).F90 
    6363   PUBLIC   sbc_cpl_alloc      ! routine called in sbcice_cice.F90 
     64   PRIVATE  cpl_namelist 
    6465 
    6566   INTEGER, PARAMETER ::   jpr_otx1   =  1            ! 3 atmosphere-ocean stress components on grid 1 
     
    259260      !      Namelist informations       ! 
    260261      ! ================================ ! 
    261  
    262       REWIND( numnam_ref )              ! Namelist namsbc_cpl in reference namelist : Variables for OASIS coupling 
    263       READ  ( numnam_ref, namsbc_cpl, IOSTAT = ios, ERR = 901) 
    264 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist', lwp ) 
    265  
    266       REWIND( numnam_cfg )              ! Namelist namsbc_cpl in configuration namelist : Variables for OASIS coupling 
    267       READ  ( numnam_cfg, namsbc_cpl, IOSTAT = ios, ERR = 902 ) 
    268 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist', lwp ) 
     262      IF(lwm) THEN 
     263         REWIND( numnam_ref )              ! Namelist namsbc_cpl in reference namelist : Variables for OASIS coupling 
     264         READ  ( numnam_ref, namsbc_cpl, IOSTAT = ios, ERR = 901) 
     265901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in reference namelist', lwm ) 
     266         REWIND( numnam_cfg )              ! Namelist namsbc_cpl in configuration namelist : Variables for OASIS coupling 
     267         READ  ( numnam_cfg, namsbc_cpl, IOSTAT = ios, ERR = 902 ) 
     268902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist', lwm ) 
     269      ENDIF 
    269270      IF(lwm) WRITE ( numond, namsbc_cpl ) 
     271 
     272      CALL cpl_namelist() 
    270273 
    271274      IF(lwp) THEN                        ! control print 
     
    25362539      ! 
    25372540   END SUBROUTINE sbc_cpl_snd 
    2538     
     2541 
     2542   SUBROUTINE cpl_namelist() 
     2543     !!--------------------------------------------------------------------- 
     2544     !!                   ***  ROUTINE cpl_namelist  *** 
     2545     !!                      
     2546     !! ** Purpose :   Broadcast namelist variables read by procesor lwm 
     2547     !! 
     2548     !! ** Method  :   use lib_mpp 
     2549     !!---------------------------------------------------------------------- 
     2550#if defined key_mpp_mpi 
     2551      CALL fld_c_bcast(sn_snd_temp) 
     2552      CALL fld_c_bcast(sn_snd_alb) 
     2553      CALL fld_c_bcast(sn_snd_thick) 
     2554      CALL fld_c_bcast(sn_snd_crt) 
     2555      CALL fld_c_bcast(sn_snd_co2) 
     2556      CALL fld_c_bcast(sn_snd_cond) 
     2557      CALL fld_c_bcast(sn_snd_mpnd) 
     2558      CALL fld_c_bcast(sn_snd_sstfrz) 
     2559      CALL fld_c_bcast(sn_snd_thick1) 
     2560      CALL fld_c_bcast(sn_rcv_w10m) 
     2561      CALL fld_c_bcast(sn_rcv_taumod) 
     2562      CALL fld_c_bcast(sn_rcv_tau) 
     2563      CALL fld_c_bcast(sn_rcv_dqnsdt) 
     2564      CALL fld_c_bcast(sn_rcv_qsr) 
     2565      CALL fld_c_bcast(sn_rcv_qns) 
     2566      CALL fld_c_bcast(sn_rcv_emp) 
     2567      CALL fld_c_bcast(sn_rcv_rnf) 
     2568      CALL fld_c_bcast(sn_rcv_cal) 
     2569      CALL fld_c_bcast(sn_rcv_iceflx) 
     2570      CALL fld_c_bcast(sn_rcv_co2) 
     2571      CALL fld_c_bcast(sn_rcv_grnm) 
     2572      CALL fld_c_bcast(sn_rcv_antm) 
     2573      CALL fld_c_bcast(sn_rcv_ts_ice) 
     2574      CALL mpp_bcast(nn_cplmodel) 
     2575      CALL mpp_bcast(ln_usecplmask) 
     2576      CALL mpp_bcast(ln_coupled_iceshelf_fluxes) 
     2577      CALL mpp_bcast(ln_iceshelf_init_atmos) 
     2578      CALL mpp_bcast(rn_greenland_calving_fraction) 
     2579      CALL mpp_bcast(rn_antarctica_calving_fraction) 
     2580      CALL mpp_bcast(rn_iceshelf_fluxes_tolerance) 
     2581      CALL fld_c_bcast(sn_snd_bio_co2) 
     2582      CALL fld_c_bcast(sn_snd_bio_dms) 
     2583      CALL fld_c_bcast(sn_rcv_atm_pco2) 
     2584      CALL fld_c_bcast(sn_rcv_atm_dust) 
     2585#endif 
     2586   END SUBROUTINE cpl_namelist    
     2587 
     2588   SUBROUTINE fld_c_bcast(sd_name) 
     2589     !!--------------------------------------------------------------------- 
     2590     !!                   ***  ROUTINE fld_c_bcast  *** 
     2591     !!                      
     2592     !! ** Purpose :   Broadcast FLD_C type to all processors  
     2593     !! 
     2594     !! ** Method  :   use lib_mpp 
     2595     !!---------------------------------------------------------------------- 
     2596     TYPE(FLD_C), INTENT(INOUT) :: sd_name 
     2597#if defined key_mpp_mpi 
     2598     CALL mpp_bcast(sd_name%cldes, 32) 
     2599     CALL mpp_bcast(sd_name%clcat, 32) 
     2600     CALL mpp_bcast(sd_name%clvref, 32) 
     2601     CALL mpp_bcast(sd_name%clvor, 32) 
     2602     CALL mpp_bcast(sd_name%clvgrd, 32) 
     2603#endif 
     2604   END SUBROUTINE fld_c_bcast 
    25392605   !!====================================================================== 
    25402606END MODULE sbccpl 
Note: See TracChangeset for help on using the changeset viewer.