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 13443 for NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2/src/OCE/SBC/sbccpl.F90 – NEMO

Ignore:
Timestamp:
2020-08-28T17:01:04+02:00 (4 years ago)
Author:
frrh
Message:

Commit changes which allow first working 2 way coupling exchanges between GO8
and LFRic aquaplanet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2/src/OCE/SBC/sbccpl.F90

    r13311 r13443  
    116116   INTEGER, PARAMETER ::   jpr_tauwy  = 56   ! y component of the ocean stress from waves 
    117117   INTEGER, PARAMETER ::   jpr_ts_ice = 57   ! Sea ice surface temp 
    118  
    119    INTEGER, PARAMETER ::   jprcv      = 57   ! total number of fields received   
     118   INTEGER, PARAMETER ::   jpr_dummy_t = 58  ! Dummy test incoming coupling tracer grid field 
     119 
     120   INTEGER, PARAMETER ::   jprcv      = 58   ! total number of fields received   
    120121 
    121122   INTEGER, PARAMETER ::   jps_fice   =  1   ! ice fraction sent to the atmosphere 
     
    157158   INTEGER, PARAMETER ::   jps_sstfrz = 37   ! sea surface freezing temperature 
    158159   INTEGER, PARAMETER ::   jps_ttilyr = 38   ! sea ice top layer temp 
    159  
    160    INTEGER, PARAMETER ::   jpsnd      = 38   ! total number of fields sent  
     160   INTEGER, PARAMETER ::   jps_dummy_t = 39  ! Dummy test outgoing coupling tracer grid field 
     161 
     162   INTEGER, PARAMETER ::   jpsnd      = 39   ! total number of fields sent  
    161163 
    162164   !                                  !!** namelist namsbc_cpl ** 
     
    278280         WRITE(numout,*)'~~~~~~~~~~~~' 
    279281      ENDIF 
    280       IF( lwp .AND. ln_cpl ) THEN                        ! control print 
     282      IF( lwp .AND. (ln_cpl .OR. ln_couple_test) ) THEN                        ! control print 
    281283         WRITE(numout,*)'  received fields (mutiple ice categogies)' 
    282284         WRITE(numout,*)'      10m wind module                 = ', TRIM(sn_rcv_w10m%cldes  ), ' (', TRIM(sn_rcv_w10m%clcat  ), ')' 
     
    723725         ENDIF 
    724726      ENDIF 
    725        
     727 
     728 
     729      IF (ln_couple_test) THEN 
     730         ! If we're just running a test coupled job then set all  
     731         ! actions to false for all fields apart from our test field(s) 
     732         srcv(:)%laction = .FALSE. 
     733 
     734 
     735         srcv(jpr_dummy_t)%clname = 'R_OC_DUMMY_T'    
     736         srcv(jpr_dummy_t)%laction = .TRUE. 
     737      ENDIF 
     738 
    726739      ! =================================================== ! 
    727740      ! Allocate all parts of frcv used for received fields ! 
     
    742755         IF ( .NOT. srcv(jpr_ity1)%laction ) ALLOCATE( frcv(jpr_ity1)%z3(jpi,jpj,srcv(jpr_ity1)%nct) ) 
    743756      END IF 
     757 
     758 
     759 
     760 
    744761 
    745762      ! ================================ ! 
     
    10311048      ENDIF 
    10321049 
     1050      IF (ln_couple_test) THEN 
     1051         ! If we're just running a test coupled job then set all  
     1052         ! actions to false for all fields apart from our test field(s) 
     1053         ssnd(:)%laction = .FALSE. 
     1054 
     1055 
     1056         ssnd(jps_dummy_t)%clname = 'S_OC_DUMMY_T'    
     1057         ssnd(jps_dummy_t)%laction = .TRUE. 
     1058      ENDIF 
     1059 
     1060 
    10331061      ! 
    10341062      ! ================================ ! 
     
    10371065 
    10381066      ! If ln_cpl is false, clearly we don't want to call cpl_dfine! 
    1039       if (ln_cpl) CALL cpl_define(jprcv, jpsnd, nn_cplmodel) 
    1040        
     1067      IF (ln_cpl .OR. ln_couple_test) THEN 
     1068           write(numout,*) "RSRH call cpl_define", ln_cpl ,ln_couple_test ; flush(numout) 
     1069         CALL cpl_define(jprcv, jpsnd, nn_cplmodel) 
     1070 
     1071      ENDIF       
     1072           write(numout,*) "RSRH after cpl_define", ln_cpl ,ln_couple_test ; flush(numout) 
     1073 
     1074 
    10411075      IF (ln_usecplmask) THEN  
    10421076         xcplmask(:,:,:) = 0. 
     
    11271161      !                                                      ! ======================================================= ! 
    11281162      isec = ( kt - nit000 ) * NINT( rdt )                      ! date of exchanges 
     1163 
     1164 
     1165      WRITE(numout,*) "RSRH in sbc_cpl_rcv" ; flush(numout) 
     1166 
    11291167      DO jn = 1, jprcv                                          ! received fields sent by the atmosphere 
    1130          IF( srcv(jn)%laction )   CALL cpl_rcv( jn, isec, frcv(jn)%z3, xcplmask(:,:,1:nn_cplmodel), nrcvinfo(jn) ) 
     1168 
     1169        WRITE(numout,*) "RSRH in sbc_cpl_rcv for field" ,jn, srcv(jn)%laction ;flush(numout) 
     1170 
     1171         IF( srcv(jn)%laction ) THEN 
     1172        WRITE(numout,*) "RSRH call cpl_rcv for field", jn, srcv(jn)%laction ;flush(numout) 
     1173               CALL cpl_rcv( jn, isec, frcv(jn)%z3, xcplmask(:,:,1:nn_cplmodel), nrcvinfo(jn) ) 
     1174        WRITE(numout,*) "RSRH  done cpl_rcv for field", jn, srcv(jn)%laction, nrcvinfo(jn) ;flush(numout) 
     1175         ENDIF 
    11311176      END DO 
    11321177 
     1178      WRITE(numout,*) "RSRH in sbc_cpl_rcv after all gets" ; flush(numout) 
    11331179      !                                                      ! ========================= ! 
    11341180      IF( srcv(jpr_otx1)%laction ) THEN                      !  ocean stress components  ! 
     
    25952641      IF( ssnd(jps_sstfrz)%laction )  CALL cpl_snd( jps_sstfrz, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info) 
    25962642#endif 
     2643 
     2644      WRITE(numout,*) "RSRH at send for ocean dummy_t"; flush(numout) 
     2645 
     2646      IF ( ssnd(jps_dummy_t)%laction ) THEN 
     2647         ! RSRH Just set up some arbitrary test pattern for now 
     2648         ztmp1(:,:) = 1.23456 
     2649      WRITE(numout,*) "RSRH call send for ocean dummy_t"; flush(numout) 
     2650         CALL cpl_snd( jps_dummy_t, isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 
     2651      WRITE(numout,*) "RSRH done send for ocean dummy_t", info; flush(numout) 
     2652      ENDIF 
     2653 
    25972654      ! 
    25982655   END SUBROUTINE sbc_cpl_snd 
Note: See TracChangeset for help on using the changeset viewer.