[ncl-talk] Map_options_error
Sebastian Otarola-Bustos
Sebastian.F.Otarola-Bustos.1 at nd.edu
Mon Jul 13 17:07:24 MDT 2015
HI,
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:
Var =1
lat = wrf_user_getvar(sfile,"lat",-1)
lon = wrf_user_getvar(sfile,"lon",-1)
times = wrf_user_getvar(sfile,"times",-1)
> u = sfile->U10
v = sfile->V10
u at units ="m/s"
v at units ="m/s"
u at lat2d = sfile->XLAT(0,:,:)
u at lon2d = sfile->XLONG(0,:,:)
v at lat2d = sfile->XLAT(0,:,:)
v at lon2d = sfile->XLONG(0,:,:)
speed = sqrt(u^2+v^2)
speed at units = "m/s"
speed at lat2d = sfile->XLAT(0,:,:)
speed at lon2d = sfile->XLONG(0,:,:)
minlat = min(lat)
maxlat = max(lat)
minlon = min(lon)
maxlon = max(lon)
> dims = dimsizes(u)
ntimes = dims(0)
nlat = dims(1)
nlon = dims(2)
>
> ;---Set some resources
res = True
res at gsnMaximize = True
res at vcRefMagnitudeF = 10.0
res at vcRefLengthF = 0.05
res at vcGlyphStyle = "CurlyVector"
res at vcMinDistanceF = 0.025
res at vcRefAnnoOrthogonalPosF = 0.01
res at vcLevelSelectionMode = "ExplicitLevels"
res at vcLevels = ispan(0,20,5)
res at mpMinLatF = minlat
res at mpMaxLatF = maxlat
res at mpMinLonF = minlon
res at mpMaxLonF = maxlon
res at mpCenterLonF = (minlon+maxlon)*0.5
res at mpCenterLatF = (minlat+maxlat)*0.5
res at pmTickMarkDisplayMode = "Always"
res at lbLabelFontHeightF = 0.02
do n=0,ntimes-1
> wks = gsn_open_wks("png","animate"+sprinti("%03i",n)) ;
> animate_00.png, animate_01.png, etc
> gsn_define_colormap(wks,"gui_default")
> print("Trabajando en el tiempo: " + times(n))
> res at gsnRightString = " Velocity(m/s): "+ times(n)
> res at gsnLeftString = " "
> res at gsnDraw = False
> res at gsnFrame = False
>
> plotB =gsn_csm_vector_map(wks,u(n,:,:),v(n,:,:),res)
>
> draw(plotB)
> frame(wks)
> delete(wks) ; Make sure PNG file is closed
> end do
All the best,
Sebastián.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150713/7465d9f2/attachment.html
More information about the ncl-talk
mailing list