New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
usrdef_sbc.F90 in branches/UKMO/dev_r8814_surge_modelling_Nemo4/NEMOGCM/CONFIG/AMM7_SURGE/MY_SRC – NEMO

source: branches/UKMO/dev_r8814_surge_modelling_Nemo4/NEMOGCM/CONFIG/AMM7_SURGE/MY_SRC/usrdef_sbc.F90 @ 9120

Last change on this file since 9120 was 9120, checked in by clne, 6 years ago

Initial work on 2D surge configuration. Works for tide-only, no SBC yet

File size: 4.2 KB
Line 
1MODULE usrdef_sbc
2   !!======================================================================
3   !!                       ***  MODULE usrdef_sbc  ***
4   !!
5   !!                  ===  AMM7_SURGE configuration  ===
6   !!
7   !! User defined :   surface forcing of a user configuration
8   !!======================================================================
9   !! History :  4.0   ! 2016-03  (S. Flavoni, G. Madec)  user defined interface
10   !!            4.0   ! 2017-12  (C. O'Neill)  add necessary options for surge work - either no fluxes
11   !!                                           (for tide-only run) or wind and pressure only
12   !!----------------------------------------------------------------------
13
14   !!----------------------------------------------------------------------
15   !!   usr_def_sbc    : user defined surface bounday conditions in LOCK_EXCHANGE case
16   !!----------------------------------------------------------------------
17   USE oce             ! ocean dynamics and tracers
18   USE dom_oce         ! ocean space and time domain
19   USE sbc_oce         ! Surface boundary condition: ocean fields
20   USE phycst          ! physical constants
21   !
22   USE in_out_manager  ! I/O manager
23   USE iom
24   USE lib_mpp         ! distribued memory computing library
25   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
26   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
27
28   IMPLICIT NONE
29   PRIVATE
30
31   PUBLIC   usrdef_sbc_oce    ! routine called in sbcmod module
32   PUBLIC   usrdef_sbc_ice_tau  ! routine called by sbcice_lim.F90 for ice dynamics
33   PUBLIC   usrdef_sbc_ice_flx  ! routine called by sbcice_lim.F90 for ice thermo
34
35   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   uwnd              !: wind speed i-component                       [m/s]
36   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   vwnd              !: wind speed j-component                       [m/s]
37
38   !! * Substitutions
39#  include "vectopt_loop_substitute.h90"
40   !!----------------------------------------------------------------------
41   !! NEMO/OPA 4.0 , NEMO Consortium (2016)
42   !! $Id$
43   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
44   !!----------------------------------------------------------------------
45CONTAINS
46
47   SUBROUTINE usrdef_sbc_oce( kt )
48      !!---------------------------------------------------------------------
49      !!                    ***  ROUTINE usr_def_sbc  ***
50      !!             
51      !! ** Purpose :   provide at each time-step the surface boundary
52      !!              condition, i.e. the momentum, heat and freshwater fluxes.
53      !!
54      !! ** Method  :   all 0 fields, for AMM7_SURGE case
55      !!                CAUTION : never mask the surface stress field !
56      !!
57      !! ** Action  : - if no-flx case - set to ZERO all the ocean surface boundary condition, i.e.   
58      !!                   utau, vtau, taum, wndm, qns, qsr, emp, sfx
59      !!
60      !!----------------------------------------------------------------------
61      INTEGER, INTENT(in) ::   kt   ! ocean time step
62      !!---------------------------------------------------------------------
63      !
64      IF( kt == nit000 ) THEN
65         !
66         IF(lwp) WRITE(numout,*)' usr_sbc : AMM7_SURGE tide only case: NO surface forcing'
67         IF(lwp) WRITE(numout,*)' ~~~~~~~~~~~   utau = vtau = taum = wndm = qns = qsr = emp = sfx = 0'
68         !
69         utau(:,:) = 0._wp
70         vtau(:,:) = 0._wp
71         taum(:,:) = 0._wp
72         wndm(:,:) = 0._wp
73         !
74         emp (:,:) = 0._wp
75         sfx (:,:) = 0._wp
76         qns (:,:) = 0._wp
77         qsr (:,:) = 0._wp
78         !         
79         uwnd(:,:) = 0._wp
80         vwnd(:,:) = 0._wp
81
82      ENDIF
83      !
84   
85!     CALL iom_put( "uwnd", uwnd )   ! output wind stress module
86!     CALL iom_put( "vwnd", vwnd )   ! output wind stress module
87
88   END SUBROUTINE usrdef_sbc_oce
89
90   SUBROUTINE usrdef_sbc_ice_tau( kt )
91      INTEGER, INTENT(in) ::   kt   ! ocean time step
92   END SUBROUTINE usrdef_sbc_ice_tau
93
94   SUBROUTINE usrdef_sbc_ice_flx( kt )
95      INTEGER, INTENT(in) ::   kt   ! ocean time step
96   END SUBROUTINE usrdef_sbc_ice_flx
97
98   !!======================================================================
99END MODULE usrdef_sbc
Note: See TracBrowser for help on using the repository browser.