CDO interpolation: nvertex undefined (grid description file) issue
Added by Qianyu Zha about 3 years ago
Hi All,
I'm trying to interpolate using CDO because of grid mismatch issue between CEH-GEAR and HadUK-Grid. I used griddes to get the target grid(HadUK-Grid) description and then using remapbil command. I always get the error said ‘nvertex undefined’ as shown below.
nvertex undefined (grid description file:haduk_grid.txt).
Has anyone ever came across this issue? Actually, I think the grid description file looks weird, so the file attached.
I would greatly appreciated if you could give any suggestion.
hadukgrid.txt (50.5 MB) hadukgrid.txt |
Replies (7)
RE: CDO interpolation: nvertex undefined (grid description file) issue - Added by Uwe Schulzweida about 3 years ago
Dear Qianyu,
This is a problem when reading the grid description file if the coordinates of projections also have bounds. This bug will be fixed in the next bug-fix release 2.0.4 of CDO.
It is not necessary to go through griddes, CDO can also read the target grid directly from the data file:
cdo remapbil,<HadUK-Datafile> infile outfileCheers,
Uwe
RE: CDO interpolation: nvertex undefined (grid description file) issue - Added by Qianyu Zha about 3 years ago
Thank you Uwe, that's really help.
But when I use remapbil command(cdo remapbil,tasmean_hadukgrid_uk_1km_day_1985.nc CEH-GEAR-1hr_199003.nc CEH_new.nc), another error occurred, shown as follow: cdo remapbil (Abort): Unsupported generic coordinates (Variable: lat)!
I find something here https://code.mpimet.mpg.de/boards/1/topics/9242,but I'm not sure if this will work for me as well.
I tried (cdo setattribute,rainfall_amount@coordinates="lon lat" CEH-GEAR-1hr_199003.nc CEH_SetAttri.nc)
Do you have any suggestion?
Best,
Qianyu
RE: CDO interpolation: nvertex undefined (grid description file) issue - Added by Uwe Schulzweida about 3 years ago
Probably the units attribute is missing for the lat/lon coordinates. But I can say more exactly only with a look into the data.
Could you upload the file tasmean_hadukgrid_uk_1km_day_1985.nc, that would help a lot?
RE: CDO interpolation: nvertex undefined (grid description file) issue - Added by Qianyu Zha about 3 years ago
Please find the attached files.
The original dataset is too big so I split the domain using CDO. Hope it may help.
Many thanks!
RE: CDO interpolation: nvertex undefined (grid description file) issue - Added by Uwe Schulzweida about 3 years ago
The coordinates attribute is missing for all data arrays. You can add this attribute with the NCO tool ncatted:
ncatted -a coordinates,rainfall_amount,c,c,"lat lon" split_domain_CEH-GEAR-1hr00001.nc ncatted -a coordinates,min_dist,c,c,"lat lon" split_domain_CEH-GEAR-1hr00001.nc ncatted -a coordinates,stat_disag,c,c,"lat lon" split_domain_CEH-GEAR-1hr00001.nc
RE: CDO interpolation: nvertex undefined (grid description file) issue - Added by Qianyu Zha about 3 years ago
Hi, It seems to work, at least when I use remapbil , there is no errors occurred. But the size of result file is more than 10 times larger than the original, which is so weird.
I'm sorry I might have too many problems. Thank you very much for your time
RE: CDO interpolation: nvertex undefined (grid description file) issue - Added by François Roberge about 3 years ago
Qianyu Zha wrote in RE: CDO interpolation: nvertex undefined (grid descriptio...:
Hi, It seems to work, at least when I use remapbil , there is no errors occurred. But the size of result file is more than 10 times larger than the original, which is so weird.
I'm sorry I might have too many problems. Thank you very much for your time
You compress the file with the option "-zip_1". 1 is the deflate number and can go from 1 to 9 with 9 being the most compressed.