1 from wrf2geotiff
import readncproj
, readllproj
, create_geotiff
2 from contline
import get_contour_verts
3 from contour2shp
import contour2shp
4 from scipy
.io
import loadmat
7 time
= ['2019-08-01_00:00:00']
9 svm
= loadmat('svm.mat')
11 if 'fxlon_interp' in svm
:
12 fxlon
= svm
['fxlon_interp']
13 fxlat
= svm
['fxlat_interp']
14 tign_g
= svm
['tign_g_interp']
18 tign_g
= svm
['tign_g']
20 tign_g
[tign_g
==tign_g
.max()] = np
.nan
22 print('Creating tign_g GeoTIFF file...')
26 csr
,geotransform
= readllproj(fxlon
,fxlat
)
27 create_geotiff(sname
, data
, ndv
, geotransform
, csr
, time
)
29 print('Computing the contours...')
30 time_num_interval
= svm
['time_num'][0]
31 time_num_granules
= svm
['time_num_granules'][0]
32 data
= get_contour_verts(fxlon
, fxlat
, tign_g
+time_num_interval
[0], time_num_granules
, contour_dt_hours
=6, contour_dt_init
=6, contour_dt_final
=6)
34 print('Creating tign_g shape files...')
35 contour2shp(data
, '.', geotransform
, csr
)