"Warning (cdf_read_xcoord): Unsupported array structure" prolem
Added by Yi Zhang over 6 years ago
Dear CDO community:
I want to convert some data defined at unstructured grids to the regular lat-lon grid
using CDO (remapdis for this case). For some reasons, the 1d and 2d unstructured data have
to be written as separate files (1d.nc 2d.nc as attached). For 1d.nc, I use the following command
and this successfully converted the data:
ncks -v phis,ps,lon_nv,lat_nv 1d.nc tmp.nc
cdo remapdis,n32 tmp.nc 1d-ll.nc
rm -rf tmp.nc
For 2d.nc, I first selected variables from 1d.nc and 2d.nc, respectively. Then I combined them to a sinlge file.
These are done via NCO's ncks. Then when cdo remapdis is invoked, it aborts with "Warning (cdf_read_xcoord): Unsupported array structure".
The detailed commands are as follows:
ncks -v temperature 2d.nc tmp-2d.nc
ncks -v lon_nv,lat_nv,nlev 1d.nc tmp-1d.nc
ncks tmp-1d.nc tmp-2d.nc
cdo remapdis,n32 tmp-2d.nc 2d-ll.nc
rm -rf tmp-1d.nc tmp-2d.nc
Could anyone help me with this problem? Thanks in advance!
Best
Yi
Replies (5)
RE: "Warning (cdf_read_xcoord): Unsupported array structure" prolem - Added by Ralf Mueller over 6 years ago
I merged your files manually with ncdump/ncgen - not so smart, but it worked.
cdo rempapdis worked
% cdo -P 8 remapdis,global_1 2dx.nc 2dx_1DegGlobal.nc Warning (cdf_read_xcoord): Unsupported array structure, skipped variable avor! Warning (cdf_read_xcoord): Unsupported array structure, skipped variable rvor! cdo remapdis: Distance-weighted average weights from unstructured (2562) to lonlat (360x180) grid cdo remapdis: Distance-weighted average weights from unstructured (7680) to lonlat (360x180) grid cdo remapdis: Processed 627324 values from 7 variables over 1 timestep [2.14s 65MB]
There must be an NCO command to merge both files, but I couldnt find it, sry
hth
ralf
2dx.nc (7.37 MB) 2dx.nc | |||
2dx_1DegGlobal.zip (23 MB) 2dx_1DegGlobal.zip |
RE: "Warning (cdf_read_xcoord): Unsupported array structure" prolem - Added by Yi Zhang over 6 years ago
Dear Ralf:
Thanks a lot!
I have tried your suggestion and it worked (though two variables are missing),
while this strategy may be kind of slow when the data become larger.
I do find this problem is sensitive to the way how one merges the data.
For example, if I use "ncks 1d.nc 2d.nc" to append one file to another.
then "cdo remapdis" is able to convert those 1d data but not those 2d data:
Warning (cdf_read_xcoord): Unsupported array structure, skipped variable temperature!
Warning (cdf_read_xcoord): Unsupported array structure, skipped variable avor!
Warning (cdf_read_xcoord): Unsupported array structure, skipped variable rvor!
Warning (cdf_read_xcoord): Unsupported array structure, skipped variable geopotential!
Warning (cdf_read_xcoord): Unsupported array structure, skipped variable u_edge!
Warning (cdf_read_xcoord): Unsupported array structure, skipped variable v_edge!
cdo remapdis: Distance-weighted average weights from unstructured (7680) to gaussian (128x64) grid
cdo remapdis: Distance-weighted average weights from unstructured (2562) to gaussian (128x64) grid
While if I use "cdo merge 1d.nc 2d.nc 12d.nc",
"cdo remapdis,n32" gives
cdo remapdis (Abort): Unsupported generic coordinates (Variable: lon_nt)!
--
Best
Yi
RE: "Warning (cdf_read_xcoord): Unsupported array structure" prolem - Added by Ralf Mueller over 6 years ago
cdo merge
does not work for your purpose - that's why I didnt suggest it ;-)
RE: "Warning (cdf_read_xcoord): Unsupported array structure" prolem - Added by Yi Zhang over 6 years ago
Just for an update.
I found that if I use "ncks 2d.nc 1d.nc" that appends 2d data to 1d data, it will give the same result as using "ncdump/ncgen";
For the missing two variables, if I write an additional 1d data array (defined at location_nt dim) to the 1d.nc,
then merge the data as above, "cdo remapdis" will remap all data correctly.
The original 1d.nc does not have a variable defined at location_nt dim, which may cause this problem.
Thanks.
RE: "Warning (cdf_read_xcoord): Unsupported array structure" prolem - Added by Ralf Mueller over 6 years ago
thx for sharing your solution ;-)
cheers
ralf