File size: 5,144 Bytes
03a6065
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
data = yyyymmdd_time(2023, 2023, "integer")
do a = 0,364
pa = "H:/ERA511w/"+data(a)+".nc"
f = addfile(pa, "r")
w1 = short2flt(f->w(:,{500},30:90:-1,250:320))
w = w1*(-100.)
copy_VarCoords(w1, w)
w_avg = dim_avg_n_Wrap(w, 0)

pa1 = "H:/ERA511/"+data(a)+".nc"
f1 = addfile(pa1, "r")
z1 = short2flt(f1->z(:,{850},30:90:-1,250:320))
z = z1/9.8
copy_VarCoords(z1, z)
z_avg = dim_avg_n_Wrap(z, 0)
TP = "F:/xiao/Q1/TP/TP.shp"
name = "f:/xiao/HXM/W/w"+data(a)
; ; name = "f:/xiao/SAH/tu/uvhgt100q1979"
wks = gsn_open_wks("png", name)

FontHeightF         = 0.013
; ;------------------------------------------------
resmp               = True 
resmp@gsnDraw       = False
resmp@gsnFrame      = False 
resmp@tmXBMajorOutwardLengthF = 0
resmp@tmXBMinorOutwardLengthF = 0
resmp@tmYLMajorOutwardLengthF = 0
resmp@tmYLMinorOutwardLengthF = 0

resmp@tmXTOn        = False
resmp@tmYROn        = False  
resmp@pmTickMarkDisplayMode = "Always"
resmp@mpFillOn               = True
resmp@mpDataSetName          = "Earth..4"
resmp@mpDataBaseVersion      = "MediumRes"
;resmp@mpDataSetName          = "Earth..4"
resmp@mpAreaMaskingOn        = True
resmp@mpMaskAreaSpecifiers   = (/"China","Taiwan"/)
resmp@mpOutlineSpecifiers        = (/"China","China:Provinces"/)
; resmp@mpOutlineSpecifiers        = (/"China"/)
resmp@mpLandFillColor        = "white"
resmp@mpInlandWaterFillColor = "white"
;resmp@mpLandFillColor        = "navajowhite1"
resmp@mpOceanFillColor       = "white"
;resmp@mpOutlineBoundarySets  = "NoBoundaries"
resmp@mpNationalLineThicknessF = 3
resmp@mpOutlineOn            = True ;
resmp@mpGeophysicalLineColor = "black"
resmp@mpGeophysicalLineThicknessF = 0.5
resmp@tmYLLabelFontHeightF = 0.013
resmp@tmYRLabelFontHeightF = 0.013
           
resmp@mpMinLonF            = 70.              
resmp@mpMaxLonF            = 140.
resmp@mpMinLatF            = 0.
resmp@mpMaxLatF            = 60.
  resmp@tmXBLabelFontHeightF      = 0.04
  resmp@tmYLLabelFontHeightF      = 0.04
resmp@tiXAxisFontHeightF = 0.03
resmp@tiYAxisFontHeightF = 0.03

cmap = read_colormap_file("WhiteBlue");"sunshine_9lev""WhiteYellowOrangeRed"
cmap1 = read_colormap_file("BlueWhiteOrangeRed")
resz                       = True  
resz@gsnDraw               = False
resz@gsnFrame              = False
resz@gsnLeftString         = "" 
resz@gsnRightString        = "" 
resz@cnFillMode = "RasterFill"
resz@cnRasterSmoothingOn = True
; resz@gsnRightString        = "" 
resz@cnInfoLabelOn         = False
resz@lbLabelBarOn = True   ;关闭每幅图的色标
resz@cnInfoLabelOn = False
resz@cnFillOn= True         ;填色图
resz@cnFillPalette = cmap;(2:190:25,:) ;"BlueWhiteOrangeRed""WhiteYellowOrangeRed"
resz@cnLinesOn = False         ; 不绘制等值线值
resz@cnLineLabelsOn = False   ;关闭等值线值标注
resz@cnLevelSelectionMode = "ManualLevels"    ;手动设置
resz@cnMinLevelValF = 5.
resz@cnMaxLevelValF = 50.
resz@cnLevelSpacingF = 5.
resz@lbLabelFontHeightF = 0.01
resz@cnFillOn = True
resz@cnLinesOn = False
resz@cnSmoothingOn         = True
resz@pmLabelBarOrthogonalPosF = 0.05  ;正的向上移
resz@lbAutoManage = False 
resz@pmLabelBarHeightF = 0.1
resz@pmLabelBarWidthF = 0.5
resz@lbLabelFontHeightF = 0.02  ;数字越大字号越小
resz@lbBoxSeparatorLinesOn = False

   res500summ                       = True  
res500summ@gsnDraw               = False
res500summ@gsnFrame              = False 
res500summ@gsnLeftString         = "" 
res500summ@gsnRightString        = "" 
res500summ@cnInfoLabelOn         = False
; res500summ@tiMainString = "(c) 500_preSummer2"       ; add title
res500summ@cnLinesOn             = True
res500summ@cnLineThicknessF      = 4.0 ; 2
; res500summ@cnLineThicknesses      = (/3.0,3.0,3.0.3,0/) ; 2
res500summ@cnLineColor           = "purple"
res500summ@cnLineLabelFontColor  = "purple"
res500summ@cnSmoothingOn         = True
res500summ@cnLineLabelFontHeightF = 0.01;FontHeightF-0.002 
res500summ@cnLineLabelAngleF      = 0
res500summ@cnLineLabelsOn      = True
res500summ@cnLevelSpacingF     = 20.0
res500summ@cnLineLabelsOn = True
; res500summ@cnMonoLineColor     =False            ;等值线颜色是否一致
; res500summ@cnLevelSelectionMode    = "ExplicitLevels"
; res500summ@cnLevels                   = (/16600/)
; res500summ@cnLineColors           = (/"blue","blue","red","gold"/)
; res500summ@cnLevelSpacingF   = 20   
res500summ@cnLineLabelDensityF   = 1 ;increase the line labels/line
res500summ@cnLineLabelInterval   = 1 ; labels for every line (default=2)
res500summ@tiMainFontHeightF = 0.013
res500summ@tiMainOffsetYF = -0.005
res500summ@cnSmoothingOn = True

pres             = True  
; pres@gsLineColor = "gray40" 
pres@gsFillColor = "gray40" 
; pres@cnFillOn = True 
pres@gsLineThicknessF = 2.0  

map = gsn_csm_map(wks, resmp)
plotz500summ1 = gsn_csm_contour(wks, w_avg(:,:), resz)
overlay(map, plotz500summ1)
plotz2 = gsn_csm_contour(wks, z_avg(:,:), res500summ)
overlay(map, plotz2)

plottp1 = gsn_add_shapefile_polygons(wks, map, TP, pres)
draw(wks)
frame(wks)

end do