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 NEMO/branches/UKMO/r14075_India_uncoupled/src/OCE/USR – NEMO

source: NEMO/branches/UKMO/r14075_India_uncoupled/src/OCE/USR/usrdef_sbc.F90 @ 15422

Last change on this file since 15422 was 15422, checked in by jcastill, 3 years ago

Changes tested so that they can merged with the CO9 Met Office branch - jpmax_harmo should be 34 with FES14 tides, but the last components are not used anyway

File size: 5.0 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   !!   usrdef_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 sbc_ice         ! Surface boundary condition: ocean fields
21   USE fldread         ! read input fields
22   USE phycst          ! physical constants
23   USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)
24   !
25   USE in_out_manager  ! I/O manager
26   USE iom 
27   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
28   USE lib_mpp         ! distribued memory computing library
29   !USE wrk_nemo       ! work arrays
30   USE timing         ! Timing
31   USE prtctl         ! Print control
32
33   IMPLICIT NONE
34   PRIVATE
35
36   PUBLIC   usrdef_sbc_oce    ! routine called in sbcmod module
37   PUBLIC   usrdef_sbc_ice_tau  ! routine called by sbcice_lim.F90 for ice dynamics
38   PUBLIC   usrdef_sbc_ice_flx  ! routine called by sbcice_lim.F90 for ice thermo
39   !                                  !!* Namelist namsbc_usr
40   REAL(wp) ::   rn_vfac     ! multiplication factor for ice/ocean velocity in the calculation of wind stress (clem)
41   REAL(wp) ::   rn_charn_const 
42   LOGICAL  ::   ln_use_sbc  ! Surface fluxes on or not
43
44   !! * Substitutions
45#  include "vectopt_loop_substitute.h90"
46   !!----------------------------------------------------------------------
47   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
48   !! $Id$
49   !! Software governed by the CeCILL license (see ./LICENSE)
50   !!----------------------------------------------------------------------
51CONTAINS
52
53   SUBROUTINE usrdef_sbc_oce( kt )
54      !!---------------------------------------------------------------------
55      !!                    ***  ROUTINE usrdef_sbc  ***
56      !!             
57      !! ** Purpose :   provide at each time-step the surface boundary
58      !!              condition, i.e. the momentum, heat and freshwater fluxes.
59      !!
60      !! ** Method  :   all 0 fields, for AMM7_SURGE case
61      !!                CAUTION : never mask the surface stress field !
62      !!
63      !! ** Action  : - if tide-only case - set to ZERO all the ocean surface boundary condition, i.e.
64      !!                   utau, vtau, taum, wndm, qns, qsr, emp, sfx
65      !!              - if tide+surge case - read in wind and air pressure      !!
66      !!----------------------------------------------------------------------
67      INTEGER, INTENT(in) ::   kt   ! ocean time step
68
69      INTEGER  ::   ios      ! Local integer output status for namelist read
70      !
71      CHARACTER(len=100) ::  cn_dir   !   Root directory for location of flux files
72      TYPE(FLD_N) ::   sn_wndi, sn_wndj                        ! informations about the fields to be read
73
74      NAMELIST/namsbc_usr/ ln_use_sbc, cn_dir , rn_vfac,  & 
75         &                   sn_wndi, sn_wndj, rn_charn_const
76      !!---------------------------------------------------------------------
77      !
78      IF( kt == nit000 ) THEN
79         
80         
81         REWIND( numnam_cfg )              ! Namelist namsbc_usr in configuration namelist
82         READ  ( numnam_cfg, namsbc_usr, IOSTAT = ios, ERR = 902 ) 
83902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_surge in configuration namelist' )
84
85         IF(lwm) WRITE( numond, namsbc_usr )
86         IF(lwp) WRITE(numout,*)' usr_sbc : AMM7_SURGE tide only case: NO surface forcing' 
87         IF(lwp) WRITE(numout,*)' ~~~~~~~~~~~   utau = vtau = taum = wndm = qns = qsr = emp = sfx = 0'
88
89         utau(:,:) = 0._wp 
90         vtau(:,:) = 0._wp 
91         taum(:,:) = 0._wp 
92         wndm(:,:) = 0._wp 
93         !
94         emp (:,:) = 0._wp 
95         sfx (:,:) = 0._wp 
96         qns (:,:) = 0._wp 
97         qsr (:,:) = 0._wp 
98         !
99      ENDIF
100      !
101   END SUBROUTINE usrdef_sbc_oce
102
103
104   SUBROUTINE usrdef_sbc_ice_tau( kt )
105      INTEGER, INTENT(in) ::   kt   ! ocean time step
106   END SUBROUTINE usrdef_sbc_ice_tau
107
108
109   SUBROUTINE usrdef_sbc_ice_flx( kt )
110      INTEGER, INTENT(in) ::   kt   ! ocean time step
111   END SUBROUTINE usrdef_sbc_ice_flx
112
113   !!======================================================================
114END MODULE usrdef_sbc
Note: See TracBrowser for help on using the repository browser.