1 | MODULE limdmp |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE limdmp *** |
---|
4 | !! Ice model : restoring Ice thickness and Fraction leads |
---|
5 | !!====================================================================== |
---|
6 | #if defined key_ice_lim |
---|
7 | !!---------------------------------------------------------------------- |
---|
8 | !! 'key_ice_lim' : LIM sea-ice model |
---|
9 | !!---------------------------------------------------------------------- |
---|
10 | !! lim_dmp : ice model damping |
---|
11 | !!---------------------------------------------------------------------- |
---|
12 | !! * Modules used |
---|
13 | USE in_out_manager ! I/O manager |
---|
14 | USE ice |
---|
15 | USE ice_oce |
---|
16 | USE tradmp |
---|
17 | USE dom_oce |
---|
18 | USE oce |
---|
19 | USE daymod ! calendar |
---|
20 | |
---|
21 | IMPLICIT NONE |
---|
22 | PRIVATE |
---|
23 | |
---|
24 | !! * Routine accessibility |
---|
25 | PUBLIC lim_dmp ! called by ice_step |
---|
26 | |
---|
27 | !! * Shared module variables |
---|
28 | CHARACTER (len=38) :: & |
---|
29 | cl_icedata = 'ice_damping_ATL4.nc' |
---|
30 | INTEGER :: & |
---|
31 | nice1 , & ! first record used |
---|
32 | nice2 ! second record used |
---|
33 | |
---|
34 | REAL(wp), DIMENSION(jpi,jpj,2) :: & |
---|
35 | hicif_data , & ! ice thickness data at two consecutive times |
---|
36 | frld_data ! fraction lead data at two consecutive times |
---|
37 | |
---|
38 | REAL(wp), DIMENSION(jpi,jpj) :: & |
---|
39 | hicif_dta , & ! ice thickness at a given time |
---|
40 | frld_dta ! fraction lead at a given time |
---|
41 | |
---|
42 | !! * Substitution |
---|
43 | # include "vectopt_loop_substitute.h90" |
---|
44 | !!---------------------------------------------------------------------- |
---|
45 | !! LIM 2.0 , UCL-LOCEAN-IPSL (2005) |
---|
46 | !! $Header$ |
---|
47 | !! This software is governed by the CeCILL licence see !modipsl/doc/NEMO_CeCILL.txt |
---|
48 | !!---------------------------------------------------------------------- |
---|
49 | |
---|
50 | CONTAINS |
---|
51 | |
---|
52 | SUBROUTINE lim_dmp(kt) |
---|
53 | !!------------------------------------------------------------------- |
---|
54 | !! *** ROUTINE lim_dmp *** |
---|
55 | !! |
---|
56 | !! ** purpose : ice model damping : restoring ice thickness and |
---|
57 | !! fraction leads |
---|
58 | !! |
---|
59 | !! ** method : the key_tradmp must be used to compute resto(:,:) coef. |
---|
60 | !! |
---|
61 | !! ** action : |
---|
62 | !! |
---|
63 | !! History : |
---|
64 | !! |
---|
65 | !! 2.0 ! 04-04 (S. Theetten) Original |
---|
66 | !!--------------------------------------------------------------------- |
---|
67 | !! * Arguments |
---|
68 | INTEGER, INTENT( in ) :: kt ! ocean time-step |
---|
69 | |
---|
70 | !! * Local Variables |
---|
71 | INTEGER :: ji, jj ! dummy loop indices |
---|
72 | !!--------------------------------------------------------------------- |
---|
73 | |
---|
74 | CALL dta_lim(kt) |
---|
75 | |
---|
76 | DO jj = 2, jpjm1 |
---|
77 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
78 | |
---|
79 | hicif(ji,jj) = hicif(ji,jj) - rdt_ice * resto(ji,jj,1) * ( hicif(ji,jj) - hicif_dta(ji,jj)) |
---|
80 | frld(ji,jj) = frld(ji,jj) - rdt_ice * resto(ji,jj,1) * ( frld(ji,jj) - frld_dta(ji,jj)) |
---|
81 | |
---|
82 | ENDDO |
---|
83 | ENDDO |
---|
84 | |
---|
85 | END SUBROUTINE lim_dmp |
---|
86 | |
---|
87 | |
---|
88 | |
---|
89 | SUBROUTINE dta_lim( kt ) |
---|
90 | !!---------------------------------------------------------------------- |
---|
91 | !! *** ROUTINE dta_lim *** |
---|
92 | !! |
---|
93 | !! ** Purpose : Reads monthly ice thickness and fraction lead data |
---|
94 | !! |
---|
95 | !! ** Method : Read on unit numicedt the interpolated ice variable |
---|
96 | !! onto the model grid. |
---|
97 | !! Data begin at january. |
---|
98 | !! The value is centered at the middle of month. |
---|
99 | !! In the opa model, kt=1 agree with january 1. |
---|
100 | !! At each time step, a linear interpolation is applied between |
---|
101 | !! two monthly values. |
---|
102 | !! |
---|
103 | !! |
---|
104 | !! ** Action : define hicif_dta and frld_dta arrays at time-step kt |
---|
105 | !! |
---|
106 | !! History : |
---|
107 | !! 2.0 ! 04-04 (S. Theetten) Original |
---|
108 | !!---------------------------------------------------------------------- |
---|
109 | !! * Modules used |
---|
110 | USE ioipsl |
---|
111 | |
---|
112 | !! * Arguments |
---|
113 | INTEGER, INTENT( in ) :: kt ! ocean time-step |
---|
114 | |
---|
115 | !! * Local declarations |
---|
116 | INTEGER, PARAMETER :: jpmois = 12 ! number of month |
---|
117 | |
---|
118 | INTEGER :: & |
---|
119 | imois, iman, itime , & ! temporary integers |
---|
120 | i15, ipi, ipj, ipk ! " " |
---|
121 | |
---|
122 | INTEGER, DIMENSION(jpmois) :: istep |
---|
123 | REAL(wp) :: zxy, zdate0, zdt |
---|
124 | REAL(wp), DIMENSION(jpi,jpj) :: zlon,zlat |
---|
125 | REAL(wp), DIMENSION(jpk) :: zlev |
---|
126 | !!---------------------------------------------------------------------- |
---|
127 | |
---|
128 | ! 0. Initialization |
---|
129 | ! ----------------- |
---|
130 | iman = jpmois |
---|
131 | i15 = nday / 16 |
---|
132 | imois = nmonth + i15 - 1 |
---|
133 | IF( imois == 0 ) imois = iman |
---|
134 | |
---|
135 | itime = jpmois |
---|
136 | ipi=jpiglo |
---|
137 | ipj=jpjglo |
---|
138 | ipk=1 |
---|
139 | zdt=rdt |
---|
140 | |
---|
141 | ! 1. First call kt=nit000 |
---|
142 | ! ----------------------- |
---|
143 | |
---|
144 | IF( kt == nit000 ) THEN |
---|
145 | nice1 = 0 |
---|
146 | IF(lwp) WRITE(numout,*) |
---|
147 | IF(lwp) WRITE(numout,*) 'dtalim : Ice thickness and lead fraction monthly fields' |
---|
148 | IF(lwp) WRITE(numout,*) '~~~~~~' |
---|
149 | IF(lwp) WRITE(numout,*) ' NetCDF FORMAT' |
---|
150 | IF(lwp) WRITE(numout,*) |
---|
151 | |
---|
152 | ! open file |
---|
153 | |
---|
154 | CALL flinopen( TRIM(cl_icedata), mig(1), nlci , mjg(1), nlcj, .FALSE., & |
---|
155 | & ipi, ipj, ipk, zlon, zlat, zlev, itime, istep, zdate0, zdt, numice_dmp ) |
---|
156 | |
---|
157 | ! title, dimensions and tests |
---|
158 | IF( itime /= jpmois ) THEN |
---|
159 | IF(lwp) THEN |
---|
160 | WRITE(numout,*) |
---|
161 | WRITE(numout,*) 'problem with time coordinates' |
---|
162 | WRITE(numout,*) ' itime ',itime,' jpmois ',jpmois |
---|
163 | ENDIF |
---|
164 | STOP 'dta_lim' |
---|
165 | ENDIF |
---|
166 | IF( ipi /= jpidta .OR. ipj /= jpjdta ) THEN |
---|
167 | IF(lwp) THEN |
---|
168 | WRITE(numout,*) |
---|
169 | WRITE(numout,*) 'problem with dimensions' |
---|
170 | WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta |
---|
171 | WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta |
---|
172 | ENDIF |
---|
173 | STOP 'dta_lim' |
---|
174 | ENDIF |
---|
175 | IF(lwp) WRITE(numout,*) itime,istep,zdate0,zdt,numice_dmp |
---|
176 | |
---|
177 | ENDIF |
---|
178 | |
---|
179 | |
---|
180 | ! 2. Read monthly file |
---|
181 | ! ------------------- |
---|
182 | |
---|
183 | IF( ( kt == nit000 ) .OR. imois /= nice1 ) THEN |
---|
184 | |
---|
185 | ! Calendar computation |
---|
186 | |
---|
187 | nice1 = imois ! first file record used |
---|
188 | nice2 = nice1 + 1 ! last file record used |
---|
189 | nice1 = MOD( nice1, iman ) |
---|
190 | IF( nice1 == 0 ) nice1 = iman |
---|
191 | nice2 = MOD( nice2, iman ) |
---|
192 | IF( nice2 == 0 ) nice2 = iman |
---|
193 | IF(lwp) WRITE(numout,*) 'first record file used nice1 ', nice1 |
---|
194 | IF(lwp) WRITE(numout,*) 'last record file used nice2 ', nice2 |
---|
195 | |
---|
196 | ! Read monthly ice thickness Levitus |
---|
197 | |
---|
198 | CALL flinget( numice_dmp, 'icethic', jpidta, jpjdta, jpk, & |
---|
199 | & jpmois, nice1, nice1, mig(1), nlci, mjg(1), nlcj, hicif_data(1:nlci,1:nlcj,1) ) |
---|
200 | CALL flinget( numice_dmp, 'icethic', jpidta, jpjdta, jpk, & |
---|
201 | & jpmois, nice2, nice2, mig(1), nlci, mjg(1), nlcj, hicif_data(1:nlci,1:nlcj,2) ) |
---|
202 | |
---|
203 | IF(lwp) WRITE(numout,*) |
---|
204 | IF(lwp) WRITE(numout,*) ' read ice thickness ok' |
---|
205 | IF(lwp) WRITE(numout,*) |
---|
206 | |
---|
207 | ! Read monthly ice thickness Levitus |
---|
208 | |
---|
209 | CALL flinget( numice_dmp, 'ileadfra', jpidta, jpjdta, jpk, & |
---|
210 | & jpmois, nice1, nice1, mig(1), nlci, mjg(1), nlcj, frld_data(1:nlci,1:nlcj,1) ) |
---|
211 | CALL flinget( numice_dmp, 'ileadfra', jpidta, jpjdta, jpk, & |
---|
212 | & jpmois, nice2, nice2, mig(1), nlci, mjg(1), nlcj, frld_data(1:nlci,1:nlcj,2) ) |
---|
213 | |
---|
214 | ! The fraction lead read in the file is in fact the |
---|
215 | ! ice concentration which is 1 - the fraction lead |
---|
216 | frld_data = 1 - frld_data |
---|
217 | |
---|
218 | IF(lwp) WRITE(numout,*) |
---|
219 | IF(lwp) WRITE(numout,*) ' read fraction lead ok' |
---|
220 | IF(lwp) WRITE(numout,*) |
---|
221 | |
---|
222 | |
---|
223 | IF(lwp) THEN |
---|
224 | WRITE(numout,*) ' Ice thickness month ', nice1,' and ', nice2 |
---|
225 | WRITE(numout,*) |
---|
226 | WRITE(numout,*) ' Ice thickness month = ', nice1 |
---|
227 | CALL prihre( hicif_data(1,1,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout ) |
---|
228 | WRITE(numout,*) |
---|
229 | WRITE(numout,*) ' Fraction lead months ', nice1,' and ', nice2 |
---|
230 | WRITE(numout,*) |
---|
231 | WRITE(numout,*) ' Fraction lead month = ', nice1 |
---|
232 | CALL prihre( frld_data(1,1,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout ) |
---|
233 | ENDIF |
---|
234 | |
---|
235 | ! 2. At every time step compute ice thickness and fraction lead data |
---|
236 | ! ------------------------------------------------------------------ |
---|
237 | |
---|
238 | zxy = FLOAT( nday + 15 - 30 * i15 ) / 30. |
---|
239 | hicif_dta(:,:) = (1.-zxy) * hicif_data(:,:,1) + zxy * hicif_data(:,:,2) |
---|
240 | frld_dta(:,:) = (1.-zxy) * frld_data(:,:,1) + zxy * frld_data(:,:,2) |
---|
241 | |
---|
242 | ENDIF |
---|
243 | |
---|
244 | |
---|
245 | END SUBROUTINE dta_lim |
---|
246 | |
---|
247 | #else |
---|
248 | !!---------------------------------------------------------------------- |
---|
249 | !! Default option Empty Module No ice damping |
---|
250 | !!---------------------------------------------------------------------- |
---|
251 | CONTAINS |
---|
252 | SUBROUTINE lim_dmp(kt) ! Dummy routine |
---|
253 | WRITE(*,*) 'lim_dmp: You should not see this print! error? ', kt |
---|
254 | END SUBROUTINE lim_dmp |
---|
255 | #endif |
---|
256 | |
---|
257 | !!====================================================================== |
---|
258 | |
---|
259 | END MODULE limdmp |
---|