1 | MODULE sbc_ice |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE sbc_ice *** |
---|
4 | !! Surface module - LIM-3: parameters & variables defined in memory |
---|
5 | !!====================================================================== |
---|
6 | !! History : 3.0 ! 2006-08 (G. Madec) Surface module |
---|
7 | !! 3.2 ! 2009-06 (S. Masson) merge with ice_oce |
---|
8 | !! 3.3.1! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation |
---|
9 | !! 3.4 ! 2011-11 (C. Harris) CICE added as an option |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | #if defined key_lim3 || defined key_cice |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! 'key_lim3' or 'key_cice' : LIM-3 or CICE sea-ice model |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | USE par_oce ! ocean parameters |
---|
16 | USE sbc_oce ! surface boundary condition: ocean |
---|
17 | # if defined key_lim3 |
---|
18 | USE ice ! LIM-3 parameters |
---|
19 | # endif |
---|
20 | # if defined key_cice |
---|
21 | USE ice_domain_size, only: ncat |
---|
22 | #endif |
---|
23 | USE lib_mpp ! MPP library |
---|
24 | USE in_out_manager ! I/O manager |
---|
25 | |
---|
26 | IMPLICIT NONE |
---|
27 | PRIVATE |
---|
28 | |
---|
29 | PUBLIC sbc_ice_alloc ! called in sbcmod.F90 or sbcice_cice.F90 |
---|
30 | |
---|
31 | # if defined key_lim3 |
---|
32 | LOGICAL , PUBLIC, PARAMETER :: lk_lim3 = .TRUE. !: LIM-3 ice model |
---|
33 | LOGICAL , PUBLIC, PARAMETER :: lk_cice = .FALSE. !: no CICE |
---|
34 | CHARACTER(len=1), PUBLIC, PARAMETER :: cp_ice_msh = 'C' !: 'C'-grid ice-velocity |
---|
35 | # endif |
---|
36 | # if defined key_cice |
---|
37 | LOGICAL , PUBLIC, PARAMETER :: lk_lim3 = .FALSE. !: no LIM-3 |
---|
38 | LOGICAL , PUBLIC, PARAMETER :: lk_cice = .TRUE. !: CICE ice model |
---|
39 | CHARACTER(len=1), PUBLIC :: cp_ice_msh = 'F' !: 'F'-grid ice-velocity |
---|
40 | |
---|
41 | ! Parameters imported from LIM to get CICE to work with NEMO4 |
---|
42 | INTEGER , PUBLIC, PARAMETER :: np_jules_OFF = 0 !: no Jules coupling (ice thermodynamics forced via qsr and qns) |
---|
43 | 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) |
---|
44 | INTEGER , PUBLIC, PARAMETER :: np_jules_ACTIVE = 2 !: active Jules coupling (SM0L) (compute qcn and qsr_tr via sbcblk.F90 or sbccpl.F90) |
---|
45 | INTEGER , PUBLIC, PARAMETER :: nice_jules = np_jules_ACTIVE !: Choice of jules coupling |
---|
46 | # endif |
---|
47 | |
---|
48 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qns_ice !: non solar heat flux over ice [W/m2] |
---|
49 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qsr_ice !: solar heat flux over ice [W/m2] |
---|
50 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: zevap_ice !: latent flux over ice [W/m2] |
---|
51 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: dqla_ice !: latent sensibility over ice [W/m2/K] |
---|
52 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qla_ice !: latent heat flux over ice [W/m2/K] |
---|
53 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: dqns_ice !: non solar heat flux over ice (LW+SEN+LA) [W/m2/K] |
---|
54 | #if ! defined key_lim3 |
---|
55 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: t1_ice !: ice surface temperature [K] |
---|
56 | # endif |
---|
57 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: alb_ice !: ice albedo [-] |
---|
58 | |
---|
59 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qml_ice !: heat available for snow / ice surface melting [W/m2] |
---|
60 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qcn_ice !: heat conduction flux in the layer below surface [W/m2] |
---|
61 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qsr_ice_tr !: solar flux transmitted below the ice surface [W/m2] |
---|
62 | |
---|
63 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: utau_ice !: atmos-ice u-stress. VP: I-pt ; EVP: U,V-pts [N/m2] |
---|
64 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vtau_ice !: atmos-ice v-stress. VP: I-pt ; EVP: U,V-pts [N/m2] |
---|
65 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_ice !: sublimation - precip over sea ice [kg/m2/s] |
---|
66 | |
---|
67 | #if defined key_lim3 || defined key_cice |
---|
68 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: evap_ice !: sublimation [kg/m2/s] |
---|
69 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: devap_ice !: sublimation sensitivity [kg/m2/s/K] |
---|
70 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qns_oce !: non solar heat flux over ocean [W/m2] |
---|
71 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr_oce !: non solar heat flux over ocean [W/m2] |
---|
72 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qemp_oce !: heat flux of precip and evap over ocean [W/m2] |
---|
73 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qemp_ice !: heat flux of precip and evap over ice [W/m2] |
---|
74 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qevap_ice !: heat flux of evap over ice [W/m2] |
---|
75 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qprec_ice !: enthalpy of precip over ice [J/m3] |
---|
76 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_oce !: evap - precip over ocean [kg/m2/s] |
---|
77 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndm_ice !: wind speed module at T-point [m/s] |
---|
78 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sstfrz !: wind speed module at T-point [m/s] |
---|
79 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tsfc_ice !: sea ice surface skin temperature (on categories) |
---|
80 | #endif |
---|
81 | |
---|
82 | #if defined key_cice |
---|
83 | ! |
---|
84 | ! for consistency with LIM, these are declared with three dimensions |
---|
85 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qlw_ice !: incoming long-wave |
---|
86 | ! |
---|
87 | ! other forcing arrays are two dimensional |
---|
88 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ss_iou !: x ice-ocean surface stress at NEMO U point |
---|
89 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ss_iov !: y ice-ocean surface stress at NEMO V point |
---|
90 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qatm_ice !: specific humidity |
---|
91 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndi_ice !: i wind at T point |
---|
92 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndj_ice !: j wind at T point |
---|
93 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: nfrzmlt !: NEMO frzmlt |
---|
94 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fr_iu !: ice fraction at NEMO U point |
---|
95 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fr_iv !: ice fraction at NEMO V point |
---|
96 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sstfrz !: sea surface freezing temperature |
---|
97 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tsfc_ice !: sea-ice surface skin temperature (on categories) |
---|
98 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: cnd_ice !: sea-ice surface layer thermal conductivity (on cats) |
---|
99 | |
---|
100 | ! variables used in the coupled interface |
---|
101 | INTEGER , PUBLIC, PARAMETER :: jpl = ncat |
---|
102 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: u_ice, v_ice ! jpi, jpj |
---|
103 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_ip, v_ip ! Meltpond fraction and depth |
---|
104 | |
---|
105 | ! |
---|
106 | |
---|
107 | ! |
---|
108 | #if defined key_asminc |
---|
109 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ndaice_da !: NEMO fresh water flux to ocean due to data assim |
---|
110 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: nfresh_da !: NEMO salt flux to ocean due to data assim |
---|
111 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: nfsalt_da !: NEMO ice concentration change/second from data assim |
---|
112 | #endif |
---|
113 | |
---|
114 | |
---|
115 | ! already defined in ice.F90 for LIM3 |
---|
116 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i |
---|
117 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h_i, h_s |
---|
118 | |
---|
119 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tatm_ice !: air temperature [K] |
---|
120 | #endif |
---|
121 | |
---|
122 | REAL(wp), PUBLIC, SAVE :: cldf_ice = 0.81 !: cloud fraction over sea ice, summer CLIO value [-] |
---|
123 | |
---|
124 | !! arrays relating to embedding ice in the ocean |
---|
125 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_mass !: mass of snow and ice at current ice time step [Kg/m2] |
---|
126 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_mass_b !: mass of snow and ice at previous ice time step [Kg/m2] |
---|
127 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_fmass !: time evolution of mass of snow+ice [Kg/m2/s] |
---|
128 | |
---|
129 | !!---------------------------------------------------------------------- |
---|
130 | !! NEMO/OPA 4.0 , NEMO Consortium (2011) |
---|
131 | !! $Id$ |
---|
132 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
133 | !!---------------------------------------------------------------------- |
---|
134 | CONTAINS |
---|
135 | |
---|
136 | INTEGER FUNCTION sbc_ice_alloc() |
---|
137 | !!---------------------------------------------------------------------- |
---|
138 | !! *** FUNCTION sbc_ice_alloc *** |
---|
139 | !!---------------------------------------------------------------------- |
---|
140 | INTEGER :: ierr(4) |
---|
141 | !!---------------------------------------------------------------------- |
---|
142 | ierr(:) = 0 |
---|
143 | |
---|
144 | ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), snwice_fmass(jpi,jpj) , STAT=ierr(1) ) |
---|
145 | |
---|
146 | #if defined key_lim3 |
---|
147 | ALLOCATE( qns_ice (jpi,jpj,jpl) , qsr_ice (jpi,jpj,jpl) , & |
---|
148 | & zevap_ice (jpi,jpj,jpl) , dqla_ice (jpi,jpj,jpl) , & |
---|
149 | & dqns_ice(jpi,jpj,jpl) , alb_ice (jpi,jpj,jpl) , & |
---|
150 | & qml_ice (jpi,jpj,jpl) , qcn_ice (jpi,jpj,jpl) , qsr_ice_tr(jpi,jpj,jpl) , & |
---|
151 | & utau_ice(jpi,jpj) , vtau_ice (jpi,jpj) , wndm_ice (jpi,jpj) , & |
---|
152 | & evap_ice(jpi,jpj,jpl) , devap_ice(jpi,jpj,jpl) , qprec_ice (jpi,jpj) , & |
---|
153 | & qemp_ice(jpi,jpj) , qevap_ice(jpi,jpj,jpl) , qemp_oce (jpi,jpj) , & |
---|
154 | & qns_oce (jpi,jpj) , qsr_oce (jpi,jpj) , emp_oce (jpi,jpj) , & |
---|
155 | & emp_ice (jpi,jpj) , tsfc_ice (jpi,jpj,jpl) , sstfrz (jpi,jpj) , STAT= ierr(2) ) |
---|
156 | #endif |
---|
157 | |
---|
158 | #if defined key_cice |
---|
159 | ALLOCATE( zevap_ice(jpi,jpj,ncat) , qlw_ice(jpi,jpj,1) , qsr_ice(jpi,jpj,1) , & |
---|
160 | wndi_ice(jpi,jpj) , tatm_ice(jpi,jpj) , qatm_ice(jpi,jpj) , & |
---|
161 | wndj_ice(jpi,jpj) , nfrzmlt(jpi,jpj) , ss_iou(jpi,jpj) , & |
---|
162 | ss_iov(jpi,jpj) , fr_iu(jpi,jpj) , fr_iv(jpi,jpj) , & |
---|
163 | a_i(jpi,jpj,ncat) , qml_ice(jpi,jpj,ncat) , qcn_ice(jpi,jpj,ncat) , & |
---|
164 | #if defined key_asminc |
---|
165 | ndaice_da(jpi,jpj) , nfresh_da(jpi,jpj) , nfsalt_da(jpi,jpj) , & |
---|
166 | #endif |
---|
167 | sstfrz(jpi,jpj) , qsr_ice_tr(jpi,jpj,jpl), STAT= ierr(2) ) |
---|
168 | IF( ln_cpl ) ALLOCATE( u_ice(jpi,jpj) , t1_ice (jpi,jpj,jpl) , & |
---|
169 | & v_ice(jpi,jpj) , alb_ice(jpi,jpj,1) , & |
---|
170 | & emp_ice(jpi,jpj) , qns_ice(jpi,jpj,1) , dqns_ice(jpi,jpj,jpl) , & |
---|
171 | & a_ip(jpi,jpj,jpl) , v_ip(jpi,jpj,jpl) , tsfc_ice(jpi,jpj,jpl) , & |
---|
172 | & cnd_ice(jpi,jpj,jpl) , STAT=ierr(3) ) |
---|
173 | IF( ln_cpl ) ALLOCATE( h_i(jpi,jpj,jpl) , h_s(jpi,jpj,jpl) , STAT=ierr(4) ) |
---|
174 | #endif |
---|
175 | |
---|
176 | sbc_ice_alloc = MAXVAL( ierr ) |
---|
177 | IF( lk_mpp ) CALL mpp_sum ( sbc_ice_alloc ) |
---|
178 | IF( sbc_ice_alloc > 0 ) CALL ctl_warn('sbc_ice_alloc: allocation of arrays failed') |
---|
179 | END FUNCTION sbc_ice_alloc |
---|
180 | |
---|
181 | #else |
---|
182 | !!---------------------------------------------------------------------- |
---|
183 | !! Default option NO LIM3 or CICE sea-ice model |
---|
184 | !!---------------------------------------------------------------------- |
---|
185 | USE lib_mpp ! MPP library |
---|
186 | USE in_out_manager ! I/O manager |
---|
187 | |
---|
188 | IMPLICIT NONE |
---|
189 | PRIVATE |
---|
190 | |
---|
191 | PUBLIC sbc_ice_alloc ! |
---|
192 | |
---|
193 | LOGICAL , PUBLIC, PARAMETER :: lk_lim3 = .FALSE. !: no LIM-3 ice model |
---|
194 | LOGICAL , PUBLIC, PARAMETER :: lk_cice = .FALSE. !: no CICE ice model |
---|
195 | CHARACTER(len=1), PUBLIC, PARAMETER :: cp_ice_msh = '-' !: no grid ice-velocity |
---|
196 | REAL(wp) , PUBLIC, PARAMETER :: cldf_ice = 0.81 !: cloud fraction over sea ice, summer CLIO value [-] |
---|
197 | INTEGER , PUBLIC, PARAMETER :: jpl = 1 |
---|
198 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: u_ice, v_ice ! jpi, jpj |
---|
199 | #if ! defined key_lim3 |
---|
200 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: t1_ice |
---|
201 | #endif |
---|
202 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: alb_ice, qns_ice, dqns_ice ! (jpi,jpj,jpl) |
---|
203 | |
---|
204 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i |
---|
205 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_ice |
---|
206 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qsr_ice |
---|
207 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: h_i, h_s |
---|
208 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: qml_ice, qcn_ice |
---|
209 | ! |
---|
210 | !! arrays related to embedding ice in the ocean. |
---|
211 | !! These arrays need to be declared even if no ice model is required. |
---|
212 | !! In the no ice model or traditional levitating ice cases they contain only zeros |
---|
213 | !! --------------------- |
---|
214 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_mass !: mass of snow and ice at current ice time step [Kg/m2] |
---|
215 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_mass_b !: mass of snow and ice at previous ice time step [Kg/m2] |
---|
216 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_fmass !: time evolution of mass of snow+ice [Kg/m2/s] |
---|
217 | !!---------------------------------------------------------------------- |
---|
218 | CONTAINS |
---|
219 | |
---|
220 | INTEGER FUNCTION sbc_ice_alloc() |
---|
221 | !!---------------------------------------------------------------------- |
---|
222 | !! *** FUNCTION sbc_ice_alloc *** |
---|
223 | !!---------------------------------------------------------------------- |
---|
224 | INTEGER :: ierr(1) |
---|
225 | !!---------------------------------------------------------------------- |
---|
226 | ierr(:) = 0 |
---|
227 | ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), snwice_fmass(jpi,jpj) , STAT=ierr(1) ) |
---|
228 | sbc_ice_alloc = MAXVAL( ierr ) |
---|
229 | IF( lk_mpp ) CALL mpp_sum ( sbc_ice_alloc ) |
---|
230 | IF( sbc_ice_alloc > 0 ) CALL ctl_warn('sbc_ice_alloc: allocation of arrays failed') |
---|
231 | END FUNCTION sbc_ice_alloc |
---|
232 | #endif |
---|
233 | |
---|
234 | !!====================================================================== |
---|
235 | END MODULE sbc_ice |
---|