[9302] | 1 | MODULE usrdef_sbc |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE usrdef_sbc *** |
---|
| 4 | !! |
---|
[9403] | 5 | !! === CANAL configuration === |
---|
[9302] | 6 | !! |
---|
| 7 | !! User defined : surface forcing of a user configuration |
---|
| 8 | !!====================================================================== |
---|
| 9 | !! History : 4.0 ! 2017-11 (J.Chanut) user defined interface |
---|
| 10 | !!---------------------------------------------------------------------- |
---|
| 11 | |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
| 13 | !! usr_def_sbc : user defined surface bounday conditions in OVERFLOW case |
---|
| 14 | !!---------------------------------------------------------------------- |
---|
| 15 | USE oce ! ocean dynamics and tracers |
---|
| 16 | USE dom_oce ! ocean space and time domain |
---|
| 17 | USE sbc_oce ! Surface boundary condition: ocean fields |
---|
| 18 | USE phycst ! physical constants |
---|
[13662] | 19 | USE usrdef_nam, ONLY : rn_u10, rn_uofac, rn_windszy, rn_windszx |
---|
[9302] | 20 | ! |
---|
| 21 | USE in_out_manager ! I/O manager |
---|
| 22 | USE lib_mpp ! distribued memory computing library |
---|
| 23 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
| 24 | USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) |
---|
| 25 | |
---|
| 26 | IMPLICIT NONE |
---|
| 27 | PRIVATE |
---|
| 28 | |
---|
[9659] | 29 | PUBLIC usrdef_sbc_oce ! routine called in sbcmod module |
---|
| 30 | PUBLIC usrdef_sbc_ice_tau ! routine called by icestp.F90 for ice dynamics |
---|
| 31 | PUBLIC usrdef_sbc_ice_flx ! routine called by icestp.F90 for ice thermo |
---|
[9302] | 32 | |
---|
| 33 | !! * Substitutions |
---|
| 34 | # include "vectopt_loop_substitute.h90" |
---|
| 35 | !!---------------------------------------------------------------------- |
---|
[10073] | 36 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
[9302] | 37 | !! $Id$ |
---|
[10073] | 38 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[9302] | 39 | !!---------------------------------------------------------------------- |
---|
| 40 | CONTAINS |
---|
| 41 | |
---|
| 42 | SUBROUTINE usrdef_sbc_oce( kt ) |
---|
| 43 | !!--------------------------------------------------------------------- |
---|
| 44 | !! *** ROUTINE usr_def_sbc *** |
---|
| 45 | !! |
---|
| 46 | !! ** Purpose : provide at each time-step the surface boundary |
---|
| 47 | !! condition, i.e. the momentum, heat and freshwater fluxes. |
---|
| 48 | !! |
---|
[9403] | 49 | !! ** Method : all 0 fields, for CANAL case |
---|
[9302] | 50 | !! CAUTION : never mask the surface stress field ! |
---|
| 51 | !! |
---|
| 52 | !! ** Action : - set to ZERO all the ocean surface boundary condition, i.e. |
---|
| 53 | !! utau, vtau, taum, wndm, qns, qsr, emp, sfx |
---|
| 54 | !! |
---|
| 55 | !!---------------------------------------------------------------------- |
---|
| 56 | INTEGER, INTENT(in) :: kt ! ocean time step |
---|
| 57 | |
---|
| 58 | INTEGER :: ji, jj ! dummy loop indices |
---|
| 59 | REAL(wp) :: zrhoair = 1.22 ! approximate air density [Kg/m3] |
---|
| 60 | REAL(wp) :: zcd = 1.13e-3 ! approximate drag coefficient |
---|
| 61 | REAL(wp) :: zrhocd ! Rho * Cd |
---|
| 62 | REAL(wp), DIMENSION(jpi,jpj) :: zwndrel ! relative wind |
---|
| 63 | !!--------------------------------------------------------------------- |
---|
| 64 | ! |
---|
| 65 | zrhocd = zrhoair * zcd |
---|
| 66 | |
---|
| 67 | IF( kt == nit000 ) THEN |
---|
| 68 | ! |
---|
| 69 | IF(lwp) WRITE(numout,*)' usr_sbc : EW_CANAL case: surface forcing' |
---|
| 70 | IF(lwp) WRITE(numout,*)' ~~~~~~~~~~~ vtau = taum = wndm = qns = qsr = emp = sfx = 0' |
---|
| 71 | ! |
---|
| 72 | utau(:,:) = 0._wp |
---|
| 73 | vtau(:,:) = 0._wp |
---|
| 74 | taum(:,:) = 0._wp |
---|
| 75 | wndm(:,:) = 0._wp |
---|
| 76 | ! |
---|
| 77 | emp (:,:) = 0._wp |
---|
| 78 | sfx (:,:) = 0._wp |
---|
| 79 | qns (:,:) = 0._wp |
---|
| 80 | qsr (:,:) = 0._wp |
---|
| 81 | ! |
---|
| 82 | ENDIF |
---|
| 83 | |
---|
[13662] | 84 | IF( rn_u10 /= 0. .AND. rn_windszy > 0. ) THEN |
---|
| 85 | IF( nyear == 1 .AND. nmonth == 1 .AND. nday <= 10 ) THEN |
---|
| 86 | WHERE( ABS(gphit) <= rn_windszy/2. .AND. ABS(glamt) <= rn_windszx/2. ) utau(:,:) = zrhocd * rn_u10 * rn_u10 |
---|
| 87 | ELSE |
---|
| 88 | utau(:,:) = 0. |
---|
| 89 | ENDIF |
---|
| 90 | ENDIF |
---|
| 91 | |
---|
[9302] | 92 | IF( rn_uofac /= 0. ) THEN |
---|
| 93 | |
---|
[9403] | 94 | WHERE( ABS(gphit) <= rn_windszy/2. ) |
---|
[9302] | 95 | zwndrel(:,:) = rn_u10 - rn_uofac * un(:,:,1) |
---|
| 96 | ELSEWHERE |
---|
| 97 | zwndrel(:,:) = - rn_uofac * un(:,:,1) |
---|
| 98 | END WHERE |
---|
| 99 | utau(:,:) = zrhocd * zwndrel(:,:) * zwndrel(:,:) |
---|
| 100 | |
---|
| 101 | zwndrel(:,:) = - rn_uofac * vn(:,:,1) |
---|
| 102 | vtau(:,:) = zrhocd * zwndrel(:,:) * zwndrel(:,:) |
---|
| 103 | |
---|
| 104 | ENDIF |
---|
| 105 | ! |
---|
| 106 | END SUBROUTINE usrdef_sbc_oce |
---|
| 107 | |
---|
| 108 | SUBROUTINE usrdef_sbc_ice_tau( kt ) |
---|
| 109 | INTEGER, INTENT(in) :: kt ! ocean time step |
---|
| 110 | END SUBROUTINE usrdef_sbc_ice_tau |
---|
| 111 | |
---|
| 112 | SUBROUTINE usrdef_sbc_ice_flx( kt ) |
---|
| 113 | INTEGER, INTENT(in) :: kt ! ocean time step |
---|
| 114 | END SUBROUTINE usrdef_sbc_ice_flx |
---|
| 115 | |
---|
| 116 | !!====================================================================== |
---|
| 117 | END MODULE usrdef_sbc |
---|