2

Minimum temperature of a year is given in GRD file. I have to read that file and then calculate the frost day (less than zero degrees celcius) from it in python.

8
  • 2
    Can you please provide I little bit more information (e.g. a sample file, a screenshot, or some numbers of your data).
    – ustroetz
    Commented Apr 23, 2014 at 13:59
  • sir,how can i send u sample file,there is no upload option.
    – Rano
    Commented Apr 23, 2014 at 14:10
  • (1) Is the data 365 days of temperature and you need to find how many are < 0? (2) You used the QGIS tag -- is your data imported already and you have questions about the statistics? Or are you asking about importing the GRD file?
    – Erica
    Commented Apr 23, 2014 at 14:17
  • yes sir,i am having the data of 365 days and want to calculate number of day in which temp is less than 0 degree celcius in python.
    – Rano
    Commented Apr 23, 2014 at 14:23
  • dropbox.com/s/5kru251hb8qyro7/MINT2005.GRD
    – Rano
    Commented Apr 23, 2014 at 14:50

1 Answer 1

2
+25

What are you using to do this?

In brief, you can load the data using RasterIO and then when you have a numpy array, you can do something like numpy.where( data < 3 ) and sum the resulting fields. That should give you an array that is X by Y and has a single value, which is a count of the number of days that are sub-zero. RasterIO again has a write function.

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.