[Thread Prev][Thread Next][Index]

[ferret_users] Viewport and color_vector.jnl



Dear ferret users,

I am trying to analise a six month wind climatlogy over South America. 

For this i made a loop to make easy to make the figures for several experiments that i'm runing. 

The problem is: 

When combining viewport with the script color_vector, Ferret is clearing the first viewport when the second is filled and so on and the result is attached.


Thank you!

====================  My script   =============


! Script to analise the wind speed at pressure levels

!go startup.jnl

set window/aspect=.8

let modo = "$1"

IF `$1 eq 200` THEN
let alt = 8 
ELIF `$1 eq 500` THEN
let alt = 12
ELIF `$1 eq 700` THEN
let alt = 14
ELIF `$1 eq 850` THEN
let alt = 15
ELIF `$1 eq 925` THEN
let alt = 16
ELIF `$1 eq 1000` THEN
let alt = 17
else 
say "Inform the correct level.... quitting" 
exit
ENDIF


use uv_aabnra.pm.nc ! HPR 50%
use uv_aabnxa.pm.nc ! HPR 100%
use uv_aabnva.pm.nc ! HPR OFF
use uv_aabnsa.pm.nc ! CONTROLE
use uv_aabwua.pm.nc ! BIOMASS OFF 50%


let imes = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"}

define region/x=85W:32W/y=15N:55S/k=`alt` SA
set region/@SA

def axis/calendar=360_day/t="16-JAN-1979":"16-NOV-2005":1/unit=month tax

! Several experiments

let exp_name = {"hpr_50","hpr_100","hpr_off","control","biomass_off"}

repeat/range=1:5/name=a (\
let var = exp_name[i=`a`] ;\
let u_`var` = u_1[d=`a`,gt=tax] ;\
let v_`var` = v_1[d=`a`,gt=tax,gxy=u_1] ;\
)

! Climatologies

use climatological_axes

repeat/range=1:5/name=a (\
let var = exp_name[i=`a`] ;\
let u_`var`_clim = u_`var`[gt=month_360_day@mod] ;\
let v_`var`_clim = v_`var`[gt=month_360_day@mod] ;\
)


go landscape3x2.jnl
let posicao = {"ul6", "um6", "ur6","ll6", "lm6", "lr6"}

ppl color,6,80,80,80 
ppl axlsze .16 .16

let marg = "1   1.2   1.2   .4"


let variavel1 = {"HPR_50","HPR_100","HPR_OFF","CONTROL","BIOMASS_OFF"}
let nome_var1 = {"HPR 50","HPR 100","HPR OFF","CONTROL","BIOMASS OFF"}


! COLOR VECTOR


define symbol vec_cmd      = VECTOR/nolab/set
define symbol vec_u        = uu
define symbol vec_v        = vv
define symbol vec_len      = 10
define symbol vec_xskip    = 1
define symbol vec_yskip    = 1
define symbol vec_arrowkey = YES
!define symbol vec_veckey   = 325,78,(f4.1, " m/s")
define symbol vec_veckey   = 310,19,,(f4.1, " m s^-^1")
define symbol vec_lo       = 0
define symbol vec_hi       = 20
define symbol vec_delta    = 1
define symbol vec_pal      = padrao
define symbol vec_colorkey = YES
define symbol vec_shakey   = 1,1,0.12,2
define symbol vec_otherppl = none
   PPL AXNMTC 3,3
   PPL AXLINT 2,2


! Test for the 1st experiment    ===> "m" loop on experiments and "a" loop for months
repeat/range=1:1/name=m ( \
repeat/range=6:11/name=a ( \
let var1 = variavel1[i=`m`] ;\
let nome1 = nome_var1[i=`m`] ;\
;\
let mes = imes[i=`a`] ;\
let pos = posicao[i=`a-5`] ;\
;\ ! MONTH ;\ 
set view `pos` ; go margins 1 .9 .9 1.2 ;\
;\
let uu=U_`var1`_CLIM[l=`a`] ; let vv=V_`var1`_CLIM[l=`a`] ;\
go color_vector ; go brasil ; go land 1 " " 1 ;\
label/nou `($PPL$XLEN)/2`, -.8, 0, 0, .2, @AS`mes` ;\
;\
set view full ;\
label/nou `($PPL$XLEN)/2`, 7.3, 0, 0, .18, @C07  Wind Speed `modo` mbar ;\ 
;\ 
frame/file=color-vec-exemple.gif ;\ 
 ))


exit




--
Otacilio Leandro de Menezes Neto
Instituto Nacional de Pesquisas Espaciais
Doutorando em Meteorologia
Contato: (12) 3186-9537 / (12) 8194-1455
Email alternativo: otacilio.neto@xxxxxxxxxxxxx

Attachment: color-vec-exemple.gif
Description: GIF image


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement