Changeset 7717 for branches/UKMO
- Timestamp:
- 2017-02-22T17:49:40+01:00 (7 years ago)
- Location:
- branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/CONFIG/SHARED/namelist_ref
r7672 r7717 299 299 sn_emp = 'emp' , 24 , 'emp' , .false. , .false., 'yearly' , '' , '' , '' 300 300 301 cn_dir = './' ! root directory for the location of the flux files 301 cn_dir = './' ! root directory for the location of the flux files 302 ln_shelf_flx = .false. ! UKMO SHELF specific flux flag - read from file wind components instead of momentum 302 303 / 303 304 !----------------------------------------------------------------------- … … 1296 1297 sn_tauoc = 'sdw_wave' , 1 , 'wave_stress', .true. , .false. , 'daily' , '' , '' , '' 1297 1298 ! 1298 cn_dir = './' ! root directory for the location of drag coefficient files 1299 cn_dir = './' ! root directory for the location of drag coefficient files 1300 nn_drag = 0 ! formula to calculate momentum from the wind components 1301 =0 UKMO SHELF formulation 1302 =1 standard formulation 1299 1303 / 1300 1304 !----------------------------------------------------------------------- -
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) -
branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90
r7470 r7717 22 22 USE lib_mpp ! distribued memory computing library 23 23 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 24 USE sbcwave ! wave physics 24 25 25 26 IMPLICIT NONE … … 35 36 INTEGER , PARAMETER :: jp_emp = 5 ! index of evaporation-precipation file 36 37 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf ! structure of input fields (file informations, fields read) 38 LOGICAL , PUBLIC :: ln_shelf_flx = .FALSE. ! UKMO SHELF specific flux flag 39 INTEGER :: jpfld_local ! maximum number of files to read (locally modified depending on ln_shelf_flx) 37 40 38 41 !! * Substitutions … … 81 84 REAL(wp) :: zrhoa = 1.22 ! Air density kg/m3 82 85 REAL(wp) :: zcdrag = 1.5e-3 ! drag coefficient 86 REAL(wp) :: totwind ! UKMO SHELF: Module of wind speed 83 87 REAL(wp) :: ztx, zty, zmod, zcoef ! temporary variables 84 88 !! 85 89 CHARACTER(len=100) :: cn_dir ! Root directory for location of flx files 90 NAMELIST/namsbc_flx/ ln_shelf_flx ! Put here to allow merging with another UKMO branch 86 91 TYPE(FLD_N), DIMENSION(jpfld) :: slf_i ! array of namelist information structures 87 92 TYPE(FLD_N) :: sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp ! informations about the fields to be read … … 140 145 END DO 141 146 END DO 147 ! ! add modification due to drag coefficient read from wave forcing 148 ! ! this code is inefficient but put here to allow merging with another UKMO branch 149 IF( ln_shelf_flx .AND. ln_cdgw .AND. nn_drag == jp_std ) THEN 150 IF( cpl_wdrag ) THEN 151 ! reset utau and vtau to the wind components: the momentum will 152 ! be calculated from the coupled value of the drag coefficient 153 DO jj = 1, jpj 154 DO ji = 1, jpi 155 utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1) 156 vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1) 157 END DO 158 END DO 159 ELSE 160 DO jj = 1, jpj 161 DO ji = 1, jpi 162 totwind = sqrt((sf(jp_utau)%fnow(ji,jj,1))**2.0 + (sf(jp_vtau)%fnow(ji,jj,1))**2.0) 163 utau(ji,jj) = zrhoa * cdn_wave(ji,jj) * sf(jp_utau)%fnow(ji,jj,1) * totwind 164 vtau(ji,jj) = zrhoa * cdn_wave(ji,jj) * sf(jp_vtau)%fnow(ji,jj,1) * totwind 165 END DO 166 END DO 167 ENDIF 168 ENDIF 142 169 ! ! add to qns the heat due to e-p 143 170 qns(:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp ! mass flux is at SST … … 153 180 zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 154 181 taum(ji,jj) = zmod 182 IF( ln_shelf_flx ) THEN 183 ztx = sf(jp_utau)%fnow(ji-1,jj ) + sf(jp_utau)%fnow(ji,jj) 184 zty = sf(jp_vtau)%fnow(ji ,jj-1) + sf(jp_vtau)%fnow(ji,jj) 185 wndm(ji,jj) = 0.5 * SQRT( ztx * ztx + zty * zty ) 186 ELSE 155 187 wndm(ji,jj) = SQRT( zmod * zcoef ) 188 ENDIF 156 189 END DO 157 190 END DO -
branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r7672 r7717 137 137 WRITE(numout,*) ' wave modified ocean stress ln_tauoc = ', ln_tauoc 138 138 WRITE(numout,*) ' Stokes coriolis term ln_stcor = ', ln_stcor 139 WRITE(numout,*) ' neutral drag coefficient (CORE, MFS)ln_cdgw = ', ln_cdgw139 WRITE(numout,*) ' neutral drag coefficient ln_cdgw = ', ln_cdgw 140 140 WRITE(numout,*) ' OASIS coupling (with atm or sas) lk_oasis = ', lk_oasis 141 141 WRITE(numout,*) ' components of your executable nn_components = ', nn_components … … 225 225 IF ( .NOT.(ln_cdgw .OR. ln_sdw .OR. ln_tauoc .OR. ln_stcor ) ) THEN 226 226 CALL ctl_warn( 'Ask for wave coupling but ln_cdgw=F, ln_sdw=F, ln_tauoc=F, ln_stcor=F') 227 !drag coefficient read from wave model definable only with mfs bulk formulae and core228 ELSEIF (ln_cdgw .AND. .NOT.(ln_blk_mfs .OR. ln_blk_core) ) THEN229 CALL ctl_stop( 'drag coefficient read from wave model definable only with mfs bulk formulae and core')230 227 ELSEIF (ln_stcor .AND. .NOT. ln_sdw) THEN 231 228 CALL ctl_stop( 'Stokes-Coriolis term calculated only if activated Stokes Drift ln_sdw=T') -
branches/UKMO/r6232_INGV1_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
r7606 r7717 63 63 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: ut0sd, vt0sd !: surface Stokes drift velocities at t-point 64 64 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:) :: usd , vsd , wsd !: Stokes drift velocities at u-, v- & w-points, resp. 65 66 INTEGER, PUBLIC :: nn_drag ! type of formula to calculate wind stress from wind components 67 INTEGER, PUBLIC, PARAMETER :: jp_ukmo = 0 ! UKMO SHELF formulation 68 INTEGER, PUBLIC, PARAMETER :: jp_std = 1 ! standard formulation: 65 69 66 70 !! * Substitutions … … 210 214 CALL fld_read( kt, nn_fsbc, sf_cd ) ! read from external forcing 211 215 cdn_wave(:,:) = sf_cd(1)%fnow(:,:,1) 216 ! make sure that the interpolation does not write silly fill values in case it fails in a grid point 217 where( cdn_wave > 1.0 ) cdn_wave = 1.5e-3 212 218 ENDIF 213 219 … … 265 271 & sn_hsw, sn_wmp, sn_wnum, sn_tauoc ! informations about the fields to be read 266 272 ! 267 NAMELIST/namsbc_wave/ sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc 273 NAMELIST/namsbc_wave/ sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc, nn_drag 268 274 !!--------------------------------------------------------------------- 269 275 ! … … 278 284 ! 279 285 IF( ln_cdgw ) THEN 286 ! check the value of nn_drag 287 IF( .NOT. ( nn_drag == jp_ukmo .OR. nn_drag == jp_std )) THEN 288 CALL ctl_stop( 'sbc_wave_init: nn_drag does not specify a valid drag formulation' ) 289 RETURN 290 ENDIF 291 280 292 IF( .NOT. cpl_wdrag ) THEN 281 293 ALLOCATE( sf_cd(1), STAT=ierror ) !* allocate and fill sf_wave with sn_cdg
Note: See TracChangeset
for help on using the changeset viewer.