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

source: NEMO/trunk/src/ICE/icedyn_adv.F90 @ 12377

Last change on this file since 12377 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: 8.4 KB
Line 
1MODULE icedyn_adv
2   !!======================================================================
3   !!                       ***  MODULE icedyn_adv   ***
4   !!   sea-ice: advection
5   !!======================================================================
6   !! History :  4.0  !  2018     (many people)      SI3 [aka Sea Ice cube]
7   !!----------------------------------------------------------------------
8#if defined key_si3
9   !!----------------------------------------------------------------------
10   !!   'key_si3'                                       SI3 sea-ice model
11   !!----------------------------------------------------------------------
12   !!   ice_dyn_adv   : advection of sea ice variables
13   !!----------------------------------------------------------------------
14   USE phycst         ! physical constant
15   USE dom_oce        ! ocean domain
16   USE sbc_oce , ONLY : nn_fsbc   ! frequency of sea-ice call
17   USE ice            ! sea-ice: variables
18   USE icevar         ! sea-ice: operations
19   USE icedyn_adv_pra ! sea-ice: advection scheme (Prather)
20   USE icedyn_adv_umx ! sea-ice: advection scheme (ultimate-macho)
21   USE icectl         ! sea-ice: control prints
22   !
23   USE in_out_manager ! I/O manager
24   USE iom            ! I/O manager library
25   USE lib_mpp        ! MPP library
26   USE lib_fortran    ! fortran utilities (glob_sum + no signed zero)
27   USE timing         ! Timing
28   USE prtctl         ! Print control
29
30   IMPLICIT NONE
31   PRIVATE
32
33   PUBLIC   ice_dyn_adv        ! called by icestp
34   PUBLIC   ice_dyn_adv_init   ! called by icedyn
35
36   INTEGER ::              nice_adv   ! choice of the type of advection scheme
37   !                                        ! associated indices:
38   INTEGER, PARAMETER ::   np_advPRA = 1   ! Prather scheme
39   INTEGER, PARAMETER ::   np_advUMx = 2   ! Ultimate-Macho scheme
40   !
41   ! ** namelist (namdyn_adv) **
42   INTEGER         ::   nn_UMx       ! order of the UMx advection scheme   
43   !
44   !!----------------------------------------------------------------------
45   !! NEMO/ICE 4.0 , NEMO Consortium (2018)
46   !! $Id$
47   !! Software governed by the CeCILL licence     (./LICENSE)
48   !!----------------------------------------------------------------------
49CONTAINS
50
51   SUBROUTINE ice_dyn_adv( kt ) 
52      !!----------------------------------------------------------------------
53      !!                   ***  ROUTINE ice_dyn_adv ***
54      !!                   
55      !! ** purpose : advection of sea ice
56      !!
57      !! ** method  : One can choose between
58      !!     a) an Ultimate-Macho scheme (with order defined by nn_UMx) => ln_adv_UMx
59      !!     b) and a second order Prather scheme => ln_adv_Pra
60      !!
61      !! ** action :
62      !!----------------------------------------------------------------------
63      INTEGER, INTENT(in) ::   kt   ! number of iteration
64      !!---------------------------------------------------------------------
65      !
66      ! controls
67      IF( ln_timing    )   CALL timing_start('icedyn_adv')                                                             ! timing
68      IF( ln_icediachk )   CALL ice_cons_hsm(0, 'icedyn_adv', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation
69      !
70      IF( kt == nit000 .AND. lwp ) THEN
71         WRITE(numout,*)
72         WRITE(numout,*) 'ice_dyn_adv: sea-ice advection'
73         WRITE(numout,*) '~~~~~~~~~~~'
74      ENDIF
75      !
76      !---------------!
77      !== Advection ==!
78      !---------------!
79      SELECT CASE( nice_adv )
80      !                                !-----------------------!
81      CASE( np_advUMx )                ! ULTIMATE-MACHO scheme !
82         !                             !-----------------------!
83         CALL ice_dyn_adv_umx( nn_UMx, kt, u_ice, v_ice, h_i, h_s, h_ip, &
84            &                          ato_i, v_i, v_s, sv_i, oa_i, a_i, a_ip, v_ip, e_s, e_i )
85         !                             !-----------------------!
86      CASE( np_advPRA )                ! PRATHER scheme        !
87         !                             !-----------------------!
88         CALL ice_dyn_adv_pra(         kt, u_ice, v_ice, h_i, h_s, h_ip, &
89            &                          ato_i, v_i, v_s, sv_i, oa_i, a_i, a_ip, v_ip, e_s, e_i )
90      END SELECT
91
92      !------------
93      ! diagnostics
94      !------------
95      diag_trp_ei(:,:) = SUM(SUM( e_i (:,:,1:nlay_i,:) - e_i_b (:,:,1:nlay_i,:), dim=4 ), dim=3 ) * r1_rdtice
96      diag_trp_es(:,:) = SUM(SUM( e_s (:,:,1:nlay_s,:) - e_s_b (:,:,1:nlay_s,:), dim=4 ), dim=3 ) * r1_rdtice
97      diag_trp_sv(:,:) = SUM(     sv_i(:,:,:)          - sv_i_b(:,:,:)                  , dim=3 ) * r1_rdtice
98      diag_trp_vi(:,:) = SUM(     v_i (:,:,:)          - v_i_b (:,:,:)                  , dim=3 ) * r1_rdtice
99      diag_trp_vs(:,:) = SUM(     v_s (:,:,:)          - v_s_b (:,:,:)                  , dim=3 ) * r1_rdtice
100      IF( iom_use('icemtrp') )   CALL iom_put( 'icemtrp' ,  diag_trp_vi * rhoi          )   ! ice mass transport
101      IF( iom_use('snwmtrp') )   CALL iom_put( 'snwmtrp' ,  diag_trp_vs * rhos          )   ! snw mass transport
102      IF( iom_use('salmtrp') )   CALL iom_put( 'salmtrp' ,  diag_trp_sv * rhoi * 1.e-03 )   ! salt mass transport (kg/m2/s)
103      IF( iom_use('dihctrp') )   CALL iom_put( 'dihctrp' , -diag_trp_ei                 )   ! advected ice heat content (W/m2)
104      IF( iom_use('dshctrp') )   CALL iom_put( 'dshctrp' , -diag_trp_es                 )   ! advected snw heat content (W/m2)
105
106      ! controls
107      IF( ln_icediachk )   CALL ice_cons_hsm(1, 'icedyn_adv', rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft) ! conservation
108      IF( ln_icectl    )   CALL ice_prt     (kt, iiceprt, jiceprt,-1, ' - ice dyn & trp - ')                           ! prints
109      IF( ln_timing    )   CALL timing_stop ('icedyn_adv')                                                             ! timing
110      !
111   END SUBROUTINE ice_dyn_adv
112
113
114   SUBROUTINE ice_dyn_adv_init
115      !!-------------------------------------------------------------------
116      !!                  ***  ROUTINE ice_dyn_adv_init  ***
117      !!
118      !! ** Purpose :   Physical constants and parameters linked to the ice
119      !!                dynamics
120      !!
121      !! ** Method  :   Read the namdyn_adv namelist and check the ice-dynamic
122      !!                parameter values called at the first timestep (nit000)
123      !!
124      !! ** input   :   Namelist namdyn_adv
125      !!-------------------------------------------------------------------
126      INTEGER ::   ios, ioptio   ! Local integer output status for namelist read
127      !!
128      NAMELIST/namdyn_adv/ ln_adv_Pra, ln_adv_UMx, nn_UMx
129      !!-------------------------------------------------------------------
130      !
131      READ  ( numnam_ice_ref, namdyn_adv, IOSTAT = ios, ERR = 901)
132901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namdyn_adv in reference namelist' )
133      READ  ( numnam_ice_cfg, namdyn_adv, IOSTAT = ios, ERR = 902 )
134902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namdyn_adv in configuration namelist' )
135      IF(lwm) WRITE( numoni, namdyn_adv )
136      !
137      IF(lwp) THEN                     ! control print
138         WRITE(numout,*)
139         WRITE(numout,*) 'ice_dyn_adv_init: ice parameters for ice dynamics '
140         WRITE(numout,*) '~~~~~~~~~~~~~~~~'
141         WRITE(numout,*) '   Namelist namdyn_adv:'
142         WRITE(numout,*) '      type of advection scheme (Prather)             ln_adv_Pra = ', ln_adv_Pra 
143         WRITE(numout,*) '      type of advection scheme (Ulimate-Macho)       ln_adv_UMx = ', ln_adv_UMx 
144         WRITE(numout,*) '         order of the Ultimate-Macho scheme          nn_UMx     = ', nn_UMx
145      ENDIF
146      !
147      !                             !== set the choice of ice advection ==!
148      ioptio = 0 
149      IF( ln_adv_Pra ) THEN   ;   ioptio = ioptio + 1   ;   nice_adv = np_advPRA    ;   ENDIF
150      IF( ln_adv_UMx ) THEN   ;   ioptio = ioptio + 1   ;   nice_adv = np_advUMx    ;   ENDIF
151      IF( ioptio /= 1 )   CALL ctl_stop( 'ice_dyn_adv_init: choose one and only one ice adv. scheme (ln_adv_Pra or ln_adv_UMx)' )
152      !
153      IF( ln_adv_Pra )   CALL adv_pra_init  !* read or initialize all required files
154      !
155   END SUBROUTINE ice_dyn_adv_init
156
157#else
158   !!----------------------------------------------------------------------
159   !!   Default option         Empty Module           NO SI3 sea-ice model
160   !!----------------------------------------------------------------------
161#endif
162
163   !!======================================================================
164END MODULE icedyn_adv
165
Note: See TracBrowser for help on using the repository browser.