Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle coordinate axis variables (x/y vs. lat/lon) #7

Open
jameshiebert opened this issue Jun 12, 2017 · 0 comments
Open

Handle coordinate axis variables (x/y vs. lat/lon) #7

jameshiebert opened this issue Jun 12, 2017 · 0 comments

Comments

@jameshiebert
Copy link
Contributor

jameshiebert commented Jun 12, 2017

Some NetCDF files record lat/lon as coordinate axis variables as a function of x/y dimensions. For example:

james@basalt ~ $ ncdump -v lon pr_EUR-11_MPI-M-MPI-ESM-LR_historical_r1i1p1_SMHI-RCA4_v1a_day_19890101-20101231_cut.nc 
netcdf pr_EUR-11_MPI-M-MPI-ESM-LR_historical_r1i1p1_SMHI-RCA4_v1a_day_19890101-20101231_cut {
dimensions:
	x = 7 ;
	y = 9 ;
	time = UNLIMITED ; // (8035 currently)
	nb2 = 2 ;
variables:
	double lon(y, x) ;
		lon:standard_name = "longitude" ;
		lon:long_name = "longitude" ;
		lon:units = "degrees_east" ;
		lon:_CoordinateAxisType = "Lon" ;
	double lat(y, x) ;
		lat:standard_name = "latitude" ;
		lat:long_name = "latitude" ;
		lat:units = "degrees_north" ;
		lat:_CoordinateAxisType = "Lat" ;

Unfortunately, ClimDown's dimension handling code is very naive and only looks for variables named lat and lon:
https://github.com/pacificclimate/ClimDown/blob/master/R/CI.R#L203

Fixing this would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant