Python Forum
Reading time steps from nc file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading time steps from nc file
#1
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.
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading large crapy text file in anaconda to profile data syamatunuguntla 0 811 Nov-18-2022, 06:15 PM
Last Post: syamatunuguntla
  How to form a dataframe reading separate dictionaries from .txt file? Doug 1 4,197 Nov-09-2020, 09:24 AM
Last Post: PsyPy
  Pipelines for different processing steps dervast 3 2,060 Jun-06-2020, 11:01 PM
Last Post: scidam
  reading tab file Mandiph 1 2,151 Sep-05-2019, 01:03 PM
Last Post: ThomasL
  Reading a .dat file in Python mohd_umair 4 23,480 Apr-24-2019, 12:07 PM
Last Post: mohd_umair
  reading, modifying and writing json file metalray 2 10,884 Jun-06-2018, 03:09 PM
Last Post: metalray
  Reading json file as pandas data frame? Alberto 1 8,309 Feb-05-2018, 12:43 AM
Last Post: snippsat
  matplotlib help with reading values from CSV file cps13 6 7,234 Aug-22-2017, 10:21 AM
Last Post: andre
  Need help reading in a binary file shaynehansen 2 3,909 Jun-22-2017, 10:04 AM
Last Post: zivoni

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020