comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » I want to plot the rainfall data on the image.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
I want to plot the rainfall data on the image. [message #92288] Wed, 11 November 2015 00:58
ristight is currently offline  ristight
Messages: 5
Registered: September 2015
Junior Member
I am creating a program that plots the rainfall data on to the cropped image.
How do If you were to plot to the cropped image?
How you do rewrite this program?
Please tell me someone.


x1 = fltarr(3600,1200)
y1 = fltarr(3600,1200)
mvk = fltarr(3600,1200)
nrt = fltarr(3600,1200)

fname1='F:\MTSAT2-145E-201410060732UTC-VIS.jpg'
fname2='F:\GSMaP\datファイル\mvk\20140831\gsmap_mvk.2014 0831.0000.v6.0000.0.dat'
fname3='F:\GSMaP\datファイル\nrt\20140831\gsmap_nrt.2014 0831.0000.dat'

read_jpeg, fname1, gsmap
clip = gsmap[*, 164:3711, 280:3824] ;To store the cropped image.

openr,1,fname2
openr,2,fname3
readu,1,x1
readu,2,y1

r1=make_array(3600,1200)
r2=make_array(3600,1200)
r3=make_array(3600,1200)
r4=make_array(3600,1200)
r5=make_array(3600,1200)
r6=make_array(3600,1200)
r7=make_array(3600,1200)
r8=make_array(3600,1200)
r9=make_array(3600,1200)
r10=make_array(3600,1200)

for j=0,1199 do begin
for i=0,1799 do begin
k = i+1800
mvk(i,j) = x1(k,j)
nrt(i,j) = y1(k,j)
endfor
endfor
for j=0,1199 do begin
for i=1800,3599 do begin
k = i-1800
mvk(i,j) = x1(k,j)
nrt(i,j) = y1(k,j)
endfor
endfor



for j=0,1200-1 do begin
for i=0,3600-1 do begin
if mvk(i,j) gt 0 and nrt(i,j) gt 0 then begin
if nrt(i,j) - mvk(i,j) ge 0.1 and nrt(i,j)-mvk(i,j) lt 0.5 then r1[i,j]=1 ;1
if nrt(i,j) - mvk(i,j) ge 0.5 and nrt(i,j)-mvk(i,j) lt 1 then r2[i,j]=1 ;9
if nrt(i,j) - mvk(i,j) ge 1 and nrt(i,j) - mvk(i,j) lt 1.5 then r3[i,j]=1 ;4
if nrt(i,j) - mvk(i,j) ge 1.5 and nrt(i,j) - mvk(i,j) lt 2 then r4[i,j]=1 ;16
if nrt(i,j) - mvk(i,j) ge 2 and nrt(i,j) - mvk(i,j) lt 2.5 then r5[i,j]=1 ;16倍以上
if nrt(i,j) - mvk(i,j) ge 2.5 and nrt(i,j)-mvk(i,j) lt 3 then r6[i,j]=1
if nrt(i,j) - mvk(i,j) ge 3 and nrt(i,j)-mvk(i,j) lt 3.5 then r7[i,j]=1
if nrt(i,j) - mvk(i,j) ge 3.5 and nrt(i,j)-mvk(i,j) lt 4 then r8[i,j]=1
if nrt(i,j) - mvk(i,j) ge 4 and nrt(i,j) - mvk(i,j) lt 4.5 then r9[i,j]=1
if nrt(i,j) - mvk(i,j) ge 4.5 then r10[i,j]=1
endif
endfor
endfor

A = 0L
for I = -180.0, 179.9, 0.1 do begin
B = 0L
for J = 59.9, -60.0, -0.1 do begin
xGrid = [I-1/20., I+1/20., I+1/20., I-1/20.]
yGrid = [J-1/20., J-1/20., J+1/20., J+1/20.]
if r1(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = '960000'XL
if r2(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = 'FF6400'XL
if r3(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = 'FFB400'XL
if r4(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = '80DB33'XL
if r5(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = '4AEB9B'XL
if r6(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = '00EBFF'XL
if r7(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = '00B3FF'XL
if r8(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = '0064FF'XL
if r9(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = '001EEB'XL
if r10(A,B) eq 1 then POLYFILL, xGrid, yGrid, color = '0000AF'XL
B++
endfor
A++
endfor


map_set,/clip, /cont, /grid, limit = [60,80,-60,-160], glinestyle = 1, title='20140831_0hour'
GridSize = 0.1
XtoBMP,'C:\Users\Desktop\20140831_0hour.bmp'
close,/all
[Message index]
 
Read Message
Previous Topic: Data -vs- Time Add trend line
Next Topic: Backlogged question: Drawing vector fields with same scaling in New Graphics

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:08:51 PDT 2025

Total time taken to generate the page: 0.00438 seconds