Read and write NetCDF with Python
How to read NetCDF file and write to CSV using Python
Python - How to get variable from netcdf file on a specific location and at different level
import xray
ds = xray.open_dataset('your_wrf_file.nc')
ds_point = ds.sel(lon=76.9525, lat=8.4875)
ds_point['Temperature'].plot() # plot profile at point assuming Temperature had dimensions of (level, lat, lon)
df = ds_point.to_dataframe() # export dataset to Pandas.DataFrame
temp_array = ds_point['Temperature'].values # access the underlying numpy array of the "Temperature" variable
cdo remapnn,lon=76.9525/lat=8.4875 wrf_file.nc pnt_file.nc
https://github.com/NCAR/pynio/blob/develop/examples/pynio_create_nc4.ipynb
网友评论