I have one year data (3d array, name is tp) (lat*lon*time) based on hourly time steps from a netcdf file, I want to convert this hourly data to daily. the time steps of each days are:
0:001:002:003:004:005:006:007:008:009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:0022:0023:00
I want to have one value for each day. as you can see time range of 23:00 to 23:59 presents in next day, so I think I should have a code that continue to one hour ahead of each day (like 25 hours)
please help me.
here is ncdisp() I want tp daily (49*41*365)
>> ncdisp(filename)Source: C:\Users\Behzad\Desktop\download.ncFormat: 64bitGlobal Attributes: Conventions = 'CF-1.6' history = '2019-11-01 07:36:15 GMT by grib_to_netcdf-2.14.0: /opt/ecmwf/eccodes/bin/grib_to_netcdf -o /cache/data6/adaptor.mars.internal-1572593007.3569295-19224-27-449cad76-bcd6-4cfa-9767-8a3c1219c0bb.nc /cache/tmp/449cad76-bcd6-4cfa-9767-8a3c1219c0bb-adaptor.mars.internal-1572593007.35751-19224-4-tmp.grib'Dimensions: longitude = 49 latitude = 41 time = 8760Variables: longitude Size: 49x1 Dimensions: longitude Datatype: single Attributes: units = 'degrees_east' long_name = 'longitude' latitude Size: 41x1 Dimensions: latitude Datatype: single Attributes: units = 'degrees_north' long_name = 'latitude' time Size: 8760x1 Dimensions: time Datatype: int32 Attributes: units = 'hours since 1900-01-01 00:00:00.0' long_name = 'time' calendar = 'gregorian' tp Size: 49x41x8760 Dimensions: longitude,latitude,time Datatype: int16 Attributes: scale_factor = 3.0792e-07 add_offset = 0.010089 _FillValue = -32767 missing_value = -32767 units = 'm' long_name = 'Total precipitation'
Best Answer