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/trunk/src/NST – NEMO

source: NEMO/trunk/src/NST/agrif_oce.F90 @ 12489

Last change on this file since 12489 was 12377, checked in by acc, 4 years ago

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

  • Property svn:keywords set to Id
File size: 5.6 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
[12377]19 
[1605]20   !                                              !!* Namelist namagrif: AGRIF parameters
[12377]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
[12377]26   REAL(wp), PUBLIC ::   rn_trelax_tra = 0.01      !: time relaxation parameter for tracers
27   REAL(wp), PUBLIC ::   rn_trelax_dyn = 0.01      !: time relaxation parameter for momentum
[5656]28   LOGICAL , PUBLIC ::   ln_chk_bathy  = .FALSE.   !: check of parent bathymetry
[12377]29   !
30   INTEGER , PUBLIC, PARAMETER ::   nn_sponge_len = 2  !: Sponge width (in number of parent grid points)
[5656]31   LOGICAL , PUBLIC :: spongedoneT = .FALSE.       !: tracer   sponge layer indicator
32   LOGICAL , PUBLIC :: spongedoneU = .FALSE.       !: dynamics sponge layer indicator
33   LOGICAL , PUBLIC :: lk_agrif_fstep = .TRUE.     !: if true: first step
34   LOGICAL , PUBLIC :: lk_agrif_debug = .FALSE.    !: if true: print debugging info
[1605]35
[5656]36   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_tsn
37# if defined key_top
38   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_trn
39# endif
40   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_u
41   LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tabspongedone_v
[12377]42   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: utint_stage
43   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vtint_stage
44   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fspu, fspv !: sponge arrays
45   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fspt, fspf !:   "      "
[2715]46
[9019]47   ! Barotropic arrays used to store open boundary data during time-splitting loop:
[12377]48   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::  ubdy, vbdy, hbdy
49   INTEGER , PUBLIC,              SAVE                 ::  Kbb_a, Kmm_a, Krhs_a   !: AGRIF module-specific copies of time-level indices
[5656]50
[12377]51# if defined key_vertical
52   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ht0_parent, hu0_parent, hv0_parent
53   INTEGER,  PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mbkt_parent, mbku_parent, mbkv_parent
54# endif
[9019]55
56   INTEGER, PUBLIC :: tsn_id                                                  ! AGRIF profile for tracers interpolation and update
57   INTEGER, PUBLIC :: un_interp_id, vn_interp_id                              ! AGRIF profiles for interpolations
58   INTEGER, PUBLIC :: un_update_id, vn_update_id                              ! AGRIF profiles for udpates
59   INTEGER, PUBLIC :: tsn_sponge_id, un_sponge_id, vn_sponge_id               ! AGRIF profiles for sponge layers
[5656]60# if defined key_top
[9019]61   INTEGER, PUBLIC :: trn_id, trn_sponge_id
[5656]62# endif 
[9019]63   INTEGER, PUBLIC :: unb_id, vnb_id, ub2b_interp_id, vb2b_interp_id
64   INTEGER, PUBLIC :: ub2b_update_id, vb2b_update_id
65   INTEGER, PUBLIC :: e3t_id, e1u_id, e2v_id, sshn_id
66   INTEGER, PUBLIC :: scales_t_id
67   INTEGER, PUBLIC :: avt_id, avm_id, en_id                ! TKE related identificators
[12377]68   INTEGER, PUBLIC :: mbkt_id, ht0_id
[9019]69   INTEGER, PUBLIC :: kindic_agr
70   
[1605]71   !!----------------------------------------------------------------------
[9598]72   !! NEMO/NST 4.0 , NEMO Consortium (2018)
[1605]73   !! $Id$
[10068]74   !! Software governed by the CeCILL license (see ./LICENSE)
[2715]75   !!----------------------------------------------------------------------
76CONTAINS
77
78   INTEGER FUNCTION agrif_oce_alloc()
79      !!----------------------------------------------------------------------
80      !!                ***  FUNCTION agrif_oce_alloc  ***
81      !!----------------------------------------------------------------------
[5656]82      INTEGER, DIMENSION(2) :: ierr
83      !!----------------------------------------------------------------------
84      ierr(:) = 0
85      !
[12377]86      ALLOCATE( fspu(jpi,jpj), fspv(jpi,jpj),          &
87         &      fspt(jpi,jpj), fspf(jpi,jpj),               &
88         &      tabspongedone_tsn(jpi,jpj),                 &
89         &      utint_stage(jpi,jpj), vtint_stage(jpi,jpj), &
[5656]90# if defined key_top         
91         &      tabspongedone_trn(jpi,jpj),           &
[12377]92# endif   
93# if defined key_vertical
94         &      ht0_parent(jpi,jpj), mbkt_parent(jpi,jpj),  &
95         &      hu0_parent(jpi,jpj), mbku_parent(jpi,jpj),  &
96         &      hv0_parent(jpi,jpj), mbkv_parent(jpi,jpj),  &
97# endif     
[5656]98         &      tabspongedone_u  (jpi,jpj),           &
99         &      tabspongedone_v  (jpi,jpj), STAT = ierr(1) )
100
[12377]101      ALLOCATE( ubdy(jpi,jpj), vbdy(jpi,jpj), hbdy(jpi,jpj), STAT = ierr(2) )
[5656]102
103      agrif_oce_alloc = MAXVAL(ierr)
104      !
[2715]105   END FUNCTION agrif_oce_alloc
106
107#endif
[1605]108   !!======================================================================
[782]109END MODULE agrif_oce
Note: See TracBrowser for help on using the repository browser.