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.
agrif_oce.F90 in NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST – NEMO

source: NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_oce.F90 @ 11590

Last change on this file since 11590 was 11590, checked in by jchanut, 5 years ago

#2222: 1) create remapping module (vremap) and integration of D. Engwirda piecewise polynomial recontruction package (PPR_LIB cpp key). 2) Various bug corrections with key_vertical activated.

  • Property svn:keywords set to Id
File size: 4.9 KB
RevLine 
[782]1MODULE agrif_oce
[1605]2   !!======================================================================
[782]3   !!                       ***  MODULE agrif_oce  ***
[1605]4   !! AGRIF :   define in memory AGRIF variables
[782]5   !!----------------------------------------------------------------------
[1605]6   !! History :  2.0  ! 2007-12  (R. Benshila)  Original code
[782]7   !!----------------------------------------------------------------------
[1605]8#if defined key_agrif
[782]9   !!----------------------------------------------------------------------
[1605]10   !!   'key_agrif'                                              AGRIF zoom
11   !!----------------------------------------------------------------------
[782]12   USE par_oce      ! ocean parameters
13   USE dom_oce      ! domain parameters
[5656]14
[782]15   IMPLICIT NONE
[2715]16   PRIVATE
[782]17
[2715]18   PUBLIC agrif_oce_alloc ! routine called by nemo_init in nemogcm.F90
[11590]19 
[1605]20   !                                              !!* Namelist namagrif: AGRIF parameters
[11574]21   LOGICAL , PUBLIC ::   ln_agrif_2way = .TRUE.    !: activate two way nesting
22   LOGICAL , PUBLIC ::   ln_spc_dyn    = .FALSE.   !: use zeros (.false.) or not (.true.) in
23                                                   !: bdys dynamical fields interpolation
[5656]24   REAL(wp), PUBLIC ::   rn_sponge_tra = 2800.     !: sponge coeff. for tracers
25   REAL(wp), PUBLIC ::   rn_sponge_dyn = 2800.     !: sponge coeff. for dynamics
26   LOGICAL , PUBLIC ::   ln_chk_bathy  = .FALSE.   !: check of parent bathymetry
[11574]27   !
28   INTEGER , PUBLIC, PARAMETER ::   nn_sponge_len = 2  !: Sponge width (in number of parent grid points)
[5656]29   LOGICAL , PUBLIC :: spongedoneT = .FALSE.       !: tracer   sponge layer indicator
30   LOGICAL , PUBLIC :: spongedoneU = .FALSE.       !: dynamics sponge layer indicator
31   LOGICAL , PUBLIC :: lk_agrif_fstep = .TRUE.     !: if true: first step
32   LOGICAL , PUBLIC :: lk_agrif_debug = .FALSE.    !: if true: print debugging info
[1605]33
[5656]34   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_tsn
35# if defined key_top
36   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_trn
37# endif
38   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_u
39   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_v
[11574]40   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: utint_stage
41   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vtint_stage
[9019]42   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fsaht_spu, fsaht_spv !: sponge diffusivities
43   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fsahm_spt, fsahm_spf !: sponge viscosities
[2715]44
[9019]45   ! Barotropic arrays used to store open boundary data during time-splitting loop:
[11574]46   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::  ubdy, vbdy, hbdy
[5656]47
[9019]48
49   INTEGER, PUBLIC :: tsn_id                                                  ! AGRIF profile for tracers interpolation and update
50   INTEGER, PUBLIC :: un_interp_id, vn_interp_id                              ! AGRIF profiles for interpolations
51   INTEGER, PUBLIC :: un_update_id, vn_update_id                              ! AGRIF profiles for udpates
52   INTEGER, PUBLIC :: tsn_sponge_id, un_sponge_id, vn_sponge_id               ! AGRIF profiles for sponge layers
[5656]53# if defined key_top
[9019]54   INTEGER, PUBLIC :: trn_id, trn_sponge_id
[5656]55# endif 
[9019]56   INTEGER, PUBLIC :: unb_id, vnb_id, ub2b_interp_id, vb2b_interp_id
57   INTEGER, PUBLIC :: ub2b_update_id, vb2b_update_id
58   INTEGER, PUBLIC :: e3t_id, e1u_id, e2v_id, sshn_id
59   INTEGER, PUBLIC :: scales_t_id
60   INTEGER, PUBLIC :: avt_id, avm_id, en_id                ! TKE related identificators
61   INTEGER, PUBLIC :: umsk_id, vmsk_id
62   INTEGER, PUBLIC :: kindic_agr
63   
[1605]64   !!----------------------------------------------------------------------
[9598]65   !! NEMO/NST 4.0 , NEMO Consortium (2018)
[1605]66   !! $Id$
[10068]67   !! Software governed by the CeCILL license (see ./LICENSE)
[2715]68   !!----------------------------------------------------------------------
69CONTAINS
70
71   INTEGER FUNCTION agrif_oce_alloc()
72      !!----------------------------------------------------------------------
73      !!                ***  FUNCTION agrif_oce_alloc  ***
74      !!----------------------------------------------------------------------
[5656]75      INTEGER, DIMENSION(2) :: ierr
76      !!----------------------------------------------------------------------
77      ierr(:) = 0
78      !
[11574]79      ALLOCATE( fsaht_spu(jpi,jpj), fsaht_spv(jpi,jpj),     &
80         &      fsahm_spt(jpi,jpj), fsahm_spf(jpi,jpj),     &
81         &      tabspongedone_tsn(jpi,jpj),                 &
82         &      utint_stage(jpi,jpj), vtint_stage(jpi,jpj), &
[5656]83# if defined key_top         
84         &      tabspongedone_trn(jpi,jpj),           &
85# endif         
86         &      tabspongedone_u  (jpi,jpj),           &
87         &      tabspongedone_v  (jpi,jpj), STAT = ierr(1) )
88
[11574]89      ALLOCATE( ubdy(jpi,jpj), vbdy(jpi,jpj), hbdy(jpi,jpj), STAT = ierr(2) )
[5656]90
91      agrif_oce_alloc = MAXVAL(ierr)
92      !
[2715]93   END FUNCTION agrif_oce_alloc
94
95#endif
[1605]96   !!======================================================================
[782]97END MODULE agrif_oce
Note: See TracBrowser for help on using the repository browser.