- Timestamp:
- 2017-02-22T17:49:40+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r7672 r7717 956 956 !!---------------------------------------------------------------------- 957 957 USE zdf_oce, ONLY : ln_zdfqiao 958 USE sbcflx , ONLY : ln_shelf_flx 958 959 959 960 INTEGER, INTENT(in) :: kt ! ocean model time step index … … 1039 1040 ELSE ! No dynamical coupling ! 1040 1041 ! ! ========================= ! 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 1041 1056 frcv(jpr_otx1)%z3(:,:,1) = 0.e0 ! here simply set to zero 1042 1057 frcv(jpr_oty1)%z3(:,:,1) = 0.e0 ! an external read in a file can be added instead 1043 1058 llnewtx = .TRUE. 1059 ENDIF 1044 1060 ! 1045 1061 ENDIF … … 1061 1077 END DO 1062 1078 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) 1063 1082 llnewtau = .TRUE. 1064 1083 ELSE … … 1075 1094 ! ! ========================= ! 1076 1095 ! ! 10 m wind speed ! (wndm) 1096 ! ! include wave drag coef ! (wndm) 1077 1097 ! ! ========================= ! 1078 1098 ! … … 1085 1105 !CDIR NOVERRCHK 1086 1106 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 1087 1110 frcv(jpr_w10m)%z3(ji,jj,1) = SQRT( frcv(jpr_taum)%z3(ji,jj,1) * zcoef ) 1111 ENDIF 1088 1112 END DO 1089 1113 END DO … … 1095 1119 IF( MOD( kt-1, k_fsbc ) == 0 ) THEN 1096 1120 ! 1121 ! if ln_wavcpl, the fields already contain the right information from forcing even if not ln_mixcpl 1097 1122 IF( ln_mixcpl ) THEN 1098 1123 IF( srcv(jpr_otx1)%laction ) THEN … … 1100 1125 vtau(:,:) = vtau(:,:) * xcplmask(:,:,0) + frcv(jpr_oty1)%z3(:,:,1) * zmsk(:,:) 1101 1126 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 ) & 1103 1128 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 ) & 1106 1130 wndm(:,:) = wndm(:,:) * xcplmask(:,:,0) + frcv(jpr_w10m)%z3(:,:,1) * zmsk(:,:) 1107 1131 ELSE IF( ll_purecpl ) THEN … … 1172 1196 IF( srcv(jpr_wstrf)%laction .AND. ln_tauoc ) tauoc_wave(:,:) = frcv(jpr_wstrf)%z3(:,:,1) 1173 1197 1174 ! ! ========================= !1175 ! ! Wave drag coefficient !1176 ! ! ========================= !1177 IF( srcv(jpr_wdrag)%laction .AND. ln_cdgw ) cdn_wave(:,:) = frcv(jpr_wdrag)%z3(:,:,1)1178 1179 1198 ! Fields received by SAS when OASIS coupling 1180 1199 ! (arrays no more filled at sbcssm stage)
Note: See TracChangeset
for help on using the changeset viewer.