Project

General

Profile

Processing unstructured nc file

Added by charls antony about 1 year ago

Hi all,

I am trying to process an unstructured nc file (attached) from ADCIRC model using cdo. 'cdo selvar,pressure fort.73.nc test.nc', for this command I am getting following warnings

Warning (cdf_read_xcoord) : Unsupported array structure, skipped variable depth!
Warning (cdf_read_xcoord) : Unsupported array structure, skipped variable zeta!
cdo selname (Warning): Variable name zeta not found!

cdo selname (Abort): No variables selected!

Much helpful if someone could point out the issue here and a solution.

Also, How can I interpolate a gridded data (attached) to this unstructured grid.

Thanks in advance
Charls

fort.73.nc (86.5 MB) fort.73.nc unstructured data
psl_ERA.nc (2.28 MB) psl_ERA.nc gridded data

Replies (3)

RE: Processing unstructured nc file - Added by Karin Meier-Fleischer about 1 year ago

Hi Charls,

there is something wrong with your fort.73.nc file. Even in Python xarray can't open the dataset and returns the following error:

ValueError: dimension 'neta' already exists as a scalar variable

Hope this helps.

RE: Processing unstructured nc file - Added by Matias De Oto 3 months ago

I have the same problem with global native domain from adcirc model (NOAA STOFS) using the xarray python library.

import xarray
file = [stofs_2d_glo.t00z.fields.cwl.maxvel.nc](https://noaa-gestofs-pds.s3.amazonaws.com/stofs_2d_glo.20240205/stofs_2d_glo.t00z.fields.cwl.maxvel.nc)
data = xr.open_dataset(file)

**ValueError: dimension 'nvel' already exists as a scalar variable**

Have you been able to solve this problem?

Regards,
Matias

RE: Processing unstructured nc file - Added by Karin Meier-Fleischer 3 months ago

Hi Matias,

this is not a CDO problem, but I can still help briefly here. There is a conflict caused by the scalar variable nvel and the dimension nvel. I renamed the scalar variable nvel to nvel2 and now I was able to read the file with xarray.

ncrename -v nvel,nvel2 stofs_2d_glo.t00z.fields.cwl.nc s.nc
    (1-3/3)