[Thread Prev][Thread Next][Index]

Re: [ferret_users] axis transfer from depth to time-reg



Hi Srinivas,

Some netCDF datasets do not have the attributes that PyFerret  uses to determine the direction of the dimensions of the variables.  When that is the case, PyFerret will create a grid with the axes in the order x, y, z, t, and if needed e, and f for the fifth and sixth dimensions.

You should be able to open the dataset with the /ORDER qualifier,

yes? use/order=xyt  filename.nc

In the CF standard for NetCDF files, dimensions are associated with coordinate variables, and those variables have attributes which define their direction, the coordinate units, and for a time axis, the time origin for the axis.  Many files that do not completely comply with the CF standard can still be used in PyFerret.  The /ORDER qualifier is one tool for doing that, and you also may want to redefine the time axis after opening the file, to associate the time steps with the correct dates and times.

You can look at the header information for a netCDF dataset using the Unix command ncdump:

> ncdump -h filename.nc

The output of this command shows the dimensions defined in the file, and the variables and coordinate variables that it contains.

There is more about netCDF files in the Ferret Users' guide, https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/converting-to-netcdf.

The full CF standard is here (quite a long document!)  https://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html

Ansley



On 9/27/2023 5:53 AM, srinivas kotta wrote:
Dear ferret users,

I have a netcdf file, data have 4time steps at single level. But it shows the time axis in depth axis. How can I transfer the depth axis into time axis.  Dimensions of the data is attached here.

Thank you



Thanking you and with Regards,

Srinivas


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement