Changeset 12287
- Timestamp:
- 2019-12-23T13:01:19+01:00 (4 years ago)
- Location:
- branches/UKMO/r8395_cpl_tauwav/NEMOGCM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/r8395_cpl_tauwav/NEMOGCM/CONFIG/SHARED/namelist_ref
r12286 r12287 217 217 ln_sdw = .false. ! Read 2D Surf Stokes Drift & Computation of 3D stokes drift (T => ln_wave=.true. & fill namsbc_wave) 218 218 ln_tauoc = .false. ! Activate ocean stress modified by external wave induced stress (T => ln_wave=.true. & fill namsbc_wave) 219 ln_tauw = .false. ! Activate ocean stress components from wave model 219 220 ln_stcor = .false. ! Activate Stokes Coriolis term (T => ln_wave=.true. & ln_sdw=.true. & fill namsbc_wave) 220 221 nn_lsm = 0 ! =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) , … … 300 301 sn_rcv_wnum = 'none' , 'no' , '' , '' , '' 301 302 sn_rcv_wstrf = 'none' , 'no' , '' , '' , '' 303 sn_rcv_tauw = 'none' , 'no' , '' , '' , '' 302 304 sn_rcv_wdrag = 'none' , 'no' , '' , '' , '' 303 305 ! … … 458 460 sn_wnum = 'sdw_wave' , 1 , 'wave_num' , .true. , .false. , 'daily' , '' , '' , '' 459 461 sn_tauoc = 'sdw_wave' , 1 , 'wave_stress', .true. , .false. , 'daily' , '' , '' , '' 462 sn_tauwx = 'sdw_wave' , 1 , 'wave_stress', .true. , .false. , 'daily' , '' , '' , '' 463 sn_tauwy = 'sdw_wave' , 1 , 'wave_stress', .true. , .false. , 'daily' , '' , '' , '' 460 464 ! 461 465 cn_dir = './' ! root directory for the location of drag coefficient files -
branches/UKMO/r8395_cpl_tauwav/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
r12286 r12287 65 65 LOGICAL , PUBLIC :: ln_sdw !: true if 3d stokes drift from wave model 66 66 LOGICAL , PUBLIC :: ln_tauoc !: true if normalized stress from wave is used 67 LOGICAL , PUBLIC :: ln_tauw !: true if ocean stress components from wave is used 67 68 LOGICAL , PUBLIC :: ln_stcor !: true if Stokes-Coriolis term is used 68 69 ! -
branches/UKMO/r8395_cpl_tauwav/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r12286 r12287 117 117 INTEGER, PARAMETER :: jpr_isf = 52 118 118 INTEGER, PARAMETER :: jpr_icb = 53 119 120 INTEGER, PARAMETER :: jprcv = 53 ! total number of fields received 119 INTEGER, PARAMETER :: jpr_tauwx = 54 ! x component of the ocean stress from waves 120 INTEGER, PARAMETER :: jpr_tauwy = 55 ! y component of the ocean stress from waves 121 122 INTEGER, PARAMETER :: jprcv = 55 ! total number of fields received 121 123 122 124 INTEGER, PARAMETER :: jps_fice = 1 ! ice fraction sent to the atmosphere … … 170 172 TYPE(FLD_C) :: sn_snd_ifrac, sn_snd_crtw, sn_snd_wlev 171 173 ! Received from waves 172 TYPE(FLD_C) :: sn_rcv_hsig,sn_rcv_phioc,sn_rcv_sdrfx,sn_rcv_sdrfy,sn_rcv_wper,sn_rcv_wnum,sn_rcv_wstrf,sn_rcv_wdrag 174 TYPE(FLD_C) :: sn_rcv_hsig,sn_rcv_phioc,sn_rcv_sdrfx,sn_rcv_sdrfy,sn_rcv_wper,sn_rcv_wnum,sn_rcv_wstrf,sn_rcv_tauw, & 175 sn_rcv_wdrag 173 176 ! ! Other namelist parameters 174 177 INTEGER :: nn_cplmodel ! Maximum number of models to/from which NEMO is potentialy sending/receiving data … … 245 248 & sn_rcv_wdrag, sn_rcv_qns , sn_rcv_emp , sn_rcv_rnf , sn_rcv_cal , & 246 249 & sn_rcv_iceflx,sn_rcv_co2 , nn_cplmodel , ln_usecplmask, sn_rcv_mslp , & 247 & sn_rcv_icb , sn_rcv_isf 250 & sn_rcv_icb , sn_rcv_isf , sn_rcv_tauw 248 251 249 252 !!--------------------------------------------------------------------- … … 296 299 WRITE(numout,*)' Mean wave number = ', TRIM(sn_rcv_wnum%cldes ), ' (', TRIM(sn_rcv_wnum%clcat ), ')' 297 300 WRITE(numout,*)' Stress frac adsorbed by waves = ', TRIM(sn_rcv_wstrf%cldes ), ' (', TRIM(sn_rcv_wstrf%clcat ), ')' 301 WRITE(numout,*)' Stress components by waves = ', TRIM(sn_rcv_tauw%cldes ), ' (', TRIM(sn_rcv_tauw%clcat ), ')' 298 302 WRITE(numout,*)' Neutral surf drag coefficient = ', TRIM(sn_rcv_wdrag%cldes ), ' (', TRIM(sn_rcv_wdrag%clcat ), ')' 299 303 WRITE(numout,*)' sent fields (multiple ice categories)' … … 588 592 cpl_wstrf = .TRUE. 589 593 ENDIF 594 srcv(jpr_tauwx)%clname = 'O_Tauwx' ! ocean stress from wave in the x direction 595 srcv(jpr_tauwy)%clname = 'O_Tauwy' ! ocean stress from wave in the y direction 596 IF( TRIM(sn_rcv_tauw%cldes ) == 'coupled' ) THEN 597 srcv(jpr_tauwx)%laction = .TRUE. 598 srcv(jpr_tauwy)%laction = .TRUE. 599 cpl_tauw = .TRUE. 600 ENDIF 590 601 srcv(jpr_wdrag)%clname = 'O_WDrag' ! neutral surface drag coefficient 591 602 IF( TRIM(sn_rcv_wdrag%cldes ) == 'coupled' ) THEN … … 593 604 cpl_wdrag = .TRUE. 594 605 ENDIF 606 ! 607 IF( srcv(jpr_tauoc)%laction .AND. srcv(jpr_tauwx)%laction .AND. srcv(jpr_tauwy)%laction ) & 608 CALL ctl_stop( 'More than one method for modifying the ocean stress has been selected ', & 609 '(sn_rcv_tauoc=coupled and sn_rcv_tauw=coupled)' ) 610 ! 595 611 ! 596 612 ! ! ------------------------------- ! … … 1181 1197 ! ! ========================= ! 1182 1198 IF( srcv(jpr_wstrf)%laction .AND. ln_tauoc ) tauoc_wave(:,:) = frcv(jpr_wstrf)%z3(:,:,1) 1199 1200 ! ! ========================= ! 1201 ! ! Stress component by waves ! 1202 ! ! ========================= ! 1203 IF( srcv(jpr_tauwx)%laction .AND. srcv(jpr_tauwy)%laction .AND. ln_tauw ) THEN 1204 tauw_x(:,:) = frcv(jpr_tauwx)%z3(:,:,1) 1205 tauw_y(:,:) = frcv(jpr_tauwy)%z3(:,:,1) 1206 ENDIF 1183 1207 1184 1208 ! ! ========================= ! -
branches/UKMO/r8395_cpl_tauwav/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r12286 r12287 407 407 IF( ll_opa ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! OPA-SAS coupling: OPA receiving fields from SAS 408 408 END SELECT 409 IF ( ln_wave .AND. ln_tauoc) THEN ! Wave stress subctracted410 utau(:,:) = utau(:,:)*tauoc_wave(:,:)411 vtau(:,:) = vtau(:,:)*tauoc_wave(:,:)412 taum(:,:) = taum(:,:)*tauoc_wave(:,:)413 !414 SELECT CASE( nsbc )415 CASE( 0,1,2,3,5,-1 ) ;416 IF(lwp .AND. kt == nit000 ) WRITE(numout,*) 'WARNING: You are subtracting the wave stress to the ocean. &417 & If not requested select ln_tauoc=.false'418 END SELECT419 !420 END IF421 409 IF( ln_mixcpl ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! forced-coupled mixed formulation after forcing 410 411 IF ( ln_wave .AND. (ln_tauoc .OR. ln_tauw) ) CALL sbc_stress( ) ! Wave stress update 422 412 423 413 ! -
branches/UKMO/r8395_cpl_tauwav/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
r12286 r12287 33 33 34 34 PUBLIC sbc_stokes ! routine called in sbccpl 35 PUBLIC sbc_stress ! routine called in sbcmod 35 36 PUBLIC sbc_wave ! routine called in sbcmod 36 37 PUBLIC sbc_wave_init ! routine called in sbcmod … … 44 45 LOGICAL, PUBLIC :: cpl_wnum = .FALSE. 45 46 LOGICAL, PUBLIC :: cpl_wstrf = .FALSE. 47 LOGICAL, PUBLIC :: cpl_tauw = .FALSE. 46 48 LOGICAL, PUBLIC :: cpl_wdrag = .FALSE. 47 49 … … 56 58 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_wn ! structure of input fields (file informations, fields read) wave number for Qiao 57 59 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_tauoc ! structure of input fields (file informations, fields read) normalized wave stress into the ocean 60 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_tauw ! structure of input fields (file informations, fields read) ocean stress components from wave model 58 61 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: cdn_wave !: 59 62 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: hsw, wmp, wnum !: 60 63 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: tauoc_wave !: 64 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: tauw_x !: 65 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: tauw_y !: 61 66 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: tsd2d !: 62 67 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: div_sd !: barotropic stokes drift divergence … … 188 193 END SUBROUTINE sbc_stokes 189 194 195 SUBROUTINE sbc_stress( ) 196 !!--------------------------------------------------------------------- 197 !! *** ROUTINE sbc_stress *** 198 !! 199 !! ** Purpose : Updates the ocean momentum modified by waves 200 !! 201 !! ** Method : - Calculate u,v components of stress depending on stress 202 !! model 203 !! - Calculate the stress module 204 !! - The wind module is not modified by waves 205 !! ** action 206 !!--------------------------------------------------------------------- 207 INTEGER :: jj, ji ! dummy loop argument 208 ! 209 IF( ln_tauoc ) THEN 210 utau(:,:) = utau(:,:)*tauoc_wave(:,:) 211 vtau(:,:) = vtau(:,:)*tauoc_wave(:,:) 212 taum(:,:) = taum(:,:)*tauoc_wave(:,:) 213 ENDIF 214 ! 215 IF( ln_tauw ) THEN 216 DO jj = 1, jpjm1 217 DO ji = 1, jpim1 218 ! Stress components at u- & v-points 219 utau(ji,jj) = 0.5_wp * ( tauw_x(ji,jj) + tauw_x(ji+1,jj) ) 220 vtau(ji,jj) = 0.5_wp * ( tauw_y(ji,jj) + tauw_y(ji,jj+1) ) 221 ! 222 ! Stress module at t points 223 taum(ji,jj) = SQRT( tauw_x(ji,jj)*tauw_x(ji,jj) + tauw_y(ji,jj)*tauw_y(ji,jj) ) 224 END DO 225 END DO 226 CALL lbc_lnk_multi( utau(:,:), 'U', -1. , vtau(:,:), 'V', -1. , taum(:,: ), 'T', -1. ) 227 ENDIF 228 ! 229 END SUBROUTINE sbc_stress 190 230 191 231 SUBROUTINE sbc_wave( kt ) … … 214 254 CALL fld_read( kt, nn_fsbc, sf_tauoc ) ! read wave norm stress from external forcing 215 255 tauoc_wave(:,:) = sf_tauoc(1)%fnow(:,:,1) 256 ENDIF 257 258 IF( ln_tauw .AND. .NOT. cpl_tauw ) THEN !== Wave induced stress ==! 259 CALL fld_read( kt, nn_fsbc, sf_tauw ) ! read ocean stress components from external forcing (T grid) 260 tauw_x(:,:) = sf_tauw(1)%fnow(:,:,1) 261 tauw_y(:,:) = sf_tauw(2)%fnow(:,:,1) 216 262 ENDIF 217 263 … … 260 306 !! 261 307 CHARACTER(len=100) :: cn_dir ! Root directory for location of drag coefficient files 262 TYPE(FLD_N), ALLOCATABLE, DIMENSION(:) :: slf_i 308 TYPE(FLD_N), ALLOCATABLE, DIMENSION(:) :: slf_i, slf_j ! array of namelist informations on the fields to read 263 309 TYPE(FLD_N) :: sn_cdg, sn_usd, sn_vsd, & 264 310 & sn_hsw, sn_wmp, sn_wnum, sn_tauoc ! informations about the fields to be read 265 311 ! 266 NAMELIST/namsbc_wave/ sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc 312 NAMELIST/namsbc_wave/ sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc, sn_tauwx, sn_tauwy 267 313 !!--------------------------------------------------------------------- 268 314 ! … … 276 322 IF(lwm) WRITE ( numond, namsbc_wave ) 277 323 ! 324 IF( ln_tauoc .AND. ln_tauw ) & 325 CALL ctl_stop( 'More than one method for modifying the ocean stress has been selected ', & 326 '(ln_tauoc=.true. and ln_tauw=.true.)' ) 327 IF( ln_tauoc ) & 328 CALL ctl_warn( 'You are subtracting the wave stress to the ocean (ln_tauoc=.true.)' ) 329 IF( ln_tauw ) & 330 CALL ctl_warn( 'The wave modified ocean stress components are used (ln_tauw=.true.) ', & 331 'This will override any other specification of the ocean stress' ) 332 278 333 IF( ln_cdgw ) THEN 279 334 IF( .NOT. cpl_wdrag ) THEN … … 298 353 ENDIF 299 354 ALLOCATE( tauoc_wave(jpi,jpj) ) 355 ENDIF 356 357 IF( ln_tauw ) THEN 358 IF( .NOT. cpl_tauw ) THEN 359 ALLOCATE( sf_tauw(2), STAT=ierror ) !* allocate and fill sf_wave with sn_tauwx/y 360 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_tauw structure' ) 361 ! 362 ALLOCATE( slf_j(2) ) 363 slf_j(1) = sn_tauwx 364 slf_j(2) = sn_tauwy 365 ALLOCATE( sf_tauw(1)%fnow(jpi,jpj,1) ) 366 ALLOCATE( sf_tauw(2)%fnow(jpi,jpj,1) ) 367 IF( slf_j(1)%ln_tint ) ALLOCATE( sf_tauw(1)%fdta(jpi,jpj,1,2) ) 368 IF( slf_j(2)%ln_tint ) ALLOCATE( sf_tauw(2)%fdta(jpi,jpj,1,2) ) 369 CALL fld_fill( sf_tauw, (/ slf_j /), cn_dir, 'sbc_wave_init', 'read wave input', 'namsbc_wave' ) 370 ENDIF 371 ALLOCATE( tauw_x(jpi,jpj) ) 372 ALLOCATE( tauw_y(jpi,jpj) ) 300 373 ENDIF 301 374
Note: See TracChangeset
for help on using the changeset viewer.