<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Sebastian,<br>
<br>
you are using min(lon), max(lon), min(lat) and max(lat) to define
the map border.<br>
To see which min/max lat/lon values are in your data, do:<br>
<br>
<font color="#3333ff"><tt> print(min(lon))</tt><tt><br>
</tt><tt> print(max(lon))</tt><tt><br>
</tt><tt> print(min(lat))</tt><tt><br>
</tt><tt> print(max(lat))</tt></font><br>
<br>
I don't know much about WRF files and the routine <b><big><big><font
size="1"><big><big>wrf_user_getvar</big></big></font></big></big></b><font
size="1"><b>, </b></font><big><big><font size="1"><big><big>b</big></big></font></big></big>ut
maybe you should <br>
use the same lat and lons of the variables u and v (XLAT, XLON)
which you use to define the <br>
lon2d attributes for u and v. Maybe they are different to the lon
and lat values.<br>
<font color="#3333ff"><tt><br>
</tt><tt> minlat = min(sfile->XLAT(0,:,:)</tt><tt><br>
</tt><tt> maxlat =</tt></font><font color="#3333ff"><tt><font
color="#3333ff"><tt> max(sfile->XLAT(0,:,:)</tt></font></tt><tt><br>
</tt><tt> minlon = </tt></font><font color="#3333ff"><tt><font
color="#3333ff"><tt> min(sfile->XLAT(0,:,:)</tt></font></tt><tt><br>
</tt><tt> maxlon = </tt></font><font color="#3333ff"><tt>max(sfile->XLAT(0,:,:)</tt></font><font
size="1"><br>
<br>
</font>If you want to use mpMinLonF, mpMaxLonF, mpMinLatF and
mpMaxLatF you should<br>
set the resource mpLimitMode to "LatLon":<br>
<br>
<font color="#3333ff"><tt> res@mpLimitMode = "LatLon"</tt></font><br>
<br>
See:
<a class="moz-txt-link-freetext" href="http://ncl.ucar.edu/Document/Graphics/Resources/mp.shtml#mpMinLonF">http://ncl.ucar.edu/Document/Graphics/Resources/mp.shtml#mpMinLonF</a><br>
<br>
Bye,<br>
Karin<br>
<br>
<div class="moz-cite-prefix">Am 14.07.15 um 01:07 schrieb Sebastian
Otarola-Bustos:<br>
</div>
<blockquote
cite="mid:CAO9pyim84D1uHORDyiuUe114OPcrFO1GTgMuSD5VXApEBkam2g@mail.gmail.com"
type="cite">
<div dir="ltr">HI,<br>
<br>
I'm doing a vector animation over a map, and for some reason I
still don't know. I cannot see the results because the map is
much bigger than my domain. I also tried to fit these map to the
maximum and minimum latitudes of my domains, but it seems that
dont work. I'm showing you my script, any help would be really
appreciated:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> </font> </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font size="1"> Var =1</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> lat = wrf_user_getvar(sfile,"lat",-1)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> lon = wrf_user_getvar(sfile,"lon",-1)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> times = wrf_user_getvar(sfile,"times",-1)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"><br>
</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> u = sfile->U10</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> v = sfile->V10</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> u@units ="m/s"</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> v@units ="m/s"</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> u@lat2d = sfile->XLAT(0,:,:)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> u@lon2d = sfile->XLONG(0,:,:) </font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> v@lat2d = sfile->XLAT(0,:,:)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> v@lon2d = sfile->XLONG(0,:,:)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> speed = sqrt(u^2+v^2)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> speed@units = "m/s"</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> speed@lat2d = sfile->XLAT(0,:,:)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> speed@lon2d = sfile->XLONG(0,:,:)</font></blockquote>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1">minlat = min(lat)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> maxlat = max(lat)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> minlon = min(lon)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> maxlon = max(lon)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"><br>
</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> dims = dimsizes(u)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> ntimes = dims(0)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> nlat = dims(1)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> nlon = dims(2)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"><br>
</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"><br>
</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1">;---Set some resources</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res = True</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@gsnMaximize = True</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@vcRefMagnitudeF = 10.0</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@vcRefLengthF = 0.05</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@vcGlyphStyle = "CurlyVector"</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@vcMinDistanceF = 0.025</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@vcRefAnnoOrthogonalPosF = 0.01</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@vcLevelSelectionMode = "ExplicitLevels"</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@vcLevels = ispan(0,20,5)</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@mpMinLatF = minlat</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@mpMaxLatF = maxlat</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@mpMinLonF = minlon</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@mpMaxLonF = maxlon</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@mpCenterLonF = (minlon+maxlon)*0.5</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@mpCenterLatF = (minlat+maxlat)*0.5</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@pmTickMarkDisplayMode = "Always"</font><span
style="font-size:x-small"> </span></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font
size="1"> res@lbLabelFontHeightF = 0.02</font></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font size="1">do n=0,ntimes-1<br>
</font><font size="1"> wks =
gsn_open_wks("png","animate"+sprinti("%03i",n)) ;
animate_00.png, animate_01.png, etc<br>
</font><font size="1">
gsn_define_colormap(wks,"gui_default")<br>
</font><font size="1"> print("Trabajando en el tiempo: "
+ times(n))<br>
</font><font size="1"> res@gsnRightString = "
Velocity(m/s): "+ times(n)<br>
</font><font size="1"> res@gsnLeftString = " "<br>
</font><font size="1"> res@gsnDraw = False<br>
</font><font size="1"> res@gsnFrame = False</font><font
size="1"><br>
</font><font size="1"> <br>
</font><font size="1"> plotB
=gsn_csm_vector_map(wks,u(n,:,:),v(n,:,:),res)<br>
</font><font size="1"> <br>
</font><font size="1"> draw(plotB)<br>
</font><font size="1"> frame(wks)<br>
</font><font size="1"> delete(wks) ; Make sure PNG file
is closed<br>
</font><font size="1"> end do</font></blockquote>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> </blockquote>
<div><br>
All the best,<br>
Sebastián. </div>
<div><br>
</div>
</div>
</blockquote>
</body>
</html>