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

Error with nldas_hourly_refet.py caused by empty/incomplete NLDAS grb file #60

Open
mattyrb opened this issue Feb 12, 2019 · 4 comments

Comments

@mattyrb
Copy link
Collaborator

mattyrb commented Feb 12, 2019

The error below was produced when a NLDAS grb was partially(?) downloaded. The file causing the error was 0kb in size, but had the appropriate naming convention. I suggest that we may have a check on NLDAS files that verifies that there is some data contained in the file.

(pymetric) c:\pymetric>python tools\nldas\nldas_hourly_refet.py --start 2004-01-01 --end 2004-12-31 --extent bear_2004\study_area\bearbnd.shp --landsat bear_2004\landsat\clear_scenes.txt --debug

################################################################################
Run Time Stamp: 2019-02-11 12:05:55.176543
Script: nldas_hourly_refet.py

Computing NLDAS hourly ETr/ETo
ETo/ETr flag(s) not set, defaulting to ETr

Reading dates from scene keep list file
c:\pymetric\bear_2004\landsat\clear_scenes.txt

Start date: 2004-01-01 00:00:00
End date: 2004-12-31 00:00:00
Projection: GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]]
Cellsize: 0.125
Geo: (-125.0, 0.125, 0.0, 53.0, 0.0, -0.125)
Extent: -125.0 25.0 -67.0 53.0

Computing subset extent & geo
Geo: (-112.5, 0.125, 0.0, 42.125, 0.0, -0.125)
Extent: -112.5 40.625 -110.5 42.125

Year: 2004
2004-03-29
c:\pymetric\nldas\grb\2004\089
c:\pymetric\nldas\etr\2004\etr_20040329_nldas.img
NLDAS_FORA0125_H.A20040329.0000.002.grb
Time: 2004-03-29 0000
Band: 1
Traceback (most recent call last):
File "tools\nldas\nldas_hourly_refet.py", line 597, in
daily_flag=args.daily)
File "tools\nldas\nldas_hourly_refet.py", line 340, in main
input_band_dict = grib_band_names(input_path)
File "tools\nldas\nldas_hourly_refet.py", line 485, in grib_band_names
grib_ds = gdal.Open(grib_path)
File "C:\Users\mquilter\AppData\Local\Continuum\miniconda3\envs\pymetric\lib\site-packages\osgeo\gdal.py", line 3251, in Open
return _gdal.Open(*args)
RuntimeError: `c:\pymetric\nldas\grb\2004\089\NLDAS_FORA0125_H.A20040329.0000.002.grb' not recognized as a supported file format.

@shrestha2019
Copy link

I am getting same error. Did you fix it?

@pixienat
Copy link

pixienat commented Aug 2, 2022

I don't think so because I am getting the same error with 2015 data. Maybe best to manually download that date where the first two files are 0 kb? I am going to try that and see if that resolves the issue. I submitted another issue request regarding this topic as well.

@pixienat
Copy link

pixienat commented Aug 2, 2022

I am getting same error. Did you fix it?

I fixed the error by manually downloading the two files. #81

@adedejioluwatola
Copy link

please what site did you download the two files from? thank you

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

No branches or pull requests

4 participants