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

source: NEMO/trunk/src/ICE/ice.F90 @ 9660

Last change on this file since 9660 was 9604, checked in by clem, 6 years ago

change history of the ice routines

  • Property svn:keywords set to Id
File size: 34.9 KB
RevLine 
[825]1MODULE ice
[2528]2   !!======================================================================
[9019]3   !!                        ***  MODULE  ice  ***
4   !!   sea-ice:  ice variables defined in memory
5   !!======================================================================
[9604]6   !! History :  3.0  !  2008-03  (M. Vancoppenolle) Original code
7   !!            4.0  !  2018     (many people)      SI3 [aka Sea Ice cube]
[2528]8   !!----------------------------------------------------------------------
[9570]9#if defined key_si3
[825]10   !!----------------------------------------------------------------------
[9570]11   !!   'key_si3'                                       SI3 sea-ice model
[825]12   !!----------------------------------------------------------------------
[3625]13   USE in_out_manager ! I/O manager
14   USE lib_mpp        ! MPP library
[825]15
16   IMPLICIT NONE
17   PRIVATE
[2528]18
[9019]19   PUBLIC   ice_alloc   ! called by icestp.F90
[2715]20
[834]21   !!======================================================================
22   !!                                                                     |
[2528]23   !!              I C E   S T A T E   V A R I A B L E S                  |
[834]24   !!                                                                     |
25   !! Introduction :                                                      |
26   !! --------------                                                      |
27   !! Every ice-covered grid cell is characterized by a series of state   |
28   !! variables. To account for unresolved spatial variability in ice     |
29   !! thickness, the ice cover in divided in ice thickness categories.    |
30   !!                                                                     |
31   !! Sea ice state variables depend on the ice thickness category        |
32   !!                                                                     |
33   !! Those variables are divided into two groups                         |
34   !! * Extensive (or global) variables.                                  |
35   !!   These are the variables that are transported by all means         |
36   !! * Intensive (or equivalent) variables.                              |
37   !!   These are the variables that are either physically more           |
38   !!   meaningful and/or used in ice thermodynamics                      |
39   !!                                                                     |
40   !! List of ice state variables :                                       |
41   !! -----------------------------                                       |
42   !!                                                                     |
43   !!-------------|-------------|---------------------------------|-------|
44   !!   name in   |   name in   |              meaning            | units |
45   !! 2D routines | 1D routines |                                 |       |
46   !!-------------|-------------|---------------------------------|-------|
47   !!                                                                     |
48   !! ******************************************************************* |
49   !! ***         Dynamical variables (prognostic)                    *** |
50   !! ******************************************************************* |
51   !!                                                                     |
52   !! u_ice       |      -      |    Comp. U of the ice velocity  | m/s   |
53   !! v_ice       |      -      |    Comp. V of the ice velocity  | m/s   |
54   !!                                                                     |
55   !! ******************************************************************* |
56   !! ***         Category dependent state variables (prognostic)     *** |
57   !! ******************************************************************* |
58   !!                                                                     |
59   !! ** Global variables                                                 |
60   !!-------------|-------------|---------------------------------|-------|
[4872]61   !! a_i         | a_i_1d      |    Ice concentration            |       |
[834]62   !! v_i         |      -      |    Ice volume per unit area     | m     |
63   !! v_s         |      -      |    Snow volume per unit area    | m     |
[9019]64   !! sv_i        |      -      |    Sea ice salt content         | ppt.m |
65   !! oa_i        !      -      !    Sea ice areal age content    | s     |
[5123]66   !! e_i         !      -      !    Ice enthalpy                 | J/m2  |
[9019]67   !!      -      ! e_i_1d      !    Ice enthalpy per unit vol.   | J/m3  |
[5123]68   !! e_s         !      -      !    Snow enthalpy                | J/m2  |
[9019]69   !!      -      ! e_s_1d      !    Snow enthalpy per unit vol.  | J/m3  |
[834]70   !!                                                                     |
71   !!-------------|-------------|---------------------------------|-------|
72   !!                                                                     |
73   !! ** Equivalent variables                                             |
74   !!-------------|-------------|---------------------------------|-------|
75   !!                                                                     |
[9019]76   !! h_i         | h_i_1d      |    Ice thickness                | m     |
77   !! h_s         ! h_s_1d      |    Snow depth                   | m     |
78   !! s_i         ! s_i_1d      |    Sea ice bulk salinity        ! ppt   |
79   !! sz_i        ! sz_i_1d     |    Sea ice salinity profile     ! ppt   |
80   !! o_i         !      -      |    Sea ice Age                  ! s     |
[4872]81   !! t_i         ! t_i_1d      |    Sea ice temperature          ! K     |
82   !! t_s         ! t_s_1d      |    Snow temperature             ! K     |
83   !! t_su        ! t_su_1d     |    Sea ice surface temperature  ! K     |
[834]84   !!                                                                     |
85   !! notes: the ice model only sees a bulk (i.e., vertically averaged)   |
86   !!        salinity, except in thermodynamic computations, for which    |
87   !!        the salinity profile is computed as a function of bulk       |
88   !!        salinity                                                     |
89   !!                                                                     |
90   !!        the sea ice surface temperature is not associated to any     |
91   !!        heat content. Therefore, it is not a state variable and      |
92   !!        does not have to be advected. Nevertheless, it has to be     |
93   !!        computed to determine whether the ice is melting or not      |
94   !!                                                                     |
95   !! ******************************************************************* |
96   !! ***         Category-summed state variables (diagnostic)        *** |
97   !! ******************************************************************* |
[4872]98   !! at_i        | at_i_1d     |    Total ice concentration      |       |
[834]99   !! vt_i        |      -      |    Total ice vol. per unit area | m     |
100   !! vt_s        |      -      |    Total snow vol. per unit ar. | m     |
[9019]101   !! sm_i        |      -      |    Mean sea ice salinity        | ppt   |
[834]102   !! tm_i        |      -      |    Mean sea ice temperature     | K     |
[9433]103   !! tm_s        |      -      |    Mean snow    temperature     | K     |
[5123]104   !! et_i        !      -      !    Total ice enthalpy           | J/m2  |
105   !! et_s        !      -      !    Total snow enthalpy          | J/m2  |
[7646]106   !! bv_i        !      -      !    relative brine volume        | ???   |
[834]107   !!=====================================================================
[825]108
[9019]109   !!----------------------------------------------------------------------
[825]110   !! * Share Module variables
[9019]111   !!----------------------------------------------------------------------
112   !                                     !!** ice-generic parameters namelist (nampar) **
113   INTEGER           , PUBLIC ::   jpl              !: number of ice  categories
114   INTEGER           , PUBLIC ::   nlay_i           !: number of ice  layers
115   INTEGER           , PUBLIC ::   nlay_s           !: number of snow layers
[9076]116   INTEGER           , PUBLIC ::   nn_virtual_itd   !: virtual ITD mono-category parameterizations (1-3) or not (0)
[9019]117   LOGICAL           , PUBLIC ::   ln_icedyn        !: flag for ice dynamics (T) or not (F)
118   LOGICAL           , PUBLIC ::   ln_icethd        !: flag for ice thermo   (T) or not (F)
119   REAL(wp)          , PUBLIC ::   rn_amax_n        !: maximum ice concentration Northern hemisphere
120   REAL(wp)          , PUBLIC ::   rn_amax_s        !: maximum ice concentration Southern hemisphere
121   CHARACTER(len=256), PUBLIC ::   cn_icerst_in     !: suffix of ice restart name (input)
122   CHARACTER(len=256), PUBLIC ::   cn_icerst_out    !: suffix of ice restart name (output)
123   CHARACTER(len=256), PUBLIC ::   cn_icerst_indir  !: ice restart input directory
124   CHARACTER(len=256), PUBLIC ::   cn_icerst_outdir !: ice restart output directory
[1465]125
[9019]126   !                                     !!** ice-itd namelist (namitd) **
127   REAL(wp), PUBLIC ::   rn_himin         !: minimum ice thickness
[7646]128   
[9019]129   !                                     !!** ice-dynamics namelist (namdyn) **
130   REAL(wp), PUBLIC ::   rn_ishlat        !: lateral boundary condition for sea-ice
131   LOGICAL , PUBLIC ::   ln_landfast      !: landfast ice parameterization (T or F)
132   REAL(wp), PUBLIC ::   rn_gamma         !:    fraction of ocean depth that ice must reach to initiate landfast ice
133   REAL(wp), PUBLIC ::   rn_icebfr        !:    maximum bottom stress per unit area of contact (landfast ice)
134   REAL(wp), PUBLIC ::   rn_lfrelax       !:    relaxation time scale (s-1) to reach static friction (landfast ice)
135   !
136   !                                     !!** ice-rheology namelist (namrhg) **
137   LOGICAL , PUBLIC ::   ln_aEVP          !: using adaptive EVP (T or F)
[5123]138   REAL(wp), PUBLIC ::   rn_creepl        !: creep limit : has to be under 1.0e-9
139   REAL(wp), PUBLIC ::   rn_ecc           !: eccentricity of the elliptical yield curve
[7646]140   INTEGER , PUBLIC ::   nn_nevp          !: number of iterations for subcycling
[5123]141   REAL(wp), PUBLIC ::   rn_relast        !: ratio => telast/rdt_ice (1/3 or 1/9 depending on nb of subcycling nevp)
[9019]142   !
143   !                                     !!** ice-surface forcing namelist (namforcing) **
144                                          ! -- icethd_dh -- !
145   REAL(wp), PUBLIC ::   rn_blow_s        !: coef. for partitioning of snowfall between leads and sea ice
146                                          ! -- icethd -- !
147   REAL(wp), PUBLIC ::   rn_cio           !: drag coefficient for oceanic stress
148   INTEGER , PUBLIC ::   nn_flxdist       !: Redistribute heat flux over ice categories
149   !                                      !   =-1  Do nothing (needs N(cat) fluxes)
150   !                                      !   = 0  Average N(cat) fluxes then apply the average over the N(cat) ice
151   !                                      !   = 1  Average N(cat) fluxes then redistribute over the N(cat) ice using T-ice and albedo sensitivity
152   !                                      !   = 2  Redistribute a single flux over categories
153   INTEGER , PUBLIC            ::   nice_jules           !: Choice of jules coupling
154   INTEGER , PUBLIC, PARAMETER ::   np_jules_OFF    = 0  !: no Jules coupling (ice thermodynamics forced via qsr and qns)
155   INTEGER , PUBLIC, PARAMETER ::   np_jules_EMULE  = 1  !: emulated Jules coupling via icethd_zdf.F90 (BL99) (1st round compute qcn and qsr_tr, 2nd round use it)
156   INTEGER , PUBLIC, PARAMETER ::   np_jules_ACTIVE = 2  !: active Jules coupling                      (SM0L) (compute qcn and qsr_tr via sbcblk.F90 or sbccpl.F90)
[5123]157
[9019]158   !                                     !!** ice-vertical diffusion namelist (namthd_zdf) **
159   LOGICAL , PUBLIC ::   ln_cndi_U64      !: thermal conductivity: Untersteiner (1964)
160   LOGICAL , PUBLIC ::   ln_cndi_P07      !: thermal conductivity: Pringle et al (2007)
[7646]161   REAL(wp), PUBLIC ::   rn_kappa_i       !: coef. for the extinction of radiation Grenfell et al. (2006) [1/m]
[9019]162   REAL(wp), PUBLIC ::   rn_cnd_s         !: thermal conductivity of the snow [W/m/K]   
[7646]163
[9019]164   !                                     !!** ice-salinity namelist (namthd_sal) **
[7646]165   INTEGER , PUBLIC ::   nn_icesal        !: salinity configuration used in the model
166   !                                      ! 1 - constant salinity in both space and time
167   !                                      ! 2 - prognostic salinity (s(z,t))
168   !                                      ! 3 - salinity profile, constant in time
169   REAL(wp), PUBLIC ::   rn_icesal        !: bulk salinity (ppt) in case of constant salinity
170   REAL(wp), PUBLIC ::   rn_simax         !: maximum ice salinity [PSU]
171   REAL(wp), PUBLIC ::   rn_simin         !: minimum ice salinity [PSU]
[825]172
[9019]173   !                                     !!** ice-ponds namelist (namthd_pnd)
174   LOGICAL , PUBLIC ::   ln_pnd_H12       !: Melt ponds scheme from Holland et al 2012
175   LOGICAL , PUBLIC ::   ln_pnd_fwb       !: melt ponds store freshwater
176   LOGICAL , PUBLIC ::   ln_pnd_CST       !: Melt ponds scheme with constant fraction and depth
177   REAL(wp), PUBLIC ::   rn_apnd          !: prescribed pond fraction (0<rn_apnd<1)
178   REAL(wp), PUBLIC ::   rn_hpnd          !: prescribed pond depth    (0<rn_hpnd<1)
179   LOGICAL , PUBLIC ::   ln_pnd_alb       !: melt ponds affect albedo
[825]180
[9019]181   !                                     !!** ice-diagnostics namelist (namdia) **
182   LOGICAL , PUBLIC ::   ln_icediachk     !: flag for ice diag (T) or not (F)
183   LOGICAL , PUBLIC ::   ln_icediahsb     !: flag for ice diag (T) or not (F)
184   LOGICAL , PUBLIC ::   ln_icectl        !: flag for sea-ice points output (T) or not (F)
185   INTEGER , PUBLIC ::   iiceprt          !: debug i-point
186   INTEGER , PUBLIC ::   jiceprt          !: debug j-point
187
[7646]188   !                                     !!** some other parameters
[9019]189   INTEGER , PUBLIC ::   kt_ice           !: iteration number
[7646]190   REAL(wp), PUBLIC ::   rdt_ice          !: ice time step
191   REAL(wp), PUBLIC ::   r1_rdtice        !: = 1. / rdt_ice
[5123]192   REAL(wp), PUBLIC ::   r1_nlay_i        !: 1 / nlay_i
193   REAL(wp), PUBLIC ::   r1_nlay_s        !: 1 / nlay_s
[7646]194   REAL(wp), PUBLIC ::   rswitch          !: switch for the presence of ice (1) or not (0)
[9019]195   REAL(wp), PUBLIC ::   rdiag_v, rdiag_s, rdiag_t, rdiag_fv, rdiag_fs, rdiag_ft   !: conservation diagnostics
196   REAL(wp), PUBLIC, PARAMETER ::   epsi06 = 1.e-06_wp  !: small number
197   REAL(wp), PUBLIC, PARAMETER ::   epsi10 = 1.e-10_wp  !: small number
198   REAL(wp), PUBLIC, PARAMETER ::   epsi20 = 1.e-20_wp  !: small number
[4990]199
[9019]200
[7646]201   !                                     !!** define arrays
[9019]202   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   u_oce,v_oce !: surface ocean velocity used in ice dynamics
203   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ht_i_new    !: ice collection thickness accreted in leads
[7646]204   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   strength    !: ice strength
[2715]205   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   stress1_i, stress2_i, stress12_i   !: 1st, 2nd & diagonal stress tensor element
[7646]206   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   delta_i     !: ice rheology elta factor (Flato & Hibler 95) [s-1]
[9604]207   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   divu_i      !: Divergence of the velocity field             [s-1]
208   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   shear_i     !: Shear of the velocity field                  [s-1]
[2715]209   !
210   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   t_bo        !: Sea-Ice bottom temperature [Kelvin]     
[4688]211   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qlead       !: heat balance of the lead (or of the open ocean)
212   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fhtur       !: net downward heat flux from the ice to the ocean
213   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fhld        !: heat flux from the lead used for bottom melting
214
[9604]215   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_snw     !: snow-ocean mass exchange             [kg.m-2.s-1]
[9019]216   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_snw_sni !: snow ice growth component of wfx_snw [kg.m-2.s-1]
[9604]217   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_snw_sum !: surface melt component of wfx_snw    [kg.m-2.s-1]
218   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_pnd     !: melt pond-ocean mass exchange        [kg.m-2.s-1]
219   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_spr     !: snow precipitation on ice            [kg.m-2.s-1]
220   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_sub     !: sublimation of snow/ice              [kg.m-2.s-1]
221   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_snw_sub !: snow sublimation                     [kg.m-2.s-1]
222   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_ice_sub !: ice sublimation                      [kg.m-2.s-1]
[4688]223
[9604]224   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_snw_dyn !: dynamical component of wfx_snw       [kg.m-2.s-1]
[9019]225
[7646]226   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_ice     !: ice-ocean mass exchange                   [kg.m-2.s-1]
227   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_sni     !: snow ice growth component of wfx_ice      [kg.m-2.s-1]
228   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_opw     !: lateral ice growth component of wfx_ice   [kg.m-2.s-1]
229   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_bog     !: bottom ice growth component of wfx_ice    [kg.m-2.s-1]
230   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_dyn     !: dynamical ice growth component of wfx_ice [kg.m-2.s-1]
231   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_bom     !: bottom melt component of wfx_ice          [kg.m-2.s-1]
232   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_sum     !: surface melt component of wfx_ice         [kg.m-2.s-1]
233   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_lam     !: lateral melt component of wfx_ice         [kg.m-2.s-1]
234   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_res     !: residual component of wfx_ice             [kg.m-2.s-1]
[4688]235
[9604]236   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   afx_tot     !: ice concentration tendency (total)        [s-1]
[5123]237
[4688]238   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_bog     !: salt flux due to ice growth/melt                      [PSU/m2/s]
239   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_bom     !: salt flux due to ice growth/melt                      [PSU/m2/s]
[7646]240   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_lam     !: salt flux due to ice growth/melt                      [PSU/m2/s]
[4688]241   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_sum     !: salt flux due to ice growth/melt                      [PSU/m2/s]
242   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_sni     !: salt flux due to ice growth/melt                      [PSU/m2/s]
243   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_opw     !: salt flux due to ice growth/melt                      [PSU/m2/s]
[3625]244   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_bri     !: salt flux due to brine rejection                      [PSU/m2/s]
[4688]245   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_dyn     !: salt flux due to porous ridged ice formation          [PSU/m2/s]
[3625]246   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_res     !: residual salt flux due to correction of ice thickness [PSU/m2/s]
[825]247
[6416]248   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sfx_sub     !: salt flux due to ice sublimation
[4688]249
[9604]250   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_bog     !: total heat flux causing bottom ice growth           [W.m-2]
251   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_bom     !: total heat flux causing bottom ice melt             [W.m-2]
252   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_sum     !: total heat flux causing surface ice melt            [W.m-2]
253   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_opw     !: total heat flux causing open water ice formation    [W.m-2]
254   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_dif     !: total heat flux causing Temp change in the ice      [W.m-2]
255   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_snw     !: heat flux for snow melt                             [W.m-2]
[6416]256   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_err_dif !: heat flux remaining due to change in non-solar flux [W.m-2]
[9604]257   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_err_rem !: heat flux error after heat remapping                [W.m-2]
258   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_in      !: heat flux available for thermo transformations      [W.m-2]
[6416]259   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_out     !: heat flux remaining at the end of thermo transformations  [W.m-2]
[9604]260   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wfx_err_sub !: mass flux error after sublimation                   [kg.m-2.s-1]
[6416]261   
[4688]262   ! heat flux associated with ice-atmosphere mass exchange
[9604]263   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_sub     !: heat flux for sublimation            [W.m-2]
[6416]264   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_spr     !: heat flux of the snow precipitation  [W.m-2]
[4688]265
266   ! heat flux associated with ice-ocean mass exchange
[9019]267   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_thd     !: ice-ocean heat flux from thermo processes (icethd_dh) [W.m-2]
268   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_dyn     !: ice-ocean heat flux from ridging                      [W.m-2]
[6416]269   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hfx_res     !: residual heat flux due to correction of ice thickness [W.m-2]
[4688]270
[7646]271   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   rn_amax_2d     !: maximum ice concentration 2d array
272   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ftr_ice        !: transmitted solar radiation under ice
[9019]273   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   t1_ice         !: temperature of the first layer (Jules coupling) [K]
274   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   cnd_ice        !: effective conductivity at the top of ice/snow (Jules coupling) [W.m-2.K-1]
[4688]275
[9019]276   !!----------------------------------------------------------------------
[834]277   !! * Ice global state variables
[9019]278   !!----------------------------------------------------------------------
[834]279   !! Variables defined for each ice category
[9019]280   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   h_i       !: Ice thickness (m)
[7646]281   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   a_i       !: Ice fractional areas (concentration)
282   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   v_i       !: Ice volume per unit area (m)
283   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   v_s       !: Snow volume per unit area(m)
[9019]284   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   h_s       !: Snow thickness (m)
[7646]285   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   t_su      !: Sea-Ice Surface Temperature (K)
[9019]286   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   s_i       !: Sea-Ice Bulk salinity (ppt)
287   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   sv_i      !: Sea-Ice Bulk salinity times volume per area (ppt.m)
288   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   o_i       !: Sea-Ice Age (s)
289   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   oa_i      !: Sea-Ice Age times ice area (s)
[7646]290   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   bv_i      !: brine volume
[825]291
[2715]292   !! Variables summed over all categories, or associated to all the ice in a single grid cell
[7646]293   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   u_ice, v_ice !: components of the ice velocity (m/s)
294   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   vt_i , vt_s  !: ice and snow total volume per unit area (m)
295   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   at_i         !: ice total fractional area (ice concentration)
296   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ato_i        !: =1-at_i ; total open water fractional area
297   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   et_i , et_s  !: ice and snow total heat content
298   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tm_i         !: mean ice temperature over all categories
[9433]299   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tm_s         !: mean snw temperature over all categories
[7646]300   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   bvm_i        !: brine volume averaged over all categories
[9019]301   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sm_i         !: mean sea ice salinity averaged over all categories [PSU]
[7646]302   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tm_su        !: mean surface temperature over all categories
[9019]303   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hm_i         !: mean ice  thickness over all categories
304   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hm_s         !: mean snow thickness over all categories
[7646]305   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   om_i         !: mean ice age over all categories
306   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tau_icebfr   !: ice friction with bathy (landfast param activated)
[825]307
[9019]308   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::   t_s      !: Snow temperatures     [K]
309   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::   e_s      !: Snow enthalpy         [J/m2]
310   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::   t_i      !: ice temperatures      [K]
311   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::   e_i      !: ice enthalpy          [J/m2]
312   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::   sz_i     !: ice salinity          [PSU]
[825]313
[9019]314   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   a_ip       !: melt pond fraction per grid cell area
315   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   v_ip       !: melt pond volume per grid cell area [m]
316   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   a_ip_frac  !: melt pond volume per ice area
317   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   h_ip       !: melt pond thickness [m]
[825]318
[9019]319   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   at_ip      !: total melt pond fraction
320   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   vt_ip      !: total melt pond volume per unit area [m]
321
322   !!----------------------------------------------------------------------
[834]323   !! * Old values of global variables
[9019]324   !!----------------------------------------------------------------------
325   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::   v_s_b, v_i_b, h_s_b, h_i_b    !: snow and ice volumes/thickness
326   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::   a_i_b, sv_i_b, oa_i_b         !:
327   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::   e_s_b                         !: snow heat content
328   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::   e_i_b                         !: ice temperatures
329   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)     ::   u_ice_b, v_ice_b              !: ice velocity
330   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)     ::   at_i_b                        !: ice concentration (total)
[5123]331           
[9019]332   !!----------------------------------------------------------------------
[834]333   !! * Ice thickness distribution variables
[9019]334   !!----------------------------------------------------------------------
335   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   hi_max         !: Boundary of ice thickness categories in thickness space
336   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   hi_mean        !: Mean ice thickness in catgories
[4147]337   !
[9019]338   !!----------------------------------------------------------------------
[834]339   !! * Ice diagnostics
[9019]340   !!----------------------------------------------------------------------
[5123]341   ! thd refers to changes induced by thermodynamics
342   ! trp   ''         ''     ''       advection (transport of ice)
[7646]343   !
[9019]344   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   diag_trp_vi   !: transport of ice volume
345   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   diag_trp_vs   !: transport of snw volume
346   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   diag_trp_ei   !: transport of ice enthalpy (W/m2)
347   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   diag_trp_es   !: transport of snw enthalpy (W/m2)
348   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   diag_trp_sv   !: transport of salt content
[4688]349   !
[9019]350   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   diag_heat     !: snw/ice heat content variation   [W/m2]
351   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   diag_sice     !: ice salt content variation   []
352   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   diag_vice     !: ice volume variation   [m/s]
353   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   diag_vsnw     !: snw volume variation   [m/s]
354
[4688]355   !
[2715]356   !!----------------------------------------------------------------------
[9019]357   !! * SIMIP extra diagnostics
358   !!----------------------------------------------------------------------
359   ! Extra sea ice diagnostics to address the data request
360   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   t_si          !: Temperature at Snow-ice interface (K)
361   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   tm_si         !: mean temperature at the snow-ice interface (K)
362   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   diag_fc_bo    !: Bottom conduction flux (W/m2)
363   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   diag_fc_su    !: Surface conduction flux (W/m2)
364
365   !
366   !!----------------------------------------------------------------------
[9598]367   !! NEMO/ICE 4.0 , NEMO Consortium (2018)
[2715]368   !! $Id$
[9598]369   !! Software governed by the CeCILL licence     (./LICENSE)
[2715]370   !!----------------------------------------------------------------------
371CONTAINS
372
373   FUNCTION ice_alloc()
374      !!-----------------------------------------------------------------
[7813]375      !!               *** Routine ice_alloc ***
[2715]376      !!-----------------------------------------------------------------
377      INTEGER :: ice_alloc
378      !
[9604]379      INTEGER :: ierr(15), ii
[2715]380      !!-----------------------------------------------------------------
381      ierr(:) = 0
382
383      ii = 1
[9604]384      ALLOCATE( u_oce    (jpi,jpj) , v_oce    (jpi,jpj) , ht_i_new  (jpi,jpj) , strength(jpi,jpj) ,  &
385         &      stress1_i(jpi,jpj) , stress2_i(jpi,jpj) , stress12_i(jpi,jpj) ,                      &
386         &      delta_i  (jpi,jpj) , divu_i   (jpi,jpj) , shear_i   (jpi,jpj) , STAT=ierr(ii) )
[2715]387
388      ii = ii + 1
[9019]389      ALLOCATE( t_bo   (jpi,jpj) , wfx_snw_sni(jpi,jpj) ,                                                &
390         &      wfx_snw(jpi,jpj) , wfx_snw_dyn(jpi,jpj) , wfx_snw_sum(jpi,jpj) , wfx_snw_sub(jpi,jpj) ,  &
391         &      wfx_ice(jpi,jpj) , wfx_sub    (jpi,jpj) , wfx_ice_sub(jpi,jpj) , wfx_lam    (jpi,jpj) ,  &
[9604]392         &      wfx_pnd(jpi,jpj) ,                                                                       &
393         &      wfx_bog(jpi,jpj) , wfx_dyn(jpi,jpj) , wfx_bom(jpi,jpj) , wfx_sum(jpi,jpj) ,              &
394         &      wfx_res(jpi,jpj) , wfx_sni(jpi,jpj) , wfx_opw(jpi,jpj) , wfx_spr(jpi,jpj) ,              &
395         &      afx_tot(jpi,jpj) , rn_amax_2d(jpi,jpj),                                                  &
396         &      fhtur  (jpi,jpj) , qlead  (jpi,jpj) ,                                                    &
[7646]397         &      sfx_res(jpi,jpj) , sfx_bri(jpi,jpj) , sfx_dyn(jpi,jpj) , sfx_sub(jpi,jpj) , sfx_lam(jpi,jpj) ,  &
398         &      sfx_bog(jpi,jpj) , sfx_bom(jpi,jpj) , sfx_sum(jpi,jpj) , sfx_sni(jpi,jpj) , sfx_opw(jpi,jpj) ,  &
[9604]399         &      hfx_res(jpi,jpj) , hfx_snw(jpi,jpj) , hfx_sub(jpi,jpj) ,                        & 
[7646]400         &      hfx_in (jpi,jpj) , hfx_out(jpi,jpj) , fhld   (jpi,jpj) ,                        &
401         &      hfx_sum(jpi,jpj) , hfx_bom(jpi,jpj) , hfx_bog(jpi,jpj) , hfx_dif(jpi,jpj) ,     &
402         &      hfx_opw(jpi,jpj) , hfx_thd(jpi,jpj) , hfx_dyn(jpi,jpj) , hfx_spr(jpi,jpj) ,     &
403         &      hfx_err_dif(jpi,jpj) , hfx_err_rem(jpi,jpj) , wfx_err_sub(jpi,jpj)        ,  STAT=ierr(ii) )
[2715]404
405      ! * Ice global state variables
406      ii = ii + 1
[9604]407      ALLOCATE( ftr_ice(jpi,jpj,jpl) , cnd_ice(jpi,jpj,jpl) , t1_ice(jpi,jpj,jpl) ,  &
408         &      h_i    (jpi,jpj,jpl) , a_i    (jpi,jpj,jpl) , v_i   (jpi,jpj,jpl) ,  &
409         &      v_s    (jpi,jpj,jpl) , h_s    (jpi,jpj,jpl) , t_su  (jpi,jpj,jpl) ,  &
410         &      s_i    (jpi,jpj,jpl) , sv_i   (jpi,jpj,jpl) , o_i   (jpi,jpj,jpl) ,  &
411         &      oa_i   (jpi,jpj,jpl) , bv_i   (jpi,jpj,jpl) , STAT=ierr(ii) )
412
[2715]413      ii = ii + 1
[9604]414      ALLOCATE( u_ice(jpi,jpj) , v_ice(jpi,jpj) ,                                   &
415         &      vt_i (jpi,jpj) , vt_s (jpi,jpj) , at_i(jpi,jpj) , ato_i(jpi,jpj) ,  &
416         &      et_i (jpi,jpj) , et_s (jpi,jpj) , tm_i(jpi,jpj) , tm_s (jpi,jpj) ,  &
417         &      sm_i (jpi,jpj) , tm_su(jpi,jpj) , hm_i(jpi,jpj) , hm_s (jpi,jpj) ,  &
418         &      om_i (jpi,jpj) , bvm_i(jpi,jpj) , tau_icebfr(jpi,jpj)            , STAT=ierr(ii) )
419
[2715]420      ii = ii + 1
[5123]421      ALLOCATE( t_s(jpi,jpj,nlay_s,jpl) , e_s(jpi,jpj,nlay_s,jpl) , STAT=ierr(ii) )
[9604]422
[2715]423      ii = ii + 1
[9019]424      ALLOCATE( t_i(jpi,jpj,nlay_i,jpl) , e_i(jpi,jpj,nlay_i,jpl) , sz_i(jpi,jpj,nlay_i,jpl) , STAT=ierr(ii) )
[2715]425
426      ii = ii + 1
[9019]427      ALLOCATE( a_ip(jpi,jpj,jpl) , v_ip(jpi,jpj,jpl) , a_ip_frac(jpi,jpj,jpl) , h_ip(jpi,jpj,jpl) , STAT = ierr(ii) )
[9604]428
[2715]429      ii = ii + 1
[9019]430      ALLOCATE( at_ip(jpi,jpj) , vt_ip(jpi,jpj) , STAT = ierr(ii) )
[2715]431
432      ! * Old values of global variables
433      ii = ii + 1
[9604]434      ALLOCATE( v_s_b (jpi,jpj,jpl) , v_i_b (jpi,jpj,jpl) , h_s_b(jpi,jpj,jpl)        , h_i_b(jpi,jpj,jpl)        ,   &
435         &      a_i_b (jpi,jpj,jpl) , sv_i_b(jpi,jpj,jpl) , e_i_b(jpi,jpj,nlay_i,jpl) , e_s_b(jpi,jpj,nlay_s,jpl) ,   &
436         &      oa_i_b(jpi,jpj,jpl)                                                   , STAT=ierr(ii) )
437
[7646]438      ii = ii + 1
439      ALLOCATE( u_ice_b(jpi,jpj) , v_ice_b(jpi,jpj) , at_i_b(jpi,jpj) , STAT=ierr(ii) )
[2715]440     
441      ! * Ice thickness distribution variables
442      ii = ii + 1
[4869]443      ALLOCATE( hi_max(0:jpl), hi_mean(jpl),  STAT=ierr(ii) )
[2715]444
445      ! * Ice diagnostics
446      ii = ii + 1
[7646]447      ALLOCATE( diag_trp_vi(jpi,jpj) , diag_trp_vs (jpi,jpj) , diag_trp_ei(jpi,jpj),   & 
[9019]448         &      diag_trp_es(jpi,jpj) , diag_trp_sv (jpi,jpj) , diag_heat  (jpi,jpj),   &
449         &      diag_sice  (jpi,jpj) , diag_vice   (jpi,jpj) , diag_vsnw  (jpi,jpj), STAT=ierr(ii) )
[2715]450
[9019]451      ! * SIMIP diagnostics
452      ii = ii + 1
453      ALLOCATE( t_si (jpi,jpj,jpl) , tm_si(jpi,jpj) , diag_fc_bo(jpi,jpj) , diag_fc_su(jpi,jpj) , STAT = ierr(ii) )
454
[2715]455      ice_alloc = MAXVAL( ierr(:) )
[7646]456      IF( ice_alloc /= 0 )   CALL ctl_warn('ice_alloc: failed to allocate arrays.')
[2715]457      !
458   END FUNCTION ice_alloc
459
[825]460#else
461   !!----------------------------------------------------------------------
[9570]462   !!   Default option         Empty module           NO SI3 sea-ice model
[825]463   !!----------------------------------------------------------------------
464#endif
465
466   !!======================================================================
467END MODULE ice
Note: See TracBrowser for help on using the repository browser.