source: configs/dcmip2016/PLOTS/testcase/SUPERCELL/todo/plot_supercell_2.5km_wvel_xsec_LOOP.ncl

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

Updated DCMIP2016 NCL scripts

File size: 4.3 KB
Line 
1;***********************************************
2; plot_supercell_2.5km_wvel_xsec.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;     w_2500m(lon, lat)
21;     2D vertical velocity field at 2.5km altitude at 7200s (units m/s)
22;
23;   Dimensions:
24;     lon:   arbitrary
25;     lat:   arbitrary
26;----------------------------------------------------------------------------
27;  wks = gsn_open_wks("pdf","neptune_supercell_2.5km_wvel_500m_res")   
28  filename_string = "neptune_supercell_2.5km_wvel_4km_res"
29  wks = gsn_open_wks("png",filename_string)   
30
31  data_file = "/glade/scratch/menchaca/run_NEPTUNE/runFILES/SC3/4deg/neptune.163.r400.L40.latlon.nonhydro.SC3.nc"
32;  data_file = "/glade/scratch/menchaca/run_NEPTUNE/runFILES/SC3/2deg/neptune.163.r200.L40.latlon.nonhydro.SC3.nc"
33;  data_file = "/glade/scratch/menchaca/run_NEPTUNE/runFILES/SC3/1deg/neptune.163.r100.L40.latlon.nonhydro.SC3.nc"
34;  data_file = "/glade/scratch/menchaca/run_NEPTUNE/runFILES/SC3/05deg/neptune.163.r50.L40.latlon.nonhydro.SC3.nc"
35
36  data = addfile(data_file,"r")
37
38
39;****************************************************************************
40; DO NOT EDIT BELOW THIS LINE
41;****************************************************************************
42
43;------------------------------------------------
44; Workspace
45;------------------------------------------------
46
47  gsn_merge_colormaps(wks,"temp_diff_18lev","sunshine_9lev")
48
49;------------------------------------------------
50; Plot resources [options]
51;------------------------------------------------
52  plot = new(1,graphic)
53
54; Resources:
55  res                     = True
56
57  res@gsnDraw             = False
58  res@gsnFrame            = False
59
60  res@vpKeepAspect        = True
61  res@vpWidthF            = 0.5
62  res@vpHeightF           = 0.6
63  res@gsnMaximize         = True
64  res@gsnPaperOrientation = "portrait"
65
66  res@cnFillOn          = True
67  res@cnLinesOn         = True
68  res@cnLineLabelsOn    = False
69  res@lbLabelAutoStride = True
70  res@cnInfoLabelOn     = False
71
72  res@trXMinF           = -45.0
73  res@trXMaxF           =  30.0
74
75  res@trYMinF           = -45.0
76  res@trYMaxF           =  45.0
77
78  res@tmXBLabelsOn      = True
79  res@tmXBOn            = True
80
81  res@tmXBMode          = "Explicit"
82  res@tmXBValues        = (/-45,-30,-15,0,15,30/)
83  res@tmXBLabels        = (/"45W","30W","15W","0","15E","30E"/)
84
85  res@tmXBMinorOn       = True
86  res@tmXBMinorValues   = (/-40,-35,-25,-20,-10,-5,5,10,20,25/)
87
88  res@tmXTLabelsOn      = True
89  res@tmXTOn            = True
90
91  res@tmYLLabelsOn      = True
92  res@tmYLOn            = True
93
94  res@tmYLMode          = "Explicit"
95  res@tmYLValues        = (/-45,-30,-15,0,15,30,45/)
96  res@tmYLLabels        = (/"45S","30S","15S","0","15N","30N","45N"/)
97
98  res@tmYLMinorOn       = True
99  res@tmYLMinorValues   = (/-40,-35,-25,-20,-10,-5,5,10,20,25,35,40/)
100
101  res@gsnSpreadColors = True
102
103  res@gsnContourZeroLineThicknessF = 0.0
104  res@gsnContourNegLineDashPattern = 1
105
106  res@gsnSpreadColorStart = 7
107  res@gsnSpreadColorEnd = 19
108  res@cnLevelSelectionMode = "ManualLevels"
109  res@cnLevelSpacingF = 1.0
110  res@cnMinLevelValF = -10.0
111  res@cnMaxLevelValF = 20.0
112
113
114  do i = 0,24
115
116  curr_time = i*5
117  res@gsnLeftString = "Time is " + curr_time + " mins"
118
119  w_2500m = data->W2500m(i,:,:)
120  plot(0) = gsn_csm_contour(wks, w_2500m(:,:), res)
121
122
123;------------------------------------------------
124; Panel plot
125;------------------------------------------------
126
127  pres = True
128  pres@gsnPanelBottom = 0.1
129  pres@gsnPanelTop = 0.9
130  pres@gsnPanelYWhiteSpacePercent = 5
131  pres@gsnPanelXWhiteSpacePercent = 5
132  gsn_panel(wks, plot, (/1,1/), pres)
133
134;  frame(wks)
135  end do
136
137 cmd = "convert -delay 25 "+ filename_string+"*.png "+filename_string+".gif"
138 system(cmd)
139  cmd = "rm "+filename_string+"*.png"
140 system(cmd)
141
142end
143
Note: See TracBrowser for help on using the repository browser.