PageRenderTime 85ms CodeModel.GetById 34ms RepoModel.GetById 0ms app.codeStats 0ms

/wrfv2_fire/external/io_phdf5/INSTALL.htm

https://github.com/jbeezley/wrf-fire
HTML | 1207 lines | 1134 code | 73 blank | 0 comment | 0 complexity | 30b741d1c257640059eafdd8778d7bcb MD5 | raw file
Possible License(s): AGPL-1.0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>
  2. <meta http-equiv="Content-Language" content="en-us">
  3. <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  4. <meta name="ProgId" content="FrontPage.Editor.Document">
  5. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>To integrate HDF5</title></head><body><big><big><b>Build and Install the HDF5-WRF IO Module</b></big></big><br>
  6. <br>
  7. There are two HDF5 WRF IO modules, <i>sequential</i> and <i>parallel.</i>  The either or both modules can be configured as optional IO modules for WRF.<br>
  8. <br>
  9. The sequential HDF module (<i>io_hdf5</i>) uses the serial HDF5 library.  The parallel
  10. HDF module (<i>io_phdf5</i>) uses parallel HDF5 (which requires MPI-IO).<br>
  11. <br>
  12. The installation for the two modules is similar.<br>
  13. <br>
  14. <big><b>Prerequisites</b></big><br>
  15. <br>
  16. <b>WRF 1.3</b><br>
  17. <br>
  18. The HDF5 WRF IO modules require Version 1.3 of WRF.  Information and downloads are available at:<br>
  19. <blockquote><a href="http://www.mmm.ucar.edu/wrf/users/user_main.html">http://www.mmm.ucar.edu/wrf/users/user_main.html</a><br>
  20. </blockquote>
  21. <br>
  22. <b>HDF5-1.6 .2 or later</b><br>
  23. <br>
  24. The HDF5 WRF IO modules require HDF5-1.6.2 or more recent. The parallel HDF5
  25. WRF module requires parallel HDF5 (which requires MPI IO). <br>
  26. <br>
  27. Installing HDF5<br>
  28. <blockquote>
  29. </blockquote>
  30. <ol>
  31. <li>To obtain
  32. HDF5, download from to <a href="http://hdf.ncsa.uiuc.edu/HDF5/release/obtain5.html">
  33. http://hdf.ncsa.uiuc.edu/HDF5/release/obtain5.html</a>. Install HDF5 according to the instructions. The HDF5 library must have he Fortran 90 interface installed. <br><br>
  34. For the sequential WRF module,  SZIP compression can be enabled.  </li>
  35. <li>
  36. For the parallel WRF module, parallel HDF5 must be installed (this requires MPI-IO). <br>
  37. Set the environment variable PHDF5 = &lt;&lt;path where phdf5 is installed&gt;&gt;.
  38.  </li>
  39. <li>For the sequential HDF WRF IO module, either serial or parallel HDF must be installed.<br>
  40. The HDF library may be installed with the optional SZIP compression enabled. <br>
  41. Set the environment variable HDF5 = &lt;&lt;path where hdf5 is installed&gt;&gt;.
  42. <br>
  43. </li>
  44. </ol>
  45. <br>
  46. <big><b>Platforms</b></big><br>
  47. <p><small><small><font size="5"><small><small>This prototype has been tested
  48. on a few platforms. The HDF WRF IO modules should work on any platform that
  49. WRF3.1 and HDF5 support, although the details of the configuration may need
  50. to be worked out.<br>
  51. </small></small></font></small></small></p>
  52. <table cellpadding="2" cellspacing="2" border="1" width="100%">
  53. <tbody>
  54. <tr>
  55. <td valign="top"><b>Module<br>
  56. </b></td>
  57. <td valign="top"><b>Platforms<br>
  58. </b></td>
  59. <td valign="top"><b>Notes<br>
  60. </b></td>
  61. </tr>
  62. <tr>
  63. <td valign="top">Sequential <br>
  64. </td>
  65. <td valign="top"><small><small><font size="5"><small><small>
  66. NCSA IBM P690</small></small></font></small></small>.<br>
  67. <small><small><font size="5"><small><small> NCAR IBM SP3 </small></small></font></small></small><br>
  68. <small><small><font size="5"><small><small>PC Linux </small></small></font></small></small>with PGI Fortran 90 Compiler, Vers. 4<br>
  69. <small><small><font size="5"><small><small>SGI IRIX6.5-64 bi</small></small></font></small></small>t<br>
  70. </td>
  71. <td valign="top">To date, WRF3.1 does not work on Linux with PGF, version 5.<br>
  72. </td>
  73. </tr>
  74. <tr>
  75. <td valign="top">Parallel<br>
  76. </td>
  77. <td valign="top"><small><small><font size="5"><small><small>
  78. NCSA IBM P690</small></small></font></small></small>.<br>
  79. <small><small><font size="5"><small><small> NCAR IBM SP3 </small></small></font></small></small><br>
  80. </td>
  81. <td valign="top"><br>
  82. </td>
  83. </tr>
  84. </tbody>
  85. </table>
  86. <br>
  87. <br>
  88. <big><b>Installation of the HDF5 WRF IO Modules</b></big><br>
  89. <br>
  90. The HDF5 WRF IO modules are used by adding it to a standard WRF configuration.  This process has four main steps<br>
  91. <ol>
  92. <li>Downoad the HDF WRF IO module(s)</li><li>Add the HDF5 WRF IO module(s) as an "extern" module</li>
  93. <li>Modifying relevant files in the WRF distribution</li>
  94. <li>Compile WRF following the usual procedures<br>
  95. </li>
  96. </ol>
  97. The parallel, sequential, or both may be configured.<br>
  98. <br>
  99. <b>1. Download the WRD-HDF5 IO modules</b><br>
  100. <br>
  101. The HDF WRF IO modules are available from:<br>
  102. <ul>
  103. <li>sequential: <a href="ftp://ftp.ncsa.uiuc.edu/HDF/pub/outgoing/wrf-hdf5-modules/io_hdf5.tar">
  104. ftp://ftp.ncsa.uiuc.edu/HDF/pub/outgoing/wrf-hdf5-modules/io_hdf5.tar</a></li>
  105. <li>parallel: 
  106. <a href="ftp://ftp.ncsa.uiuc.edu/HDF/pub/outgoing/wrf-hdf5-modules/io_phdf5.tar">
  107. ftp://ftp.ncsa.uiuc.edu/HDF/pub/outgoing/wrf-hdf5-modules/io_phdf5.tar</a><br>
  108. </li>
  109. </ul>
  110. <blockquote><p></p>
  111. </blockquote>
  112. <p><b><small>
  113. <font size="4"><small>2. Add WRF-HDF5 IO module(s) to the WRF source</small></font></small></b></p>
  114. <p>
  115. The HDF5 WRF IO modules are added as sub-directories in the 'external' directory of the WRF source.<br>
  116. </p>
  117. <blockquote><blockquote>
  118. <p> cd external;<br>
  119. tar xvf io_hdf5.tar<br>
  120. tar xvf io_phdf5.tar<br>
  121. </p>
  122. </blockquote></blockquote>
  123. <p>
  124. </p>
  125. <table cellpadding="2" cellspacing="2" border="1" width="90%" align="center">
  126. <tbody>
  127. <tr>
  128. <td valign="top">contents of the sequential HDF WRF IO module:<br>
  129. <br>
  130.   ./io_hdf5<br>  ./io_hdf5/wrf-hdf5.F90<br>  ./io_hdf5/wrf_status_codes.h<br>  ./io_hdf5/Makefile<br>  ./io_hdf5/wrf-hdf5attr.F90<br>  ./io_hdf5/wrf-hdf5support.F90<br>  ./io_hdf5/wrf_io_flags.h<br>
  131. </td>
  132. </tr>
  133. </tbody>
  134. </table>
  135. <br>
  136. <br>
  137. <table cellpadding="2" cellspacing="2" border="1" width="90%" align="center">
  138. <tbody>
  139. <tr>
  140. <td valign="top">contents of the sequential HDF WRF IO module:<br>
  141. <br>
  142.   ./io_phdf5/<br>  ./io_phdf5/Makefile<br>  ./io_phdf5/wrf_status_codes.h<br>  ./io_phdf5/wrf-phdf5attr.F90<br>  ./io_phdf5/wrf-phdf5support.F90<br>  ./io_phdf5/wrf_io_flags.h<br>  ./io_phdf5/wrf-phdf5.F90<br>
  143. </td>
  144. </tr>
  145. </tbody>
  146. </table>
  147. <br>
  148. <p><b><small><small><font size="5"><small><small>Design note:</small></small></font></small></small></b></p>
  149. <p><small><small><font size="5"><small><small>In the sequential HDF5 WRF
  150. IO modules, arrays larger thatn 8096 bytes are compressed by default. In
  151. this case, the HDF5 dataset is configured to use the shuffle filter plus deflate
  152. (GZIP) compression, with compression level 6.  <br>
  153. </small></small></font></small></small></p>
  154. <p><small><small><font size="5"><small><small>In the current prototype, there is no option in the namelist for
  155. users to change this default. To modify this behavior, it is necessary to modify the source code.</small></small></font><br>
  156. <font size="5"><small><small><br>
  157. <i>To disable compression:</i></small></small></font></small></small></p>
  158. <blockquote>
  159. <p><small><font size="5"><small><small>Edit</small></small></font><font size="4"><small> the file '</small></font></small><small><font size="4"><small>wrf/external/io_hdf5/</small></font></small><small><font size="4"><small>wrf-hdf5.F90</small></font></small><small><font size="4"><small>'<br>
  160. </small></font></small></p>
  161. <p><small><font size="4"><small>Comment out the lines: </small></font></small></p>
  162. <p><small><font face="Arial" size="4"><small>           
  163. call h5pset_shuffle_f(crp_list,hdf5err) </small></font></small></p>
  164. <p><small><font size="4"><small>               
  165. and </small></font></small></p>
  166. <p><small><font size="4" face="Arial"><small>           
  167. call h5pset_deflate_f(crp_list,6,hdf5err) </small></font></small></p>
  168. </blockquote>
  169. <p><i><small><small><font size="5"><small><small>To use  SZIP compression instead:</small></small></font></small></small></i></p>
  170. <blockquote>
  171. <p><small><font size="4"><small>For SZIP information and downloads, see the szip at 
  172. <a href="http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/">
  173. http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/</a>.<br>
  174. </small></font></small></p>
  175. <p><small><font size="4"><small>Edit the file 'wrf/external/io_hdf5/</small></font></small><small><font size="4"><small>wrf-hdf5.F90'.</small></font></small></p>
  176. <p><small><font size="4"><small>Comment out the lines: </small></font></small></p>
  177. <p><small><font face="Arial" size="4"><small>           
  178. call h5pset_shuffle_f(crp_list,hdf5err) </small></font></small></p>
  179. <p><small><font size="4"><small>               
  180. and </small></font></small></p>
  181. <p><small><font size="4" face="Arial"><small>           
  182. call h5pset_deflate_f(crp_list,6,hdf5err) </small></font></small></p>
  183. <p><small><font size="4"><small>Uncomment the line:
  184. </small></font></small></p>
  185. <p><small><font size="4"><small>             
  186. <font face="Arial">call
  187. h5pset_szip_f(crp_list,H5_SZIP_AK13_OM_F+H5_SZIP_NN_OM_F,8,hdf5err)</font><br>
  188. </small></font></small></p>
  189. <p><small><font size="4"><small>Change the value
  190. of the parameters in the function <i>h5pset_szip_f</i> if necessary.</small></font></small>  See the SZIP documentation for more information about the parameters.<br>
  191. </p>
  192. </blockquote>
  193. <p><br>
  194. </p>
  195. <p><font size="4"><b><small>3. Modifications to WRF files</small></b><br>
  196. </font></p>
  197. <p><font size="4"><small>In order to add a new IO module to WRF,  several
  198. files in the WRF source code must be changed. The following files need to be
  199. modified:<br>
  200. </small></font></p>
  201. <table cellpadding="2" cellspacing="2" border="1" width="50%" align="center">
  202. <tbody>
  203. <tr>
  204. <td valign="top">WRFV1/configure<br>
  205. WRFV1/Registry/Registry<br>
  206. WRFV1/arch/Config.pl<br>
  207. WRFV1/arch/configure.defaults<br>
  208. WRFV1/frame/md_calls.m4<br>
  209. WRFV1/frame/module_io.F<br>
  210. WRFV1/share/module_io_wrf.F<br>
  211. WRFV1/external/Makefile<br>
  212. </td>
  213. </tr>
  214. </tbody>
  215. </table>
  216. <br>
  217. The exact changes depend on how WRF has been configured on the sytsem.  <br>
  218. <p>Examples of the changes to the files of the WRF1.3 distribution are available at:<br>
  219. </p>
  220. <p> 
  221. <a href="ftp://ftp.ncsa.uiuc.edu/HDF/pub/outgoing/wrf-hdf5-modules">
  222. ftp://ftp.ncsa.uiuc.edu/HDF/pub/outgoing/wrf-hdf5-modules</a><br>
  223. </p>
  224. <blockquote>
  225. </blockquote>
  226. <p><i><b>WRF configuration files<br>
  227. </b></i>
  228. </p>
  229. <p>The 'configure' file must be updated to add the HDF5 and PHDF5 variables.<br>
  230. </p>
  231. <table cellpadding="2" cellspacing="2" border="1" align="center" width="90%">
  232. <tbody>
  233. <tr>
  234. <td valign="top">*** ../WRFV1/configure Thu Feb 6 13:10:56 2003<br>
  235. --- ./WRFV1-with-hdf/configure Thu May 13 12:18:40 2004<br>
  236. ***************<br>
  237. *** 206,211 ****<br>
  238. --- 206,223 ----<br>
  239. echo "Will configure for use without NetCDF"<br>
  240. fi<br>
  241. <br>
  242. + if [ -n "$HDF5" ] ; then<br>
  243. + echo "Will use HDF5 in dir: $HDF5"<br>
  244. + else<br>
  245. + echo "Will configure for use without HDF5"<br>
  246. + fi<br>
  247. + <br>
  248. + if [ -n "$PHDF5" ] ; then<br>
  249. + echo "Will use PHDF5 in dir: $PHDF5"<br>
  250. + else<br>
  251. + echo "Will configure for use without PHDF5"<br>
  252. + fi<br>
  253. + <br>
  254. # if the uname command exists, give it a shot and see if<br>
  255. # we can narrow the choices; otherwise, spam 'em<br>
  256. os="ARCH"<br>
  257. ***************<br>
  258. *** 227,232 ****<br>
  259. <br>
  260. # Found perl, so proceed with configuration<br>
  261. if test -n "$PERL" ; then<br>
  262. ! $PERL arch/Config.pl -perl=$PERL -netcdf=$NETCDF -os=$os -mach=$mach<br>
  263. fi<br>
  264. <br>
  265. --- 239,244 ----<br>
  266. <br>
  267. # Found perl, so proceed with configuration<br>
  268. if test -n "$PERL" ; then<br>
  269. ! $PERL arch/Config.pl -perl=$PERL -netcdf=$NETCDF -hdf5=$HDF5 -phdf5=$PHDF5 -os=$os -mach=$mach<br>
  270. fi<br>
  271. <br>
  272. </td>
  273. </tr>
  274. </tbody>
  275. </table>
  276. <p>The file 'Registry/Registry' must be updated to add the HDF IO modules (<i>io_hdf5</i> and <i>io_phdf5</i>).<br>
  277. </p>
  278. <table cellpadding="2" cellspacing="2" border="1" width="90%" align="center">
  279. <tbody>
  280. <tr>
  281. <td valign="top">*** ../WRFV1/Registry/Registry Wed Feb 12 09:28:28 2003<br>
  282. --- ./WRFV1-with-hdf/Registry/Registry Thu May 13 12:18:39 2004<br>
  283. ***************<br>
  284. *** 738,745 ****<br>
  285. # Four placeholders for additional packages (we can go beyond zzz <br>
  286. # but that will entail modifying frame/module_io.F and frame/md_calls.m4)<br>
  287. # Please note these are placeholders; HDF has not been implemented yet.<br>
  288. ! package io_hdf io_form_restart==3 - -<br>
  289. ! package io_xxx io_form_restart==4 - -<br>
  290. package io_yyy io_form_restart==5 - -<br>
  291. package io_zzz io_form_restart==6 - -<br>
  292. <br>
  293. --- 738,745 ----<br>
  294. # Four placeholders for additional packages (we can go beyond zzz <br>
  295. # but that will entail modifying frame/module_io.F and frame/md_calls.m4)<br>
  296. # Please note these are placeholders; HDF has not been implemented yet.<br>
  297. ! package io_hdf5 io_form_restart==3 - -<br>
  298. ! package io_phdf5 io_form_restart==4 - -<br>
  299. package io_yyy io_form_restart==5 - -<br>
  300. package io_zzz io_form_restart==6 - -<br>
  301. <br>
  302. </td>
  303. </tr>
  304. </tbody>
  305. </table>
  306. <p>The file 'arch/Config.pl' needs to be changed to add the code to use the HDF5 and PHDF5 variables.<br>
  307. </p>
  308. <table cellpadding="2" cellspacing="2" border="1" width="90%" align="center">
  309. <tbody>
  310. <tr>
  311. <td valign="top">*** ../WRFV1/arch/Config.pl Fri Mar 16 12:06:46 2001<br>
  312. --- ./WRFV1-with-hdf/arch/Config.pl Thu May 13 12:18:37 2004<br>
  313. ***************<br>
  314. *** 7,12 ****<br>
  315. --- 7,14 ----<br>
  316. <br>
  317. $sw_perl_path = perl ;<br>
  318. $sw_netcdf_path = "" ;<br>
  319. + $sw_hdf5_path ="";<br>
  320. + $sw_phdf5_path=""; <br>
  321. $sw_os = "ARCH" ; # ARCH will match any<br>
  322. $sw_mach = "ARCH" ; # ARCH will match any<br>
  323. <br>
  324. ***************<br>
  325. *** 20,25 ****<br>
  326. --- 22,35 ----<br>
  327. {<br>
  328. $sw_netcdf_path = substr( $ARGV[0], 8 ) ;<br>
  329. }<br>
  330. + if ( substr( $ARGV[0], 1, 5 ) eq "hdf5=" )<br>
  331. + {<br>
  332. + $sw_hdf5_path = substr( $ARGV[0], 6 ) ;<br>
  333. + }<br>
  334. + if ( substr( $ARGV[0], 1, 6 ) eq "phdf5=" )<br>
  335. + {<br>
  336. + $sw_phdf5_path = substr( $ARGV[0], 7 ) ;<br>
  337. + }<br>
  338. if ( substr( $ARGV[0], 1, 3 ) eq "os=" )<br>
  339. {<br>
  340. $sw_os = substr( $ARGV[0], 4 ) ;<br>
  341. ***************<br>
  342. *** 89,94 ****<br>
  343. --- 99,106 ----<br>
  344. {<br>
  345. $_ =~ s/CONFIGURE_PERL_PATH/$sw_perl_path/g ;<br>
  346. $_ =~ s/CONFIGURE_NETCDF_PATH/$sw_netcdf_path/g ;<br>
  347. + $_ =~ s/CONFIGURE_HDF5_PATH/$sw_hdf5_path/g ;<br>
  348. + $_ =~ s/CONFIGURE_PHDF5_PATH/$sw_phdf5_path/g ;<br>
  349. if ( $sw_netcdf_path ) <br>
  350. { $_ =~ s/CONFIGURE_WRFIO_NF/wrfio_nf/g ;<br>
  351. $_ =~ s:CONFIGURE_NETCDF_FLAG:-DNETCDF: ;<br>
  352. ***************<br>
  353. *** 99,104 ****<br>
  354. --- 111,140 ----<br>
  355. $_ =~ s:CONFIGURE_NETCDF_FLAG::g ;<br>
  356. $_ =~ s:CONFIGURE_NETCDF_LIB_PATH::g ;<br>
  357. }<br>
  358. + <br>
  359. + if ( $sw_hdf5_path ) <br>
  360. + <br>
  361. + { $_ =~ s/CONFIGURE_WRFIO_HDF5/wrfio_hdf5/g ;<br>
  362. + $_ =~ s:CONFIGURE_HDF5_FLAG:-DHDF5: ;<br>
  363. + $_ =~ s:CONFIGURE_HDF5_LIB_PATH:-L../external/io_hdf5 -lwrfio_hdf5 -L$sw_hdf5_path/lib
  364. -lhdf5_fortran -lhdf5 -lm -lz -L$sw_hdf5_path/lib -lsz: ;<br>
  365. + }<br>
  366. + else <br>
  367. + { $_ =~ s/CONFIGURE_WRFIO_HDF5//g ;<br>
  368. + $_ =~ s:CONFIGURE_HDF5_FLAG::g ;<br>
  369. + $_ =~ s:CONFIGURE_HDF5_LIB_PATH::g ;<br>
  370. + }<br>
  371. + <br>
  372. + if ( $sw_phdf5_path ) <br>
  373. + <br>
  374. + { $_ =~ s/CONFIGURE_WRFIO_PHDF5/wrfio_phdf5/g ;<br>
  375. + $_ =~ s:CONFIGURE_PHDF5_FLAG:-DPHDF5: ;<br>
  376. + $_ =~ s:CONFIGURE_PHDF5_LIB_PATH:-L../external/io_phdf5 -lwrfio_phdf5 -L$sw_phdf5_path/lib -lhdf5_fortran -lhdf5 -lm -lz: ;<br>
  377. + }<br>
  378. + else <br>
  379. + { $_ =~ s/CONFIGURE_WRFIO_PHDF5//g ;<br>
  380. + $_ =~ s:CONFIGURE_PHDF5_FLAG::g ;<br>
  381. + $_ =~ s:CONFIGURE_PHDF5_LIB_PATH::g ;<br>
  382. + }<br>
  383. @machopts = ( @machopts, $_ ) ;<br>
  384. }<br>
  385. if ( substr( $_, 0, 5 ) eq "#ARCH" &amp;&amp; $latchon == 0 )<br>
  386. <br>
  387. </td>
  388. </tr>
  389. </tbody>
  390. </table>
  391. <p>The file 'arch/configure.defauts' must be edited to reflect the configuration of the current system.<br>
  392. </p>
  393. <table cellpadding="2" cellspacing="2" border="1" width="90%" align="center">
  394. <tbody>
  395. <tr>
  396. <td valign="top">*** ../WRFV1/arch/configure.defaults Fri Mar 28 14:08:48 2003<br>
  397. --- ./WRFV1-with-hdf/arch/configure.defaults Thu May 13 12:18:40 2004<br>
  398. ***************<br>
  399. *** 732,758 ****<br>
  400. <br>
  401. <br>
  402. ###########################################################<br>
  403. ! #ARCH AIX DM (RSL-IO, IBM-MPI)<br>
  404. #<br>
  405. DMPARALLEL = 1<br>
  406. ! SFC = xlf90_r<br>
  407. SCC = xlc_r<br>
  408. ! FC = mpxlf90_r<br>
  409. CC = mpcc_r<br>
  410. CFLAGS = -DNOUNDERSCORE -DWRF_RSL_IO -I../external/RSL/RSL -DDM_PARALLEL \<br>
  411. -DMAXDOM_MAKE=$(MAX_DOMAINS) -DMAXPROC_MAKE=$(MAX_PROC)<br>
  412. ! FCOPTIM = -O2 -qarch=auto -qmaxmem=32676<br>
  413. FCDEBUG = # -g -qfullpath<br>
  414. FCBASEOPTS = -qspill=20000 $(FCDEBUG)<br>
  415. FCFLAGS = $(FCOPTIM) $(FCBASEOPTS)<br>
  416. ! INCLUDE_MODULES = -I../external/io_netcdf -I../external/io_int \<br>
  417. -I../frame -I../share -I../phys -I../inc<br>
  418. EXTRAMODULES = <br>
  419. ARCHFLAGS = -DWRF_RSL_IO -DRSL -DDM_PARALLEL -DIWORDSIZE=4 -DRWORDSIZE=4 \<br>
  420. ! -DLWORDSIZE=4 CONFIGURE_NETCDF_FLAG -DTRIEDNTRUE -DONLY_WRFMODEL_IO -DINTIO<br>
  421. PERL = perl<br>
  422. REGISTRY = Registry<br>
  423. ! LIB = CONFIGURE_NETCDF_LIB_PATH -L../external/RSL/RSL -lrsl -lmass \<br>
  424. -L../external/io_int -lwrfio_int \<br>
  425. ../frame/internal_header_util.o ../frame/pack_utils.o<br>
  426. LDFLAGS = -bmaxstack:256000000<br>
  427. --- 732,823 ----<br>
  428. <br>
  429. <br>
  430. ###########################################################<br>
  431. ! #ARCH AIX DM (RSL-IO, IBM-MPI)(PARALLEL HDF5)<br>
  432. #<br>
  433. DMPARALLEL = 1<br>
  434. ! SFC = xlf90_r <br>
  435. SCC = xlc_r<br>
  436. ! FC = mpxlf90_r <br>
  437. CC = mpcc_r<br>
  438. CFLAGS = -DNOUNDERSCORE -DWRF_RSL_IO -I../external/RSL/RSL -DDM_PARALLEL \<br>
  439. -DMAXDOM_MAKE=$(MAX_DOMAINS) -DMAXPROC_MAKE=$(MAX_PROC)<br>
  440. ! FCOPTIM = -O1 -qarch=auto -qmaxmem=-1<br>
  441. ! #FCOPTIM = -O2 <br>
  442. ! FCDEBUG = -g -qfullpath<br>
  443. ! FCBASEOPTS = -qspill=20000 $(FCDEBUG)<br>
  444. ! FCFLAGS = $(FCOPTIM) $(FCBASEOPTS)<br>
  445. ! INCLUDE_MODULES = -I../external/io_netcdf -I../external/io_phdf5 -I../external/io_int \<br>
  446. ! -I../frame -I../share -I../phys -I../inc<br>
  447. ! EXTRAMODULES = <br>
  448. ! ARCHFLAGS = -DWRF_RSL_IO -DRSL -DDM_PARALLEL -DIWORDSIZE=4 -DRWORDSIZE=4 \<br>
  449. ! -DLWORDSIZE=4 CONFIGURE_NETCDF_FLAG CONFIGURE_PHDF5_FLAG -DTRIEDNTRUE -DONLY_WRFMODEL_IO -DINTIO<br>
  450. ! PERL = perl<br>
  451. ! REGISTRY = Registry<br>
  452. ! LIB = CONFIGURE_NETCDF_LIB_PATH CONFIGURE_PHDF5_LIB_PATH -L../external/RSL/RSL -lrsl -lmass \<br>
  453. ! -L../external/io_int -lwrfio_int \<br>
  454. ! ../frame/internal_header_util.o ../frame/pack_utils.o<br>
  455. ! LDFLAGS = -bmaxstack:256000000 -bmaxdata:0x80000000<br>
  456. ! CPP = /lib/cpp<br>
  457. ! CPPFLAGS = -I$(LIBINCLUDE) -C -P $(ARCHFLAGS) -I../external/RSL/RSL `cat ../inc/dm_comm_cpp_flags`<br>
  458. ! MAX_DOMAINS = 4<br>
  459. ! MAX_PROC = 1024<br>
  460. ! AR = ar ru<br>
  461. ! M4 = m4 -B 8000<br>
  462. ! RANLIB = ranlib<br>
  463. ! <br>
  464. ! externals : CONFIGURE_WRFIO_NF CONFIGURE_WRFIO_PHDF5 ../external/RSL/RSL/librsl.a wrfio_int<br>
  465. ! ( /bin/cp ../tools/gen_comms_warning ../tools/gen_comms.c ; cat ../external/RSL/gen_comms.c
  466. &gt;&gt; ../tools/gen_comms.c ; \<br>
  467. ! /bin/cp module_dm_warning module_dm.F ; cat ../external/RSL/module_dm.F &gt;&gt; module_dm.F )<br>
  468. ! <br>
  469. ! wrfio_nf : <br>
  470. ! ( cd ../external/io_netcdf ; make NETCDFPATH=CONFIGURE_NETCDF_PATH FC="$(SFC)
  471. $(FCDEBUG) -qarch=auto -qzerosize" ; /bin/cp wrf_io_flags.h wrf_status_codes.h
  472. ../../inc )<br>
  473. ! <br>
  474. ! wrfio_phdf5 : <br>
  475. ! ( cd ../external/io_phdf5 ; make PHDF5PATH=CONFIGURE_PHDF5_PATH FC="$(FC)
  476. $(FCDEBUG) -qarch=auto -qfree=F90 -qzerosize" ; /bin/cp wrf_io_flags.h wrf_status_codes.h
  477. ../../inc )<br>
  478. ! <br>
  479. ! wrfio_int : <br>
  480. ! ( cd ../external/io_int ; \<br>
  481. ! make CC=$(CC) FC="$(SFC) $(FCDEBUG) -qarch=auto -qzerosize" all diffwrf )<br>
  482. ! <br>
  483. ! ../external/RSL/RSL/librsl.a :<br>
  484. ! ( cd ../external/RSL/RSL ; make MAX_DOMAINS=$(MAX_DOMAINS) MAX_PROC=$(MAX_PROC) LEARN_BCAST=-DLEARN_BCAST sp2 )<br>
  485. ! <br>
  486. ! # compile these without high optimization to speed compile<br>
  487. ! mediation_force_domain.o : mediation_force_domain.F<br>
  488. ! mediation_interp_domain.o : mediation_interp_domain.F<br>
  489. ! <br>
  490. ! mediation_force_domain.o \<br>
  491. ! mediation_interp_domain.o :<br>
  492. ! $(RM) $@<br>
  493. ! sed /\!.\*\'/s/\'//g $*.F &gt; $*.b<br>
  494. ! $(CPP) -I../inc $(CPPFLAGS) $*.b &gt; $*.f<br>
  495. ! $(RM) $*.b<br>
  496. ! $(FC) -c $(FCBASEOPTS) $(MODULE_DIRS) $*.f<br>
  497. ! <br>
  498. ! ###########################################################<br>
  499. ! #ARCH AIX DM (RSL-IO, IBM-MPI)(SERIAL HDF5)<br>
  500. ! #<br>
  501. ! DMPARALLEL = 1<br>
  502. ! SFC = xlf90_r <br>
  503. ! SCC = xlc_r<br>
  504. ! FC = mpxlf90_r <br>
  505. ! CC = mpcc_r<br>
  506. ! CFLAGS = -DNOUNDERSCORE -DWRF_RSL_IO -I../external/RSL/RSL -DDM_PARALLEL \<br>
  507. ! -DMAXDOM_MAKE=$(MAX_DOMAINS) -DMAXPROC_MAKE=$(MAX_PROC)<br>
  508. ! FCOPTIM = -O1 -qarch=auto -qmaxmem=32676<br>
  509. ! #FCOPTIM = -O2 <br>
  510. FCDEBUG = # -g -qfullpath<br>
  511. FCBASEOPTS = -qspill=20000 $(FCDEBUG)<br>
  512. FCFLAGS = $(FCOPTIM) $(FCBASEOPTS)<br>
  513. ! INCLUDE_MODULES = -I../external/io_netcdf -I../external/io_hdf5 -I../external/io_int \<br>
  514. -I../frame -I../share -I../phys -I../inc<br>
  515. EXTRAMODULES = <br>
  516. ARCHFLAGS = -DWRF_RSL_IO -DRSL -DDM_PARALLEL -DIWORDSIZE=4 -DRWORDSIZE=4 \<br>
  517. ! -DLWORDSIZE=4 CONFIGURE_NETCDF_FLAG CONFIGURE_HDF5_FLAG -DTRIEDNTRUE -DONLY_WRFMODEL_IO -DINTIO<br>
  518. PERL = perl<br>
  519. REGISTRY = Registry<br>
  520. ! LIB = CONFIGURE_NETCDF_LIB_PATH CONFIGURE_HDF5_LIB_PATH \<br>
  521. ! -L../external/RSL/RSL -lrsl -lmass \<br>
  522. -L../external/io_int -lwrfio_int \<br>
  523. ../frame/internal_header_util.o ../frame/pack_utils.o<br>
  524. LDFLAGS = -bmaxstack:256000000<br>
  525. ***************<br>
  526. *** 764,776 ****<br>
  527. M4 = m4 -B 8000<br>
  528. RANLIB = ranlib<br>
  529. <br>
  530. ! externals : CONFIGURE_WRFIO_NF ../external/RSL/RSL/librsl.a wrfio_int<br>
  531. ( /bin/cp ../tools/gen_comms_warning ../tools/gen_comms.c ; cat ../external/RSL/gen_comms.c
  532. &gt;&gt; ../tools/gen_comms.c ; \<br>
  533. /bin/cp module_dm_warning module_dm.F ; cat ../external/RSL/module_dm.F &gt;&gt; module_dm.F )<br>
  534. <br>
  535. wrfio_nf : <br>
  536. ( cd ../external/io_netcdf ; make NETCDFPATH=CONFIGURE_NETCDF_PATH FC="$(SFC)
  537. $(FCDEBUG) -qarch=auto -qzerosize" ; /bin/cp wrf_io_flags.h wrf_status_codes.h
  538. ../../inc )<br>
  539. <br>
  540. wrfio_int : <br>
  541. ( cd ../external/io_int ; \<br>
  542. make CC=$(CC) FC="$(SFC) $(FCDEBUG) -qarch=auto -qzerosize" all diffwrf )<br>
  543. --- 829,844 ----<br>
  544. M4 = m4 -B 8000<br>
  545. RANLIB = ranlib<br>
  546. <br>
  547. ! externals : CONFIGURE_WRFIO_NF CONFIGURE_WRFIO_HDF5 ../external/RSL/RSL/librsl.a wrfio_int<br>
  548. ( /bin/cp ../tools/gen_comms_warning ../tools/gen_comms.c ; cat ../external/RSL/gen_comms.c
  549. &gt;&gt; ../tools/gen_comms.c ; \<br>
  550. /bin/cp module_dm_warning module_dm.F ; cat ../external/RSL/module_dm.F &gt;&gt; module_dm.F )<br>
  551. <br>
  552. wrfio_nf : <br>
  553. ( cd ../external/io_netcdf ; make NETCDFPATH=CONFIGURE_NETCDF_PATH FC="$(SFC)
  554. $(FCDEBUG) -qarch=auto -qzerosize" ; /bin/cp wrf_io_flags.h wrf_status_codes.h
  555. ../../inc )<br>
  556. <br>
  557. + wrfio_hdf5 : <br>
  558. + ( cd ../external/io_hdf5 ; make HDF5PATH=CONFIGURE_HDF5_PATH FC="$(SFC)
  559. $(FCDEBUG) -qarch=auto -qfree=F90 -qzerosize" ; /bin/cp wrf_io_flags.h wrf_status_codes.h
  560. ../../inc )<br>
  561. + <br>
  562. wrfio_int : <br>
  563. ( cd ../external/io_int ; \<br>
  564. make CC=$(CC) FC="$(SFC) $(FCDEBUG) -qarch=auto -qzerosize" all diffwrf )<br>
  565. ***************<br>
  566. *** 1650,1663 ****<br>
  567. FCBASEOPTS = -byteswapio -Ktrap=fp -Mfree -tp p6 $(FCDEBUG)<br>
  568. FCFLAGS = $(FCOPTIM) $(FCBASEOPTS)<br>
  569. ARCHFLAGS = -DDEREF_KLUDGE -DIO_DEREF_KLUDGE -DIWORDSIZE=4 -DRWORDSIZE=4 -DLWORDSIZE=4 \<br>
  570. ! CONFIGURE_NETCDF_FLAG \<br>
  571. -DTRIEDNTRUE -DONLY_WRFMODEL_IO<br>
  572. ! INCLUDE_MODULES = -module ../main -I../external/io_netcdf -I../external/io_int \<br>
  573. -I../frame -I../share -I../phys -I../inc<br>
  574. EXTRAMODULES = <br>
  575. PERL = perl<br>
  576. REGISTRY = Registry<br>
  577. ! LIB = CONFIGURE_NETCDF_LIB_PATH \<br>
  578. ../frame/internal_header_util.o ../frame/pack_utils.o<br>
  579. LDFLAGS =<br>
  580. CPP = /lib/cpp<br>
  581. --- 1718,1731 ----<br>
  582. FCBASEOPTS = -byteswapio -Ktrap=fp -Mfree -tp p6 $(FCDEBUG)<br>
  583. FCFLAGS = $(FCOPTIM) $(FCBASEOPTS)<br>
  584. ARCHFLAGS = -DDEREF_KLUDGE -DIO_DEREF_KLUDGE -DIWORDSIZE=4 -DRWORDSIZE=4 -DLWORDSIZE=4 \<br>
  585. ! CONFIGURE_NETCDF_FLAG CONFIGURE_HDF5_FLAG\<br>
  586. -DTRIEDNTRUE -DONLY_WRFMODEL_IO<br>
  587. ! INCLUDE_MODULES = -module ../main -I../external/io_netcdf -I../external/io_hdf5 -I../external/io_int \<br>
  588. -I../frame -I../share -I../phys -I../inc<br>
  589. EXTRAMODULES = <br>
  590. PERL = perl<br>
  591. REGISTRY = Registry<br>
  592. ! LIB = CONFIGURE_NETCDF_LIB_PATH CONFIGURE_HDF5_LIB_PATH \<br>
  593. ../frame/internal_header_util.o ../frame/pack_utils.o<br>
  594. LDFLAGS =<br>
  595. CPP = /lib/cpp<br>
  596. ***************<br>
  597. *** 1666,1672 ****<br>
  598. M4 = m4<br>
  599. RANLIB = ranlib<br>
  600. <br>
  601. ! externals : CONFIGURE_WRFIO_NF wrfio_int<br>
  602. ( /bin/cp module_dm_warning module_dm.F ; cat module_dm_stubs.F &gt;&gt; module_dm.F )<br>
  603. <br>
  604. wrfio_nf : <br>
  605. --- 1734,1740 ----<br>
  606. M4 = m4<br>
  607. RANLIB = ranlib<br>
  608. <br>
  609. ! externals : CONFIGURE_WRFIO_NF CONFIGURE_WRFIO_HDF5 wrfio_int<br>
  610. ( /bin/cp module_dm_warning module_dm.F ; cat module_dm_stubs.F &gt;&gt; module_dm.F )<br>
  611. <br>
  612. wrfio_nf : <br>
  613. ***************<br>
  614. *** 1675,1680 ****<br>
  615. --- 1743,1754 ----<br>
  616. FFLAGS='$(FCFLAGS) -ICONFIGURE_NETCDF_PATH/include' ; \<br>
  617. /bin/cp wrf_io_flags.h wrf_status_codes.h ../../inc )<br>
  618. <br>
  619. + wrfio_hdf5 : <br>
  620. + ( cd ../external/io_hdf5 ; \<br>
  621. + make HDF5PATH=CONFIGURE_HDF5_PATH FC=$(FC) TRADFLAG="-traditional" \<br>
  622. + FFLAGS='$(FCFLAGS) -ICONFIGURE_HDF5_PATH/lib' ; \<br>
  623. + /bin/cp wrf_io_flags.h wrf_status_codes.h ../../inc )<br>
  624. + <br>
  625. wrfio_int : <br>
  626. ( cd ../external/io_int ; \<br>
  627. make CC=$(CC) FC="$(SFC) $(FCDEBUG) $(FCBASEOPTS)" \<br>
  628. </td>
  629. </tr>
  630. </tbody>
  631. </table>
  632. <p><br>
  633. </p>
  634. <blockquote>
  635. <ul>
  636. </ul><p></p>
  637. </blockquote>
  638. <p><i>Modifications of source code inside WRF</i><b><br>
  639. </b></p>
  640. <p>The<i> io_hdf5</i> and/or<i> io_phdf5</i> modules must be added to the WRF source. In addition, the WRF source must be modified in a few places.<br>
  641. </p>
  642. <p>The 'frame/md_calls.m4' must be modified to recognize the HDF modules.<br>
  643. </p>
  644. <blockquote>
  645. </blockquote>
  646. <table cellpadding="2" cellspacing="2" border="1" width="90%" align="center">
  647. <tbody>
  648. <tr>
  649. <td valign="top">*** ../WRFV1/frame/md_calls.m4 Mon Dec 10 18:10:43 2001<br>
  650. --- ./WRFV1-with-hdf/frame/md_calls.m4 Thu May 13 12:18:44 2004<br>
  651. ***************<br>
  652. *** 70,78 ****<br>
  653. CALL wrf_dm_bcast_bytes( Status, IWORDSIZE )<br>
  654. ENDIF<br>
  655. #endif<br>
  656. ! #ifdef HDF<br>
  657. ! CASE ( IO_HDF )<br>
  658. ! CALL ext_hdf_$1_$2_$6_$3$4 ( Hndl, Element, ifelse($6,td,`DateStr,') ifelse($2,var,`Varname,') Data, &amp;<br>
  659. ifelse($4,char,,`locCount, ifelse($1,get,`Outcount,')') Status )<br>
  660. #endif<br>
  661. #ifdef XXX<br>
  662. --- 70,99 ----<br>
  663. CALL wrf_dm_bcast_bytes( Status, IWORDSIZE )<br>
  664. ENDIF<br>
  665. #endif<br>
  666. ! #ifdef HDF5<br>
  667. ! CASE ( IO_HDF5 )<br>
  668. ! IF ( multi_files(io_form) .OR. wrf_dm_on_monitor() ) THEN<br>
  669. ! CALL ext_hdf5_$1_$2_$6_$3$4 ( Hndl, Element, ifelse($6,td,`DateStr,') ifelse($2,var,`Varname,') Data, &amp;<br>
  670. ! ifelse($4,char,,`locCount, ifelse($1,get,`Outcount,')') Status )<br>
  671. ! ENDIF <br>
  672. ! IF ( .NOT. multi_files(io_form) ) THEN<br>
  673. ! ifelse($1,get,ifelse($3,integer,`CALL wrf_dm_bcast_bytes( locCount, IWORDSIZE )'))<br>
  674. ! ifelse($1,get,ifelse($3,integer,`CALL wrf_dm_bcast_bytes( Data, IWORDSIZE*locCount )'))<br>
  675. ! ifelse($1,get,ifelse($3,real, `CALL wrf_dm_bcast_bytes( locCount, IWORDSIZE )'))<br>
  676. ! ifelse($1,get,ifelse($3,real, `CALL wrf_dm_bcast_bytes( Data, RWORDSIZE*locCount )'))<br>
  677. ! ifelse($1,get,ifelse($3,logical,`CALL wrf_dm_bcast_bytes( locCount, IWORDSIZE )'))<br>
  678. ! ifelse($1,get,ifelse($3,logical,`CALL wrf_dm_bcast_bytes( Data, LWORDSIZE*locCount )'))<br>
  679. ! ifelse($1,get,ifelse($4,char, `len_of_str = LEN(Data)'))<br>
  680. ! ifelse($1,get,ifelse($4,char, `CALL wrf_dm_bcast_bytes( len_of_str, IWORDSIZE )'))<br>
  681. ! ifelse($1,get,ifelse($4,char, `CALL wrf_dm_bcast_string( Data, len_of_str )'))<br>
  682. ! CALL wrf_dm_bcast_bytes( Status, IWORDSIZE )<br>
  683. ! ENDIF<br>
  684. ! <br>
  685. ! <br>
  686. ! #endif<br>
  687. ! #ifdef PHDF5<br>
  688. ! CASE ( IO_PHDF5 )<br>
  689. ! CALL ext_phdf5_$1_$2_$6_$3$4 ( Hndl, Element, ifelse($6,td,`DateStr,') ifelse($2,var,`Varname,') Data, &amp;<br>
  690. ifelse($4,char,,`locCount, ifelse($1,get,`Outcount,')') Status )<br>
  691. #endif<br>
  692. #ifdef XXX<br>
  693. <br>
  694. </td>
  695. </tr>
  696. </tbody>
  697. </table>
  698. <p><br>
  699. The 'frame/module_io.F' file must be modified to add code to call the HDF5 modules if selected.<br>
  700. </p>
  701. <table cellpadding="2" cellspacing="2" border="1" width="90%" align="center">
  702. <tbody>
  703. <tr>
  704. <td valign="top">*** ../WRFV1/frame/module_io.F Tue Dec 3 14:10:48 2002<br>
  705. --- ./WRFV1-with-hdf/frame/module_io.F Thu May 13 12:18:45 2004<br>
  706. ***************<br>
  707. *** 34,39 ****<br>
  708. --- 34,48 ----<br>
  709. #ifdef NETCDF<br>
  710. CALL ext_ncd_ioinit( SysDepInfo, Status )<br>
  711. #endif<br>
  712. + <br>
  713. + #ifdef HDF5<br>
  714. + CALL ext_hdf5_ioinit(SysDepInfo, Status)<br>
  715. + #endif<br>
  716. + <br>
  717. + #ifdef PHDF5<br>
  718. + CALL ext_phdf5_ioinit(SysDepInfo, Status)<br>
  719. + #endif<br>
  720. + <br>
  721. END SUBROUTINE wrf_ioinit<br>
  722. <br>
  723. !--- ioexit<br>
  724. ***************<br>
  725. *** 47,52 ****<br>
  726. --- 56,70 ----<br>
  727. #ifdef NETCDF<br>
  728. CALL ext_ncd_ioexit( Status )<br>
  729. #endif<br>
  730. + <br>
  731. + #ifdef HDF5<br>
  732. + CALL ext_hdf5_ioexit(Status)<br>
  733. + #endif<br>
  734. + <br>
  735. + #ifdef PHDF5<br>
  736. + CALL ext_phdf5_ioexit(Status)<br>
  737. + #endif<br>
  738. + <br>
  739. IF ( use_output_servers() ) CALL ext_quilt_ioexit( Status )<br>
  740. END SUBROUTINE<br>
  741. <br>
  742. ***************<br>
  743. *** 134,139 ****<br>
  744. --- 152,179 ----<br>
  745. CALL ext_hdf_open_for_write_begin ( FileName , Comm_compute, Comm_io, SysDepInfo, &amp;<br>
  746. Hndl , Status )<br>
  747. #endif<br>
  748. + #ifdef HDF5<br>
  749. + CASE ( IO_HDF5 )<br>
  750. + IF ( multi_files(io_form) .OR. wrf_dm_on_monitor() ) THEN<br>
  751. + IF ( multi_files(io_form) ) THEN<br>
  752. + CALL wrf_get_myproc ( myproc )<br>
  753. + CALL append_to_filename ( LocFilename , FileName , myproc, 4 )<br>
  754. + ELSE<br>
  755. + LocFilename = FileName<br>
  756. + ENDIF<br>
  757. + CALL ext_hdf5_open_for_write_begin ( LocFileName , Comm_compute, Comm_io, SysDepInfo, &amp;<br>
  758. + Hndl , Status )<br>
  759. + ENDIF<br>
  760. + IF ( .NOT. multi_files(io_form) ) THEN<br>
  761. + CALL wrf_dm_bcast_bytes( Hndl, IWORDSIZE )<br>
  762. + CALL wrf_dm_bcast_bytes( Status, IWORDSIZE )<br>
  763. + ENDIF<br>
  764. + #endif<br>
  765. + #ifdef PHDF5<br>
  766. + CASE ( IO_PHDF5 )<br>
  767. + CALL ext_phdf5_open_for_write_begin ( FileName , Comm_compute, Comm_io, SysDepInfo, &amp;<br>
  768. + Hndl , Status )<br>
  769. + #endif<br>
  770. #ifdef XXX<br>
  771. CASE ( IO_XXX )<br>
  772. CALL ext_xxx_open_for_write_begin ( FileName , Comm_compute, Comm_io, SysDepInfo, &amp;<br>
  773. ***************<br>
  774. *** 214,219 ****<br>
  775. --- 254,270 ----<br>
  776. CASE ( IO_HDF )<br>
  777. CALL ext_hdf_open_for_write_commit ( Hndl , Status )<br>
  778. #endif<br>
  779. + #ifdef HDF5<br>
  780. + CASE ( IO_HDF5 )<br>
  781. + IF ( multi_files(io_form) .OR. wrf_dm_on_monitor() ) THEN<br>
  782. + CALL ext_hdf5_open_for_write_commit ( Hndl , Status )<br>
  783. + ENDIF<br>
  784. + IF ( .NOT. multi_files(io_form) ) CALL wrf_dm_bcast_bytes( Status, IWORDSIZE )<br>
  785. + #endif<br>
  786. + #ifdef PHDF5<br>
  787. + CASE ( IO_PHDF5 )<br>
  788. + CALL ext_phdf5_open_for_write_commit ( Hndl , Status )<br>
  789. + #endif<br>
  790. #ifdef XXX<br>
  791. CASE ( IO_XXX )<br>
  792. CALL ext_xxx_open_for_write_commit ( Hndl , Status )<br>
  793. ***************<br>
  794. *** 316,321 ****<br>
  795. --- 367,388 ----<br>
  796. CALL ext_hdf_open_for_read ( FileName , Comm_compute, Comm_io, SysDepInfo, &amp;<br>
  797. Hndl , Status )<br>
  798. #endif<br>
  799. + #ifdef HDF5<br>
  800. + CASE ( IO_HDF5 )<br>
  801. + IF ( multi_files(io_form) .OR. wrf_dm_on_monitor() ) THEN<br>
  802. + CALL ext_hdf5_open_for_read ( FileName , Comm_compute, Comm_io, SysDepInfo, &amp;<br>
  803. + Hndl , Status )<br>
  804. + ENDIF<br>
  805. + IF ( .NOT. multi_files(io_form) ) THEN<br>
  806. + CALL wrf_dm_bcast_bytes( Status, IWORDSIZE )<br>
  807. + CALL wrf_dm_bcast_bytes( Hndl, IWORDSIZE )<br>
  808. + ENDIF<br>
  809. + #endif<br>
  810. + #ifdef PHDF5<br>
  811. + CASE ( IO_PHDF5 )<br>
  812. + CALL ext_phdf5_open_for_read ( FileName , Comm_compute, Comm_io, SysDepInfo, &amp;<br>
  813. + Hndl , Status )<br>
  814. + #endif<br>
  815. #ifdef XXX<br>
  816. CASE ( IO_XXX )<br>
  817. CALL ext_xxx_open_for_read ( FileName , Comm_compute, Comm_io, SysDepInfo, &amp;<br>
  818. ***************<br>
  819. *** 420,425 ****<br>
  820. --- 487,502 ----<br>
  821. CASE ( IO_HDF )<br>
  822. CALL ext_hdf_inquire_opened ( Hndl, FileName , FileStatus, Status )<br>
  823. #endif<br>
  824. + #ifdef HDF5<br>
  825. + CASE ( IO_HDF5 )<br>
  826. + IF (wrf_dm_on_monitor()) CALL ext_hdf5_inquire_opened ( Hndl, FileName , FileStatus, Status )<br>
  827. + CALL wrf_dm_bcast_bytes( FileStatus, IWORDSIZE )<br>
  828. + CALL wrf_dm_bcast_bytes( Status , IWORDSIZE )<br>
  829. + #endif<br>
  830. + #ifdef PHDF5<br>
  831. + CASE ( IO_PHDF5 )<br>
  832. + CALL ext_phdf5_inquire_opened ( Hndl, FileName , FileStatus, Status )<br>
  833. + #endif<br>
  834. #ifdef XXX<br>
  835. CASE ( IO_XXX )<br>
  836. CALL ext_xxx_inquire_opened ( Hndl, FileName , FileStatus, Status )<br>
  837. ***************<br>
  838. *** 486,491 ****<br>
  839. --- 563,578 ----<br>
  840. CASE ( IO_HDF )<br>
  841. CALL ext_hdf_inquire_filename ( Hndl, FileName , FileStatus, Status )<br>
  842. #endif<br>
  843. + #ifdef HDF5<br>
  844. + CASE ( IO_HDF5 )<br>
  845. + IF (wrf_dm_on_monitor()) CALL ext_hdf5_inquire_filename ( Hndl, FileName , FileStatus, Status )<br>
  846. + CALL wrf_dm_bcast_bytes( FileStatus, IWORDSIZE )<br>
  847. + CALL wrf_dm_bcast_bytes( Status , IWORDSIZE )<br>
  848. + #endif<br>
  849. + #ifdef PHDF5<br>
  850. + CASE ( IO_PHDF5 )<br>
  851. + CALL ext_phdf5_inquire_filename ( Hndl, FileName , FileStatus, Status )<br>
  852. + #endif<br>
  853. #ifdef XXX<br>
  854. CASE ( IO_XXX )<br>
  855. CALL ext_xxx_inquire_filename ( Hndl, FileName , FileStatus, Status )<br>
  856. ***************<br>
  857. *** 607,612 ****<br>
  858. --- 694,708 ----<br>
  859. CASE ( IO_HDF )<br>
  860. CALL ext_ncd_ioclose( Hndl, Status )<br>
  861. #endif<br>
  862. + #ifdef HDF5<br>
  863. + CASE ( IO_HDF5 )<br>
  864. + IF ( multi_files(io_form) .OR. wrf_dm_on_monitor() ) CALL ext_hdf5_ioclose( Hndl, Status )<br>
  865. + CALL wrf_dm_bcast_bytes( Status, IWORDSIZE )<br>
  866. + #endif<br>
  867. + #ifdef PHDF5<br>
  868. + CASE ( IO_PHDF5 )<br>
  869. + CALL ext_phdf5_ioclose( Hndl, Status )<br>
  870. + #endif<br>
  871. #ifdef XXX<br>
  872. CASE ( IO_XXX )<br>
  873. CALL ext_xxx_ioclose( Hndl, Status )<br>
  874. ***************<br>
  875. *** 675,680 ****<br>
  876. --- 771,790 ----<br>
  877. CASE ( IO_HDF )<br>
  878. CALL ext_hdf_get_next_time( Hndl, DateStr, Status )<br>
  879. #endif<br>
  880. + #ifdef HDF5<br>
  881. + CASE ( IO_HDF5 )<br>
  882. + IF ( multi_files(io_form) .OR. wrf_dm_on_monitor() ) CALL ext_hdf5_get_next_time( Hndl, DateStr, Status )<br>
  883. + IF ( .NOT. multi_files(io_form) ) THEN<br>
  884. + CALL wrf_dm_bcast_bytes( Status, IWORDSIZE )<br>
  885. + len_of_str = LEN(DateStr)<br>
  886. + CALL wrf_dm_bcast_bytes( len_of_str, IWORDSIZE )<br>
  887. + CALL wrf_dm_bcast_string ( DateStr , len_of_str )<br>
  888. + ENDIF<br>
  889. + #endif<br>
  890. + #ifdef PHDF5<br>
  891. + CASE ( IO_PHDF5 )<br>
  892. + CALL ext_phdf5_get_next_time( Hndl, DateStr, Status )<br>
  893. + #endif<br>
  894. #ifdef XXX<br>
  895. CASE ( IO_XXX )<br>
  896. CALL ext_xxx_get_next_time( Hndl, DateStr, Status )<br>
  897. ***************<br>
  898. *** 742,747 ****<br>
  899. --- 852,866 ----<br>
  900. CASE ( IO_HDF )<br>
  901. CALL ext_hdf_set_time( Hndl, DateStr, Status )<br>
  902. #endif<br>
  903. + #ifdef HDF5<br>
  904. + CASE ( IO_HDF5 )<br>
  905. + IF ( multi_files(io_form) .OR. wrf_dm_on_monitor() ) CALL ext_hdf5_set_time( Hndl, DateStr, Status )<br>
  906. + CALL wrf_dm_bcast_bytes( Status, IWORDSIZE )<br>
  907. + #endif<br>
  908. + #ifdef PHDF5<br>
  909. + CASE ( IO_PHDF5 )<br>
  910. + CALL ext_phdf5_set_time( Hndl, DateStr, Status )<br>
  911. + #endif<br>
  912. #ifdef XXX<br>
  913. CASE ( IO_XXX )<br>
  914. CALL ext_xxx_set_time( Hndl, DateStr, Status )<br>
  915. ***************<br>
  916. *** 875,880 ****<br>
  917. --- 994,1002 ----<br>
  918. #ifdef HDF<br>
  919. EXTERNAL ext_hdf_read_field<br>
  920. #endif<br>
  921. + #ifdef HDF5<br>
  922. + EXTERNAL ext_hdf5_read_field<br>
  923. + #endif<br>
  924. #ifdef XXX<br>
  925. EXTERNAL ext_xxx_read_field<br>
  926. #endif<br>
  927. ***************<br>
  928. *** 911,916 ****<br>
  929. --- 1033,1058 ----<br>
  930. PatchStart , PatchEnd , &amp;<br>
  931. Status )<br>
  932. #endif<br>
  933. + #ifdef HDF5<br>
  934. + CASE ( IO_HDF5 )<br>
  935. + CALL call_pkg_and_dist ( ext_hdf5_read_field, multi_files(io_form), &amp;<br>
  936. + Hndl , DateStr , VarName , Field , FieldType , Comm , IOComm , &amp;<br>
  937. + DomainDesc , bdy_mask, MemoryOrder , Stagger , DimNames , &amp;<br>
  938. + DomainStart , DomainEnd , &amp;<br>
  939. + MemoryStart , MemoryEnd , &amp;<br>
  940. + PatchStart , PatchEnd , &amp;<br>
  941. + Status )<br>
  942. + #endif<br>
  943. + #ifdef PHDF5 <br>
  944. + CASE (IO_PHDF5)<br>
  945. + CALL ext_phdf5_read_field ( &amp;<br>
  946. + Hndl , DateStr , VarName , Field , FieldType , Comm , IOComm , &amp;<br>
  947. + DomainDesc , MemoryOrder , Stagger , DimNames , &amp;<br>
  948. + DomainStart , DomainEnd , &amp;<br>
  949. + MemoryStart , MemoryEnd , &amp;<br>
  950. + PatchStart , PatchEnd , &amp;<br>
  951. + Status )<br>
  952. + #endif<br>
  953. #ifdef XXX<br>
  954. CASE ( IO_XXX )<br>
  955. CALL call_pkg_and_dist ( ext_xxx_read_field, multi_files(io_form), &amp;<br>
  956. ***************<br>
  957. *** 994,999 ****<br>
  958. --- 1136,1144 ----<br>
  959. #ifdef HDF<br>
  960. EXTERNAL ext_hdf_write_field<br>
  961. #endif<br>
  962. + #ifdef HDF5<br>
  963. + EXTERNAL ext_hdf5_write_field<br>
  964. + #endif<br>
  965. #ifdef XXX<br>
  966. EXTERNAL ext_xxx_write_field<br>
  967. #endif<br>
  968. ***************<br>
  969. *** 1028,1033 ****<br>
  970. --- 1173,1198 ----<br>
  971. PatchStart , PatchEnd , &amp;<br>
  972. Status )<br>
  973. #endif<br>
  974. + #ifdef HDF5<br>
  975. + CASE ( IO_HDF5 )<br>
  976. + CALL collect_fld_and_call_pkg ( ext_hdf5_write_field, multi_files(io_form), &amp;<br>
  977. + Hndl , DateStr , VarName , Field , FieldType , Comm , IOComm , &amp;<br>
  978. + DomainDesc , bdy_mask, MemoryOrder , Stagger , DimNames , &amp;<br>
  979. + DomainStart , DomainEnd , &amp;<br>
  980. + MemoryStart , MemoryEnd , &amp;<br>
  981. + PatchStart , PatchEnd , &amp;<br>
  982. + Status )<br>
  983. + #endif<br>
  984. + #ifdef PHDF5<br>
  985. + CASE ( IO_PHDF5 )<br>
  986. + CALL ext_phdf5_write_field ( &amp;<br>
  987. + Hndl , DateStr , VarName , Field , FieldType , Comm , IOComm , &amp;<br>
  988. + DomainDesc , MemoryOrder , Stagger , DimNames , &amp;<br>
  989. + DomainStart , DomainEnd , &amp;<br>
  990. + MemoryStart , MemoryEnd , &amp;<br>
  991. + PatchStart , PatchEnd , &amp;<br>
  992. + Status )<br>
  993. + #endif<br>
  994. #ifdef XXX<br>
  995. CASE ( IO_XXX )<br>
  996. CALL collect_fld_and_call_pkg ( ext_xxx_write_field, multi_files(io_form), &amp;<br>
  997. ***************<br>
  998. *** 1115,1120 ****<br>
  999. --- 1280,1293 ----<br>
  1000. DomainStart , DomainEnd , &amp;<br>
  1001. Status )<br>
  1002. #endif<br>
  1003. + #ifdef HDF5<br>
  1004. + CASE ( IO_HDF5 )<br>
  1005. + write(*,*) "NOT IMPLEMENT at HDF5" <br>
  1006. + ! CALL ext_hdf5_get_var_info ( Hndl , VarName , NDim , &amp;<br>
  1007. + ! MemoryOrder , Stagger , &amp;<br>
  1008. + ! DomainStart , DomainEnd , &amp;<br>
  1009. + ! Status )<br>
  1010. + #endif<br>
  1011. #ifdef XXX<br>
  1012. CASE ( IO_XXX )<br>
  1013. CALL ext_xxx_get_var_info ( Hndl , VarName , NDim , &amp;<br>
  1014. <br>
  1015. </td>
  1016. </tr>
  1017. </tbody>
  1018. </table>
  1019. <p><br>
  1020. The 'share/module_io.F' file must be modified to recognize the HDF5 options for IO.<br>
  1021. </p>
  1022. <table cellpadding="2" cellspacing="2" border="1" width="90%" align="center">
  1023. <tbody>
  1024. <tr>
  1025. <td valign="top">*** ../WRFV1/share/module_io_wrf.F Tue Feb 18 14:26:22 2003<br>
  1026. --- ./WRFV1-with-hdf/share/module_io_wrf.F Thu May 13 12:18:46 2004<br>
  1027. ***************<br>
  1028. *** 1032,1037 ****<br>
  1029. --- 1032,1079 ----<br>
  1030. ,Status )<br>
  1031. ENDIF<br>
  1032. <br>
  1033. + IF (io_form .EQ. IO_HDF5) THEN<br>
  1034. + CALL wrf_put_var_ti_char( &amp;<br>
  1035. + DataHandle &amp; ! DataHandle<br>
  1036. + ,"description" &amp; ! Element<br>
  1037. + ,Var &amp; ! Data Name<br>
  1038. + ,Desc &amp; ! Data<br>
  1039. + ,Status )<br>
  1040. + CALL wrf_put_var_ti_char( &amp;<br>
  1041. + DataHandle &amp; ! DataHandle<br>
  1042. + ,"units" &amp; ! Element<br>
  1043. + ,Var &amp; ! Data Name<br>
  1044. + ,Units &amp; ! Data<br>
  1045. + ,Status )<br>
  1046. + CALL wrf_put_var_ti_char( &amp;<br>
  1047. + DataHandle &amp; ! DataHandle<br>
  1048. + ,"stagger" &amp; ! Element<br>
  1049. + ,Var &amp; ! Data Name<br>
  1050. + ,Stagger &amp; ! Data<br>
  1051. 4/ Build WRF<br>
  1052. <br>
  1053. + ,Status )<br>
  1054. + ENDIF<br>
  1055. + <br>
  1056. + IF (io_form .EQ. IO_PHDF5) THEN<br>
  1057. + CALL wrf_put_var_ti_char( &amp;<br>
  1058. + DataHandle &amp; ! DataHandle<br>
  1059. + ,"description" &amp; ! Element<br>
  1060. + ,Var &amp; ! Data Name<br>
  1061. + ,Desc &amp; ! Data<br>
  1062. + ,Status )<br>
  1063. + CALL wrf_put_var_ti_char( &amp;<br>
  1064. + DataHandle &amp; ! DataHandle<br>
  1065. + ,"units" &amp; ! Element<br>
  1066. + ,Var &amp; ! Data Name<br>
  1067. + ,Units &amp; ! Data<br>
  1068. + ,Status )<br>
  1069. + CALL wrf_put_var_ti_char( &amp;<br>
  1070. + DataHandle &amp; ! DataHandle<br>
  1071. + ,"stagger" &amp; ! Element<br>
  1072. + ,Var &amp; ! Data Name<br>
  1073. + ,Stagger &amp; ! Data<br>
  1074. + ,Status )<br>
  1075. + ENDIF<br>
  1076. + <br>
  1077. IF ( wrf_at_debug_level(300) ) THEN<br>
  1078. WRITE(wrf_err_message,*) debug_message,' Status = ',Status<br>
  1079. CALL wrf_message ( TRIM(wrf_err_message) )<br>
  1080. <br>
  1081. </td>
  1082. </tr>
  1083. </tbody>
  1084. </table>
  1085. <p>The 'Makefile' for the 'external' directory must be updated to build the new IO modules.<br>
  1086. </p>
  1087. <table cellpadding="2" cellspacing="2" border="1" width="90%" align="center">
  1088. <tbody>
  1089. <tr>
  1090. <td valign="top">*** ../WRFV1/external/Makefile Mon Dec 10 18:07:21 2001<br>
  1091. --- ./WRFV1-with-hdf/external/Makefile Thu May 13 12:18:38 2004<br>
  1092. ***************<br>
  1093. *** 3,12 ****<br>
  1094. ( cd RSL/RSL ; make clean )<br>
  1095. ( cd io_netcdf ; make clean )<br>
  1096. ( cd io_int ; make clean )<br>
  1097. <br>
  1098. superclean : clean<br>
  1099. /bin/rm -f RSL/RSL/librsl.a RSL/RSL/rsl.inc<br>
  1100. /bin/rm -f io_netcdf/libwrfio_nf.a io_netcdf/diffwrf io_netcdf/*.o io_netcdf/*.f \<br>
  1101. io_int/libwrfio_int.a io_int/diffwrf */*.mod<br>
  1102. ! <br>
  1103. ! <br>
  1104. --- 3,14 ----<br>
  1105. ( cd RSL/RSL ; make clean )<br>
  1106. ( cd io_netcdf ; make clean )<br>
  1107. ( cd io_int ; make clean )<br>
  1108. + (cd io_hdf5; make clean)<br>
  1109. + (cd io_phdf5; make clean)<br>
  1110. <br>
  1111. superclean : clean<br>
  1112. /bin/rm -f RSL/RSL/librsl.a RSL/RSL/rsl.inc<br>
  1113. /bin/rm -f io_netcdf/libwrfio_nf.a io_netcdf/diffwrf io_netcdf/*.o io_netcdf/*.f \<br>
  1114. io_int/libwrfio_int.a io_int/diffwrf */*.mod<br>
  1115. ! /bin/rm -f io_phdf5/*.a io_phdf5/*.o *.f *.mod<br>
  1116. ! /bin/rm -f io_hdf5/*.a io_hdf5/*.o *.f *.mod<br>
  1117. <br>
  1118. <br>
  1119. </td>
  1120. </tr>
  1121. </tbody>
  1122. </table>
  1123. <p><b><small>
  1124. <font size="4"><small></small></font></small></b><br>
  1125. </p>
  1126. <p><i>Last Modified: 17 May 2004 </i></p>
  1127. <blockquote>
  1128. <blockquote>
  1129. <p> </p>
  1130. </blockquote>
  1131. </blockquote>
  1132. <br>
  1133. <br>
  1134. </body></html>