@@ -178,159 +178,176 @@ subroutine readParams ( ncid )
178
178
logical :: readv ! has variable been read in or not
179
179
real (r8 ) :: tempr ! temporary to read in constant
180
180
character (len= 100 ) :: tString ! temp. var for reading
181
+ character (len= 20 ) :: param_pref ! parameter prefix
181
182
!- ----------------------------------------------------------------------
182
183
184
+ param_pref = ' mimics'
185
+ if (decomp_method == mimicsplus_decomp) then
186
+ param_pref = ' mimicsplus'
187
+ endif
188
+
183
189
! Read off of netcdf file
184
- tString= ' mimics_initial_Cstocks_depth '
190
+ tString= trim (param_pref) // ' _initial_Cstocks_depth '
185
191
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
186
192
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
187
193
params_inst% mimics_initial_Cstocks_depth= tempr
188
194
189
195
allocate (params_inst% mimics_initial_Cstocks(ndecomp_pools_max))
190
- tString= ' mimics_initial_Cstocks '
196
+ tString= trim (param_pref) // ' _initial_Cstocks '
191
197
call ncd_io(trim (tString), params_inst% mimics_initial_Cstocks(:), ' read' , ncid, readvar= readv)
192
198
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
193
199
194
200
allocate (params_inst% mimics_mge(ndecomp_pools_max))
195
- tString= ' mimics_mge '
201
+ tString= trim (param_pref) // ' _mge '
196
202
call ncd_io(trim (tString), params_inst% mimics_mge(:), ' read' , ncid, readvar= readv)
197
203
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
198
204
199
205
allocate (params_inst% mimics_vmod(ndecomp_pools_max))
200
- tString= ' mimics_vmod '
206
+ tString= trim (param_pref) // ' _vmod '
201
207
call ncd_io(trim (tString), params_inst% mimics_vmod(:), ' read' , ncid, readvar= readv)
202
208
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
203
209
204
210
allocate (params_inst% mimics_vslope(ndecomp_pools_max))
205
- tString= ' mimics_vslope '
211
+ tString= trim (param_pref) // ' _vslope '
206
212
call ncd_io(trim (tString), params_inst% mimics_vslope(:), ' read' , ncid, readvar= readv)
207
213
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
208
214
209
215
allocate (params_inst% mimics_vint(ndecomp_pools_max))
210
- tString= ' mimics_vint '
216
+ tString= trim (param_pref) // ' _vint '
211
217
call ncd_io(trim (tString), params_inst% mimics_vint(:), ' read' , ncid, readvar= readv)
212
218
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
213
219
214
220
allocate (params_inst% mimics_kmod(ndecomp_pools_max))
215
- tString= ' mimics_kmod '
221
+ tString= trim (param_pref) // ' _kmod '
216
222
call ncd_io(trim (tString), params_inst% mimics_kmod(:), ' read' , ncid, readvar= readv)
217
223
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
218
224
219
225
allocate (params_inst% mimics_kslope(ndecomp_pools_max))
220
- tString= ' mimics_kslope '
226
+ tString= trim (param_pref) // ' _kslope '
221
227
call ncd_io(trim (tString), params_inst% mimics_kslope(:), ' read' , ncid, readvar= readv)
222
228
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
223
229
224
230
allocate (params_inst% mimics_kint(ndecomp_pools_max))
225
- tString= ' mimics_kint '
231
+ tString= trim (param_pref) // ' _kint '
226
232
call ncd_io(trim (tString), params_inst% mimics_kint(:), ' read' , ncid, readvar= readv)
227
233
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
228
234
229
235
allocate (params_inst% mimics_p_scalar(2 ))
230
- tString= ' mimics_p_scalar '
236
+ tString= trim (param_pref) // ' _p_scalar '
231
237
call ncd_io(trim (tString), params_inst% mimics_p_scalar(:), ' read' , ncid, readvar= readv)
232
238
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
233
239
234
240
allocate (params_inst% mimics_desorp(2 ))
235
- tString= ' mimics_desorp '
241
+ tString= trim (param_pref) // ' _desorp '
236
242
call ncd_io(trim (tString), params_inst% mimics_desorp(:), ' read' , ncid, readvar= readv)
237
243
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
238
244
239
245
allocate (params_inst% mimics_fphys_r(2 ))
240
- tString= ' mimics_fphys_r '
246
+ tString= trim (param_pref) // ' _fphys_r '
241
247
call ncd_io(trim (tString), params_inst% mimics_fphys_r(:), ' read' , ncid, readvar= readv)
242
248
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
243
249
244
250
allocate (params_inst% mimics_fphys_k(2 ))
245
- tString= ' mimics_fphys_k '
251
+ tString= trim (param_pref) // ' _fphys_k '
246
252
call ncd_io(trim (tString), params_inst% mimics_fphys_k(:), ' read' , ncid, readvar= readv)
247
253
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
248
254
249
255
allocate (params_inst% mimics_fmet(4 ))
250
- tString= ' mimics_fmet '
256
+ tString= trim (param_pref) // ' _fmet '
251
257
call ncd_io(trim (tString), params_inst% mimics_fmet(:), ' read' , ncid, readvar= readv)
252
258
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
253
259
254
260
allocate (params_inst% mimics_fchem_r(2 ))
255
- tString= ' mimics_fchem_r '
261
+ tString= trim (param_pref) // ' _fchem_r '
256
262
call ncd_io(trim (tString), params_inst% mimics_fchem_r(:), ' read' , ncid, readvar= readv)
257
263
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
258
264
259
265
allocate (params_inst% mimics_fchem_k(2 ))
260
- tString= ' mimics_fchem_k '
266
+ tString= trim (param_pref) // ' _fchem_k '
261
267
call ncd_io(trim (tString), params_inst% mimics_fchem_k(:), ' read' , ncid, readvar= readv)
262
268
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
263
269
264
270
allocate (params_inst% mimics_tau_r(2 ))
265
- tString= ' mimics_tau_r '
271
+ tString= trim (param_pref) // ' _tau_r '
266
272
call ncd_io(trim (tString), params_inst% mimics_tau_r(:), ' read' , ncid, readvar= readv)
267
273
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
268
274
269
275
allocate (params_inst% mimics_tau_k(2 ))
270
- tString= ' mimics_tau_k '
276
+ tString= trim (param_pref) // ' _tau_k '
271
277
call ncd_io(trim (tString), params_inst% mimics_tau_k(:), ' read' , ncid, readvar= readv)
272
278
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
273
279
274
- tString= ' mimics_nue_into_mic '
280
+ tString= trim (param_pref) // ' _nue_into_mic '
275
281
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
276
282
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
277
283
params_inst% mimics_nue_into_mic = tempr
278
284
279
- tString= ' mimics_tau_mod_factor '
285
+ tString= trim (param_pref) // ' _tau_mod_factor '
280
286
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
281
287
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
282
288
params_inst% mimics_tau_mod_factor = tempr
283
289
284
- tString= ' mimics_tau_mod_min '
290
+ tString= trim (param_pref) // ' _tau_mod_min '
285
291
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
286
292
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
287
293
params_inst% mimics_tau_mod_min = tempr
288
294
289
- tString= ' mimics_tau_mod_max '
295
+ tString= trim (param_pref) // ' _tau_mod_max '
290
296
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
291
297
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
292
298
params_inst% mimics_tau_mod_max = tempr
293
299
294
- tString= ' mimics_ko_r '
300
+ tString= trim (param_pref) // ' _ko_r '
295
301
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
296
302
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
297
303
params_inst% mimics_ko_r = tempr
298
304
299
- tString= ' mimics_ko_k '
305
+ tString= trim (param_pref) // ' _ko_k '
300
306
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
301
307
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
302
308
params_inst% mimics_ko_k = tempr
303
309
304
- tString= ' mimics_densdep '
310
+ tString= trim (param_pref) // ' _densdep '
305
311
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
306
312
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
307
313
params_inst% mimics_densdep = tempr
308
314
309
- tString= ' mimics_desorpQ10 '
315
+ tString= trim (param_pref) // ' _desorpQ10 '
310
316
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
311
317
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
312
318
params_inst% mimics_desorpQ10 = tempr
313
319
314
- tString= ' mimics_t_soi_ref '
320
+ tString= trim (param_pref) // ' _t_soi_ref '
315
321
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
316
322
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
317
323
params_inst% mimics_t_soi_ref = tempr
318
324
319
- tString= ' mimics_cn_mod_num '
325
+ tString= trim (param_pref) // ' _cn_mod_num '
320
326
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
321
327
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
322
328
params_inst% mimics_cn_mod_num = tempr
323
329
324
- tString= ' mimics_cn_r '
330
+ tString= trim (param_pref) // ' _cn_r '
325
331
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
326
332
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
327
333
params_inst% mimics_cn_r = tempr
328
334
329
- tString= ' mimics_cn_k '
335
+ tString= trim (param_pref) // ' _cn_k '
330
336
call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
331
337
if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
332
338
params_inst% mimics_cn_k = tempr
333
339
340
+ ! Parameters specific for mimicsplus / mimics parameters that have updated values in mimicsplus
341
+
342
+ if (decomp_method == mimicsplus_decomp) then
343
+
344
+ tString= ' name_parameter'
345
+ call ncd_io(trim (tString), tempr, ' read' , ncid, readvar= readv)
346
+ if ( .not. readv ) call endrun(msg= trim (errCode)// trim (tString)// errMsg(sourcefile, __LINE__))
347
+ params_inst% name_parameter = tempr
348
+
349
+ end if
350
+
334
351
end subroutine readParams
335
352
336
353
!- ----------------------------------------------------------------------
0 commit comments