0

I've downloaded SNODAS data from NSIDC (here). After uncompromising the files I can only open the first two products (both precipitation data) in ArcMap. I can open the others with SAGA, but I want to process ~3500 of them using an ArcPy script.

Has anyone else encountered this issue with SNODAS data?

2 Answers 2

2

edit: After contacting NSIDC they referred me to this page - the key point here is that you must create an entirely new .hdr file, rather than simply appending those lines to the .txt 'header' that comes in the tarball.

I found a work around. For each product there is a .dat file and .txt header file. The begging of each header file looks like this:

Format version: NOHRSC GIS/RS raster file v1.1 Data source: RUC2, NESDIS, etc. Created by module: sm_products Created by module comment: number BARD codes: 0000000024 BARD codes: 447200641 453379106 363670475 448507164 447201002 447200999 448507161 447201003 447200647 458956735 449198303 447201000 12222 226921937 194762463 194750795 120043862 319955379 194761059 244392413 324899530 445116660 445116661 445116662 Created year: 2011 Created month: 1 Created day: 19 Created hour: 5 Created minute: 42

I had to modify the script to delete the bold numbers (following the second occurrence of "BARD codes:"). For the products that worked (precipitation) this information was always blank.

2
  • Yeah, this is a GDAL problem... I remember having to do this with SNODAS files. I think it's worth mentioning on the gdal listserv since this seems to come up every now and then. For posterity, the pseudocode regex replacement in the hdr files is (/^Created.*/,'').
    – Thomas
    Sep 30, 2019 at 19:32
  • Thanks, Thomas. So it's a problem with GDAL that occurs when NSIDC is creating the files? I also ran into another problem - starting on March 23 2017, I had to edit the first line of each header file to read "NOHRSC GIS/RS Raster file v1.1' rather than 'v1.0'.
    – Nick
    Oct 1, 2019 at 15:59
1

I came across this issue in March 2021 while trying to load these data into R with rgdal. I can confirm this is still an issue, but only from March 23, 2017 to April 03, 2017. The first line of each header file from March 22 or April 04 (load properly) both say Format version: NOHRSC GIS/RS raster file v1.1, whereas all the problematic files say Format version: NOHRSC GIS/RS raster file v1.0

My solution in R is to use xfun::gsub_file() to replace the version in the header for those dates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.