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 7717 for branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90 – NEMO

Ignore:
Timestamp:
2017-02-22T17:49:40+01:00 (7 years ago)
Author:
jcastill
Message:

Add surface drag coefficient direct forcing and coupling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r7672 r7717  
    956956      !!---------------------------------------------------------------------- 
    957957      USE zdf_oce,  ONLY : ln_zdfqiao 
     958      USE sbcflx ,  ONLY : ln_shelf_flx 
    958959 
    959960      INTEGER, INTENT(in)           ::   kt          ! ocean model time step index 
     
    10391040      ELSE                                                   !   No dynamical coupling   ! 
    10401041         !                                                   ! ========================= ! 
     1042         ! it is possible that the momentum is calculated from the winds (ln_shelf_flx) and a coupled drag coefficient 
     1043         IF( srcv(jpr_wdrag)%laction .AND. ln_shelf_flx .AND. ln_cdgw .AND. nn_drag == jp_std ) THEN 
     1044            DO jj = 1, jpj 
     1045               DO ji = 1, jpi 
     1046                  ! here utau and vtau should contain the wind components as read from the forcing files 
     1047                  zcoef = SQRT(utau(ji,jj)*utau(ji,jj) + vtau(ji,jj)*vtau(ji,jj)) 
     1048                  frcv(jpr_otx1)%z3(ji,jj,1) = zrhoa * frcv(jpr_wdrag)%z3(ji,jj,1) * utau(ji,jj) * zcoef 
     1049                  frcv(jpr_oty1)%z3(ji,jj,1) = zrhoa * frcv(jpr_wdrag)%z3(ji,jj,1) * vtau(ji,jj) * zcoef 
     1050                  utau(ji,jj) = frcv(jpr_otx1)%z3(ji,jj,1) 
     1051                  vtau(ji,jj) = frcv(jpr_oty1)%z3(ji,jj,1) 
     1052               END DO 
     1053            END DO 
     1054            llnewtx = .TRUE. 
     1055         ELSE 
    10411056         frcv(jpr_otx1)%z3(:,:,1) = 0.e0                               ! here simply set to zero  
    10421057         frcv(jpr_oty1)%z3(:,:,1) = 0.e0                               ! an external read in a file can be added instead 
    10431058         llnewtx = .TRUE. 
     1059         ENDIF 
    10441060         ! 
    10451061      ENDIF 
     
    10611077            END DO 
    10621078            CALL lbc_lnk( frcv(jpr_taum)%z3(:,:,1), 'T', 1. ) 
     1079            IF( .NOT. srcv(jpr_otx1)%laction .AND. srcv(jpr_wdrag)%laction .AND. & 
     1080                                ln_shelf_flx .AND. ln_cdgw .AND. nn_drag == jp_std ) & 
     1081               taum(:,:) = frcv(jpr_taum)%z3(:,:,1) 
    10631082            llnewtau = .TRUE. 
    10641083         ELSE 
     
    10751094      !                                                      ! ========================= ! 
    10761095      !                                                      !      10 m wind speed      !   (wndm) 
     1096      !                                                      !   include wave drag coef  !   (wndm) 
    10771097      !                                                      ! ========================= ! 
    10781098      ! 
     
    10851105!CDIR NOVERRCHK 
    10861106               DO ji = 1, jpi  
     1107                  IF( ln_shelf_flx ) THEN   ! the 10 wind module is properly calculated before if ln_shelf_flx 
     1108                     frcv(jpr_w10m)%z3(ji,jj,1) = wndm(ji,jj) 
     1109                  ELSE 
    10871110                  frcv(jpr_w10m)%z3(ji,jj,1) = SQRT( frcv(jpr_taum)%z3(ji,jj,1) * zcoef ) 
     1111                  ENDIF 
    10881112               END DO 
    10891113            END DO 
     
    10951119      IF( MOD( kt-1, k_fsbc ) == 0 ) THEN 
    10961120         ! 
     1121         ! if ln_wavcpl, the fields already contain the right information from forcing even if not ln_mixcpl 
    10971122         IF( ln_mixcpl ) THEN 
    10981123            IF( srcv(jpr_otx1)%laction ) THEN 
     
    11001125               vtau(:,:) = vtau(:,:) * xcplmask(:,:,0) + frcv(jpr_oty1)%z3(:,:,1) * zmsk(:,:) 
    11011126            ENDIF 
    1102             IF( srcv(jpr_taum)%laction .OR. (.NOT.srcv(jpr_taum)%laction .AND. srcv(jpr_otx1)%laction .AND. llnewtx ))   & 
     1127            IF( srcv(jpr_taum)%laction )   & 
    11031128               taum(:,:) = taum(:,:) * xcplmask(:,:,0) + frcv(jpr_taum)%z3(:,:,1) * zmsk(:,:) 
    1104             IF( srcv(jpr_w10m)%laction .OR. (.NOT.srcv(jpr_w10m)%laction .AND. llnewtau .AND.                            & 
    1105                (srcv(jpr_taum)%laction .OR. (.NOT.srcv(jpr_taum)%laction .AND. srcv(jpr_otx1)%laction .AND. llnewtx )))) & 
     1129            IF( srcv(jpr_w10m)%laction )   & 
    11061130               wndm(:,:) = wndm(:,:) * xcplmask(:,:,0) + frcv(jpr_w10m)%z3(:,:,1) * zmsk(:,:) 
    11071131         ELSE IF( ll_purecpl ) THEN 
     
    11721196      IF( srcv(jpr_wstrf)%laction .AND. ln_tauoc ) tauoc_wave(:,:) = frcv(jpr_wstrf)%z3(:,:,1)  
    11731197       
    1174       !                                                      ! ========================= !   
    1175       !                                                      !   Wave drag coefficient   !  
    1176       !                                                      ! ========================= !   
    1177       IF( srcv(jpr_wdrag)%laction .AND. ln_cdgw ) cdn_wave(:,:) = frcv(jpr_wdrag)%z3(:,:,1) 
    1178  
    11791198      !  Fields received by SAS when OASIS coupling 
    11801199      !  (arrays no more filled at sbcssm stage) 
Note: See TracChangeset for help on using the changeset viewer.