-
Notifications
You must be signed in to change notification settings - Fork 24
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
Create new Nuiqsut data inputs #135
Comments
OK, I checked out and older version (before we deleted the old-style sample input data) and checked for the lat/lon that were used there:
Will check to see if this makes sense in light of the new inputs. |
This link has the super slick way(s) to look up pixel location based on Lat/Lon: |
Using all methods above (manual using In [55]: !gdal_translate -of netcdf -co WRITE_LONLAT=YES ../snap-data/iem_ancillary_data/Landcover/LandCover_iem_TEM_2005.tif temp-veg.nc
Input file size is 2560, 1850
0...10...20...30...40...50...60...70...80...90...100 - done.
In [56]: ds = netCDF4.Dataset("temp-veg.nc", 'r')
# copied 'tunnel_fast' function from the Unidata IPython Notebook linked above
In [57]: tunnel_fast(ds.variables['lat'], ds.variables['lon'], 70.1789,-151.0077)
Out[57]: (1725, 850)
In [58]: ds.variables['lon'][1725,850]
Out[58]: -151.00816
In [59]: ds.variables['lat'][1725,850]
Out[59]: 70.177719 |
Very possible that the slight difference in lat/lon coordinates has to do with which part of the pixel is referenced (one of the corners, or the center). I have not been able to figure out what is used by default with the gdal command line utils. |
Just talked to Michael about gdal utilities, and he says it's probably the upper left of the pixel. He provided a snippet of code here: |
This issue is no longer relevant. I linked to it from the wiki page on input generation for ease of locating details. |
For this we need an initial point to start from (in lat/lon).
The text was updated successfully, but these errors were encountered: