Monthly average snow depth files

5075
4
08-13-2015 04:25 PM
Labels (1)
PriscillaCoe
New Contributor

I want to import grids from the Candadian Meteorological Centre to ArcGIS but it looks like some processing of each file will be needed.  I'm wondering if anyone has developed scripts to read these files and prepare them for ASCII to Raster import? Here is the link: Data Set Landing Page

Thanks for any help!

Cilla

Tags (1)
0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

It is pretty straight forward... the format etc is well described in the documentation and there is an ftp site for downloading.  The asciii file is tab delimited and they indicated that they can be view in a text editor.  Check the first couple of lines to see if it contains typical ascii raster format and you can use asciitoraster in the conversion toolset

Canadian Meteorological Centre (CMC) Daily Snow Depth Analysis Data

0 Kudos
PriscillaCoe
New Contributor

Thank you for your replay, Dan.  It's not quite so straight forward.  There is no header file, although I did get a suggested header file from their tech support.  The problem is that each month of the year is included in one download file, so I think I need to read it in and write out each month to a separate file.  They supply the Fortran code to read it, and I can do that, but I was wondering if anyone else has done it yet.  Thanks again! 

0 Kudos
DarrenWiens2
MVP Honored Contributor

This can all be done, somewhat tediously, in Python using the csv library. Read through each line. If it contains only the date, start a new file. If it contains data, write the line to the new file.

I'm curious, if you have the code and can do this in Fortran, why bother making your own script?

0 Kudos
PriscillaCoe
New Contributor

Thank you for your suggestion. I would have to tweak the Fortran code, plus I don't have a compiler, plus I'm lazy.

0 Kudos