Python Forum

Full Version: Reading time steps from nc file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a nc file having time steps from 2013-10-09:00:00:00 to 2013-10-13 09:00:00, having 3hr interval.
When I read the time step, it's showing 0,180,360..... and so on.
Am I doing something wrong? Or is it the correct way to read the time steps?


import numpy as np
from netCDF4 import Dataset
trmm='test_file.nc'
first=Dataset(trmm,'r')
time=first.variables['time'][:]
I have attached the .nc file as well.
What's the correct way to read time steps, so that I can get the required dates?
I have attached the link to nc file here.
No one is going to download an unknown file from an unknown person in a forum. Append 20 lines, plus or minus, of the file in the post.