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.
-
2Can you please provide I little bit more information (e.g. a sample file, a screenshot, or some numbers of your data).– ustroetzCommented Apr 23, 2014 at 13:59
-
sir,how can i send u sample file,there is no upload option.– RanoCommented 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?– EricaCommented 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.– RanoCommented Apr 23, 2014 at 14:23
-
dropbox.com/s/5kru251hb8qyro7/MINT2005.GRD– RanoCommented Apr 23, 2014 at 14:50
|
Show 3 more comments
1 Answer
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.