| 1 |
********************************************************************** |
| 2 |
* This directory provides sample programs for the user to run to * |
| 3 |
* check if the HDFEOS_5 library installed correctly. Below is a * |
| 4 |
* description of what routines are available and the order in * |
| 5 |
* which the routines should be run. * |
| 6 |
* Updated: 06/20/01 A.M. * |
| 7 |
* Aug 02 S.Z * |
| 8 |
********************************************************************** |
| 9 |
|
| 10 |
|
| 11 |
Swath Demonstration Programs |
| 12 |
---------------------------- |
| 13 |
|
| 14 |
A. C - programs |
| 15 |
~~~~~~~~~~~~~~~ |
| 16 |
he5_sw_setup --- creates HDFEOS_5 swath file "Swath.h5"; |
| 17 |
sets a single swath structure "Swath1"; |
| 18 |
defines dimensions and the geolocation |
| 19 |
relations between them. |
| 20 |
|
| 21 |
he5_sw_definefields --- defines a number of fields within the swath. |
| 22 |
|
| 23 |
he5_sw_writedata --- writes data to the "Longitude", "Latitude", |
| 24 |
and "Spectra" fields; sets up global, group, |
| 25 |
and local attributes. |
| 26 |
|
| 27 |
he5_sw_readdata --- reads data from the "Longitude" field; reads |
| 28 |
global, group, and local attributes. |
| 29 |
|
| 30 |
he5_sw_info --- retrieves and displays information on the |
| 31 |
swath dimensions, geolocation relations, |
| 32 |
swath fields, and (global/group/local) |
| 33 |
attributes. |
| 34 |
|
| 35 |
he5_sw_datainfo --- retrieves data type information for a |
| 36 |
specified object (field, attribute). |
| 37 |
|
| 38 |
he5_sw_subset --- demonstrates subsetting on the "Spectra" field. |
| 39 |
|
| 40 |
|
| 41 |
he5_sw_defunlimfld --- same as 'he5_sw_definefields' but defines |
| 42 |
"Spectra" field as having unlimited dimension. |
| 43 |
|
| 44 |
he5_sw_wrunlimfld --- same as 'he5_sw_writedata' but writes data to |
| 45 |
the "Spectra" field twice. |
| 46 |
|
| 47 |
he5_sw_wrextendrd --- demonstrates usage of unlimited dimension for |
| 48 |
appendible field "Count". |
| 49 |
|
| 50 |
|
| 51 |
Sequence of calls: |
| 52 |
|
| 53 |
1. he5_sw_setup |
| 54 |
he5_sw_definefields |
| 55 |
he5_sw_writedata |
| 56 |
he5_sw_readdata |
| 57 |
he5_sw_info |
| 58 |
he5_sw_datainfo |
| 59 |
he5_sw_subset |
| 60 |
|
| 61 |
2. he5_sw_setup |
| 62 |
he5_sw_defunlimfld |
| 63 |
he5_sw_wrunlimfld |
| 64 |
he5_sw_subset |
| 65 |
|
| 66 |
3. he5_sw_setup |
| 67 |
he5_sw_definefields |
| 68 |
he5_sw_wrextendrd |
| 69 |
|
| 70 |
|
| 71 |
Example of working with external data files |
| 72 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 73 |
he5_sw_setup --- creates HDFEOS_5 swath file "Swath.h5"; |
| 74 |
sets a single swath structure "Swath1"; |
| 75 |
defines dimensions (including dimension |
| 76 |
of external data set) and the geolocation |
| 77 |
relations between them. |
| 78 |
he5_sw_defexternalfld --- defines external field (data set) |
| 79 |
he5_sw_rdexternaldata --- reads data from external data file(s) to |
| 80 |
the external field |
| 81 |
he5_sw_wrexternaldata --- writes data to external field/data file(s) |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
B. FORTRAN-77 programs |
| 86 |
~~~~~~~~~~~~~~~~~~~~~~ |
| 87 |
he5_sw_setupF_64 --- see 'he5_sw_setup', creates "swath.h5" file. |
| 88 |
(he5_sw_setupF_32) |
| 89 |
|
| 90 |
he5_sw_definefieldsF_64 --- see 'he5_sw_definefields' |
| 91 |
(he5_sw_definefieldsF_32) |
| 92 |
|
| 93 |
he5_sw_writedataF_64 --- see 'he5_sw_writedata' |
| 94 |
(he5_sw_writedataF_32) |
| 95 |
|
| 96 |
he5_sw_readdataF_64 --- see 'he5_sw_readdata' |
| 97 |
(he5_sw_readdataF_32) |
| 98 |
|
| 99 |
he5_sw_infoF_64 --- see 'he5_sw_info' |
| 100 |
(he5_sw_infoF_32) |
| 101 |
|
| 102 |
he5_sw_subsetF_64 --- see 'he5_sw_subset' |
| 103 |
(he5_sw_subsetF_32) |
| 104 |
|
| 105 |
|
| 106 |
Sequence of calls: |
| 107 |
|
| 108 |
he5_sw_setupF_64 (...F_32) |
| 109 |
he5_sw_definefieldsF_64 (...F_32) |
| 110 |
he5_sw_writedataF_64 (...F_32) |
| 111 |
he5_sw_readdataF_64 (...F_32) |
| 112 |
he5_sw_infoF_64 (...F_32) |
| 113 |
he5_sw_subsetF_64 (...F_32) |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
=========================================================================== |
| 119 |
|
| 120 |
Grid Demonstration Programs |
| 121 |
--------------------------- |
| 122 |
|
| 123 |
A. C - programs |
| 124 |
~~~~~~~~~~~~~~~ |
| 125 |
he5_gd_setup --- creates HDFEOS_5 grid file "Grid.h5"; |
| 126 |
sets two grid structures. |
| 127 |
|
| 128 |
he5_gd_definefields --- defines fields within the two grids. |
| 129 |
|
| 130 |
he5_gd_writedata --- writes data to the fields within the two |
| 131 |
grids; sets up global, group, and local |
| 132 |
attributes. |
| 133 |
|
| 134 |
he5_gd_readdata --- reads data from the fields; reads |
| 135 |
global, group, and local attributes. |
| 136 |
|
| 137 |
he5_gd_info --- retrieves and displays information on the |
| 138 |
grid dimensions, projections, grid fields, |
| 139 |
and (global/group/local) attributes. |
| 140 |
|
| 141 |
he5_gd_datainfo --- retrieves data type information for a |
| 142 |
specified object (field, attribute). |
| 143 |
|
| 144 |
he5_gd_subset --- demonstrates subsetting on the "Temperature" |
| 145 |
field in the "PolarGrid" grid. |
| 146 |
|
| 147 |
|
| 148 |
he5_gd_defunlimfld --- defines "Vegetation" field having unlimited |
| 149 |
dimension. |
| 150 |
|
| 151 |
he5_gd_wrunlimfld --- sequentially writes data buffers of different |
| 152 |
size to the "Vegetation" field. |
| 153 |
|
| 154 |
Sequence of calls: |
| 155 |
|
| 156 |
1. he5_gd_setup |
| 157 |
he5_gd_definefields |
| 158 |
he5_gd_writedata |
| 159 |
he5_gd_readdata |
| 160 |
he5_gd_info |
| 161 |
he5_gd_datainfo |
| 162 |
he5_gd_subset |
| 163 |
|
| 164 |
2. he5_gd_setup |
| 165 |
he5_gd_defunlimfld |
| 166 |
he5_gd_wrunlimfld |
| 167 |
|
| 168 |
|
| 169 |
Example of working with external data files |
| 170 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 171 |
he5_gd_setup --- creates HDFEOS_5 grid file "Grid.h5"; |
| 172 |
sets two grid structures; defines |
| 173 |
dimensions (including dimension of |
| 174 |
external data set). |
| 175 |
he5_gd_defexternalfld --- defines external field (data set) |
| 176 |
he5_gd_rdexternaldata --- reads data from external data file(s) to |
| 177 |
the external field |
| 178 |
he5_gd_wrexternaldata --- writes data to external field/data file(s) |
| 179 |
|
| 180 |
|
| 181 |
B. FORTRAN-77 programs |
| 182 |
~~~~~~~~~~~~~~~~~~~~~~ |
| 183 |
he5_gd_setupF_64 --- see 'he5_gd_setup'; creates "grid.h5" file. |
| 184 |
(he5_gd_setupF_32) |
| 185 |
|
| 186 |
he5_gd_definefieldsF_64 --- see 'he5_gd_definefields' |
| 187 |
(he5_gd_definefieldsF_32) |
| 188 |
|
| 189 |
he5_gd_writedataF_64 --- see 'he5_gd_writedata' |
| 190 |
(he5_gd_writedataF_32) |
| 191 |
|
| 192 |
he5_gd_readdataF_64 --- see 'he5_gd_readdata' |
| 193 |
(he5_gd_readdataF_32) |
| 194 |
|
| 195 |
he5_gd_infoF_64 --- see 'he5_gd_info' |
| 196 |
(he5_gd_infoF_32) |
| 197 |
|
| 198 |
he5_gd_subsetF_64 --- see 'he5_gd_subset' |
| 199 |
(he5_gd_subsetF_32) |
| 200 |
|
| 201 |
|
| 202 |
Sequence of calls: |
| 203 |
|
| 204 |
he5_gd_setupF_64 (...F_32) |
| 205 |
he5_gd_definefieldsF_64 (...F_32) |
| 206 |
he5_gd_writedataF_64 (...F_32) |
| 207 |
he5_gd_readdataF_64 (...F_32) |
| 208 |
he5_gd_infoF_64 (...F_32) |
| 209 |
he5_gd_subsetF_64 (...F_32) |
| 210 |
|
| 211 |
=========================================================================== |
| 212 |
|
| 213 |
|
| 214 |
Point Demonstration Programs |
| 215 |
---------------------------- |
| 216 |
|
| 217 |
The sample codes described below use the following input data files |
| 218 |
(make sure these files are in the same directory with the sample codes) : |
| 219 |
|
| 220 |
fixedBuoy0.txt |
| 221 |
fixedBuoy1s.txt |
| 222 |
floatBuoy1.txt |
| 223 |
fixedBuoy1.txt |
| 224 |
floatBuoy0.txt |
| 225 |
simple.txt |
| 226 |
|
| 227 |
|
| 228 |
A. C - programs |
| 229 |
~~~~~~~~~~~~~~~ |
| 230 |
he5_pt_setup --- creates HDFEOS_5 point file "Point.h5"; |
| 231 |
|
| 232 |
he5_pt_definelevels --- defines levels within the point. |
| 233 |
|
| 234 |
he5_pt_writedata --- writes data to the specified levels. |
| 235 |
|
| 236 |
he5_pt_writeattrs --- writes attributes. |
| 237 |
|
| 238 |
he5_pt_readdata --- reads data from a level. |
| 239 |
|
| 240 |
he5_pt_readattrs --- reads attributes. |
| 241 |
|
| 242 |
he5_pt_updatelevels --- updates level data. |
| 243 |
|
| 244 |
he5_pt_datainfo --- retrieves data type information for a |
| 245 |
specified object within point. |
| 246 |
|
| 247 |
Sequence of calls: |
| 248 |
|
| 249 |
he5_pt_setup |
| 250 |
he5_pt_definelevels |
| 251 |
he5_pt_writedata |
| 252 |
he5_pt_writeattrs |
| 253 |
he5_pt_readdata |
| 254 |
he5_pt_readattrs |
| 255 |
he5_pt_updatelevels |
| 256 |
he5_pt_datainfo |
| 257 |
|
| 258 |
|
| 259 |
B. FORTRAN-77 programs |
| 260 |
~~~~~~~~~~~~~~~~~~~~~~ |
| 261 |
he5_pt_setupF_64 --- see 'he5_pt_setup'; creates "point.h5" file. |
| 262 |
(he5_pt_setupF_32) |
| 263 |
|
| 264 |
he5_pt_definelevelsF_64 --- see 'he5_pt_definelevels' |
| 265 |
(he5_pt_definelevelsF_32) |
| 266 |
|
| 267 |
he5_pt_writedataF_64 --- see 'he5_pt_writedata' |
| 268 |
(he5_pt_writedataF_32) |
| 269 |
|
| 270 |
he5_pt_writeattrsF_64 --- see 'he5_pt_writeattrs' |
| 271 |
(he5_pt_writeattrsF_32) |
| 272 |
|
| 273 |
he5_pt_readdataF_64 --- see 'he5_pt_readdata' |
| 274 |
(he5_pt_readdataF_32) |
| 275 |
|
| 276 |
he5_pt_readattrsF_64 --- see 'he5_pt_readattrs' |
| 277 |
(he5_pt_readattrsF_32) |
| 278 |
|
| 279 |
he5_pt_updatelevelsF_64 --- see 'he5_pt_updatelevels' |
| 280 |
(he5_pt_updatelevelsF_32) |
| 281 |
|
| 282 |
he5_pt_datainfoF_64 --- see 'he5_pt_datainfo' |
| 283 |
(he5_pt_datainfoF_32) |
| 284 |
|
| 285 |
|
| 286 |
Sequence of calls: |
| 287 |
|
| 288 |
he5_pt_setupF_64 (...F_32) |
| 289 |
he5_pt_definelevelsF_64 (...F_32) |
| 290 |
he5_pt_writedataF_64 (...F_32) |
| 291 |
he5_pt_writeattrsF_64 (...F_32) |
| 292 |
he5_pt_readdataF_64 (...F_32) |
| 293 |
he5_pt_readattrsF_64 (...F_32) |
| 294 |
he5_pt_updatelevelsF_64 (...F_32) |
| 295 |
he5_pt_datainfoF_64 (...F_32) |
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
===================================================================== |
| 300 |
|
| 301 |
|
| 302 |
ZA Demonstration Programs |
| 303 |
------------------------- |
| 304 |
|
| 305 |
A. C - programs |
| 306 |
~~~~~~~~~~~~~~ |
| 307 |
he5_za_setup --- creates HDFEOS_5 za file "ZA.h5"; |
| 308 |
sets a single za structure "ZA1"; |
| 309 |
defines dimensions. |
| 310 |
|
| 311 |
he5_za_definefields --- defines a number of fields within the za. |
| 312 |
|
| 313 |
he5_za_writedata --- writes data to the "Spectra" field; |
| 314 |
sets up global, group, and local attributes. |
| 315 |
|
| 316 |
he5_za_readdata --- reads data from the "Spectra" field; reads |
| 317 |
global, group, and local attributes. |
| 318 |
|
| 319 |
he5_za_info --- retrieves and displays information on the |
| 320 |
za dimensions, and (global/group/local) |
| 321 |
attributes. |
| 322 |
|
| 323 |
he5_za_datainfo --- retrieves data type information for a |
| 324 |
specified object (field, attribute). |
| 325 |
|
| 326 |
|
| 327 |
Sequence of calls: |
| 328 |
|
| 329 |
he5_za_setup |
| 330 |
he5_za_definefields |
| 331 |
he5_za_writedata |
| 332 |
he5_za_readdata |
| 333 |
he5_za_info |
| 334 |
he5_za_datainfo |
| 335 |
|
| 336 |
|
| 337 |
Example of working with external data files |
| 338 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 339 |
he5_za_setup --- creates HDFEOS_5 za file "ZA.h5"; |
| 340 |
sets a single za structure "ZA1"; |
| 341 |
defines dimensions (including dimension |
| 342 |
of external data set). |
| 343 |
he5_za_defexternalfld --- defines external field (data set) |
| 344 |
he5_za_rdexternaldata --- reads data from external data file(s) to |
| 345 |
the external field |
| 346 |
he5_za_wrexternaldata --- writes data to external field/data file(s) |
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
B. FORTRAN-77 programs |
| 351 |
~~~~~~~~~~~~~~~~~~~~~ |
| 352 |
he5_za_setupF_64 --- see 'he5_za_setup', creates "za.he5" file. |
| 353 |
(he5_za_setupF_32) |
| 354 |
|
| 355 |
he5_za_definefieldsF_64 --- see 'he5_za_definefields' |
| 356 |
(he5_za_definefieldsF_32) |
| 357 |
|
| 358 |
he5_za_writedataF_64 --- see 'he5_za_writedata' |
| 359 |
(he5_za_writedataF_32) |
| 360 |
|
| 361 |
he5_za_readdataF_64 --- see 'he5_za_readdata' |
| 362 |
(he5_za_readdataF_32) |
| 363 |
|
| 364 |
he5_za_infoF_64 --- see 'he5_za_info' |
| 365 |
(he5_za_infoF_32) |
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
Sequence of calls: |
| 370 |
|
| 371 |
he5_za_setupF_64 (...F_32) |
| 372 |
he5_za_definefieldsF_64 (...F_32) |
| 373 |
he5_za_writedataF_64 (...F_32) |
| 374 |
he5_za_readdataF_64 (...F_32) |
| 375 |
he5_za_infoF_64 (...F_32) |
| 376 |
|
| 377 |
|
| 378 |
====================================================================================== |
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|