1 | MODULE isf |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE sbcisf *** |
---|
4 | !! Surface module : compute iceshelf melt and heat flux |
---|
5 | !!====================================================================== |
---|
6 | !! History : 3.2 ! 2011-02 (C.Harris ) Original code isf cav |
---|
7 | !! X.X ! 2006-02 (C. Wang ) Original code bg03 |
---|
8 | !! 3.4 ! 2013-03 (P. Mathiot) Merging + parametrization |
---|
9 | !! 4.1 ! 2019-09 (P. Mathiot) Split param/explicit ice shelf and re-organisation |
---|
10 | !!---------------------------------------------------------------------- |
---|
11 | |
---|
12 | !!---------------------------------------------------------------------- |
---|
13 | !! isf : define and allocate ice shelf variables |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | |
---|
16 | USE in_out_manager ! I/O manager |
---|
17 | USE lib_mpp ! MPP library |
---|
18 | USE fldread ! read input fields |
---|
19 | |
---|
20 | IMPLICIT NONE |
---|
21 | |
---|
22 | PRIVATE |
---|
23 | |
---|
24 | PUBLIC isf_alloc, isf_alloc_par, isf_alloc_cav, isf_alloc_cpl |
---|
25 | ! |
---|
26 | !------------------------------------------------------- |
---|
27 | ! 0 : namelist parameter |
---|
28 | !------------------------------------------------------- |
---|
29 | ! |
---|
30 | ! 0.1 -------- ice shelf cavity parameter -------------- |
---|
31 | CHARACTER(LEN=256), PUBLIC :: cn_isfdir |
---|
32 | LOGICAL , PUBLIC :: ln_isf |
---|
33 | ! |
---|
34 | ! 0.2 -------- ice shelf cavity opened namelist parameter ------------- |
---|
35 | LOGICAL , PUBLIC :: ln_isfcav_mlt !: logical for the use of ice shelf parametrisation |
---|
36 | REAL(wp) , PUBLIC :: rn_gammat0 !: temperature exchange coeficient [] |
---|
37 | REAL(wp) , PUBLIC :: rn_gammas0 !: salinity exchange coeficient [] |
---|
38 | REAL(wp) , PUBLIC :: rn_htbl !: Losch top boundary layer thickness [m] |
---|
39 | CHARACTER(LEN=256), PUBLIC :: cn_gammablk !: gamma formulation |
---|
40 | CHARACTER(LEN=256), PUBLIC :: cn_isfcav_mlt !: melt formulation (cavity/param) |
---|
41 | CHARACTER(LEN=256), PUBLIC :: cn_isfload !: ice shelf load computation method |
---|
42 | TYPE(FLD_N) , PUBLIC :: sn_isfcav_fwf !: information about the isf melting file to be read |
---|
43 | ! |
---|
44 | ! 0.3 -------- ice shelf cavity parametrised namelist parameter ------------- |
---|
45 | LOGICAL , PUBLIC :: ln_isfpar_mlt !: logical for the computation of melt inside the cavity |
---|
46 | CHARACTER(LEN=256), PUBLIC :: cn_isfpar_mlt !: melt formulation (cavity/param) |
---|
47 | TYPE(FLD_N) , PUBLIC :: sn_isfpar_fwf !: information about the isf melting file to be read |
---|
48 | TYPE(FLD_N) , PUBLIC :: sn_isfpar_zmax !: information about the grounding line depth file to be read |
---|
49 | TYPE(FLD_N) , PUBLIC :: sn_isfpar_zmin !: information about the calving line depth file to be read |
---|
50 | TYPE(FLD_N) , PUBLIC :: sn_isfpar_Leff !: information about the effective length file to be read |
---|
51 | ! |
---|
52 | ! 0.4 -------- coupling namelist parameter ------------- |
---|
53 | LOGICAL, PUBLIC :: ln_isfcpl !: |
---|
54 | LOGICAL, PUBLIC :: ln_isfcpl_cons !: |
---|
55 | INTEGER, PUBLIC :: nn_drown !: |
---|
56 | ! |
---|
57 | !------------------------------------------------------- |
---|
58 | ! 1 : ice shelf parameter |
---|
59 | !------------------------------------------------------- |
---|
60 | ! |
---|
61 | REAL(wp), PARAMETER, PUBLIC :: rLfusisf = 0.334e6_wp !: latent heat of fusion of ice shelf [J/kg] |
---|
62 | REAL(wp), PARAMETER, PUBLIC :: rcpisf = 2000.0_wp !: specific heat of ice shelf [J/kg/K] |
---|
63 | REAL(wp), PARAMETER, PUBLIC :: rkappa = 1.54e-6_wp !: heat diffusivity through the ice-shelf [m2/s] |
---|
64 | REAL(wp), PARAMETER, PUBLIC :: rhoisf = 920.0_wp !: volumic mass of ice shelf [kg/m3] |
---|
65 | REAL(wp), PARAMETER, PUBLIC :: rtsurf = -20.0 !: surface temperature [C] |
---|
66 | ! |
---|
67 | !------------------------------------------------------- |
---|
68 | ! 2 : ice shelf global variables |
---|
69 | !------------------------------------------------------- |
---|
70 | ! |
---|
71 | ! 0.1 -------- ice shelf cavity parameter -------------- |
---|
72 | LOGICAL , PUBLIC :: l_isfoasis |
---|
73 | REAL(wp), PUBLIC :: r1_Lfusisf !: 1/rLfusisf |
---|
74 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: risfload !: ice shelf load |
---|
75 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwfisf_oasis |
---|
76 | ! |
---|
77 | ! 0.2 -------- ice shelf cavity melt namelist parameter ------------- |
---|
78 | INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mskisf_cav !: |
---|
79 | INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: misfkt_cav , misfkb_cav !: |
---|
80 | REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rhisf_tbl_cav, rfrac_tbl_cav !: |
---|
81 | REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwfisf_cav , fwfisf_cav_b !: before and now net fwf from the ice shelf [kg/m2/s] |
---|
82 | REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: risf_cav_tsc , risf_cav_tsc_b !: before and now T & S isf contents [K.m/s & PSU.m/s] |
---|
83 | TYPE(FLD), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sf_isfcav_fwf !: |
---|
84 | ! |
---|
85 | REAL(wp) , PUBLIC :: risf_lamb1, risf_lamb2, risf_lamb3 ! freezing point linearization coeficient |
---|
86 | ! |
---|
87 | ! 0.3 -------- ice shelf param. melt namelist parameter ------------- |
---|
88 | INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mskisf_par !: |
---|
89 | INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: misfkt_par , misfkb_par !: |
---|
90 | REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rhisf_tbl_par, rfrac_tbl_par !: |
---|
91 | REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwfisf_par , fwfisf_par_b !: before and now net fwf from the ice shelf [kg/m2/s] |
---|
92 | REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: risf_par_tsc , risf_par_tsc_b !: before and now T & S isf contents [K.m/s & PSU.m/s] |
---|
93 | TYPE(FLD), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: sf_isfpar_fwf !: |
---|
94 | ! |
---|
95 | REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rhisf0_tbl_par !: thickness of tbl (initial value) [m] |
---|
96 | REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: risfLeff !: |
---|
97 | ! |
---|
98 | ! 0.4 -------- coupling namelist parameter ------------- |
---|
99 | LOGICAL , PUBLIC :: ll_isfcpl !: |
---|
100 | LOGICAL , PUBLIC :: ll_isfcpl_cons !: |
---|
101 | INTEGER , PUBLIC :: nstp_iscpl !: |
---|
102 | REAL(wp), PUBLIC :: rdt_iscpl !: |
---|
103 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: risfcpl_cons_ssh, risfcpl_cons_ssh_b !: |
---|
104 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: risfcpl_vol, risfcpl_cons_vol, risfcpl_cons_vol_b !: |
---|
105 | REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: risfcpl_tsc, risfcpl_cons_tsc, risfcpl_cons_tsc_b !: |
---|
106 | ! |
---|
107 | !!---------------------------------------------------------------------- |
---|
108 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
109 | !! $Id: sbcisf.F90 10536 2019-01-16 19:21:09Z mathiot $ |
---|
110 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
111 | !!---------------------------------------------------------------------- |
---|
112 | CONTAINS |
---|
113 | |
---|
114 | SUBROUTINE isf_alloc_par() |
---|
115 | !!--------------------------------------------------------------------- |
---|
116 | !! *** ROUTINE isf_alloc_par *** |
---|
117 | !! |
---|
118 | !! ** Purpose : |
---|
119 | !! |
---|
120 | !! ** Method : |
---|
121 | !! |
---|
122 | !!---------------------------------------------------------------------- |
---|
123 | INTEGER :: ierr, ialloc |
---|
124 | !!---------------------------------------------------------------------- |
---|
125 | ierr = 0 ! set to zero if no array to be allocated |
---|
126 | ! |
---|
127 | ALLOCATE(risfLeff(jpi,jpj), STAT=ialloc) |
---|
128 | ierr = ierr + ialloc |
---|
129 | ! |
---|
130 | ALLOCATE(misfkt_par(jpi,jpj), misfkb_par(jpi,jpj), STAT=ialloc ) |
---|
131 | ierr = ierr + ialloc |
---|
132 | ! |
---|
133 | ALLOCATE( rfrac_tbl_par(jpi,jpj), STAT=ialloc) |
---|
134 | ierr = ierr + ialloc |
---|
135 | ! |
---|
136 | ALLOCATE( rhisf_tbl_par(jpi,jpj), rhisf0_tbl_par(jpi,jpj), STAT=ialloc) |
---|
137 | ierr = ierr + ialloc |
---|
138 | ! |
---|
139 | ALLOCATE( mskisf_par(jpi,jpj), STAT=ialloc) |
---|
140 | ierr = ierr + ialloc |
---|
141 | ! |
---|
142 | CALL mpp_sum ( 'isf', ierr ) |
---|
143 | IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'isf: failed to allocate arrays.' ) |
---|
144 | ! |
---|
145 | END SUBROUTINE isf_alloc_par |
---|
146 | |
---|
147 | SUBROUTINE isf_alloc_cav() |
---|
148 | !!--------------------------------------------------------------------- |
---|
149 | !! *** ROUTINE isf_alloc_cav *** |
---|
150 | !! |
---|
151 | !! ** Purpose : |
---|
152 | !! |
---|
153 | !! ** Method : |
---|
154 | !! |
---|
155 | !!---------------------------------------------------------------------- |
---|
156 | INTEGER :: ierr, ialloc |
---|
157 | !!---------------------------------------------------------------------- |
---|
158 | ierr = 0 ! set to zero if no array to be allocated |
---|
159 | ! |
---|
160 | ALLOCATE(misfkt_cav(jpi,jpj), misfkb_cav(jpi,jpj), STAT=ialloc ) |
---|
161 | ierr = ierr + ialloc |
---|
162 | ! |
---|
163 | ALLOCATE( rfrac_tbl_cav(jpi,jpj), STAT=ialloc) |
---|
164 | ierr = ierr + ialloc |
---|
165 | ! |
---|
166 | ALLOCATE( rhisf_tbl_cav(jpi,jpj), STAT=ialloc) |
---|
167 | ierr = ierr + ialloc |
---|
168 | ! |
---|
169 | CALL mpp_sum ( 'isf', ierr ) |
---|
170 | IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'isf: failed to allocate arrays.' ) |
---|
171 | ! |
---|
172 | END SUBROUTINE isf_alloc_cav |
---|
173 | |
---|
174 | SUBROUTINE isf_alloc_cpl() |
---|
175 | !!--------------------------------------------------------------------- |
---|
176 | !! *** ROUTINE isf_alloc_cpl *** |
---|
177 | !! |
---|
178 | !! ** Purpose : |
---|
179 | !! |
---|
180 | !! ** Method : |
---|
181 | !! |
---|
182 | !!---------------------------------------------------------------------- |
---|
183 | INTEGER :: ierr, ialloc |
---|
184 | !!---------------------------------------------------------------------- |
---|
185 | ierr = 0 |
---|
186 | ! |
---|
187 | ALLOCATE( risfcpl_tsc(jpi,jpj,jpk,jpts) , risfcpl_vol(jpi,jpj,jpk) , & |
---|
188 | & risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) , & |
---|
189 | & risfcpl_cons_tsc_b(jpi,jpj,jpk,jpts) , risfcpl_cons_vol_b(jpi,jpj,jpk), & |
---|
190 | risfcpl_cons_ssh_b(jpi,jpj), risfcpl_cons_ssh(jpi,jpj), STAT=ialloc ) |
---|
191 | ierr = ierr + ialloc |
---|
192 | ! |
---|
193 | CALL mpp_sum ( 'isf', ierr ) |
---|
194 | IF( ierr /= 0 ) CALL ctl_warn('STOP','isfcpl: failed to allocate arrays.') |
---|
195 | ! |
---|
196 | END SUBROUTINE isf_alloc_cpl |
---|
197 | |
---|
198 | SUBROUTINE isf_alloc() |
---|
199 | !!--------------------------------------------------------------------- |
---|
200 | !! *** ROUTINE isf_alloc *** |
---|
201 | !! |
---|
202 | !! ** Purpose : |
---|
203 | !! |
---|
204 | !! ** Method : |
---|
205 | !! |
---|
206 | !!---------------------------------------------------------------------- |
---|
207 | INTEGER :: ierr, ialloc |
---|
208 | !!---------------------------------------------------------------------- |
---|
209 | ! |
---|
210 | ierr = 0 ! set to zero if no array to be allocated |
---|
211 | ! |
---|
212 | ALLOCATE(fwfisf_par(jpi,jpj) , fwfisf_par_b(jpi,jpj), & |
---|
213 | & fwfisf_cav(jpi,jpj) , fwfisf_cav_b(jpi,jpj), & |
---|
214 | & fwfisf_oasis(jpi,jpj), STAT=ialloc ) |
---|
215 | ierr = ierr + ialloc |
---|
216 | ! |
---|
217 | ALLOCATE(risf_par_tsc(jpi,jpj,jpts), risf_par_tsc_b(jpi,jpj,jpts), STAT=ialloc ) |
---|
218 | ierr = ierr + ialloc |
---|
219 | ! |
---|
220 | ALLOCATE(risf_cav_tsc(jpi,jpj,jpts), risf_cav_tsc_b(jpi,jpj,jpts), STAT=ialloc ) |
---|
221 | ierr = ierr + ialloc |
---|
222 | ! |
---|
223 | ALLOCATE(risfload(jpi,jpj), STAT=ialloc) |
---|
224 | ierr = ierr + ialloc |
---|
225 | ! |
---|
226 | ALLOCATE( mskisf_cav(jpi,jpj), STAT=ialloc) |
---|
227 | ierr = ierr + ialloc |
---|
228 | ! |
---|
229 | CALL mpp_sum ( 'isf', ierr ) |
---|
230 | IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'isf: failed to allocate arrays.' ) |
---|
231 | |
---|
232 | END SUBROUTINE isf_alloc |
---|
233 | |
---|
234 | END MODULE isf |
---|