387 | | |
388 | | |
| 400 | Once the NcML dataset is created and we get an idea of the nature of the variables stored, the `loadData` function is used to retrieve the variables desired at selected dimensional slices. In this particular example, we will load the temperature data from the NCEP reanalysis in the Iberian Peninsula. |
| 401 | |
| 402 | We have a look again to the description of the variable temperature, as provided by the `dataInventory`: |
| 403 | |
| 404 | {{{ |
| 405 | > str(inv.iberiaNCEP$T) |
| 406 | List of 5 |
| 407 | $ Description: chr "Temperature" |
| 408 | $ DataType : chr "float" |
| 409 | $ Units : chr "K" |
| 410 | $ TimeStep :Class 'difftime' atomic [1:1] 24 |
| 411 | .. ..- attr(*, "tzone")= chr "" |
| 412 | .. ..- attr(*, "units")= chr "hours" |
| 413 | $ Dimensions :List of 4 |
| 414 | ..$ level:List of 3 |
| 415 | .. ..$ Type : chr "Pressure" |
| 416 | .. ..$ Units : chr "millibar" |
| 417 | .. ..$ Values: num 850 |
| 418 | ..$ time :List of 3 |
| 419 | .. ..$ Type : chr "Time" |
| 420 | .. ..$ Units : chr "days since 1950-01-01 00:00:00" |
| 421 | .. ..$ Values: POSIXlt[1:16071], format: "1958-01-01" "1958-01-02" "1958-01-03" "1958-01-04" ... |
| 422 | ..$ lat :List of 3 |
| 423 | .. ..$ Type : chr "Lat" |
| 424 | .. ..$ Units : chr "degrees north" |
| 425 | .. ..$ Values: num [1:6] 35 37.5 40 42.5 45 47.5 |
| 426 | ..$ lon :List of 3 |
| 427 | .. ..$ Type : chr "Lon" |
| 428 | .. ..$ Units : chr "degrees east" |
| 429 | .. ..$ Values: num [1:9] -15 -12.5 -10 -7.5 -5 -2.5 0 2.5 5 |
| 430 | |
| 431 | }}} |
| 432 | |
| 433 | As we can see, the variable T has vertical levels. In this case, the only level available is at 850 mb. The variable is daily, as we can see in the `TimeStep` element of the list, and the original units are Kelvin. |
| 434 | |
| 435 | There are several options for spatial selection using the 'loadData` function. For instance, if we want the whole domain of teh dataset () |
| 436 | |
| 437 | |
| 438 | |
| 439 | = Using standard variables via vocabulary and dictionary = |
| 440 | |
| 441 | |
| 442 | |