load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" begin ;;;STC16;;; a = addfile("/media/lara/MyPassport/SIMULACIONES/STC16_parametrizaciones/STC16/nuevoD02/output_20141019/wrfout_d02_2014-10-18_12___00___00_416", "r") ;for Ubuntu level = (/850/) ; default levels param=416 text=(param) ; Set basic resources res = True res@MainTitle = "850hPa Equivalent Potential Temperature (" +param+ ")" times = wrf_user_getvar(a,"times",-1) ; get all times in the file ntimes = dimsizes(times) ;do it = 0,ntimes-1,1 ; TIME LOOP ntimes = 30 it = ntimes ;--------------------------------------------------------------- print("Working on time: " + times(it) ) res@TimeLabel = times(it) ; Set Valid time to use on plots res@InitTime = False res@MainTitlePos = "Center" ; Open workstation wks_type = "png" wks_type@wkWidth = 2000 wks_type@wkHeight = 2000 ;;;;;;;;;;;;;;;;;;;;;;;;;;; wks = gsn_open_wks(wks_type, "/home/lara/Documents/Papers/FinalP3_FIGURES/850ETH/850hPa_ETH_" +text+ "_" +times(it)+ "") ;;;;;;;;;;;;;;;;;;;;;;;;;;; ; c o l o r s ; ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;RGB COLORS WHITE TO GREEN (DIVIDIR POR 255) ;colors = (/"(/255, 255, 255/)", "(/252, 254, 255/)", \ ;"(/250, 253, 255/)", "(/247, 252, 254/)", \ ;"(/244, 251, 254/)", "(/242, 250, 254/)", \ ;"(/239, 249, 254/)", "(/236, 248, 253/)", \ ;"(/234, 247, 253/)", "(/231, 246, 253/)", \ ;"(/229, 245, 253/)", "(/226, 244, 253/)", \ ;"(/223, 243, 252/)", "(/221, 242, 252/)", \ ;"(/218, 241, 252/)", "(/215, 240, 252/)", \ ;"(/213, 239, 252/)", "(/210, 238, 251/)", \ ;"(/207, 237, 251/)", "(/205, 236, 251/)", \ ;"(/202, 235, 251/)", "(/199, 234, 250/)", \ ;"(/197, 233, 250/)", "(/194, 232, 250/)", \ ;"(/191, 231, 250/)", "(/189, 230, 250/)", \ ;"(/186, 229, 249/)", "(/183, 228, 249/)", \ ;"(/181, 227, 249/)", "(/178, 226, 249/)", \ ;"(/176, 225, 249/)", "(/173, 224, 248/)", \ ;"(/170, 223, 248/)", "(/168, 222, 248/)", \ ;"(/165, 221, 248/)", "(/162, 220, 247/)", \ ;"(/157, 218, 247/)", "(/155, 216, 246/)", \ ;"(/152, 214, 245/)", "(/150, 212, 243/)", \ ;"(/148, 210, 242/)", "(/146, 208, 241/)", \ ;"(/143, 206, 240/)", "(/141, 204, 238/)", \ ;"(/139, 202, 237/)", "(/136, 200, 236/)", \ ;"(/134, 197, 235/)", "(/132, 195, 234/)", \ ;"(/129, 193, 232/)", "(/127, 191, 231/)", \ ;"(/125, 189, 230/)", "(/123, 187, 229/)", \ ;"(/120, 185, 228/)", "(/118, 183, 226/)", \ ;"(/116, 181, 225/)", "(/113, 179, 224/)", \ ;"(/111, 177, 223/)", "(/109, 175, 221/)", \ ;"(/106, 173, 220/)", "(/104, 171, 219/)", \ ;"(/102, 169, 218/)", "(/100, 167, 217/)", \ ;"(/97, 165, 215/)", "(/95, 163, 214/)", \ ;"(/93, 160, 213/)", "(/90, 158, 212/)", \ ;"(/88, 156, 211/)", "(/86, 154, 209/)", \ ;"(/83, 152, 208/)", "(/81, 150, 207/)", \ ;"(/79, 148, 206/)", "(/77, 146, 204/)", \ ;"(/72, 142, 202/)", "(/72, 143, 198/)", \ ;"(/72, 144, 195/)", "(/72, 145, 191/)", \ ;"(/72, 146, 188/)", "(/72, 147, 184/)", \ ;"(/72, 148, 181/)", "(/72, 149, 177/)", \ ;"(/72, 150, 173/)", "(/72, 151, 170/)", \ ;"(/72, 153, 166/)", "(/72, 154, 163/)", \ ;"(/72, 155, 159/)", "(/72, 156, 156/)", \ ;"(/72, 157, 152/)", "(/72, 158, 148/)", \ ;"(/72, 159, 145/)", "(/72, 160, 141/)", \ ;"(/72, 161, 138/)", "(/73, 162, 134/)", \ ;"(/73, 163, 131/)", "(/73, 164, 127/)", \ ;"(/73, 165, 124/)", "(/73, 166, 120/)", \ ;"(/73, 167, 116/)", "(/73, 168, 113/)", \ ;"(/73, 169, 109/)", "(/73, 170, 106/)", \ ;"(/73, 172, 102/)", "(/73, 173, 99/)", \ ;"(/73, 174, 95/)", "(/73, 175, 91/)", \ ;"(/73, 176, 88/)", "(/73, 177, 84/)", \ ;"(/73, 178, 81/)", "(/73, 179, 77/)", \ ;"(/73, 181, 70/)"/) colors = (/"(/1.00, 1.00, 1.00/)", "(/0.98, 0.99, 1.00/)", \ "(/0.98, 0.99, 1.00/)", "(/0.96, 0.98, 0.99/)", \ "(/0.95, 0.98, 0.99/)", "(/0.94, 0.98, 0.99/)", \ "(/0.93, 0.97, 0.99/)", "(/0.92, 0.97, 0.99/)", \ "(/0.91, 0.96, 0.99/)", "(/0.90, 0.96, 0.99/)", \ "(/0.89, 0.96, 0.99/)", "(/0.88, 0.95, 0.99/)", \ "(/0.87, 0.95, 0.98/)", "(/0.86, 0.94, 0.98/)", \ "(/0.85, 0.94, 0.98/)", "(/0.84, 0.94, 0.98/)", \ "(/0.83, 0.93, 0.98/)", "(/0.82, 0.93, 0.98/)", \ "(/0.81, 0.92, 0.98/)", "(/0.80, 0.92, 0.98/)", \ "(/0.79, 0.92, 0.98/)", "(/0.78, 0.91, 0.98/)", \ "(/0.77, 0.91, 0.98/)", "(/0.76, 0.90, 0.98/)", \ "(/0.74, 0.90, 0.98/)", "(/0.74, 0.90, 0.98/)", \ "(/0.72, 0.89, 0.97/)", "(/0.71, 0.89, 0.97/)", \ "(/0.70, 0.89, 0.97/)", "(/0.69, 0.88, 0.97/)", \ "(/0.69, 0.88, 0.97/)", "(/0.67, 0.87, 0.97/)", \ "(/0.66, 0.87, 0.97/)", "(/0.65, 0.87, 0.97/)", \ "(/0.64, 0.86, 0.97/)", "(/0.63, 0.86, 0.96/)", \ "(/0.61, 0.85, 0.96/)", "(/0.60, 0.84, 0.96/)", \ "(/0.59, 0.83, 0.96/)", "(/0.58, 0.83, 0.95/)", \ "(/0.58, 0.82, 0.94/)", "(/0.57, 0.81, 0.94/)", \ "(/0.56, 0.80, 0.94/)", "(/0.55, 0.80, 0.93/)", \ "(/0.54, 0.79, 0.92/)", "(/0.53, 0.78, 0.92/)", \ "(/0.52, 0.77, 0.92/)", "(/0.51, 0.76, 0.91/)", \ "(/0.50, 0.75, 0.90/)", "(/0.49, 0.74, 0.90/)", \ "(/0.49, 0.74, 0.90/)", "(/0.48, 0.73, 0.89/)", \ "(/0.47, 0.72, 0.89/)", "(/0.46, 0.71, 0.88/)", \ "(/0.45, 0.70, 0.88/)", "(/0.44, 0.70, 0.87/)", \ "(/0.43, 0.69, 0.87/)", "(/0.42, 0.68, 0.86/)", \ "(/0.41, 0.67, 0.86/)", "(/0.40, 0.67, 0.85/)", \ "(/0.40, 0.66, 0.85/)", "(/0.39, 0.65, 0.85/)", \ "(/0.38, 0.64, 0.84/)", "(/0.37, 0.63, 0.83/)", \ "(/0.36, 0.62, 0.83/)", "(/0.35, 0.61, 0.83/)", \ "(/0.34, 0.61, 0.82/)", "(/0.33, 0.60, 0.81/)", \ "(/0.32, 0.59, 0.81/)", "(/0.31, 0.58, 0.81/)", \ "(/0.30, 0.58, 0.80/)", "(/0.30, 0.57, 0.80/)", \ "(/0.28, 0.55, 0.79/)", "(/0.28, 0.56, 0.77/)", \ "(/0.28, 0.56, 0.76/)", "(/0.28, 0.56, 0.74/)", \ "(/0.28, 0.57, 0.73/)", "(/0.28, 0.57, 0.72/)", \ "(/0.28, 0.58, 0.70/)", "(/0.28, 0.58, 0.69/)", \ "(/0.28, 0.58, 0.67/)", "(/0.28, 0.59, 0.66/)", \ "(/0.28, 0.60, 0.65/)", "(/0.28, 0.60, 0.63/)", \ "(/0.28, 0.60, 0.62/)", "(/0.28, 0.61, 0.61/)", \ "(/0.28, 0.61, 0.59/)", "(/0.28, 0.61, 0.58/)", \ "(/0.28, 0.62, 0.56/)", "(/0.28, 0.62, 0.55/)", \ "(/0.28, 0.63, 0.54/)", "(/0.28, 0.63, 0.52/)", \ "(/0.28, 0.63, 0.51/)", "(/0.28, 0.64, 0.49/)", \ "(/0.28, 0.64, 0.48/)", "(/0.28, 0.65, 0.47/)", \ "(/0.28, 0.65, 0.45/)", "(/0.28, 0.65, 0.44/)", \ "(/0.28, 0.66, 0.42/)", "(/0.28, 0.66, 0.41/)", \ "(/0.28, 0.67, 0.40/)", "(/0.28, 0.71, 0.38/)", \ "(/0.28, 0.68, 0.37/)", "(/0.28, 0.68, 0.35/)", \ "(/0.28, 0.69, 0.34/)", "(/0.28, 0.69, 0.32/)", \ "(/0.28, 0.69, 0.31/)", "(/0.28, 0.70, 0.30/)", \ "(/0.28, 0.70, 0.27/)"/) ;gsn_define_colormap(wks,colors) gsn_define_colormap(wks,"WhiteBlueGreenYellowRed") ; Set plot and map resources pltres = True mpres = True mpres@mpOutlineBoundarySets = "National" mpres@mpDataBaseVersion = "MediumRes" mpres@mpDataSetName = "Earth..4" mpres@mpGeophysicalLineColor = "Black" mpres@mpGeophysicalLineThicknessF = 4.0 if (isvar("zoomCoords")) then lat2d = wrf_user_getvar(a,"XLAT",0) lon2d = wrf_user_getvar(a,"XLONG",0) ; Coordenadas de la zona del mapa que quiero dibujar mpres@mpLimitMode = "Corners" mpres@mpLeftCornerLatF = zoomCoords(0) mpres@mpLeftCornerLonF = zoomCoords(1) mpres@mpRightCornerLatF = zoomCoords(2) mpres@mpRightCornerLonF = zoomCoords(3) end if ; Get the variables tc = wrf_user_getvar(a,"eth",it) ; ETH (Equivalent Potential Temperature) tc@units = "K" p = wrf_user_getvar(a, "pressure", it) ETH_plane = wrf_user_intrp3d(tc, p, "h", level, 0., False) ;Interpolamos para sacar la PV horizontal (2D) slp = wrf_user_getvar(a,"slp",it) slp@units ="hPa" ; Plotting options for Potential Vorticity opts = res if (isvar("zoomCoords")) then opts@sfXArray = lon2d opts@sfYArray = lat2d end if opts@cnLevelSelectionMode = "ExplicitLevels" ; opts@cnLevelSelectionMode = "ManualLevels" opts@cnFillOn = True ; opts@ContourParameters = (/ 310,340,5/) opts@cnInfoLabelOn = False opts@NoHeaderFooter = True opts@lbLabelBarOn = True contour_ETH = wrf_contour(a, wks, ETH_plane, opts) delete(opts) ; Plotting options for slp opts2 = res ; opts2@cnLevelSelectionMode = "ExplicitLevels" opts2@cnLevelSelectionMode = "ManualLevels" opts2@gsnContourLineThicknessesScale = 7.0 opts2@cnLineColor = "Black" opts2@cnLineLabelInterval = 1 ; default = 2 opts2@cnLineLabelPlacementMode = "constant" opts2@cnLineLabelDensityF = 2 ;densidad de info-boxes en una linea de contorno opts2@ContourParameters = (/ 980, 1022, 2 /) opts2@cnFillOn = False contour_slp = wrf_contour(a, wks, slp, opts2) delete(opts2) ; MAKE PLOT if (isvar("zoomCoords")) then pltres@LatLonOverlay = True end if plot = wrf_map_overlays(a, wks, (/contour_ETH,contour_slp/), pltres, mpres) ;end do ; TIME LOOP end