Changeset 14007 for NEMO/trunk/src/OCE/SBC/sbcmod.F90
- Timestamp:
- 2020-12-02T15:30:51+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/SBC/sbcmod.F90
r13970 r14007 16 16 !! 4.0 ! 2016-06 (L. Brodeau) new general bulk formulation 17 17 !! 4.0 ! 2019-03 (F. Lemarié & G. Samson) add ABL compatibility (ln_abl=TRUE) 18 !! 4.2 ! 2020-12 (G. Madec, E. Clementi) modified wave forcing and coupling 18 19 !!---------------------------------------------------------------------- 19 20 … … 54 55 USE usrdef_sbc ! user defined: surface boundary condition 55 56 USE closea ! closed sea 57 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 56 58 ! 57 59 USE prtctl ! Print control (prt_ctl routine) … … 70 72 71 73 INTEGER :: nsbc ! type of surface boundary condition (deduced from namsbc informations) 72 74 !! * Substitutions 75 # include "do_loop_substitute.h90" 73 76 !!---------------------------------------------------------------------- 74 77 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 99 102 & nn_ice , ln_ice_embd, & 100 103 & ln_traqsr, ln_dm2dc , & 101 & ln_rnf , nn_fwb , ln_ssr , ln_apr_dyn, & 102 & ln_wave , ln_cdgw , ln_sdw , ln_tauwoc , ln_stcor , & 103 & ln_tauw , nn_lsm, nn_sdrift 104 & ln_rnf , nn_fwb , ln_ssr , ln_apr_dyn, & 105 & ln_wave , nn_lsm 104 106 !!---------------------------------------------------------------------- 105 107 ! … … 133 135 WRITE(numout,*) ' bulk formulation ln_blk = ', ln_blk 134 136 WRITE(numout,*) ' ABL formulation ln_abl = ', ln_abl 137 WRITE(numout,*) ' Surface wave (forced or coupled) ln_wave = ', ln_wave 135 138 WRITE(numout,*) ' Type of coupling (Ocean/Ice/Atmosphere) : ' 136 139 WRITE(numout,*) ' ocean-atmosphere coupled formulation ln_cpl = ', ln_cpl … … 150 153 WRITE(numout,*) ' runoff / runoff mouths ln_rnf = ', ln_rnf 151 154 WRITE(numout,*) ' nb of iterations if land-sea-mask applied nn_lsm = ', nn_lsm 152 WRITE(numout,*) ' surface wave ln_wave = ', ln_wave 153 WRITE(numout,*) ' Stokes drift corr. to vert. velocity ln_sdw = ', ln_sdw 154 WRITE(numout,*) ' vertical parametrization nn_sdrift = ', nn_sdrift 155 WRITE(numout,*) ' wave modified ocean stress ln_tauwoc = ', ln_tauwoc 156 WRITE(numout,*) ' wave modified ocean stress component ln_tauw = ', ln_tauw 157 WRITE(numout,*) ' Stokes coriolis term ln_stcor = ', ln_stcor 158 WRITE(numout,*) ' neutral drag coefficient (CORE,NCAR) ln_cdgw = ', ln_cdgw 159 ENDIF 160 ! 161 IF( .NOT.ln_wave ) THEN 162 ln_sdw = .false. ; ln_cdgw = .false. ; ln_tauwoc = .false. ; ln_tauw = .false. ; ln_stcor = .false. 163 ENDIF 164 IF( ln_sdw ) THEN 165 IF( .NOT.(nn_sdrift==jp_breivik_2014 .OR. nn_sdrift==jp_li_2017 .OR. nn_sdrift==jp_peakfr) ) & 166 CALL ctl_stop( 'The chosen nn_sdrift for Stokes drift vertical velocity must be 0, 1, or 2' ) 167 ENDIF 168 ll_st_bv2014 = ( nn_sdrift==jp_breivik_2014 ) 169 ll_st_li2017 = ( nn_sdrift==jp_li_2017 ) 170 ll_st_bv_li = ( ll_st_bv2014 .OR. ll_st_li2017 ) 171 ll_st_peakfr = ( nn_sdrift==jp_peakfr ) 172 IF( ln_tauwoc .AND. ln_tauw ) & 173 CALL ctl_stop( 'More than one method for modifying the ocean stress has been selected ', & 174 '(ln_tauwoc=.true. and ln_tauw=.true.)' ) 175 IF( ln_tauwoc ) & 176 CALL ctl_warn( 'You are subtracting the wave stress to the ocean (ln_tauwoc=.true.)' ) 177 IF( ln_tauw ) & 178 CALL ctl_warn( 'The wave modified ocean stress components are used (ln_tauw=.true.) ', & 179 'This will override any other specification of the ocean stress' ) 155 ENDIF 180 156 ! 181 157 IF( .NOT.ln_usr ) THEN ! the model calendar needs some specificities (except in user defined case) … … 357 333 IF( nn_ice == 3 ) CALL cice_sbc_init( nsbc, Kbb, Kmm ) ! CICE initialization 358 334 ! 359 IF( ln_wave ) CALL sbc_wave_init ! surface wave initialisation 335 IF( ln_wave ) THEN 336 CALL sbc_wave_init ! surface wave initialisation 337 ELSE 338 IF(lwp) WRITE(numout,*) 339 IF(lwp) WRITE(numout,*) ' No surface waves : all wave related logical set to false' 340 ln_sdw = .false. 341 ln_stcor = .false. 342 ln_cdgw = .false. 343 ln_tauoc = .false. 344 ln_wave_test = .false. 345 ln_charn = .false. 346 ln_taw = .false. 347 ln_phioc = .false. 348 ln_bern_srfc = .false. 349 ln_breivikFV_2016 = .false. 350 ln_vortex_force = .false. 351 ln_stshear = .false. 352 ENDIF 360 353 ! 361 354 END SUBROUTINE sbc_init … … 380 373 INTEGER, INTENT(in) :: kt ! ocean time step 381 374 INTEGER, INTENT(in) :: Kbb, Kmm ! ocean time level indices 375 INTEGER :: jj, ji ! dummy loop argument 382 376 ! 383 377 LOGICAL :: ll_sas, ll_opa ! local logical … … 412 406 ! 413 407 IF( .NOT.ll_sas ) CALL sbc_ssm ( kt, Kbb, Kmm ) ! mean ocean sea surface variables (sst_m, sss_m, ssu_m, ssv_m) 414 IF( ln_wave ) CALL sbc_wave( kt, Kmm ) ! surface waves415 416 408 ! 417 409 ! !== sbc formulation ==! 418 410 ! 411 ! 419 412 SELECT CASE( nsbc ) ! Compute ocean surface boundary condition 420 413 ! ! (i.e. utau,vtau, qns, qsr, emp, sfx) … … 423 416 CASE( jp_blk ) 424 417 IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OPA-SAS coupling: SAS receiving fields from OPA 418 !!!!!!!!!!! ATTENTION:ln_wave is not only used for oasis coupling !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 419 IF( ln_wave ) THEN 420 IF ( lk_oasis ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OPA-wave coupling 421 CALL sbc_wave ( kt, Kmm ) 422 ENDIF 425 423 CALL sbc_blk ( kt ) ! bulk formulation for the ocean 426 424 ! … … 436 434 IF( ln_mixcpl ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! forced-coupled mixed formulation after forcing 437 435 ! 438 IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( ) ! Wind stress provided by waves 436 IF( ln_wave .AND. ln_tauoc ) THEN ! Wave stress reduction 437 DO_2D( 0, 0, 0, 0) 438 utau(ji,jj) = utau(ji,jj) * ( tauoc_wave(ji,jj) + tauoc_wave(ji-1,jj) ) * 0.5_wp 439 vtau(ji,jj) = vtau(ji,jj) * ( tauoc_wave(ji,jj) + tauoc_wave(ji,jj-1) ) * 0.5_wp 440 END_2D 441 ! 442 CALL lbc_lnk( 'sbcwave', utau, 'U', -1. ) 443 CALL lbc_lnk( 'sbcwave', vtau, 'V', -1. ) 444 ! 445 taum(:,:) = taum(:,:)*tauoc_wave(:,:) 446 ! 447 IF( kt == nit000 ) CALL ctl_warn( 'sbc: You are subtracting the wave stress to the ocean.', & 448 & 'If not requested select ln_tauoc=.false.' ) 449 ! 450 ELSEIF( ln_wave .AND. ln_taw ) THEN ! Wave stress reduction 451 utau(:,:) = utau(:,:) - tawx(:,:) + twox(:,:) 452 vtau(:,:) = vtau(:,:) - tawy(:,:) + twoy(:,:) 453 CALL lbc_lnk( 'sbcwave', utau, 'U', -1. ) 454 CALL lbc_lnk( 'sbcwave', vtau, 'V', -1. ) 455 ! 456 DO_2D( 0, 0, 0, 0) 457 taum(ji,jj) = sqrt((.5*(utau(ji-1,jj)+utau(ji,jj)))**2 + (.5*(vtau(ji,jj-1)+vtau(ji,jj)))**2) 458 END_2D 459 ! 460 IF( kt == nit000 ) CALL ctl_warn( 'sbc: You are subtracting the wave stress to the ocean.', & 461 & 'If not requested select ln_taw=.false.' ) 462 ! 463 ENDIF 464 CALL lbc_lnk( 'sbcmod', taum(:,:), 'T', 1. ) 439 465 ! 440 466 ! !== Misc. Options ==!
Note: See TracChangeset
for help on using the changeset viewer.