Input files contain no time information
Closed this issue · 2 comments
Hi,
I'm trying to use Tempest Extremes's DetectNodes to track tropical cyclones in my netcdf4 file. When I try to use it, it says "Input files contain no time information". I'm guessing my netCDF4 file is the problem since I manually created it (the file is generated from NCEP FNL dataset.). Here is the output of ncdump -h
on my file:
netcdf fnl_20080505_00_00 {
dimensions:
lev = 19 ;
lat = 41 ;
lon = 161 ;
variables:
float absvprs(lev, lat, lon) ;
absvprs:_FillValue = -9.99e+08f ;
absvprs:missing_value = -9.99e+08f ;
float capesfc(lat, lon) ;
capesfc:_FillValue = -9.99e+08f ;
capesfc:missing_value = -9.99e+08f ;
float hgtprs(lev, lat, lon) ;
hgtprs:_FillValue = -9.99e+08f ;
hgtprs:missing_value = -9.99e+08f ;
double lat(lat) ;
lat:standard_name = "latitude" ;
lat:long_name = "Latitude" ;
lat:units = "degrees_north" ;
lat:axis = "Y" ;
double lev(lev) ;
lev:standard_name = "air_pressure" ;
lev:long_name = "Level" ;
lev:units = "millibar" ;
lev:positive = "down" ;
lev:axis = "Z" ;
double lon(lon) ;
lon:standard_name = "longitude" ;
lon:long_name = "Longitude" ;
lon:units = "degrees_east" ;
lon:axis = "X" ;
float rhprs(lev, lat, lon) ;
rhprs:_FillValue = -9.99e+08f ;
rhprs:missing_value = -9.99e+08f ;
float tmpprs(lev, lat, lon) ;
tmpprs:_FillValue = -9.99e+08f ;
tmpprs:missing_value = -9.99e+08f ;
float tmpsfc(lat, lon) ;
tmpsfc:_FillValue = -9.99e+08f ;
tmpsfc:missing_value = -9.99e+08f ;
float ugrdprs(lev, lat, lon) ;
ugrdprs:_FillValue = -9.99e+08f ;
ugrdprs:missing_value = -9.99e+08f ;
float vgrdprs(lev, lat, lon) ;
vgrdprs:_FillValue = -9.99e+08f ;
float vvelprs(lev, lat, lon) ;
vvelprs:_FillValue = -9.99e+08f ;
vvelprs:missing_value = -9.99e+08f ;
// global attributes:
:CDI = "Climate Data Interface version 1.9.6 (http://mpimet.mpg.de/cdi)" ;
:Conventions = "CF-1.6" ;
:history = "Mon Nov 15 14:26:47 2021: cdo -O -s merge e8687965a8094b73afbd.ABSVprs.nc e8687965a8094b73afbd.CAPEsfc.nc e8687965a8094b73afbd.HGTprs.nc e8687965a8094b73afbd.RHprs.nc e8687965a8094b73afbd.TMPprs.nc e8687965a8094b73afbd.TMPsfc.nc e8687965a8094b73afbd.ugrdprs.nc e8687965a8094b73afbd.vgrdprs.nc e8687965a8094b73afbd.VVELprs.nc /N/project/pfec_climo/qmnguyen/tc_prediction/extracted_features/nolabels_wp_ep_alllevels_ABSV_CAPE_RH_TMP_HGT_VVEL_UGRD_VGRD_100_260/12h/fnl_20080505_00_00.nc" ;
:CDO = "Climate Data Operators version 1.9.6 (http://mpimet.mpg.de/cdo)" ;
:NCO = "netCDF Operators version 4.7.9 (Homepage = http://nco.sf.net, Code = http://github.com/nco/nco)" ;
}
What should I change to the file to make it work with Tempest Extremes's DetectNodes?
Thanks in advance.
Thank Paul, I have figured the way to do it. I use ncecat
and cdo
instead to do the job:
ncecat -u time fnl_20080505_00_00.nc -O tmp.nc
This will add a time dimension to the netCDF file. Then, I use:
cdo -setreftime,'2008-05-01','00:00:00' tmp.nc out.nc
To set the value of the time dimension based on the file name.