PageRenderTime 48ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 1ms

/WPS/geogrid/src/source_data_module.F

http://github.com/jbeezley/wrf-fire
FORTRAN Legacy | 3622 lines | 2434 code | 531 blank | 657 comment | 712 complexity | 3a35ef6a6616356155eb80c46f76cdc4 MD5 | raw file
Possible License(s): AGPL-1.0

Large files files are truncated, but you can click here to view the full file

  1. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  2. ! Module: source_data_module
  3. !
  4. ! Description:
  5. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  6. module source_data_module
  7. use hash_module
  8. use list_module
  9. use module_debug
  10. use misc_definitions_module
  11. ! Parameters
  12. integer, parameter :: RETURN_LANDMASK = 0, &
  13. RETURN_DOMCAT_LM = 1, &
  14. RETURN_DFDX_LM = 2, &
  15. RETURN_DFDY_LM = 3, &
  16. RETURN_FIELDNAME = 4, &
  17. RETURN_DOMCAT = 5, &
  18. RETURN_DFDX = 6, &
  19. RETURN_DFDY = 7
  20. integer, parameter :: MAX_LANDMASK_CATEGORIES = 100
  21. ! Module variables
  22. integer :: num_entries
  23. integer :: next_field = 1
  24. integer :: output_field_state = RETURN_LANDMASK
  25. integer, pointer, dimension(:) :: source_proj, source_wordsize, source_endian, source_fieldtype, &
  26. source_dest_fieldtype, source_priority, source_tile_x, source_tile_y, &
  27. source_tile_z, source_tile_z_start, source_tile_z_end, source_tile_bdr, &
  28. source_category_min, source_category_max, source_smooth_option, &
  29. source_smooth_passes, source_output_stagger, source_row_order
  30. integer :: source_iswater, source_islake, source_isice, source_isurban, source_isoilwater
  31. real, pointer, dimension(:) :: source_dx, source_dy, source_known_x, source_known_y, &
  32. source_known_lat, source_known_lon, source_masked, source_truelat1, source_truelat2, &
  33. source_stdlon, source_scale_factor, source_missing_value, source_fill_missing
  34. character (len=128), pointer, dimension(:) :: source_fieldname, source_path, source_interp_string, &
  35. source_dominant_category, source_dominant_only, source_dfdx, source_dfdy, &
  36. source_z_dim_name, source_units, source_descr, source_geotiff_file
  37. character (len=128) :: source_mminlu
  38. logical, pointer, dimension(:) :: is_proj, is_wordsize, is_endian, is_fieldtype, &
  39. is_dest_fieldtype, is_priority, is_tile_x, is_tile_y, is_tile_z, &
  40. is_tile_z_start, is_tile_z_end, is_tile_bdr, is_category_min, &
  41. is_category_max, is_masked, &
  42. is_dx, is_dy, is_known_x, is_known_y, &
  43. is_known_lat, is_known_lon, is_truelat1, is_truelat2, is_stdlon, &
  44. is_scale_factor, is_fieldname, is_path, is_dominant_category, &
  45. is_dominant_only, is_dfdx, is_dfdy, is_z_dim_name, &
  46. is_smooth_option, is_smooth_passes, is_signed, is_missing_value, &
  47. is_fill_missing, is_halt_missing, is_output_stagger, is_row_order, &
  48. is_units, is_descr, is_subgrid, is_geotiff
  49. type (list), pointer, dimension(:) :: source_res_path, source_interp_option, source_landmask_land, &
  50. source_landmask_water
  51. type (hashtable) :: bad_files ! Track which files produce errors when we try to open them
  52. type (hashtable) :: duplicate_fnames ! Remember which output fields we have returned
  53. contains
  54. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  55. ! Name: get_datalist
  56. !
  57. ! Purpose:
  58. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  59. subroutine get_datalist()
  60. use gridinfo_module
  61. use stringutil
  62. implicit none
  63. ! Parameters
  64. integer, parameter :: BUFSIZE = 256
  65. ! Local variables
  66. integer :: nparams, idx, eos, ispace, comma, i, j, funit
  67. logical :: have_specification, is_used
  68. character (len=128) :: res_string, path_string, interp_string, landmask_string
  69. character (len=BUFSIZE) :: buffer
  70. nparams = 0
  71. num_entries = 0
  72. do funit=10,100
  73. inquire(unit=funit, opened=is_used)
  74. if (.not. is_used) exit
  75. end do
  76. open(funit,file=trim(opt_geogrid_tbl_path)//'GEOGRID.TBL',form='formatted',status='old',err=1000)
  77. !
  78. ! We will first go through the file to determine how many field
  79. ! specifications there are
  80. !
  81. 10 read(funit,'(a)',end=20,err=1001) buffer
  82. call despace(buffer)
  83. ! Is this line a comment?
  84. if (buffer(1:1) == '#') then
  85. ! Are we beginning a new field specification?
  86. else if (index(buffer,'=====') /= 0) then
  87. if (nparams > 0) num_entries = num_entries + 1
  88. nparams = 0
  89. else
  90. eos = index(buffer,'#')
  91. if (eos /= 0) buffer(eos:BUFSIZE) = ' '
  92. ! Does this line contain at least one parameter specification?
  93. if (index(buffer,'=') /= 0) then
  94. nparams = nparams + 1
  95. end if
  96. end if
  97. go to 10
  98. 20 rewind(funit)
  99. ! In case the last entry ended without a ======== line
  100. if (nparams > 0) num_entries = num_entries + 1
  101. call mprintf(.true.,STDOUT,'Parsed %i entries in GEOGRID.TBL', i1=num_entries)
  102. !
  103. ! Now that we know how many fields the user has specified, allocate
  104. ! the properly sized arrays
  105. !
  106. allocate(source_wordsize(num_entries))
  107. allocate(source_endian(num_entries))
  108. allocate(source_fieldtype(num_entries))
  109. allocate(source_dest_fieldtype(num_entries))
  110. allocate(source_proj(num_entries))
  111. allocate(source_priority(num_entries))
  112. allocate(source_dx(num_entries))
  113. allocate(source_dy(num_entries))
  114. allocate(source_known_x(num_entries))
  115. allocate(source_known_y(num_entries))
  116. allocate(source_known_lat(num_entries))
  117. allocate(source_known_lon(num_entries))
  118. allocate(source_truelat1(num_entries))
  119. allocate(source_truelat2(num_entries))
  120. allocate(source_stdlon(num_entries))
  121. allocate(source_fieldname(num_entries))
  122. allocate(source_path(num_entries))
  123. allocate(source_interp_string(num_entries))
  124. allocate(source_tile_x(num_entries))
  125. allocate(source_tile_y(num_entries))
  126. allocate(source_tile_z(num_entries))
  127. allocate(source_tile_z_start(num_entries))
  128. allocate(source_tile_z_end(num_entries))
  129. allocate(source_category_min(num_entries))
  130. allocate(source_category_max(num_entries))
  131. allocate(source_tile_bdr(num_entries))
  132. allocate(source_masked(num_entries))
  133. allocate(source_output_stagger(num_entries))
  134. allocate(source_row_order(num_entries))
  135. allocate(source_dominant_category(num_entries))
  136. allocate(source_dominant_only(num_entries))
  137. allocate(source_dfdx(num_entries))
  138. allocate(source_dfdy(num_entries))
  139. allocate(source_scale_factor(num_entries))
  140. allocate(source_z_dim_name(num_entries))
  141. allocate(source_units(num_entries))
  142. allocate(source_descr(num_entries))
  143. allocate(source_smooth_option(num_entries))
  144. allocate(source_smooth_passes(num_entries))
  145. allocate(source_missing_value(num_entries))
  146. allocate(source_fill_missing(num_entries))
  147. allocate(source_res_path(num_entries))
  148. allocate(source_interp_option(num_entries))
  149. allocate(source_landmask_land(num_entries))
  150. allocate(source_landmask_water(num_entries))
  151. allocate(source_geotiff_file(num_entries))
  152. do i=1,num_entries
  153. call list_init(source_res_path(i))
  154. call list_init(source_interp_option(i))
  155. call list_init(source_landmask_land(i))
  156. call list_init(source_landmask_water(i))
  157. end do
  158. allocate(is_wordsize(num_entries))
  159. allocate(is_endian(num_entries))
  160. allocate(is_fieldtype(num_entries))
  161. allocate(is_dest_fieldtype(num_entries))
  162. allocate(is_proj(num_entries))
  163. allocate(is_priority(num_entries))
  164. allocate(is_dx(num_entries))
  165. allocate(is_dy(num_entries))
  166. allocate(is_known_x(num_entries))
  167. allocate(is_known_y(num_entries))
  168. allocate(is_known_lat(num_entries))
  169. allocate(is_known_lon(num_entries))
  170. allocate(is_truelat1(num_entries))
  171. allocate(is_truelat2(num_entries))
  172. allocate(is_stdlon(num_entries))
  173. allocate(is_fieldname(num_entries))
  174. allocate(is_path(num_entries))
  175. allocate(is_tile_x(num_entries))
  176. allocate(is_tile_y(num_entries))
  177. allocate(is_tile_z(num_entries))
  178. allocate(is_tile_z_start(num_entries))
  179. allocate(is_tile_z_end(num_entries))
  180. allocate(is_category_min(num_entries))
  181. allocate(is_category_max(num_entries))
  182. allocate(is_tile_bdr(num_entries))
  183. allocate(is_masked(num_entries))
  184. allocate(is_halt_missing(num_entries))
  185. allocate(is_output_stagger(num_entries))
  186. allocate(is_row_order(num_entries))
  187. allocate(is_dominant_category(num_entries))
  188. allocate(is_dominant_only(num_entries))
  189. allocate(is_dfdx(num_entries))
  190. allocate(is_dfdy(num_entries))
  191. allocate(is_scale_factor(num_entries))
  192. allocate(is_z_dim_name(num_entries))
  193. allocate(is_units(num_entries))
  194. allocate(is_descr(num_entries))
  195. allocate(is_smooth_option(num_entries))
  196. allocate(is_smooth_passes(num_entries))
  197. allocate(is_signed(num_entries))
  198. allocate(is_missing_value(num_entries))
  199. allocate(is_fill_missing(num_entries))
  200. allocate(is_subgrid(num_entries))
  201. allocate(is_geotiff(num_entries))
  202. source_wordsize=0
  203. source_endian=0
  204. source_fieldtype=0
  205. source_dest_fieldtype=0
  206. source_proj=0
  207. source_priority=0
  208. source_dx=0
  209. source_dy=0
  210. source_known_x=0
  211. source_known_y=0
  212. source_known_lat=0
  213. source_known_lon=0
  214. source_truelat1=0
  215. source_truelat2=0
  216. source_stdlon=0
  217. source_fieldname=' '
  218. source_path=' '
  219. source_interp_string=' '
  220. source_tile_x=0
  221. source_tile_y=0
  222. source_tile_z=0
  223. source_tile_z_start=0
  224. source_tile_z_end=0
  225. source_category_min=0
  226. source_category_max=0
  227. source_tile_bdr=0
  228. source_masked=0
  229. source_output_stagger=0
  230. source_row_order=0
  231. source_dominant_category=' '
  232. source_dominant_only=' '
  233. source_dfdx=' '
  234. source_dfdy=' '
  235. source_scale_factor=0
  236. source_z_dim_name=' '
  237. source_units=' '
  238. source_descr=' '
  239. source_smooth_option=0
  240. source_smooth_passes=0
  241. source_missing_value=0
  242. source_fill_missing=0
  243. is_wordsize=.false.
  244. is_endian=.false.
  245. is_fieldtype=.false.
  246. is_dest_fieldtype=.false.
  247. is_proj=.false.
  248. is_priority=.false.
  249. is_dx=.false.
  250. is_dy=.false.
  251. is_known_x=.false.
  252. is_known_y=.false.
  253. is_known_lat=.false.
  254. is_known_lon=.false.
  255. is_truelat1=.false.
  256. is_truelat2=.false.
  257. is_stdlon=.false.
  258. is_fieldname=.false.
  259. is_path=.false.
  260. is_tile_x=.false.
  261. is_tile_y=.false.
  262. is_tile_z=.false.
  263. is_tile_z_start=.false.
  264. is_tile_z_end=.false.
  265. is_category_min=.false.
  266. is_category_max=.false.
  267. is_tile_bdr=.false.
  268. is_masked=.false.
  269. is_halt_missing=.false.
  270. is_output_stagger=.false.
  271. is_row_order=.false.
  272. is_dominant_category=.false.
  273. is_dominant_only=.false.
  274. is_dfdx=.false.
  275. is_dfdy=.false.
  276. is_scale_factor=.false.
  277. is_z_dim_name=.false.
  278. is_units=.false.
  279. is_descr=.false.
  280. is_smooth_option=.false.
  281. is_smooth_passes=.false.
  282. is_signed=.false.
  283. is_missing_value=.false.
  284. is_fill_missing=.false.
  285. is_subgrid=.false.
  286. write(source_mminlu,'(a4)') 'USGS'
  287. source_iswater = 16
  288. source_islake = -1
  289. source_isice = 24
  290. source_isurban = 1
  291. source_isoilwater = 14
  292. !
  293. ! Actually read and save the specifications
  294. !
  295. nparams = 0
  296. i = 1
  297. 30 buffer = ' '
  298. read(funit,'(a)',end=40,err=1001) buffer
  299. call despace(buffer)
  300. ! Is this line a comment?
  301. if (buffer(1:1) == '#') then
  302. ! Do nothing.
  303. ! Are we beginning a new field specification?
  304. else if (index(buffer,'=====') /= 0) then !{
  305. if (nparams > 0) i = i + 1
  306. nparams = 0
  307. if (i <= num_entries) then
  308. !BUG: Are these initializations needed now that we've added initializations for
  309. ! all options after their initial allocation above?
  310. is_path(i) = .false.
  311. is_masked(i) = .false.
  312. is_halt_missing(i) = .false.
  313. is_output_stagger(i) = .false.
  314. is_dominant_category(i) = .false.
  315. is_dominant_only(i) = .false.
  316. is_dfdx(i) = .false.
  317. is_dfdy(i) = .false.
  318. is_dest_fieldtype(i) = .false.
  319. is_priority(i) = .false.
  320. is_z_dim_name(i) = .false.
  321. is_smooth_option(i) = .false.
  322. is_smooth_passes(i) = .false.
  323. is_fill_missing(i) = .false.
  324. is_subgrid(i) = .false.
  325. end if
  326. else
  327. ! Check whether the current line is a comment
  328. if (buffer(1:1) /= '#') then
  329. have_specification = .true.
  330. else
  331. have_specification = .false.
  332. end if
  333. ! If only part of the line is a comment, just turn the comment into spaces
  334. eos = index(buffer,'#')
  335. if (eos /= 0) buffer(eos:BUFSIZE) = ' '
  336. do while (have_specification) !{
  337. ! If this line has no semicolon, it may contain a single specification,
  338. ! so we set have_specification = .false. to prevent the line from being
  339. ! processed again and "pretend" that the last character was a semicolon
  340. eos = index(buffer,';')
  341. if (eos == 0) then
  342. have_specification = .false.
  343. eos = BUFSIZE
  344. end if
  345. idx = index(buffer(1:eos-1),'=')
  346. if (idx /= 0) then !{
  347. nparams = nparams + 1
  348. if (index('name',trim(buffer(1:idx-1))) /= 0) then
  349. ispace = idx+1
  350. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  351. ispace = ispace + 1
  352. end do
  353. is_fieldname(i) = .true.
  354. source_fieldname(i) = ' '
  355. source_fieldname(i)(1:ispace-idx) = buffer(idx+1:ispace-1)
  356. else if (index('priority',trim(buffer(1:idx-1))) /= 0) then
  357. is_priority(i) = .true.
  358. read(buffer(idx+1:eos-1),'(i10)') source_priority(i)
  359. else if (index('dest_type',trim(buffer(1:idx-1))) /= 0) then
  360. if (index('continuous',trim(buffer(idx+1:eos-1))) /= 0) then
  361. is_dest_fieldtype(i) = .true.
  362. source_dest_fieldtype(i) = CONTINUOUS
  363. else if (index('categorical',trim(buffer(idx+1:eos-1))) /= 0) then
  364. is_dest_fieldtype(i) = .true.
  365. source_dest_fieldtype(i) = CATEGORICAL
  366. end if
  367. else if (index('interp_option',trim(buffer(1:idx-1))) /= 0) then
  368. ispace = idx+1
  369. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  370. ispace = ispace + 1
  371. end do
  372. interp_string = ' '
  373. interp_string(1:ispace-idx-1) = buffer(idx+1:ispace-1)
  374. ispace = index(interp_string,':')
  375. if (ispace /= 0) then
  376. write(res_string,'(a)') interp_string(1:ispace-1)
  377. else
  378. res_string = 'default'
  379. end if
  380. write(interp_string,'(a)') trim(interp_string(ispace+1:128))
  381. if (list_search(source_interp_option(i), ckey=res_string, cvalue=interp_string)) then
  382. call mprintf(.true., WARN, &
  383. 'In GEOGRID.TBL entry %i, multiple interpolation methods are '// &
  384. 'given for resolution %s. %s will be used.', &
  385. i1=i, s1=trim(res_string), s2=trim(interp_string))
  386. else
  387. call list_insert(source_interp_option(i), ckey=res_string, cvalue=interp_string)
  388. end if
  389. else if (index('smooth_option',trim(buffer(1:idx-1))) /= 0) then
  390. if ((index('1-2-1',trim(buffer(idx+1:eos-1))) /= 0) .and. &
  391. (len_trim(buffer(idx+1:eos-1)) == len('1-2-1'))) then
  392. is_smooth_option(i) = .true.
  393. source_smooth_option(i) = ONETWOONE
  394. else if ((index('smth-desmth',trim(buffer(idx+1:eos-1))) /= 0) .and. &
  395. (len_trim(buffer(idx+1:eos-1)) == len('smth-desmth'))) then
  396. is_smooth_option(i) = .true.
  397. source_smooth_option(i) = SMTHDESMTH
  398. else if ((index('smth-desmth_special',trim(buffer(idx+1:eos-1))) /= 0) .and. &
  399. (len_trim(buffer(idx+1:eos-1)) == len('smth-desmth_special'))) then
  400. is_smooth_option(i) = .true.
  401. source_smooth_option(i) = SMTHDESMTH_SPECIAL
  402. end if
  403. else if (index('smooth_passes',trim(buffer(1:idx-1))) /= 0) then
  404. is_smooth_passes(i) = .true.
  405. read(buffer(idx+1:eos-1),'(i10)') source_smooth_passes(i)
  406. else if (index('rel_path',trim(buffer(1:idx-1))) /= 0) then
  407. ispace = idx+1
  408. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  409. ispace = ispace + 1
  410. end do
  411. path_string = ' '
  412. path_string(1:ispace-idx-1) = buffer(idx+1:ispace-1)
  413. if (path_string(ispace-idx-1:ispace-idx-1) /= '/') &
  414. path_string(ispace-idx:ispace-idx) = '/'
  415. if (path_string(1:1) == '/') then
  416. path_string(1:127) = path_string(2:128)
  417. path_string(128:128) = ' '
  418. end if
  419. ispace = index(path_string,':')
  420. if (ispace /= 0) then
  421. write(res_string,'(a)') path_string(1:ispace-1)
  422. else
  423. res_string = 'default'
  424. end if
  425. write(path_string,'(a)') trim(geog_data_path)//trim(path_string(ispace+1:128))
  426. if (list_search(source_res_path(i), ckey=res_string, cvalue=path_string)) then
  427. call mprintf(.true., WARN, &
  428. 'In GEOGRID.TBL entry %i, multiple paths are given for '// &
  429. 'resolution %s. %s will be used.', &
  430. i1=i, s1=trim(res_string), s2=trim(path_string))
  431. else
  432. call list_insert(source_res_path(i), ckey=res_string, cvalue=path_string)
  433. end if
  434. else if (index('abs_path',trim(buffer(1:idx-1))) /= 0) then
  435. ispace = idx+1
  436. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  437. ispace = ispace + 1
  438. end do
  439. path_string = ' '
  440. path_string(1:ispace-idx-1) = buffer(idx+1:ispace-1)
  441. if (path_string(ispace-idx-1:ispace-idx-1) /= '/') &
  442. path_string(ispace-idx:ispace-idx) = '/'
  443. ispace = index(path_string,':')
  444. if (ispace /= 0) then
  445. write(res_string,'(a)') path_string(1:ispace-1)
  446. else
  447. res_string = 'default'
  448. end if
  449. write(path_string,'(a)') trim(path_string(ispace+1:128))
  450. if (list_search(source_res_path(i), ckey=res_string, cvalue=path_string)) then
  451. call mprintf(.true., WARN, &
  452. 'In GEOGRID.TBL entry %i, multiple paths are given for '// &
  453. 'resolution %s. %s will be used.', &
  454. i1=i, s1=trim(res_string), s2=trim(path_string))
  455. else
  456. call list_insert(source_res_path(i), ckey=res_string, cvalue=path_string)
  457. end if
  458. else if (index('output_stagger',trim(buffer(1:idx-1))) /= 0) then
  459. if (index('M',trim(buffer(idx+1:eos-1))) /= 0) then
  460. is_output_stagger(i) = .true.
  461. source_output_stagger(i) = M
  462. else if (index('U',trim(buffer(idx+1:eos-1))) /= 0) then
  463. is_output_stagger(i) = .true.
  464. source_output_stagger(i) = U
  465. else if (index('V',trim(buffer(idx+1:eos-1))) /= 0) then
  466. is_output_stagger(i) = .true.
  467. source_output_stagger(i) = V
  468. else if (index('HH',trim(buffer(idx+1:eos-1))) /= 0) then
  469. is_output_stagger(i) = .true.
  470. source_output_stagger(i) = HH
  471. else if (index('VV',trim(buffer(idx+1:eos-1))) /= 0) then
  472. is_output_stagger(i) = .true.
  473. source_output_stagger(i) = VV
  474. end if
  475. else if ((index('landmask_water',trim(buffer(1:idx-1))) /= 0) .and. &
  476. (len_trim(buffer(1:idx-1)) == 14)) then
  477. ispace = idx+1
  478. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  479. ispace = ispace + 1
  480. end do
  481. landmask_string = ' '
  482. landmask_string(1:ispace-idx-1) = buffer(idx+1:ispace-1)
  483. ispace = index(landmask_string,':')
  484. if (ispace /= 0) then
  485. write(res_string,'(a)') landmask_string(1:ispace-1)
  486. else
  487. res_string = 'default'
  488. end if
  489. write(landmask_string,'(a)') trim(landmask_string(ispace+1:128))
  490. if (list_search(source_landmask_water(i), ckey=res_string, cvalue=landmask_string)) then
  491. call mprintf(.true., WARN, &
  492. 'In GEOGRID.TBL entry %i, multiple landmask category specifications are given for '// &
  493. 'resolution %s. %s will be used.', &
  494. i1=i, s1=trim(res_string), s2=trim(landmask_string))
  495. else
  496. call list_insert(source_landmask_water(i), ckey=res_string, cvalue=landmask_string)
  497. end if
  498. else if ((index('landmask_land',trim(buffer(1:idx-1))) /= 0) .and. &
  499. (len_trim(buffer(1:idx-1)) == 13)) then
  500. ispace = idx+1
  501. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  502. ispace = ispace + 1
  503. end do
  504. landmask_string = ' '
  505. landmask_string(1:ispace-idx-1) = buffer(idx+1:ispace-1)
  506. ispace = index(landmask_string,':')
  507. if (ispace /= 0) then
  508. write(res_string,'(a)') landmask_string(1:ispace-1)
  509. else
  510. res_string = 'default'
  511. end if
  512. write(landmask_string,'(a)') trim(landmask_string(ispace+1:128))
  513. if (list_search(source_landmask_land(i), ckey=res_string, cvalue=landmask_string)) then
  514. call mprintf(.true., WARN, &
  515. 'In GEOGRID.TBL entry %i, multiple landmask category specifications are given for '// &
  516. 'resolution %s. %s will be used.', &
  517. i1=i, s1=trim(res_string), s2=trim(landmask_string))
  518. else
  519. call list_insert(source_landmask_land(i), ckey=res_string, cvalue=landmask_string)
  520. end if
  521. else if ((index('masked',trim(buffer(1:idx-1))) /= 0) .and. &
  522. (len_trim(buffer(1:idx-1)) == 6)) then
  523. if (index('water',trim(buffer(idx+1:eos-1))) /= 0) then
  524. is_masked(i) = .true.
  525. source_masked(i) = 0.
  526. else if (index('land',trim(buffer(idx+1:eos-1))) /= 0) then
  527. is_masked(i) = .true.
  528. source_masked(i) = 1.
  529. end if
  530. else if (index('fill_missing',trim(buffer(1:idx-1))) /= 0) then
  531. is_fill_missing(i) = .true.
  532. read(buffer(idx+1:eos-1),*) source_fill_missing(i)
  533. else if (index('halt_on_missing',trim(buffer(1:idx-1))) /= 0) then
  534. if (index('yes',trim(buffer(idx+1:eos-1))) /= 0) then
  535. is_halt_missing(i) = .true.
  536. else if (index('no',trim(buffer(idx+1:eos-1))) /= 0) then
  537. is_halt_missing(i) = .false.
  538. end if
  539. else if (index('dominant_category',trim(buffer(1:idx-1))) /= 0) then
  540. ispace = idx+1
  541. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  542. ispace = ispace + 1
  543. end do
  544. is_dominant_category(i) = .true.
  545. source_dominant_category(i) = ' '
  546. source_dominant_category(i)(1:ispace-idx) = buffer(idx+1:ispace-1)
  547. else if (index('dominant_only',trim(buffer(1:idx-1))) /= 0) then
  548. ispace = idx+1
  549. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  550. ispace = ispace + 1
  551. end do
  552. is_dominant_only(i) = .true.
  553. source_dominant_only(i) = ' '
  554. source_dominant_only(i)(1:ispace-idx) = buffer(idx+1:ispace-1)
  555. else if (index('df_dx',trim(buffer(1:idx-1))) /= 0) then
  556. ispace = idx+1
  557. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  558. ispace = ispace + 1
  559. end do
  560. is_dfdx(i) = .true.
  561. source_dfdx(i) = ' '
  562. source_dfdx(i)(1:ispace-idx) = buffer(idx+1:ispace-1)
  563. else if (index('df_dy',trim(buffer(1:idx-1))) /= 0) then
  564. ispace = idx+1
  565. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  566. ispace = ispace + 1
  567. end do
  568. is_dfdy(i) = .true.
  569. source_dfdy(i) = ' '
  570. source_dfdy(i)(1:ispace-idx) = buffer(idx+1:ispace-1)
  571. else if (index('z_dim_name',trim(buffer(1:idx-1))) /= 0) then
  572. ispace = idx+1
  573. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  574. ispace = ispace + 1
  575. end do
  576. is_z_dim_name(i) = .true.
  577. source_z_dim_name(i) = ' '
  578. source_z_dim_name(i)(1:ispace-idx) = buffer(idx+1:ispace-1)
  579. else if (index('subgrid',trim(buffer(1:idx-1))) /= 0) then
  580. ispace = idx+1
  581. do while ((ispace < eos) .and. (buffer(ispace:ispace) /= ' '))
  582. ispace = ispace + 1
  583. end do
  584. if (index('yes',trim(buffer(idx+1:eos-1))) /= 0) then
  585. is_subgrid(i) = .true.
  586. else if (index('no',trim(buffer(idx+1:eos-1))) /= 0) then
  587. is_subgrid(i) = .false.
  588. end if
  589. else
  590. call mprintf(.true., WARN, 'In GEOGRID.TBL, unrecognized option %s in '// &
  591. 'entry %i.',i1=idx, s1=buffer(i:idx-1))
  592. end if
  593. end if !} index(buffer(1:eos-1),'=') /= 0
  594. buffer = buffer(eos+1:BUFSIZE)
  595. end do ! while eos /= 0 }
  596. end if !} index(buffer, '=====') /= 0
  597. go to 30
  598. 40 close(funit)
  599. ! Check the user specifications for gross errors
  600. if ( .not. check_data_specification() ) then
  601. call datalist_destroy()
  602. call mprintf(.true.,ERROR,'Errors were found in either index files or GEOGRID.TBL.')
  603. end if
  604. call hash_init(bad_files)
  605. return
  606. 1000 call mprintf(.true.,ERROR,'Could not open GEOGRID.TBL')
  607. 1001 call mprintf(.true.,ERROR,'Encountered error while reading GEOGRID.TBL')
  608. end subroutine get_datalist
  609. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  610. ! Name: get_source_params
  611. !
  612. ! Purpose: For each field, this routine reads in the metadata in the index file
  613. ! for the first available resolution of data specified by res_string. Also
  614. ! based on res_string, this routine sets the interpolation sequence for the
  615. ! field. This routine should be called prior to processing a field for each
  616. ! domain.
  617. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  618. subroutine get_source_params(res_string)
  619. use stringutil
  620. #ifdef _HAS_GEOTIFF
  621. use geotiff_module, only : open_geotiff,merge_geotiff_header
  622. #endif
  623. implicit none
  624. ! Parameters
  625. integer, parameter :: BUFSIZE = 256
  626. ! Arguments
  627. character (len=128), intent(in) :: res_string
  628. ! Local variables
  629. integer :: idx, i, is, ie, ispace, eos, iquoted, funit
  630. character (len=128) :: temp_data, temp_interp
  631. character (len=256) :: test_fname
  632. character (len=BUFSIZE) :: buffer
  633. logical :: have_specification, is_used
  634. ! For each entry in the GEOGRID.TBL file
  635. do idx=1,num_entries
  636. ! Initialize metadata
  637. is_wordsize(idx) = .false.
  638. is_endian(idx) = .false.
  639. is_row_order(idx) = .false.
  640. is_fieldtype(idx) = .false.
  641. is_proj(idx) = .false.
  642. is_dx(idx) = .false.
  643. is_dy(idx) = .false.
  644. is_known_x(idx) = .false.
  645. is_known_y(idx) = .false.
  646. is_known_lat(idx) = .false.
  647. is_known_lon(idx) = .false.
  648. is_truelat1(idx) = .false.
  649. is_truelat2(idx) = .false.
  650. is_stdlon(idx) = .false.
  651. is_tile_x(idx) = .false.
  652. is_tile_y(idx) = .false.
  653. is_tile_z(idx) = .false.
  654. is_tile_z_start(idx) = .false.
  655. is_tile_z_end(idx) = .false.
  656. is_category_min(idx) = .false.
  657. is_category_max(idx) = .false.
  658. is_tile_bdr(idx) = .false.
  659. is_fieldname(idx) = .false.
  660. is_scale_factor(idx) = .false.
  661. is_units(idx) = .false.
  662. is_descr(idx) = .false.
  663. is_signed(idx) = .false.
  664. is_missing_value(idx) = .false.
  665. is_geotiff(idx) = .false.
  666. ! Set the interpolator sequence for the field to be the first value in res_string that matches
  667. ! the resolution keyword for an interp_sequence specification
  668. is = 1
  669. ie = index(res_string(is:128),'+') - 1
  670. if (ie <= 0) ie = 128
  671. temp_interp = res_string(is:ie)
  672. do while (.not. list_search(source_interp_option(idx), ckey=temp_interp, cvalue=source_interp_string(idx)) &
  673. .and. is <= 128)
  674. call mprintf(.true., INFORM, 'For %s, couldn''t find interpolator sequence for '// &
  675. 'resolution %s.', &
  676. s1=trim(source_fieldname(idx)), s2=trim(temp_interp))
  677. is = ie+2
  678. ie = is + index(res_string(is:128),'+') - 2
  679. if (ie - is <= 0) ie = 128
  680. temp_interp = res_string(is:ie)
  681. end do
  682. if (is > 128) then
  683. temp_interp = 'default'
  684. if (list_search(source_interp_option(idx), ckey=temp_interp, cvalue=source_interp_string(idx))) then
  685. call mprintf(.true., INFORM, 'Using default interpolator sequence for %s.', &
  686. s1=trim(source_fieldname(idx)))
  687. else
  688. call mprintf(.true., ERROR, 'Could not find interpolator sequence for requested resolution for %s.'// &
  689. ' The sources specified in namelist.wps is not listed in GEOGRID.TBL.', &
  690. s1=trim(source_fieldname(idx)))
  691. end if
  692. else
  693. call mprintf(.true., INFORM, 'Using %s interpolator sequence for %s.', &
  694. s1=temp_interp, s2=trim(source_fieldname(idx)))
  695. end if
  696. ! Set the data source for the field to be the first value in res_string that matches
  697. ! the resolution keyword for an abs_path or rel_path specification
  698. is = 1
  699. ie = index(res_string(is:128),'+') - 1
  700. if (ie <= 0) ie = 128
  701. temp_data = res_string(is:ie)
  702. do while (.not. list_search(source_res_path(idx), ckey=temp_data, cvalue=source_path(idx)) &
  703. .and. is <= 128)
  704. call mprintf(.true., INFORM, 'For %s, couldn''t find %s data source.', &
  705. s1=trim(source_fieldname(idx)), s2=trim(temp_data))
  706. is = ie+2
  707. ie = is + index(res_string(is:128),'+') - 2
  708. if (ie - is <= 0) ie = 128
  709. temp_data = res_string(is:ie)
  710. end do
  711. if (is > 128) then
  712. temp_data = 'default'
  713. if (list_search(source_res_path(idx), ckey=temp_data, cvalue=source_path(idx))) then
  714. call mprintf(.true., INFORM, 'Using default data source for %s.', &
  715. s1=trim(source_fieldname(idx)))
  716. else
  717. call mprintf(.true., ERROR, 'Could not find data resolution for requested resolution for %s. '// &
  718. 'The source specified in namelist.wps is not listed in GEOGRID.TBL.', &
  719. s1=trim(source_fieldname(idx)))
  720. end if
  721. else
  722. call mprintf(.true., INFORM, 'Using %s data source for %s.', &
  723. s1=temp_data, s2=trim(source_fieldname(idx)))
  724. end if
  725. call mprintf(trim(temp_data) /= trim(temp_interp),WARN,'For %s, using %s data source with %s interpolation sequence.', &
  726. s1=source_fieldname(idx), s2=temp_data, s3=temp_interp)
  727. write(test_fname, '(a)') trim(source_path(idx))//'index'
  728. !
  729. ! Open the index file for the data source for this field, and read in metadata specs
  730. !
  731. do funit=10,100
  732. inquire(unit=funit, opened=is_used)
  733. if (.not. is_used) exit
  734. end do
  735. open(funit,file=trim(test_fname),form='formatted',status='old',err=1000)
  736. 30 buffer = ' '
  737. read(funit,'(a)',end=40, err=1001) buffer
  738. call despace(buffer)
  739. ! Is this line a comment?
  740. if (buffer(1:1) == '#') then
  741. ! Do nothing.
  742. else
  743. have_specification = .true.
  744. ! If only part of the line is a comment, just turn the comment into spaces
  745. eos = index(buffer,'#')
  746. if (eos /= 0) buffer(eos:BUFSIZE) = ' '
  747. do while (have_specification) !{
  748. ! If this line has no semicolon, it may contain a single specification,
  749. ! so we set have_specification = .false. to prevent the line from being
  750. ! processed again and pretend that the last character was a semicolon
  751. eos = index(buffer,';')
  752. if (eos == 0) then
  753. have_specification = .false.
  754. eos = BUFSIZE
  755. end if
  756. i = index(buffer(1:eos-1),'=')
  757. if (i /= 0) then !{
  758. if (index('projection',trim(buffer(1:i-1))) /= 0) then
  759. if (index('lambert',trim(buffer(i+1:eos-1))) /= 0) then
  760. is_proj(idx) = .true.
  761. source_proj(idx) = PROJ_LC
  762. else if (index('polar_wgs84',trim(buffer(i+1:eos-1))) /= 0 .and. &
  763. len_trim('polar_wgs84') == len_trim(buffer(i+1:eos-1))) then
  764. is_proj(idx) = .true.
  765. source_proj(idx) = PROJ_PS_WGS84
  766. else if (index('albers_nad83',trim(buffer(i+1:eos-1))) /= 0 .and. &
  767. len_trim('albers_nad83') == len_trim(buffer(i+1:eos-1))) then
  768. is_proj(idx) = .true.
  769. source_proj(idx) = PROJ_ALBERS_NAD83
  770. else if (index('polar',trim(buffer(i+1:eos-1))) /= 0 .and. &
  771. len_trim('polar') == len_trim(buffer(i+1:eos-1))) then
  772. is_proj(idx) = .true.
  773. source_proj(idx) = PROJ_PS
  774. else if (index('mercator',trim(buffer(i+1:eos-1))) /= 0) then
  775. is_proj(idx) = .true.
  776. source_proj(idx) = PROJ_MERC
  777. else if (index('regular_ll',trim(buffer(i+1:eos-1))) /= 0) then
  778. is_proj(idx) = .true.
  779. source_proj(idx) = PROJ_LATLON
  780. end if
  781. else if (index('type',trim(buffer(1:i-1))) /= 0) then
  782. if (index('continuous',trim(buffer(i+1:eos-1))) /= 0) then
  783. is_fieldtype(idx) = .true.
  784. source_fieldtype(idx) = CONTINUOUS
  785. else if (index('categorical',trim(buffer(i+1:eos-1))) /= 0) then
  786. is_fieldtype(idx) = .true.
  787. source_fieldtype(idx) = CATEGORICAL
  788. end if
  789. else if (index('signed',trim(buffer(1:i-1))) /= 0) then
  790. if (index('yes',trim(buffer(i+1:eos-1))) /= 0) then
  791. is_signed(idx) = .true.
  792. else if (index('no',trim(buffer(i+1:eos-1))) /= 0) then
  793. is_signed(idx) = .false.
  794. end if
  795. else if (index('units',trim(buffer(1:i-1))) /= 0) then
  796. ispace = i+1
  797. iquoted = 0
  798. do while (((ispace < eos) .and. (buffer(ispace:ispace) /= ' ')) .or. (iquoted == 1))
  799. if (buffer(ispace:ispace) == '"' .or. buffer(ispace:ispace) == '''') iquoted = mod(iquoted+1,2)
  800. ispace = ispace + 1
  801. end do
  802. is_units(idx) = .true.
  803. source_units(idx) = ' '
  804. if (buffer(i+1:i+1) == '"' .or. buffer(i+1:i+1) == '''') i = i + 1
  805. if (buffer(ispace-1:ispace-1) == '"' .or. buffer(ispace-1:ispace-1) == '''') ispace = ispace - 1
  806. source_units(idx)(1:ispace-i) = buffer(i+1:ispace-1)
  807. else if (index('description',trim(buffer(1:i-1))) /= 0) then
  808. ispace = i+1
  809. iquoted = 0
  810. do while (((ispace < eos) .and. (buffer(ispace:ispace) /= ' ')) .or. (iquoted == 1))
  811. if (buffer(ispace:ispace) == '"' .or. buffer(ispace:ispace) == '''') iquoted = mod(iquoted+1,2)
  812. ispace = ispace + 1
  813. end do
  814. is_descr(idx) = .true.
  815. source_descr(idx) = ' '
  816. if (buffer(i+1:i+1) == '"' .or. buffer(i+1:i+1) == '''') i = i + 1
  817. if (buffer(ispace-1:ispace-1) == '"' .or. buffer(ispace-1:ispace-1) == '''') ispace = ispace - 1
  818. source_descr(idx)(1:ispace-i) = buffer(i+1:ispace-1)
  819. else if (index('mminlu',trim(buffer(1:i-1))) /= 0) then
  820. ispace = i+1
  821. iquoted = 0
  822. do while (((ispace < eos) .and. (buffer(ispace:ispace) /= ' ')) .or. (iquoted == 1))
  823. if (buffer(ispace:ispace) == '"' .or. buffer(ispace:ispace) == '''') iquoted = mod(iquoted+1,2)
  824. ispace = ispace + 1
  825. end do
  826. if (buffer(i+1:i+1) == '"' .or. buffer(i+1:i+1) == '''') i = i + 1
  827. if (buffer(ispace-1:ispace-1) == '"' .or. buffer(ispace-1:ispace-1) == '''') ispace = ispace - 1
  828. source_mminlu(1:ispace-i) = buffer(i+1:ispace-1)
  829. else if (index('iswater',trim(buffer(1:i-1))) /= 0) then
  830. read(buffer(i+1:eos-1),*) source_iswater
  831. else if (index('islake',trim(buffer(1:i-1))) /= 0) then
  832. read(buffer(i+1:eos-1),*) source_islake
  833. else if (index('isice',trim(buffer(1:i-1))) /= 0) then
  834. read(buffer(i+1:eos-1),*) source_isice
  835. else if (index('isurban',trim(buffer(1:i-1))) /= 0) then
  836. read(buffer(i+1:eos-1),*) source_isurban
  837. else if (index('isoilwater',trim(buffer(1:i-1))) /= 0) then
  838. read(buffer(i+1:eos-1),*) source_isoilwater
  839. else if (index('dx',trim(buffer(1:i-1))) /= 0) then
  840. is_dx(idx) = .true.
  841. read(buffer(i+1:eos-1),*) source_dx(idx)
  842. else if (index('dy',trim(buffer(1:i-1))) /= 0) then
  843. is_dy(idx) = .true.
  844. read(buffer(i+1:eos-1),*) source_dy(idx)
  845. else if (index('known_x',trim(buffer(1:i-1))) /= 0) then
  846. is_known_x(idx) = .true.
  847. read(buffer(i+1:eos-1),*) source_known_x(idx)
  848. else if (index('known_y',trim(buffer(1:i-1))) /= 0) then
  849. is_known_y(idx) = .true.
  850. read(buffer(i+1:eos-1),*) source_known_y(idx)
  851. else if (index('known_lat',trim(buffer(1:i-1))) /= 0) then
  852. is_known_lat(idx) = .true.
  853. read(buffer(i+1:eos-1),*) source_known_lat(idx)
  854. else if (index('known_lon',trim(buffer(1:i-1))) /= 0) then
  855. is_known_lon(idx) = .true.
  856. read(buffer(i+1:eos-1),*) source_known_lon(idx)
  857. else if (index('stdlon',trim(buffer(1:i-1))) /= 0) then
  858. is_stdlon(idx) = .true.
  859. read(buffer(i+1:eos-1),*) source_stdlon(idx)
  860. else if (index('truelat1',trim(buffer(1:i-1))) /= 0) then
  861. is_truelat1(idx) = .true.
  862. read(buffer(i+1:eos-1),*) source_truelat1(idx)
  863. else if (index('truelat2',trim(buffer(1:i-1))) /= 0) then
  864. is_truelat2(idx) = .true.
  865. read(buffer(i+1:eos-1),*) source_truelat2(idx)
  866. else if (index('wordsize',trim(buffer(1:i-1))) /= 0) then
  867. is_wordsize(idx) = .true.
  868. read(buffer(i+1:eos-1),'(i10)') source_wordsize(idx)
  869. else if (index('endian',trim(buffer(1:i-1))) /= 0) then
  870. if (index('big',trim(buffer(i+1:eos-1))) /= 0) then
  871. is_endian(idx) = .true.
  872. source_endian(idx) = BIG_ENDIAN
  873. else if (index('little',trim(buffer(i+1:eos-1))) /= 0) then
  874. is_endian(idx) = .true.
  875. source_endian(idx) = LITTLE_ENDIAN
  876. else
  877. call mprintf(.true.,WARN,'Invalid value for keyword ''endian'' '// &
  878. 'specified in index file. BIG_ENDIAN will be used.')
  879. end if
  880. else if (index('row_order',trim(buffer(1:i-1))) /= 0) then
  881. if (index('bottom_top',trim(buffer(i+1:eos-1))) /= 0) then
  882. is_row_order(idx) = .true.
  883. source_row_order(idx) = BOTTOM_TOP
  884. else if (index('top_bottom',trim(buffer(i+1:eos-1))) /= 0) then
  885. is_row_order(idx) = .true.
  886. source_row_order(idx) = TOP_BOTTOM
  887. end if
  888. else if (index('tile_x',trim(buffer(1:i-1))) /= 0) then
  889. is_tile_x(idx) = .true.
  890. read(buffer(i+1:eos-1),'(i10)') source_tile_x(idx)
  891. else if (index('tile_y',trim(buffer(1:i-1))) /= 0) then
  892. is_tile_y(idx) = .true.
  893. read(buffer(i+1:eos-1),'(i10)') source_tile_y(idx)
  894. else if (index('tile_z',trim(buffer(1:i-1))) /= 0) then
  895. is_tile_z(idx) = .true.
  896. read(buffer(i+1:eos-1),'(i10)') source_tile_z(idx)
  897. else if (index('tile_z_start',trim(buffer(1:i-1))) /= 0) then
  898. is_tile_z_start(idx) = .true.
  899. read(buffer(i+1:eos-1),'(i10)') source_tile_z_start(idx)
  900. else if (index('tile_z_end',trim(buffer(1:i-1))) /= 0) then
  901. is_tile_z_end(idx) = .true.
  902. read(buffer(i+1:eos-1),'(i10)') source_tile_z_end(idx)
  903. else if (index('category_min',trim(buffer(1:i-1))) /= 0) then
  904. is_category_min(idx) = .true.
  905. read(buffer(i+1:eos-1),'(i10)') source_category_min(idx)
  906. else if (index('category_max',trim(buffer(1:i-1))) /= 0) then
  907. is_category_max(idx) = .true.
  908. read(buffer(i+1:eos-1),'(i10)') source_category_max(idx)
  909. else if (index('tile_bdr',trim(buffer(1:i-1))) /= 0) then
  910. is_tile_bdr(idx) = .true.
  911. read(buffer(i+1:eos-1),'(i10)') source_tile_bdr(idx)
  912. else if (index('missing_value',trim(buffer(1:i-1))) /= 0) then
  913. is_missing_value(idx) = .true.
  914. read(buffer(i+1:eos-1),*) source_missing_value(idx)
  915. else if (index('scale_factor',trim(buffer(1:i-1))) /= 0) then
  916. is_scale_factor(idx) = .true.
  917. read(buffer(i+1:eos-1),*) source_scale_factor(idx)
  918. else if (index('geotiff',trim(buffer(1:i-1))) /= 0) then
  919. is_geotiff(idx) = .true.
  920. read(buffer(i+1:eos-1),*) source_geotiff_file(idx)
  921. else
  922. call mprintf(.true., WARN, 'In %s, unrecognized option %s in entry %i.', &
  923. s1=trim(test_fname), s2=buffer(1:i-1), i1=i)
  924. end if
  925. end if !} index(buffer(1:eos-1),'=') /= 0
  926. buffer = buffer(eos+1:BUFSIZE)
  927. end do ! while eos /= 0 }
  928. end if !} index(buffer, '=====') /= 0
  929. go to 30
  930. 40 continue
  931. #ifdef _HAS_GEOTIFF
  932. if(is_geotiff(idx)) then
  933. if(source_geotiff_file(idx)(1:1) .ne. '/')then
  934. source_geotiff_file(idx)=TRIM(source_path(idx))//TRIM(source_geotiff_file(idx))
  935. endif
  936. call open_geotiff(source_geotiff_file(idx))
  937. call merge_geotiff_header(source_geotiff_file(idx),is_proj(idx),source_proj(idx),&
  938. is_fieldtype(idx),source_fieldtype(idx), &
  939. is_units(idx),source_units(idx), &
  940. is_descr(idx),source_descr(idx),is_dx(idx), &
  941. source_dx(idx),is_dy(idx),source_dy(idx), &
  942. is_known_x(idx),source_known_x(idx), &
  943. is_known_y(idx),source_known_y(idx), &
  944. is_known_lat(idx),source_known_lat(idx), &
  945. is_known_lon(idx),source_known_lon(idx), &
  946. is_stdlon(idx),source_stdlon(idx), &
  947. is_truelat1(idx),source_truelat1(idx), &
  948. is_truelat2(idx),source_truelat2(idx), &
  949. is_row_order(idx),source_row_order(idx), &
  950. is_tile_x(idx),source_tile_x(idx), &
  951. is_tile_y(idx),source_tile_y(idx), &
  952. is_tile_z(idx),source_tile_z(idx), &
  953. is_tile_z_start(idx),source_tile_z_start(idx), &
  954. is_tile_z_end(idx), source_tile_z_end(idx), &
  955. is_category_min(idx),source_category_min(idx), &
  956. is_category_max(idx),source_category_max(idx), &
  957. is_tile_bdr(idx),source_tile_bdr(idx), &
  958. is_missing_value(idx),source_missing_value(idx))
  959. is_wordsize(idx)=.true.
  960. source_wordsize(idx)=4
  961. is_scale_factor(idx)=.true.
  962. source_scale_factor(idx)=1.
  963. call mprintf(.true.,INFORM,'For geotiff file, %s, using the following parameters:', &
  964. s1=TRIM(source_geotiff_file(idx)))
  965. if(is_descr(idx)) &
  966. call mprintf(.true.,INFORM,'description=%s',s1=TRIM(sou

Large files files are truncated, but you can click here to view the full file