Commit 656143ee authored by Andi Walther's avatar Andi Walther 💬
Browse files

add cpr profiles

parent a094c46d
......@@ -999,7 +999,7 @@ function cws_read::init $
cws_source_path = '/Users/awalther/SOFTWARE/ICWG_IDL/tools/'
cws_base_path = '/DATA/ICWG/DATA/'
cws_base_path = '/DATA/ICWG_local/DATA/'
cws_archive_path = '/DATA/ICWG_local/data/ICWG2_COMMON/'
cws_product_path = 'products/'
......
;
;
; Oct 29 2018: AW changed to direct graphic
;
pro cws_stats::caliop_profile, start , nr $
,overpass=overpass $
,cut = cut $
,noPS = noPS $
, group = group
, group = group $
, cpr = cpr
if not self.quiet then print, '... start caliop_profile'
default, noPs, 0
default, noPs, 1
;noPs=0
default, group, 'AWG'
if not self.quiet then print, '... group = ', group
......@@ -36,6 +37,7 @@ pro cws_stats::caliop_profile, start , nr $
pxl = geo_2_msg(lon,lat)
lidar = oCwsAtrain->get_data(sen='CALIOP', pro='TAB_0532', /DATA)
; create object msg_data_cl (.../tools/subtools/msg/msg_data_cl__define.pro)
ooo = obj_new('msg_data_cl',xrange=[self.x_0,self.x_1],yrange=[self.y_0,self.y_1])
......@@ -58,13 +60,15 @@ pro cws_stats::caliop_profile, start , nr $
ind = indgen(nr_idx)+start
rfl = o->get_data(pro='RFL',sens='CPR',/data)
radar = o->get_data(pro='RFL',sens='CPR',/data)
lidar = o->get_data(sen='CALIOP' ,pro='TAB_0532',/DATA)
height = o->get_data(sen='CALIOP' ,pro='HGT',/DATA)
sfcbin = o->get_data(sen='CALIOP' ,pro='SHB',/DATA)
sfcbin_cpr = o->get_data(sen='CPR' ,pro='SHB',/DATA)
time = o->get_data(pro='YDT',/DATA)
cth_cal = o->get_data(sen='CALIOP', prod='CTH',/data)
cth_cpr = o->get_data(sen='CPR', prod='CTH',/data)
time = time[ind]
lon = o->get_data( pro='lon',/DATA)
......@@ -83,15 +87,60 @@ pro cws_stats::caliop_profile, start , nr $
cth_cal = cth_cal[ind]
lidar = lidar [*,ind]
if keyword_set(cpr) then begin
radar = radar [*,ind]
sfcbin_cpr = sfcbin_cpr[ind]
h = REVERSE(FINDGEN(99)*0.25) + 0.5 ; this just for quicklook height bins starting 500 m above surfcae
l = LINDGEN(N_ELEMENTS(ind))
zind =(99-FINDGEN(99)) # (FLTARR(N_ELEMENTS(sfcbin_cpr))+1)
zind =(FLTARR(99)+1) # (sfcbin_cpr-2) - 2 - zind
; horizontal index
lind =(FLTARR(99)+1) # FINDGEN(N_ELEMENTS(sfcbin_cpr))
r = TRANSPOSE(radar[zind,lind])
values = findgen(70)-28.5
values[0] = -90.
values[1] = -29.
values[2] = -28.
levels = n_elements(values)
ctable = COLORTABLE([[085,026,139],[135,206,255],[0,255,0]], NCOLORS = levels, /TRANSPOSE)
ctable[*,0] = fsc_color('gray',/triple)
ctable[*,1] = fsc_color('gray',/triple)
ctable[*,2] = fsc_color('gray',/triple)
h = reverse(h)
endif else begin ; CALIOP
height = height[*,ind]
h = REVERSE(FINDGEN(99)*0.25) + 0.5 ; this just for quicklook height bins starting 500 m above surfcae
l = LINDGEN(N_ELEMENTS(ind))
h = height[*,1]
sfcbin = make_array(n_elements(ind),/long)
for u=0,n_elements(sfcbin)-1 do radar[sfcbin[u]:*,u]= -999.
;sfcbin = make_array(n_elements(ind),/long)
......@@ -99,8 +148,18 @@ pro cws_stats::caliop_profile, start , nr $
;zind =(FLTARR(99)+1) # (sfcbin-2) - 2 - zind
;horizontal index
lind =(FLTARR(n_elements(h))+1) # FINDGEN(N_ELEMENTS(ind))
; do everything for CALIOP
r_caliop = TRANSPOSE(lidar[zind,lind])
values = [-0.04,0.004,0.015,0.02,0.03,0.04,0.05,0.1,0.3]
levels = n_elements(values)
r = TRANSPOSE(lidar[zind,lind])
ctable = COLORTABLE([[085,026,139],[135,206,255],[0,255,0]], NCOLORS = levels, /TRANSPOSE)
ctable[*,0] = fsc_color('gray',/triple)
r= r_caliop/1000.
endelse
loadct,39
outFile = !PROJECTS.cws_path+'/results/atrain/cloudsat/C'+string(cut,fo='(i2.2)')+'_cpr_profile_' $
......@@ -146,17 +205,13 @@ pro cws_stats::caliop_profile, start , nr $
;if ~keyword_set(noPS) then startps,outname=outfile,xs=2,ys=2
w = window(dimension=[700,1200])
w = window(dimension=[700,800])
values = [-0.04,0.004,0.015,0.02,0.03,0.04,0.05,0.1,0.3]
levels = n_elements(values)
ctable = COLORTABLE([[085,026,139],[135,206,255],[0,255,0]], NCOLORS = levels, /TRANSPOSE)
ctable[*,0] = fsc_color('gray',/triple)
c= contour(r,l,reverse(h)/1000.,/current,pos =[0.1,0.68,0.9,0.95], yrange=[0,20] $
c= contour(r,l,reverse(h),/current,pos =[0.1,0.68,0.9,0.95], yrange=[0,20] $
, c_value = values $
,c_color=ctable,/fill,/xstyle )
......
pro cws_stats::cpr_image $
, overpass = overpass
default,position ,[0.1,0.1,0.9,0.9]
default,wdims,[600,400]
orbt_nr = time_2_orbit( $
julday(self.month,self.day,self.year,self.hour,self.minute))
default, overpass, orbt_nr
oCwsAtrain = obj_new('cws2',overpass=overpass)
lon = oCwsAtrain->get_data(prod='LON',/data)
lat = oCwsAtrain->get_data(prod='LAT',/data)
ydt = oCwsAtrain->get_data(pr='YDT',/data)
radar = oCwsAtrain->get_data(sen='CPR' ,pro='RFL',/DATA)
sfcbin = oCwsAtrain->get_data(sen='CPR' ,pro='SHB',/DATA)
pxl = geo_2_msg(lon,lat)
idx = where (between((ydt mod (3600D*24D))/3600D $
,float(self.hour)+float(self.minute)/60. $
,float(self.hour)+(float(self.minute))/60.+0.3) $
and between(pxl.(0),self.x_0,self.x_1) $
and between(pxl.(1),self.y_0,self.y_1) ,cW)
start = idx[0]
nr_idx = max(idx)-min(idx)
if nr_idx le 0 then stop
ind = indgen(nr_idx)+start
radar = radar [*,ind]
sfcbin = sfcbin[ind]
h = REVERSE(FINDGEN(99)*0.25) + 0.5 ; this just for quicklook height bins starting 500 m above surfcae
l = LINDGEN(N_ELEMENTS(ind))
zind =(99-FINDGEN(99)) # (FLTARR(N_ELEMENTS(sfcbin))+1)
zind =(FLTARR(99)+1) # (sfcbin-2) - 2 - zind
; horizontal index
lind =(FLTARR(99)+1) # FINDGEN(N_ELEMENTS(sfcbin))
r = TRANSPOSE(radar[zind,lind])
values = findgen(70)-50.
levels = n_elements(values)
ctable = COLORTABLE([[085,026,139],[135,206,255],[0,255,0]], NCOLORS = levels, /TRANSPOSE)
ctable[*,0] = fsc_color('gray',/triple)
w = window(dimension=wdims)
c= contour(r,lat[ind],reverse(reverse(h)),/current,pos = position, yrange=[0,20] $
, c_value = values $
,c_color=ctable,/fill,/xstyle )
stop
end
......@@ -2,7 +2,8 @@ pro cws_stats::cpr_profile, start , nr $
,overpass=overpass $
,cut = cut $
,noPS = noPS $
, group = group
, group = group $
, cpr=cpr
DEFAULT,group,'AWG'
......@@ -80,7 +81,7 @@ pro cws_stats::cpr_profile, start , nr $
lind =(FLTARR(99)+1) # FINDGEN(N_ELEMENTS(sfcbin))
r = TRANSPOSE(radar[zind,lind])
stop
loadct,39
outFile = !PROJECTS.cws_path+'/results/atrain/cloudsat/C'+string(cut,fo='(i2.2)')+'_cpr_profile_' $
+group+'_' +string(overpass,format='(i5.5)')
......@@ -122,7 +123,7 @@ pro cws_stats::cpr_profile, start , nr $
cth_affi = o->atrain::p2z(data[ind,*],ind)
thisP = !p
!p.charsize=0.8
noPs=1
if ~keyword_set(noPS) then startps,outname=outfile,xs=2,ys=2
loadct,11
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment