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.
abl.F90 in NEMO/trunk/src/ABL – NEMO

source: NEMO/trunk/src/ABL/abl.F90 @ 12587

Last change on this file since 12587 was 12489, checked in by davestorkey, 4 years ago

Preparation for new timestepping scheme #2390.
Main changes:

  1. Initial euler timestep now handled in stp and not in TRA/DYN routines.
  2. Renaming of all timestep parameters. In summary, the namelist parameter is now rn_Dt and the current timestep is rDt (and rDt_ice, rDt_trc etc).
  3. Renaming of a few miscellaneous parameters, eg. atfp -> rn_atfp (namelist parameter used everywhere) and rau0 -> rho0.

This version gives bit-comparable results to the previous version of the trunk.

File size: 4.0 KB
RevLine 
[11305]1MODULE abl
2   !!======================================================================
3   !!                      ***  MODULE  abl  ***
4   !! Abl        :  ABL dynamics and active tracers defined in memory
5   !!======================================================================
6   !! History :  4.0  !  2019-03  (F. Lemarié & G. Samson)  Original code
7   !!----------------------------------------------------------------------
8   USE par_abl        ! abl parameters
9   USE lib_mpp        ! MPP library
10   USE dom_oce, ONLY: glamt, gphit               ! latitude/longitude
11   USE dom_oce, ONLY: e1t, e1u, e1v, e1f         ! scale factors for horizontal grid
12   USE dom_oce, ONLY: e2t, e2u, e2v, e2f         !
[12489]13   USE dom_oce, ONLY: rn_Dt                      ! oceanic time-step
[11305]14   USE sbc_oce, ONLY: ght_abl, ghw_abl, e3t_abl, e3w_abl, jpka   ! scale factors and altitudes of ABL grid points in the vertical
15 
16   IMPLICIT NONE
17   PRIVATE
18
19   PUBLIC abl_alloc ! routine called by nemo_init in nemogcm.F90
20
21   !! ABL dynamics and tracer fields                            !
22   !! --------------------------                            !
23   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:,:)   ::   u_abl        !: i-horizontal velocity   [m/s]
24   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:,:)   ::   v_abl        !: j-horizontal velocity   [m/s]
25   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:,:,:) ::   tq_abl       !: 4D T-q fields           [Kelvin,kg/kg]
26   
27   !! ABL TKE closure scheme                            !
28   !! --------------------------       
29   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:)     ::   avm_abl      !: turbulent viscosity   [m2/s]
30   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:)     ::   avt_abl      !: turbulent diffusivity [m2/s]
31   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:)     ::   mxl_abl      !: mixing length         [m]
32   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:,:,:)   ::   tke_abl      !: turbulent kinetic energy [m2/s2]
33   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:)       ::   fft_abl      !: Coriolis parameter    [1/s]
34   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:)       ::   pblh         !: PBL height            [m]
35
36   !! ABL Land/sea mask and restoring term                           !
37   !! --------------------------     
38   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:)       ::   msk_abl
39   REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:)       ::   rest_eq
40   !
41   INTEGER , PUBLIC :: nt_n, nt_a       !: now / after indices (equal 1 or 2)
42   !
43   !!----------------------------------------------------------------------
44   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
45   !! $Id: abl.F90 4990 2014-12-15 16:42:49Z timgraham $
46   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
47   !!----------------------------------------------------------------------
48CONTAINS
49
50   INTEGER FUNCTION abl_alloc()
51      !!----------------------------------------------------------------------
52      !!                   ***  FUNCTION abl_alloc  ***
53      !!----------------------------------------------------------------------
54      INTEGER :: ierr
55      !!----------------------------------------------------------------------
56      !
57      ALLOCATE( u_abl  (1:jpi,1:jpj,1:jpka,jptime), &
58         &      v_abl  (1:jpi,1:jpj,1:jpka,jptime), &
59         &      tq_abl (1:jpi,1:jpj,1:jpka,jptime,jptq), &
60         &      avm_abl(1:jpi,1:jpj,1:jpka), &
61         &      avt_abl(1:jpi,1:jpj,1:jpka), &
62         &      mxl_abl(1:jpi,1:jpj,1:jpka), &         
63         &      tke_abl(1:jpi,1:jpj,1:jpka,jptime), &
64         &      fft_abl(1:jpi,1:jpj), &
65         &      pblh   (1:jpi,1:jpj), &         
66         &      msk_abl(1:jpi,1:jpj), &
67         &      rest_eq(1:jpi,1:jpj), &         
68         &      e3t_abl(1:jpka), e3w_abl(1:jpka), ght_abl(1:jpka), ghw_abl(1:jpka),                 STAT=ierr )
69         !
70      abl_alloc = ierr
71      IF( abl_alloc /= 0 )   CALL ctl_warn('abl_alloc: failed to allocate arrays')
72      !
73   END FUNCTION abl_alloc
74
75   !!======================================================================
76END MODULE abl
Note: See TracBrowser for help on using the repository browser.