Created
August 7, 2019 21:46
-
-
Save prl900/530528422ae869aa5f2d0ed0ae2fac4c to your computer and use it in GitHub Desktop.
Adding ERA5 topography
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import netCDF4 | |
x = netCDF4.Dataset("/datasets/work/D61_CPSR_A_INPUT/ERA5_global/press_levels_201501.nc")["z"][:] | |
x = np.moveaxes(x,1,-1) | |
topo = netCDF4.Dataset("/datasets/work/D61_CPSR_A_INPUT/ERA5_global/ERA5_orography.nc")['z'][:] | |
topo = np.tile(topo, (x.shape[0],1,1,1)) | |
x = np.concatenate((x,topo), axis=3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment