SCALE-RM
mod_admin_versioncheck.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
12  !-----------------------------------------------------------------------------
13  !
14  !++ used modules
15  !
16  use scale_precision
17  use scale_io
18  use scale_prof
19  !-----------------------------------------------------------------------------
20  implicit none
21  private
22  !-----------------------------------------------------------------------------
23  !
24  !++ Public procedure
25  !
26  public :: admin_versioncheck
27 
28  !-----------------------------------------------------------------------------
29  !
30  !++ Public parameters & variables
31  !
32  !-----------------------------------------------------------------------------
33  !
34  !++ Private procedure
35  !
36  !-----------------------------------------------------------------------------
37  !
38  !++ Private parameters & variables
39  !
40  !-----------------------------------------------------------------------------
41 contains
42  !-----------------------------------------------------------------------------
44  subroutine admin_versioncheck
45  use scale_prc, only: &
46  prc_abort
47  implicit none
48 
49  logical :: dummy
50 
51  ! 5.2 to 5.3
52  namelist / param_time / dummy
53  namelist / param_prc / dummy
54  namelist / param_comm / dummy
55  namelist / param_nest / dummy
56 
57  namelist / param_fileio / dummy
58  namelist / param_history / dummy
59  namelist / param_hist / dummy
60  namelist / histitem / dummy
61  namelist / extitem / dummy
62  namelist / monititem / dummy
63 
64  namelist / param_index / dummy
65  namelist / param_grid / dummy
66  namelist / param_land_index / dummy
67  namelist / param_land_grid / dummy
68  namelist / param_urban_index / dummy
69  namelist / param_urban_grid / dummy
70 
71  namelist / param_tracer / dummy
72  namelist / param_tracer_kajino13 / dummy
73 
74  namelist / param_mapproj / dummy
75  namelist / param_gtrans / dummy
76 
77  namelist / param_atmos_phy_mp_bin2bulk / dummy
78  namelist / param_bin / dummy
79  namelist / nm_mp_sn14_collection / dummy
80  namelist / nm_mp_sn14_condensation / dummy
81  namelist / nm_mp_sn14_init / dummy
82  namelist / nm_mp_sn14_nucleation / dummy
83  namelist / nm_mp_sn14_particles / dummy
84  namelist / param_atmos_phy_sf / dummy
85  namelist / param_atmos_phy_sf_bulkcoef / dummy
86  namelist / param_atmos_phy_tb_hybrid / dummy
87  namelist / param_atmos_phy_tb_mynn / dummy
88 
89  namelist / param_land_phy_slab / dummy
90  namelist / param_land_sfc_slab / dummy
91  namelist / param_land_sfc_thin_slab / dummy
92  namelist / param_land_sfc_thick_slab / dummy
93 
94  namelist / param_ocean_phy_slab / dummy
95  namelist / param_ocean_phy_file / dummy
96  namelist / param_roughness / dummy
97  namelist / param_roughness_miller92 / dummy
98  namelist / param_roughness_moon07 / dummy
99 
100  namelist / param_urban_phy_slc / dummy
101 
102  namelist / param_sbmaero / dummy
103  namelist / param_mkinit_interporation / dummy
104 
105 
106  ! 5.3 to 5.4
107  namelist / param_topo / dummy
108 
109 
110  logical :: stop4error
111  integer :: ierr
112  !---------------------------------------------------------------------------
113 
114  log_newline
115  log_info("ADMIN_versioncheck",*) 'Check version'
116 
117  stop4error = .false.
118 
119 
120  ! 5.2 to 5.3
121 
122  rewind(io_fid_conf)
123  read(io_fid_conf,nml=param_prc,iostat=ierr)
124  if ( ierr >= 0 ) then !--- exists
125  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_PRC is found.'
126  log_warn_cont(*) '=> You expected to use PARAM_PRC_CARTESC?'
127  stop4error = .true.
128  endif
129 
130  rewind(io_fid_conf)
131  read(io_fid_conf,nml=param_comm,iostat=ierr)
132  if ( ierr >= 0 ) then !--- exists
133  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_COMM is found.'
134  log_warn_cont(*) '=> You expected to use PARAM_COMM_CARTESC?'
135  stop4error = .true.
136  endif
137 
138  rewind(io_fid_conf)
139  read(io_fid_conf,nml=param_nest,iostat=ierr)
140  if ( ierr >= 0 ) then !--- exists
141  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_NEST is found.'
142  log_warn_cont(*) '=> You expected to use PARAM_COMM_CARTESC_NEST?'
143  stop4error = .true.
144  endif
145 
146  rewind(io_fid_conf)
147  read(io_fid_conf,nml=param_fileio,iostat=ierr)
148  if ( ierr >= 0 ) then !--- exists
149  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_FILEIO is found.'
150  log_warn_cont(*) '=> You expected to use PARAM_FILE_CARTESC?'
151  stop4error = .true.
152  endif
153 
154  rewind(io_fid_conf)
155  read(io_fid_conf,nml=param_history,iostat=ierr)
156  if ( ierr >= 0 ) then !--- exists
157  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_HISTORY is found.'
158  log_warn_cont(*) '=> You expected to use PARAM_FILE_HISTORY?'
159  stop4error = .true.
160  endif
161 
162  rewind(io_fid_conf)
163  read(io_fid_conf,nml=param_hist,iostat=ierr)
164  if ( ierr >= 0 ) then !--- exists
165  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_HIST is found.'
166  log_warn_cont(*) '=> You expected to use PARAM_FILE_HISTORY_CARTESC?'
167  stop4error = .true.
168  endif
169 
170  rewind(io_fid_conf)
171  read(io_fid_conf,nml=histitem,iostat=ierr)
172  if ( ierr >= 0 ) then !--- exists
173  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist HISTITEM is found.'
174  log_warn_cont(*) '=> You expected to use HISTORY_ITEM?'
175  stop4error = .true.
176  endif
177 
178  rewind(io_fid_conf)
179  read(io_fid_conf,nml=extitem,iostat=ierr)
180  if ( ierr >= 0 ) then !--- exists
181  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist EXTITEM is found.'
182  log_warn_cont(*) '=> You expected to use EXTERNAL_ITEM?'
183  stop4error = .true.
184  endif
185 
186  rewind(io_fid_conf)
187  read(io_fid_conf,nml=monititem,iostat=ierr)
188  if ( ierr >= 0 ) then !--- exists
189  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist MONITITEM is found.'
190  log_warn_cont(*) '=> You expected to use MONITOR_ITEM?'
191  stop4error = .true.
192  endif
193 
194  rewind(io_fid_conf)
195  read(io_fid_conf,nml=param_index,iostat=ierr)
196  if ( ierr >= 0 ) then !--- exists
197  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_INDEX is found.'
198  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_GRID_CARTESC_INDEX?'
199  stop4error = .true.
200  endif
201 
202  rewind(io_fid_conf)
203  read(io_fid_conf,nml=param_grid,iostat=ierr)
204  if ( ierr >= 0 ) then !--- exists
205  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_GRID is found.'
206  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_GRID_CARTESC?'
207  stop4error = .true.
208  endif
209 
210  rewind(io_fid_conf)
211  read(io_fid_conf,nml=param_land_index,iostat=ierr)
212  if ( ierr >= 0 ) then !--- exists
213  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_LAND_INDEX is found.'
214  log_warn_cont(*) '=> You expected to use PARAM_LAND_GRID_CARTESC_INDEX?'
215  stop4error = .true.
216  endif
217 
218  rewind(io_fid_conf)
219  read(io_fid_conf,nml=param_land_grid,iostat=ierr)
220  if ( ierr >= 0 ) then !--- exists
221  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_LAND_GRID is found.'
222  log_warn_cont(*) '=> You expected to use PARAM_LAND_GRID_CARTESC?'
223  stop4error = .true.
224  endif
225 
226  rewind(io_fid_conf)
227  read(io_fid_conf,nml=param_urban_index,iostat=ierr)
228  if ( ierr >= 0 ) then !--- exists
229  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_URBAN_INDEX is found.'
230  log_warn_cont(*) '=> You expected to use PARAM_URBAN_GRID_CARTESC_INDEX?'
231  stop4error = .true.
232  endif
233 
234  rewind(io_fid_conf)
235  read(io_fid_conf,nml=param_urban_grid,iostat=ierr)
236  if ( ierr >= 0 ) then !--- exists
237  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_URBAN_GRID is found.'
238  log_warn_cont(*) '=> You expected to use PARAM_URBAN_GRID_CARTESC?'
239  stop4error = .true.
240  endif
241 
242  rewind(io_fid_conf)
243  read(io_fid_conf,nml=param_tracer,iostat=ierr)
244  if ( ierr >= 0 ) then !--- exists
245  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_TRACER is found.'
246  stop4error = .true.
247  endif
248 
249  rewind(io_fid_conf)
250  read(io_fid_conf,nml=param_tracer_kajino13,iostat=ierr)
251  if ( ierr >= 0 ) then !--- exists
252  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_TRACER_KAJINO13 is found.'
253  stop4error = .true.
254  endif
255 
256  rewind(io_fid_conf)
257  read(io_fid_conf,nml=param_mapproj,iostat=ierr)
258  if ( ierr >= 0 ) then !--- exists
259  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_MAPPROJ is found.'
260  log_warn_cont(*) '=> You expected to use PARAM_MAPPROJECTION?'
261  stop4error = .true.
262  endif
263 
264  rewind(io_fid_conf)
265  read(io_fid_conf,nml=param_gtrans,iostat=ierr)
266  if ( ierr >= 0 ) then !--- exists
267  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_GTRANS is found.'
268  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_GRID_CARTESC_METRIC?'
269  stop4error = .true.
270  endif
271 
272  rewind(io_fid_conf)
273  read(io_fid_conf,nml=param_atmos_phy_mp_bin2bulk,iostat=ierr)
274  if ( ierr >= 0 ) then !--- exists
275  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_ATMOS_PHY_MP_BIN2BULK is found.'
276  stop4error = .true.
277  endif
278 
279  rewind(io_fid_conf)
280  read(io_fid_conf,nml=param_bin,iostat=ierr)
281  if ( ierr >= 0 ) then !--- exists
282  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_BIN is found.'
283  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_PHY_MP_SUZUKI10_bin?'
284  stop4error = .true.
285  endif
286 
287  rewind(io_fid_conf)
288  read(io_fid_conf,nml=nm_mp_sn14_collection,iostat=ierr)
289  if ( ierr >= 0 ) then !--- exists
290  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist NM_MP_SN14_COLLECTION is found.'
291  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_PHY_MP_SN14_collection?'
292  stop4error = .true.
293  endif
294 
295  rewind(io_fid_conf)
296  read(io_fid_conf,nml=nm_mp_sn14_condensation,iostat=ierr)
297  if ( ierr >= 0 ) then !--- exists
298  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist NM_MP_SN14_CONDENSATION is found.'
299  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_PHY_MP_SN14_condensation?'
300  stop4error = .true.
301  endif
302 
303  rewind(io_fid_conf)
304  read(io_fid_conf,nml=nm_mp_sn14_init,iostat=ierr)
305  if ( ierr >= 0 ) then !--- exists
306  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist NM_MP_SN14_INIT is found.'
307  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_PHY_MP_SN14_init?'
308  stop4error = .true.
309  endif
310 
311  rewind(io_fid_conf)
312  read(io_fid_conf,nml=nm_mp_sn14_nucleation,iostat=ierr)
313  if ( ierr >= 0 ) then !--- exists
314  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist NM_MP_SN14_NUCLEATION is found.'
315  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_PHY_MP_SN14_nucleation?'
316  stop4error = .true.
317  endif
318 
319  rewind(io_fid_conf)
320  read(io_fid_conf,nml=nm_mp_sn14_particles,iostat=ierr)
321  if ( ierr >= 0 ) then !--- exists
322  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist NM_MP_SN14_PARTICLES is found.'
323  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_PHY_MP_SN14_particles?'
324  stop4error = .true.
325  endif
326 
327  rewind(io_fid_conf)
328  read(io_fid_conf,nml=param_atmos_phy_sf,iostat=ierr)
329  if ( ierr >= 0 ) then !--- exists
330  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_ATMOS_PHY_SF is found.'
331  log_warn_cont(*) '=> You expected to use PARAM_ATMOS_PHY_SF_BULK?'
332  stop4error = .true.
333  endif
334 
335  rewind(io_fid_conf)
336  read(io_fid_conf,nml=param_atmos_phy_sf_bulkcoef,iostat=ierr)
337  if ( ierr >= 0 ) then !--- exists
338  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_ATMOS_PHY_SF_BULKCOEF is found.'
339  stop4error = .true.
340  endif
341 
342  rewind(io_fid_conf)
343  read(io_fid_conf,nml=param_atmos_phy_tb_hybrid,iostat=ierr)
344  if ( ierr >= 0 ) then !--- exists
345  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_ATMOS_PHY_TB_HYBRID is found.'
346  stop4error = .true.
347  endif
348 
349  rewind(io_fid_conf)
350  read(io_fid_conf,nml=param_atmos_phy_tb_mynn,iostat=ierr)
351  if ( ierr >= 0 ) then !--- exists
352  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_ATMOS_PHY_TB_MYNN is found.'
353  stop4error = .true.
354  endif
355 
356  rewind(io_fid_conf)
357  read(io_fid_conf,nml=param_land_phy_slab,iostat=ierr)
358  if ( ierr >= 0 ) then !--- exists
359  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_LAND_PHY_SLAB is found.'
360  log_warn_cont(*) '=> You expected to use PARAM_LAND_DYN_BUCKET?'
361  stop4error = .true.
362  endif
363 
364  rewind(io_fid_conf)
365  read(io_fid_conf,nml=param_land_sfc_slab,iostat=ierr)
366  if ( ierr >= 0 ) then !--- exists
367  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_LAND_SFC_SLAB is found.'
368  log_warn_cont(*) '=> You expected to use PARAM_LAND_SFC_SKIN?'
369  stop4error = .true.
370  endif
371 
372  rewind(io_fid_conf)
373  read(io_fid_conf,nml=param_land_sfc_thin_slab,iostat=ierr)
374  if ( ierr >= 0 ) then !--- exists
375  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_LAND_SFC_THIN_SLAB is found.'
376  log_warn_cont(*) '=> You expected to use PARAM_LAND_SFC_SKIN?'
377  stop4error = .true.
378  endif
379 
380  rewind(io_fid_conf)
381  read(io_fid_conf,nml=param_land_sfc_thick_slab,iostat=ierr)
382  if ( ierr >= 0 ) then !--- exists
383  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_LAND_SFC_THICK_SLAB is found.'
384  log_warn_cont(*) '=> You expected to use PARAM_LAND_SFC_FIXED_TEMP?'
385  stop4error = .true.
386  endif
387 
388  rewind(io_fid_conf)
389  read(io_fid_conf,nml=param_ocean_phy_slab,iostat=ierr)
390  if ( ierr >= 0 ) then !--- exists
391  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_OCEAN_PHY_SLAB is found.'
392  log_warn_cont(*) '=> You expected to use PARAM_OCEAN_DYN_SLAB?'
393  stop4error = .true.
394  endif
395 
396  rewind(io_fid_conf)
397  read(io_fid_conf,nml=param_ocean_phy_file,iostat=ierr)
398  if ( ierr >= 0 ) then !--- exists
399  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_OCEAN_PHY_FILE is found.'
400  log_warn_cont(*) '=> You expected to use PARAM_OCEAN_DYN_SLAB?'
401  stop4error = .true.
402  endif
403 
404  rewind(io_fid_conf)
405  read(io_fid_conf,nml=param_roughness,iostat=ierr)
406  if ( ierr >= 0 ) then !--- exists
407  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_ROUGHNESS is found.'
408  log_warn_cont(*) '=> You expected to use PARAM_OCEAN_ROUGHNESS?'
409  stop4error = .true.
410  endif
411 
412  rewind(io_fid_conf)
413  read(io_fid_conf,nml=param_roughness_miller92,iostat=ierr)
414  if ( ierr >= 0 ) then !--- exists
415  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_ROUGHNESS_MILLER92 is found.'
416  log_warn_cont(*) '=> You expected to use PARAM_OCEAN_PHY_ROUGHNESS_MILLER92?'
417  stop4error = .true.
418  endif
419 
420  rewind(io_fid_conf)
421  read(io_fid_conf,nml=param_roughness_moon07,iostat=ierr)
422  if ( ierr >= 0 ) then !--- exists
423  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_ROUGHNESS_MOON07 is found.'
424  log_warn_cont(*) '=> You expected to use PARAM_OCEAN_PHY_ROUGHNESS_MOON07?'
425  stop4error = .true.
426  endif
427 
428  rewind(io_fid_conf)
429  read(io_fid_conf,nml=param_urban_phy_slc,iostat=ierr)
430  if ( ierr >= 0 ) then !--- exists
431  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_URBAN_PHY_SLC is found.'
432  log_warn_cont(*) '=> You expected to use PARAM_URBAN_DYN_KUSAKA01?'
433  stop4error = .true.
434  endif
435 
436  rewind(io_fid_conf)
437  read(io_fid_conf,nml=param_sbmaero,iostat=ierr)
438  if ( ierr >= 0 ) then !--- exists
439  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_SBMAERO is found.'
440  stop4error = .true.
441  endif
442 
443  rewind(io_fid_conf)
444  read(io_fid_conf,nml=param_mkinit_interporation,iostat=ierr)
445  if ( ierr >= 0 ) then !--- exists
446  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_MKINIT_INTERPORATION is found.'
447  stop4error = .true.
448  endif
449 
450 
451 
452  ! 5.3 to 5.4
453 
454  rewind(io_fid_conf)
455  read(io_fid_conf,nml=param_topo,iostat=ierr)
456  if ( ierr >= 0 ) then !--- exists
457  log_warn("ADMIN_versioncheck",*) 'Obsolete namelist PARAM_TOPO is found.'
458  stop4error = .true.
459  endif
460 
461 
462 
463 
464  if ( stop4error ) then !--- exists
465  log_error("ADMIN_versioncheck",*) 'Obsolete namelist found. Check the log file.'
466  call prc_abort
467  else
468  log_info("ADMIN_versioncheck",*) 'Obsolete namelists were not found. OK.'
469  endif
470 
471 
472  return
473  end subroutine admin_versioncheck
474 
475 end module mod_admin_versioncheck
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:342
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_io
module STDIO
Definition: scale_io.F90:10
scale_prof
module profiler
Definition: scale_prof.F90:11
mod_admin_versioncheck
module ADMIN VERSIONCHECK
Definition: mod_admin_versioncheck.F90:11
mod_admin_versioncheck::admin_versioncheck
subroutine, public admin_versioncheck
Setup.
Definition: mod_admin_versioncheck.F90:45
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:56