<div dir="ltr">Joseph, sorry I did not show all the code because I did not want to put too much text. There are contouring of rh and other variables before the map overlay. Below is the code I left out before doing the overlays..<div> ; Plotting options for RH <br> opts = res<br> opts@cnFillOn = True<br> opts@pmLabelBarOrthogonalPosF = -0.1<br> opts@ContourParameters = (/ 10., 90., 10./)<br> opts@cnFillColors = (/"White","White","White", \<br> "White","Chartreuse","Green",\<br> "Green3","Green4", \<br> "ForestGreen","PaleGreen4"/)<br> contour_rh = wrf_contour(files_all[it],wks,rh_plane,opts)<br> delete(opts)<br><br> ; Plotting options for Wind Speed <br> opts = res<br> opts@cnLineColor = "MediumSeaGreen"<br> opts@ContourParameters = (/ 10. /)<br> opts@cnInfoLabelOrthogonalPosF = 0.07 ; offset second label information<br> opts@gsnContourLineThicknessesScale = 3.0<br> contour_spd = wrf_contour(files_all[it],wks,spd,opts)<br> delete(opts)<br><br> ; Plotting options for Wind Vectors <br> opts = res<br> opts@FieldTitle = "Wind" ; overwrite Field Title<br> opts@NumVectors = 47 ; wind barb density<br> vector = wrf_vector(files_all[it],wks,u_plane,v_plane,opts)<br> delete(opts)<br></div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid #d3d4de">
<tr>
<td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
<td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color:#4453ea">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 5:24 PM Joseph Clark <<a href="mailto:jpclark186000@gmail.com">jpclark186000@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Oh I see that now.<br><br>It looks like you are overlaying contour_tc with plots named contour_rh and contour_height. I can't see where these plots are produced in your code. Is it possible that contour_rh and contour_height have gsnLeftString and gsnRightStrings set to values?<br><br>Joe</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 11:08 AM Zilore Mumba <<a href="mailto:zmumba@gmail.com" target="_blank">zmumba@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks Joseph for your intervention. res@gsn.. are actually being captured. This is through,firstly there is res=True, then before opts is used there is opts=res. I confirm they are captured by printing print(opts). In that print the fields are there. The output of "print(opts)" is<div>Variable: opts<br>Type: logical<br>Total Size: 4 bytes<br> 1 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [1]<br>Coordinates: <br>Number Of Attributes: 10<br> gsnContourLineThicknessesScale : 2<br> cnInfoLabelOrthogonalPosF : 0.07<br> ContourParameters : 5<br> cnLineColor : Red<br> MainTitle : WRF MODEL OUTPUT<br> Footer : False<br> cnInfoLabelOn : False<br> gsnCenterString : <br> gsnLeftString : <br> gsnRightString : <br>(0) True<br></div></div><div id="gmail-m_-8376375158042282936gmail-m_-1919973380634856049DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid rgb(211,212,222)">
<tbody><tr>
<td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
<td style="width:470px;padding-top:12px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:rgb(68,83,234)" target="_blank">www.avast.com</a>
</td>
</tr>
</tbody></table><a href="#m_-8376375158042282936_m_-1919973380634856049_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 4:28 PM Joseph Clark <<a href="mailto:jpclark186000@gmail.com" target="_blank">jpclark186000@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Zilore,<br><br>Just a regular NCL user here. I looked through your code. It doesn't seem like your variable "res" is being used in the plot. Instead you are using pltres and mpres. Maybe try adding the following lines anywhere below the lines that read "mpres = True" and "pltres = True"<br><br>pltres@gsnLeftString = ""<div>pltres@gsnRightString = ""</div><div>pltres@gsnCenterString = ""</div><div>mpres@gsnLeftString = ""</div><div>mpres@gsnRightString = ""</div><div>mpres@gsnCenterString = ""<br><br>Joe</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 5:55 AM Zilore Mumba via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">In my wrf plot script below, I am trying to suppress the left, center and right string as well as the label at the bottom right. None of the wrf script examples I have seen has these fields suppressed. My gsn and cn resources (marked in blue in the code below) do not seem to have any effect, hence the warning message.<div>When I print these resources (in purple below) they are captured ok.</div><div>Is it that with this kind of plot one cannot suppress these fields?</div><div><br></div><div><br>; Example script to produce plots for a WRF real-data run,<br>; with the ARW coordinate dynamics option.<br>; Interpolating to specified pressure levels<br><br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br><br>begin<br>;<br>; The WRF ARW input file. <br> DATADir = "/home/zmumba/DA/OUTPUT/2022022800/noda/"<br> FILES = systemfunc (" ls -1 " + DATADir + "wrfout_d01* ")<br> numFILES = dimsizes(FILES)<br><br> files_all = addfiles(FILES+".nc","r")<br> <div>; We generate plots, but what kind do we prefer?<br>; type = "x11"<br>; type = "pdf"<br>; type = "ps"<br>; type = "ncgm"<br> type = "png"<br>; wks = gsn_open_wks(type,"plt_PressureLevel1")<br><br>; Set some Basic Plot options<br> res = True<br> <span style="background-color:rgb(0,0,255)"><font color="#f3f3f3"> res@MainTitle = "WRF MODEL OUTPUT"<br> res@Footer = False</font></span></div><div><span style="background-color:rgb(0,0,255)"><font color="#f3f3f3"><br> res@cnInfoLabelOn = False ; Suppress text "CONTOUR FROM # TO # by #"<br> res@gsnCenterString = "" ;"gsnCenterString ~C~ ~Z80~ (Default: None)"<br> res@gsnLeftString = "" ;"gsnRightString ~C~ ~Z80~ (Default: Long_Name)"<br> res@gsnRightString = "" ;"gsnRightString ~C~ ~Z80~ (Default: Units)"</font></span><br><br> pltres = True<br> mpres = True<br> mpres@mpFillOn = False ; turn off gray fill<br> mpres@mpOutlineBoundarySets = "National" ; turn on country boundaries<br> mpres@mpGeophysicalLineColor = "Navy" ; color of cont. outlines<br> mpres@mpGeophysicalLineThicknessF = 1.5 ; thickness of outlines<br> mpres@mpNationalLineColor = "Black"<br> mpres@mpNationalLineThicknessF = 2.5 ; turn on country boundaries<br><br> mpres@mpDataBaseVersion = "MediumRes" ; choose higher resolution<br> mpres@mpDataSetName = "Earth..4" ; choose most recent boundaries<br><br> mpres@mpMaxLatF = -4 ; choose subregion<br> mpres@mpMinLatF = -21<br> mpres@mpMaxLonF = 37<br> mpres@mpMinLonF = 21<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br><br>; What times and how many time steps are in the data set?<br> times = files_all[:]->Times <br> ntimes = dimsizes(times) ; number of times in the file<br><br>; The specific pressure levels that we want the data interpolated to.<br> pressure_levels = (/ 850., 700., 500., 300./) ; pressure levels to plot<br> nlevels = dimsizes(pressure_levels) ; number of pressure levels<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br><br>; VTlab = (/ "T+00", T+00", "T+06", "T+12", "T+18", "T+24", "T+30", "T+36", "T+42", "T+48"/) ; Validity for file name <br><br>; get time information and strip out the day and hour<br> times_in_file = files_all[:]->Times<br> dims = dimsizes (times)<br> ntimes = dimsizes (times(:,0))<br><br> times_to_use = new(dims(0),string)<br><br> do i=0,dims(0)-1<br> times_to_use(i) = chartostring(times_in_file(i,8:12))<br> end do<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br> do it = 0,ntimes(0)-1,2 ; TIME LOOP<br><br> print("Working on time: " + times_to_use(it) )<br> res@TimeLabel = times_to_use(it) ; Set Valid time to use on plots<br><br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br>; First get the variables we will need <br><br> tc = wrf_user_getvar(files_all,"tc",it) ; T in C<br> u = wrf_user_getvar(files_all,"ua",it) ; u averaged to mass points<br> v = wrf_user_getvar(files_all,"va",it) ; v averaged to mass points<br> p = wrf_user_getvar(files_all, "pressure",it) ; pressure is our vertical coordinate<br> z = wrf_user_getvar(files_all, "z",it) ; grid point height<br> rh = wrf_user_getvar(files_all,"rh",it) ; relative humidity<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br> do level = 0,nlevels-1 ; LOOP OVER LEVELS<br> pressure = pressure_levels(level)<br><br> tc_plane = wrf_user_intrp3d(tc,p,"h",pressure,0.,False)<br> z_plane = wrf_user_intrp3d( z,p,"h",pressure,0.,False)<br> rh_plane = wrf_user_intrp3d(rh,p,"h",pressure,0.,False)<br> u_plane = wrf_user_intrp3d( u,p,"h",pressure,0.,False)<br> v_plane = wrf_user_intrp3d( v,p,"h",pressure,0.,False)<br><br> spd = (u_plane*u_plane + v_plane*v_plane)^(0.5) ; m/sec<br> spd@description = "Wind Speed"<br> spd@units = "m/s"<br> u_plane = u_plane*1.94386 ; kts<br> v_plane = v_plane*1.94386 ; kts<br> u_plane@units = "kts"<br> v_plane@units = "kts"<br><br> wks = gsn_open_wks(type,"Plots00-" + "P" + pressure_levels(level) + "_" + times_to_use(it) + "Z") <br> <br> ; Plotting options for T <br> <font color="#f3f3f3"> <span style="background-color:rgb(153,0,255)"> opts = res<br> print(opts)</span><span style="background-color:rgb(0,255,255)">)</span></font><br><br> opts@cnLineColor = "Red"<br> opts@ContourParameters = (/ 5.0 /)<br> opts@cnInfoLabelOrthogonalPosF = 0.07 ; offset second label information<br> opts@gsnContourLineThicknessesScale = 2.0<br> contour_tc = wrf_contour(files_all[it],wks,tc_plane,opts)<br> delete(opts)<br> <div> ; MAKE PLOT <br> if ( pressure .eq. 850 ) then ; plot temp, rh, height, wind barbs<br> opts_z@ContourParameters = (/ 20.0 /)<br> contour_height = wrf_contour(files_all[it],wks,z_plane,opts_z)<br> plot = wrf_map_overlays(files_all[it],wks,(/contour_rh,contour_tc,contour_height, \<br> vector/),pltres,mpres)<br> end if<br><div><br></div><div> end do ; END OF LEVEL LOOP<br>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br> end do ; END OF TIME LOOP<br>end<br></div><div><br></div></div></div></div></div><div id="gmail-m_-8376375158042282936gmail-m_-1919973380634856049gmail-m_8223286762302240149gmail-m_4986238943696855104DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid rgb(211,212,222)">
<tbody><tr>
<td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
<td style="width:470px;padding-top:12px;color:rgb(65,66,78);font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:rgb(68,83,234)" target="_blank">www.avast.com</a>
</td>
</tr>
</tbody></table><a href="#m_-8376375158042282936_m_-1919973380634856049_m_8223286762302240149_m_4986238943696855104_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>