| 1 | = Visualisation and Animation of ERA5 Reanalysis Climate Data = |
| 2 | == Prerequisites == |
| 3 | === NetCDF/HDF5 (on JURECA) === |
| 4 | How to find out what modules to load for NetCDF/HDF5: |
| 5 | {{{ |
| 6 | #!bash |
| 7 | module spider netcdf |
| 8 | module spider hdf5 |
| 9 | }}} |
| 10 | |
| 11 | Load modules e.g. by: |
| 12 | |
| 13 | {{{ |
| 14 | #!bash |
| 15 | module load Stages/2017a GCC/5.4.0 ParaStationMPI/5.1.9-1 |
| 16 | module load netCDF/4.4.1.1 |
| 17 | module load HDF5/1.8.18 |
| 18 | }}} |
| 19 | |
| 20 | Just some examples of hot to use h5dump: |
| 21 | {{{ |
| 22 | #!bash |
| 23 | h5dump -H wrf_rv025_r07_test.wrfout_3km.20100702130000-20100703000000.h5 | grep DATASET |
| 24 | h5dump -a /T/description test.h5 |
| 25 | h5dump -d XLAT -c "1,1,100" test.h5 # shows the 100 first entries from the 3d array XLAT |
| 26 | }}} |
| 27 | |
| 28 | How to find out the version of a netcdf file: |
| 29 | {{{ |
| 30 | #!bash |
| 31 | ncdump -k foo.nc |
| 32 | }}} |
| 33 | If ncdump returns netCDF-4, or netCDF-4 classic model, then congratulations, you already have an HDF file, as netCDF-4 is the netCDF data model implemented using HDF5 as the storage layer. These files can be ready by the HDF library version 1.8 or later, and from what I can tell, pytables. If ncdump returns classic or 64-bit offset, then you are using netCDF-3 and will need to convert to netCDF-4 (and thus HDF). The good news is that if you have netCDF installed, you can do the conversion pretty easily: |
| 34 | {{{ |
| 35 | #!bash |
| 36 | nccopy -k 4 foo3.nc foo4c.nc |
| 37 | }}} |
| 38 | |
| 39 | Graphical hdf5 viewer: |
| 40 | HDFView is a very handy tool to investigate hdf5 files. To open HDFView on JURECA, either click on the HDFView icon on the desktop. Or launch HDFView by |
| 41 | {{{ |
| 42 | #!bash |
| 43 | /usr/local/jsc/etc/xdg/scripts/launch_hdfview.sh |
| 44 | }}} |
| 45 | |
| 46 | === Python on JURECA === |
| 47 | To use Python on JURECA, you have to load some modules first, e.g. |
| 48 | {{{ |
| 49 | #!bash |
| 50 | module use otherstages |
| 51 | module --force purge && module load Stages/Devel-2017b GCC/7.2.0 ParaStationMPI/5.2.0-1 h5py/2.7.1-Python-2.7.14 |
| 52 | }}} |