source: configs/dcmip2016/PLOTS/testcase/SUPERCELL/todo/plot_supercell_prect.ncl @ 439

Last change on this file since 439 was 439, checked in by dubos, 8 years ago

Updated DCMIP2016 NCL scripts

File size: 3.0 KB
Line 
1;***********************************************
2; plot_supercell_prect.ncl
3;
4; Version 1.0
5;***********************************************
6
7load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" 
8load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" 
9load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" 
10load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" 
11
12begin
13
14;****************************************************************************
15; DO NOT EDIT ABOVE THIS LINE
16;****************************************************************************
17; Read in data and store as follows:
18;
19;   Output:
20;     prect_rate(time)
21;     time series precipitation rate (units m/s)
22;
23;     time_s(time)
24;     time of each sample (units s)
25;
26;   Dimensions:
27;     time:  arbitrary
28;----------------------------------------------------------------------------
29
30  data_file = "output_dcmip2016_regular.nc"
31
32  maxw = asciiread(data_file, (/25/), "double")
33  time_s = fspan(0.0, 7200.0, 25)
34
35;****************************************************************************
36; DO NOT EDIT BELOW THIS LINE
37;****************************************************************************
38
39;------------------------------------------------
40; Workspace
41;------------------------------------------------
42  wks = gsn_open_wks("eps","plot_supercell_wvel")   
43
44;------------------------------------------------
45; Plot resources [options]
46;------------------------------------------------
47; Resources:
48  res                     = True
49
50  res@gsnDraw             = False
51  res@gsnFrame            = False
52
53  res@vpKeepAspect        = True
54  res@vpWidthF            = 0.6
55  res@vpHeightF           = 0.6
56  res@gsnMaximize         = True
57  res@gsnPaperOrientation = "portrait"
58
59  res@tmXBLabelsOn      = True
60  res@tmXBOn            = True
61
62  res@tmXTLabelsOn      = False
63  res@tmXTOn            = False
64
65  res@tmXBMinorOn       = True
66  res@tmYLMinorOn       = True
67
68  res@xyLineThicknessF  = 2.0
69  res@xyMarkLineMode    = "MarkLines"
70
71  resw = res
72
73;------------------------------------------------
74; Vertical velocity plot
75;------------------------------------------------
76
77  resw@tiXAxisOn = True
78  resw@tiXAxisString = "time (s)"
79
80  resw@tiYAxisOn = True
81  resw@tiYAxisString = "maximum vertical velocity (m/s)"
82
83  resw@trXMinF = 0.0
84  resw@trXMaxF = 7200.0
85 
86  resw@trYMinF = 0.0
87  resw@trYMaxF = 50.0
88
89  resw@tmXBMode = "Manual"
90  resw@tmXBTickStartF = 0.0
91  resw@tmXBTickEndF = 7200.0
92  resw@tmXBTickSpacingF = 1800.0
93
94  resw@tmYLMode = "Explicit"
95  resw@tmYLTickStartF = 0.0
96  resw@tmYLTickEndF = 50.0
97
98  plot = gsn_csm_xy(wks, time_s, maxw, resw)
99
100;------------------------------------------------
101; Panel plot
102;------------------------------------------------
103
104  pres = True
105  pres@gsnPanelBottom = 0.1
106  pres@gsnPanelTop = 0.9
107  pres@gsnPanelYWhiteSpacePercent = 5
108  pres@gsnPanelXWhiteSpacePercent = 5
109  gsn_panel(wks, plot, (/1,1/), pres)
110
111end
112
Note: See TracBrowser for help on using the repository browser.