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/csm/contributed.ncl" ;*************************************************** ; load ncl_preferences.ncl ;*************************************************** function which_script() local script begin script="profiles" return(script) end if (isfilepresent("~/ncl_preferences.ncl")) then loadscript("~/ncl_preferences.ncl") else if (isfilepresent("~/palm/current_version/trunk/SCRIPTS/NCL/ncl_preferences.ncl")) then loadscript( "~/palm/current_version/trunk/SCRIPTS/NCL/ncl_preferences.ncl") else print(" ") print("'ncl_preferences.ncl' does not exist in $home or $home/palm/current_version/trunk/SCRIPTS/NCL/") print(" ") exit end if end if begin ;*************************************************** ; set up default parameter values and strings ;*************************************************** if (no_files .LT. 1 .OR. no_files .GT. 6) then print(" ") print("Assign 'no_files' between 1 and 6") print(" ") exit end if file_in = new(no_files,string) file_in_1 = new(no_files,logical) start_f = new(no_files,integer) end_f = new(no_files,integer) if (file_1 .EQ. "File in") then print(" ") print("Declare 1st input file 'file_1=' in 'ncl_preferences.ncl' or prompt") print(" ") exit else file_in(0) = file_1 end if file_in_1(0) = False if (isStrSubset(file_in(0), ".nc"))then start_f_1 = -2 end_f_1 = -2 file_in_1(0) = True end if if (start_f_1 .EQ. -1)then print(" ") print("'start_f_1' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if if (end_f_1 .EQ. -1)then print(" ") print("'end_f_1' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if start_f(0) = start_f_1 end_f(0) = end_f_1 if (prof3d .EQ. -1)then print(" ") print("Set 'prof3d' to 0 or 1") print(" ") exit else if (prof3d .NE. 0 .AND. prof3d .NE. 1)then print(" ") print("'prof3d'= "+prof3d+" is invalid; set 'prof3d' to 0 or 1") print(" ") exit end if end if if (no_files .GT. 1) then if (file_2 .EQ. "File in") then print(" ") print("Declare 2nd input file 'file_2=' in 'ncl_preferences.ncl' or prompt") print(" ") exit else file_in(1) = file_2 end if file_in_1(1) = False if (isStrSubset(file_in(1), ".nc"))then start_f_2 = -2 end_f_2 = -2 file_in_1(1) = True end if if (start_f_2 .EQ. -1)then print(" ") print("'start_f_2' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if if (end_f_2 .EQ. -1)then print(" ") print("'end_f_2' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if start_f(1) = start_f_2 end_f(1) = end_f_2 end if if (no_files .GT. 2) then if (file_3 .EQ. "File in") then print(" ") print("Declare 3rd input file 'file_3=' in 'ncl_preferences.ncl' or prompt") print(" ") exit else file_in(2) = file_3 end if file_in_1(2) = False if (isStrSubset(file_in(2), ".nc"))then start_f_3 = -2 end_f_3 = -2 file_in_1(2) = True end if if (start_f_3 .EQ. -1)then print(" ") print("'start_f_3' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if if (end_f_3 .EQ. -1)then print(" ") print("'end_f_3' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if start_f(2) = start_f_3 end_f(2) = end_f_3 end if if (no_files .GT. 3) then if (file_4 .EQ. "File in") then print(" ") print("Declare 4th input file 'file_4=' in 'ncl_preferences.ncl' or prompt") print(" ") exit else file_in(3) = file_4 end if file_in_1(3) = False if (isStrSubset(file_in(3), ".nc"))then start_f_4 = -2 end_f_4 = -2 file_in_1(3) = True end if if (start_f_4 .EQ. -1)then print(" ") print("'start_f_4' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if if (end_f_4 .EQ. -1)then print(" ") print("'end_f_4' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if start_f(3) = start_f_4 end_f(3) = end_f_4 end if if (no_files .GT. 4) then if (file_5 .EQ. "File in") then print(" ") print("Declare 5th input file 'file_5=' in 'ncl_preferences.ncl' or prompt") print(" ") exit else file_in(4) = file_5 end if file_in_1(4) = False if (isStrSubset(file_in(4), ".nc"))then start_f_5 = -2 end_f_5 = -2 file_in_1(4) = True end if if (start_f_5 .EQ. -1)then print(" ") print("'start_f_5' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if if (end_f_5 .EQ. -1)then print(" ") print("'end_f_5' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if start_f(4) = start_f_5 end_f(4) = end_f_5 end if if (no_files .GT. 5) then if (file_6 .EQ. "File in") then print(" ") print("Declare 6th input file 'file_6=' in 'ncl_preferences.ncl' or prompt") print(" ") exit else file_in(5) = file_6 end if file_in_1(5) = False if (isStrSubset(file_in(5), ".nc"))then start_f_6 = -2 end_f_6 = -2 file_in_1(5) = True end if if (start_f_6 .EQ. -1)then print(" ") print("'start_f_6' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if if (end_f_6 .EQ. -1)then print(" ") print("'end_f_6' must be one of the cyclic numbers (at least 0) of your input file(s)") print(" ") exit end if start_f(5) = start_f_6 end_f(5) = end_f_6 end if if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then print(" ") print("'format_out = "+format_out+"' is invalid and set to'x11'") print(" ") format_out="x11" end if if (over .NE. 0 .AND. over .NE. 1) then print(" ") print("'over'= "+over+" is invalid and set to 0") print(" ") over = 0 end if if (no_files .GT. 1) then over = 0 print(" ") print("If you have more than one input file - you cannot overlay variables: over is set to 0") print(" ") end if if (combine .NE. 0 .AND. combine .NE. 1)then print(" ") print("Your 'combine'= "+combine+" is invalid and set to 0") print(" ") combine = 0 end if if (no_files .GT. 1) then combine = 0 print(" ") print("If you have more than one input file you cannot combine variables: combine is set to 0") print(" ") end if if (combine .EQ. 1 .AND. number_comb .EQ. -1) then print(" ") print("Set 'number_comb' to 2 or 3 or combine to 0") print(" ") exit end if if (combine .EQ. 1)then if (number_comb .EQ. -1) then print(" ") print("Set 'number_comb' to 2 or 3 or combine to 0") print(" ") exit end if if (number_comb .NE. 2 .AND. number_comb .NE. 3) then print(" ") print("Set 'number_comb' to 2 or 3 or combine to 0") print(" ") exit end if end if if (combine .EQ. 1 .AND. c_var .EQ. "c_variables") then print(" ") print("Select variables for overlaying ('c_var') or set combine to 0") print(" ") exit end if if (log_z .NE. 0 .AND. log_z .NE. 1)then print(" ") print("'log_z'= "+log_z+" is invalid and set to 0") print(" ") log_z = 0 end if if (norm_z .EQ. 0) then print(" ") print("Normalising with 0 is not allowed, 'norm_z' is set to 1.0") print(" ") norm_z = 1.0 end if ;*************************************************** ; open input file ;*************************************************** do nof=0,no_files-1 files=new(end_f(nof)-start_f(nof)+1,string) if (file_in_1(nof))then if (isfilepresent(file_in(nof)))then files(0)=file_in(nof) else print(" ") print("1st input file: '"+file_in(nof)+"' does not exist") print(" ") exit end if else if (start_f(nof) .EQ. 0)then if (isfilepresent(file_in(nof)+".nc"))then files(0)=file_in(nof)+".nc" do i=1,end_f(nof) if (isfilepresent(file_in(nof)+"."+i+".nc"))then files(i)=file_in(nof)+"."+i+".nc" else print(" ") print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist") print(" ") exit end if end do else print(" ") print("Input file: '"+file_in(nof)+".nc' does not exist") print(" ") exit end if else do i=start_f(nof),end_f(nof) if (isfilepresent(file_in(nof)+"."+i+".nc"))then files(i-start_f(nof))=file_in(nof)+"."+i+".nc" else print(" ") print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist") print(" ") exit end if end do end if end if f=addfiles(files,"r") f_att=addfile(files(0),"r") ListSetType(f,"cat") vNam = getfilevarnames(f_att) if (nof .EQ. 0)then vNam0=vNam end if if (nof .NE. 0)then if (dim0 .NE. dim)then print(" ") print("There are 'no_files'="+no_files+" input files but they do not contain the same variables") print(" ") exit else do i=0,dim0-1 if (vNam0(i) .NE. vNam(i))then print(" ") print("There are 'no_files'="+no_files+" input files but they do not contain the same variables") print(" ") exit end if end do end if end if nof=nof+1 print(" ") print("Variables in input file "+nof+":") print("- "+ vNam) print(" ") nof=nof-1 dim = dimsizes(vNam) dim0=dim if (dim .EQ. 0) then print(" ") print("There is no data on file") print(" ") end if ;-----------------------------------------------------below steps only for first file -> nof=0 if (nof .EQ. 0) then plot = new(dim,graphic) plot_ = new(dim,graphic) if (no_files .GT. 1) then multi_plot = new((/no_files,dim/),graphic) max_nof = new((/no_files,dim/),float) min_nof = new((/no_files,dim/),float) name = new((/no_files,dim/),string) unit_ = new((/no_files,dim/),string) end if if (prof3d .EQ. 0) then do varn = dim-1,0,1 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then varn=varn-1 continue end if if (vNam(varn) .EQ. "u" .OR. isStrSubset(vNam(varn), "u_"))then z_u = f_att->$vNam(varn+1)$ break else if (vNam(varn) .EQ. "v" .OR. isStrSubset(vNam(varn), "v_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "pt" .OR. isStrSubset(vNam(varn), "pt_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "vpt" .OR. isStrSubset(vNam(varn), "vpt_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "lpt" .OR. isStrSubset(vNam(varn), "lpt_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "q" .OR. isStrSubset(vNam(varn), "q_") )then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "qv" .OR. isStrSubset(vNam(varn), "qv_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ql" .OR. isStrSubset(vNam(varn), "ql_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "rho" .OR. isStrSubset(vNam(varn), "rho_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "s" .OR. isStrSubset(vNam(varn), "s_") )then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "sa" .OR. isStrSubset(vNam(varn), "sa_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "e" .OR. isStrSubset(vNam(varn), "e_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "es" .OR. isStrSubset(vNam(varn), "es_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "km" .OR. isStrSubset(vNam(varn), "km_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "kh" .OR. isStrSubset(vNam(varn), "kh_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "l" .OR. isStrSubset(vNam(varn), "l_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "us2" .OR. isStrSubset(vNam(varn), "us2_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "vs2" .OR. isStrSubset(vNam(varn), "vs2_") )then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "pts2" .OR. isStrSubset(vNam(varn), "pts2_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsususodz" .OR. isStrSubset(vNam(varn), "wsususodz_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wspsodz" .OR. isStrSubset(vNam(varn), "wspsodz_"))then z_u = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpeodz" .OR. isStrSubset(vNam(varn), "wpeodz_"))then z_u = f_att->$vNam(varn+1)$ break end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if varn=varn-1 end do do varn=dim-1,0,1 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then varn=varn-1 continue end if if (vNam(varn) .EQ. "w" .OR. isStrSubset(vNam(varn), "w_"))then z_w = f_att->$vNam(varn+1)$ break else if (vNam(varn) .EQ. "wpup" .OR. isStrSubset(vNam(varn), "wpup_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsus" .OR. isStrSubset(vNam(varn), "wsus_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wu" .OR. isStrSubset(vNam(varn), "wu_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpvp" .OR. isStrSubset(vNam(varn), "wpvp_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsvs" .OR. isStrSubset(vNam(varn), "wsvs_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wv" .OR. isStrSubset(vNam(varn), "wv_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wptpp" .OR. isStrSubset(vNam(varn), "wptpp_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wspts" .OR. isStrSubset(vNam(varn), "wspts_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpt" .OR. isStrSubset(vNam(varn), "wpz_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsptsBC" .OR. isStrSubset(vNam(varn), "wsptsBC_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wptBC" .OR. isStrSubset(vNam(varn), "wptBC_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpvptp" .OR. isStrSubset(vNam(varn), "wpvptp_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsvpts" .OR. isStrSubset(vNam(varn), "wsvpts_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wvpt" .OR. isStrSubset(vNam(varn), "wvpt_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpqp" .OR. isStrSubset(vNam(varn), "wpqp_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsqs" .OR. isStrSubset(vNam(varn), "wsqs_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wq" .OR. isStrSubset(vNam(varn), "wq_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpqvp" .OR. isStrSubset(vNam(varn), "wpqvp_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsqvs" .OR. isStrSubset(vNam(varn), "wsqvs_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wqv" .OR. isStrSubset(vNam(varn), "wqv_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpsp" .OR. isStrSubset(vNam(varn), "wpsp_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsss" .OR. isStrSubset(vNam(varn), "wsss_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ws" .OR. isStrSubset(vNam(varn), "ws_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpsap" .OR. isStrSubset(vNam(varn), "wpsap_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wssas" .OR. isStrSubset(vNam(varn), "wssas_") )then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsa" .OR. isStrSubset(vNam(varn), "wsa_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wses" .OR. isStrSubset(vNam(varn), "wses_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ws2" .OR. isStrSubset(vNam(varn), "ws2_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ws3" .OR. isStrSubset(vNam(varn), "ws3_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "Sw" .OR. isStrSubset(vNam(varn), "Sw_"))then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ws2pts".OR. isStrSubset(vNam(varn), "ws2pts_") )then z_w = f_att->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wspts2" .OR. isStrSubset(vNam(varn), "wspts2_"))then z_w = f_att->$vNam(varn+1)$ break end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if end if varn=varn-1 end do if (.not. isvar("z_u") .AND. .not. isvar ("z_w")) then co=0 do varn=0,dim-1 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then check = False else check = True if (var .NE. "all") then check = isStrSubset( var,","+vNam(varn)+"," ) end if end if if (check)then co=co+1 z = f_att->$vNam(varn+1)$ if (getvardims(z) .EQ. "zu")then z_u = z else if (getvardims(z) .EQ. "zw")then z_w = z end if end if dimz = dimsizes(z) break end if end do if (co .EQ. 0) then print(" ") print("The variables 'var="+var+"' do not exist on your input file;") print("be sure to have one comma berfore and after each variable") print(" ") exit end if end if if (isvar("z_u") ) then dimz = dimsizes(z_u) else if (isvar("z_w"))then dimz = dimsizes(z_w) end if end if else do varn = dim-1,0,1 if (vNam(varn) .EQ. "zu_3d")then z_u = f_att->zu_3d dimz = dimsizes(z_u) else if (vNam(varn) .EQ. "zw_3d")then z_w = f_att->zw_3d dimz = dimsizes(z_w) end if end if if (vNam(varn) .EQ. "x")then x = f_att->x dimx=dimsizes(x) else if (vNam(varn) .EQ. "xu")then x = f_att->xu dimx=dimsizes(x) end if end if if (vNam(varn) .EQ. "y")then y = f_att->y dimy=dimsizes(y) else if (vNam(varn) .EQ. "yv")then y = f_att->yv dimy=dimsizes(y) end if end if end do end if if(.not. isvar("z_u") .AND. .not. isvar("z_w"))then print(" ") print("Program aborts - there are no z-variables available") print("Be sure if 'plot_3d' is set correctly") print(" ") exit end if if (prof3d .EQ. 1)then t_all = f[:]->time else t_all = f[:]->time(1:) end if nt = dimsizes(t_all) delta_t=t_all(nt-1)/nt ; **************************************************** ; start of time step and different types of mistakes that could be done ; **************************************************** if (start_time_step .EQ. -1.) then start_time_step=t_all(0)/3600 else if (start_time_step .GT. t_all(nt-1)/3600)then print(" ") print("'start_time_step' = "+ start_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") print(" ") print("Select another 'start_time_step'") print(" ") exit end if if (start_time_step .LT. t_all(0)/3600)then print(" ") print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") print(" ") exit end if end if do i=0,nt-1 if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then st=i break end if end do if (.not. isvar("st"))then print(" ") print("'start_time_step' = "+ start_time_step +"h is invalid") print(" ") print("Select another 'start_time_step'") print(" ") exit end if ; **************************************************** ; end of time step and different types of mistakes that could be done ; **************************************************** if (end_time_step .EQ. -1.) then end_time_step = t_all(nt-1)/3600 else if (end_time_step .GT. t_all(nt-1)/3600)then print(" ") print("'end_time_step' = "+ end_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") print(" ") print("Select another 'end_time_step'") print(" ") exit end if if (end_time_step .LT. start_time_step/3600)then print(" ") print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h") print(" ") print("Select another 'start_time_step' or 'end_time_step'") print(" ") exit end if end if do i=0,nt-1 if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. end_time_step .LT. (t_all(i)+delta_t/2)/3600)then et=i break end if end do if (.not. isvar("et"))then print(" ") print("'end_time_step' = "+ end_time_step +"h is invalid") print(" ") print("Select another 'end_time_step'") print(" ") exit end if delete(start_time_step) start_time_step=round(st,3) delete(end_time_step) end_time_step=round(et,3) print(" ") print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step) print(" till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step) print(" ") ; **************************************************** ; set up legend and colors ; **************************************************** legend_label=new(nt,double) do p=start_time_step,end_time_step if (t_all(p)/3600 .LT. 1) then legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600,3,True) else legend_label(p-start_time_step)=decimalPlaces(t_all(p)/3600,0,True) end if end do np = end_time_step-start_time_step+1 ; *************************************************** ; set up recourses ; *************************************************** res = True res@gsnDraw = False res@gsnFrame = False res@gsnPaperOrientation = "portrait" res@gsnPaperWidth = 8.27 res@gsnPaperHeight = 11.69 res@gsnPaperMargin = 0.79 res@txFont = "helvetica" res@tiMainFont = "helvetica" res@tiXAxisFont = "helvetica" res@tiYAxisFont = "helvetica" res@tmXBLabelFont = "helvetica" res@tmYLLabelFont = "helvetica" res@lgLabelFont = "helvetica" res@tmLabelAutoStride = True if (legend .EQ. 1)then res@pmLegendDisplayMode = "Always" end if res@pmLegendSide = "Top" res@xyExplicitLegendLabels = legend_label res@pmLegendParallelPosF = 1.15 res@pmLegendOrthogonalPosF = -1.0 res@pmLegendWidthF = 0.12 res@pmLegendHeightF = 0.04*(end_time_step-start_time_step+1) res@lgLabelFontHeightF = font_size res@lgTitleString = "Time [h]" res@lgTitleFontHeightF = font_size res@txFontHeightF = font_size res@tiXAxisFontHeightF = font_size res@tiYAxisFontHeightF = font_size res@tmXBLabelFontHeightF = font_size res@tmYLLabelFontHeightF = font_size res@tiXAxisString = " " if ( black .eq. 0 ) then res@xyLineColors = ispan(2,237,235/np) end if if (norm_z .EQ. 1)then res@tiYAxisString = "Height [m]" else res@tiYAxisString = "Height / "+norm_z+" [m]" end if if (log_z .EQ. 1) then res@trYLog = True end if if (dash .EQ. 0 ) then res@xyMonoDashPattern = True else if (no_files .GT. 1) res@xyMonoDashPattern = True print(" ") print("If you use more than one file, patterns for different timesteps cannot be used") print(" ") end if end if res@tmXBMinorPerMajor = 4 res@tmYLMinorPerMajor = 4 resP = True resP@txFont = "helvetica" resP@txString = f_att@title resP@txFuncCode = "~" resP@txFontHeightF = 0.015 ; *************************************************** ; set up graphics for plot ; *************************************************** if (combine .EQ. 1) then plot_o = new(number_comb,graphic) label=new(number_comb,string) color_o=new(number_comb,integer) mini=new(number_comb,float) maxi=new(number_comb,float) end if wks=gsn_open_wks(format_out,file_out) gsn_define_colormap(wks,"rainbow+white") ; *************************************************** ; set up minimum and maximum height ; *************************************************** if (log_z .EQ. 1)then if (min_z .EQ. -1)then if (isvar("z_u"))then min_z=z_u(1) else min_z=z_w(1) end if else if (isvar("z_w"))then if (min_z .GE. max(z_w) ) then print(" ") print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_w)+")") print(" ") exit end if else if (min_z .GE. max(z_u) ) then print(" ") print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_u)+")") print(" ") exit end if end if if (isvar("z_u"))then if (min_z .LT. z_u(1) ) then print(" ") print("Begin height 'min_z' at least at level k=1 (="+z_u(1)+"m) due to the logarithmic scale of the y-axis") print(" ") exit end if else if (min_z .LT. z_w(1) ) then print(" ") print("Begin height 'min_z' at least at level k=1 (="+z_w(1)+"m) due to the logarithmic scale of the y-axis") print(" ") exit end if end if end if else if (isvar("z_u"))then if (min_z .EQ. -1)then min_z=z_u(0) end if else if (min_z .EQ. -1)then min_z=z_w(0) end if end if if (isvar("z_w"))then if (min_z .GE. max(z_w) ) then print(" ") print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_w)+")") print(" ") exit end if else if (min_z .EQ. -1)then min_z=z_u(0) end if if (min_z .GE. max(z_u) ) then print(" ") print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_u)+")") print(" ") exit end if end if end if if (isvar("z_w"))then if (max_z .EQ. -1)then max_z=max(z_w) end if else if (max_z .EQ. -1)then max_z=max(z_u) end if end if if (isvar("z_w"))then if (max_z .GT. max(z_w) ) then print(" ") print("Maximum of height ('max_z'="+max_z+") is greater than available heights (="+max(z_w)+")") print(" ") exit end if end if min_z=min_z/norm_z max_z=max_z/norm_z ; *************************************************** ; read data and create plots ; *************************************************** do ti = start_time_step, end_time_step if( t_all(ti) .lt. 10^36) then start_time_step = ti break end if end do if (log_z .EQ. 1) then data = new((/dim,(end_time_step-start_time_step)+1,dimz-1/),float) data_0 = new((/(end_time_step-start_time_step)+1,dimz-1/),float) data_0 = 0.1 t = new((/(end_time_step-start_time_step)+1,dimz-1/),float) t = 0.0 unit = new(dim,string) if (isvar("z_u"))then if (typeof(z_u) .EQ. "double")then z_v = new((/dim,dimz/),double) z_ = new((/dim,dimz-1/),double) else if (typeof(z_u) .EQ. "float")then z_v = new((/dim,dimz/),float) z_ = new((/dim,dimz-1/),float) end if end if else if (isvar("z_w"))then if (typeof(z_w) .EQ. "double")then z_v = new((/dim,dimz/),double) z_ = new((/dim,dimz-1/),double) else if (typeof(z_w) .EQ. "float")then z_v = new((/dim,dimz/),float) z_ = new((/dim,dimz-1/),float) end if end if end if end if else data = new((/dim,(end_time_step-start_time_step)+1,dimz/),float) data_0 = new((/(end_time_step-start_time_step)+1,dimz/),float) data_0 = 0.0 t = new((/(end_time_step-start_time_step)+1,dimz/),float) t = 0.0 unit = new(dim,string) if (isvar("z_u"))then if (typeof(z_u) .EQ. "double")then z_v = new((/dim,dimz/),double) z_ = new((/dim,dimz/),double) else if (typeof(z_u) .EQ. "float")then z_v = new((/dim,dimz/),float) z_ = new((/dim,dimz/),float) end if end if else if (isvar("z_w"))then if (typeof(z_w) .EQ. "double")then z_v = new((/dim,dimz/),double) z_ = new((/dim,dimz/),double) else if (typeof(z_w) .EQ. "float")then z_v = new((/dim,dimz/),float) z_ = new((/dim,dimz/),float) end if end if end if end if end if end if ;------------------------------------------------------ above steps only for first file ; *************************************************** ; indicate plot number ; *************************************************** if (combine .EQ. 1) then n = 1 else n = 0 end if if (over .EQ. 1) then plot_u = gsn_csm_xy(wks,t,data_0(:,:),res) miniu = 1.E27 maxiu =-1.E27 plot_v = gsn_csm_xy(wks,t,data_0(:,:),res) miniv = 1.E27 maxiv =-1.E27 plot_w = gsn_csm_xy(wks,t,data_0(:,:),res) miniw = 1.E27 maxiw =-1.E27 plot_pt = gsn_csm_xy(wks,t,data_0(:,:),res) minipt = 1.E27 maxipt =-1.E27 plot_vpt = gsn_csm_xy(wks,t,data_0(:,:),res) minivpt = 1.E27 maxivpt =-1.E27 plot_lpt = gsn_csm_xy(wks,t,data_0(:,:),res) minilpt = 1.E27 maxilpt =-1.E27 plot_q = gsn_csm_xy(wks,t,data_0(:,:),res) miniq = 1.E27 maxiq =-1.E27 plot_qv = gsn_csm_xy(wks,t,data_0(:,:),res) miniqv = 1.E27 maxiqv =-1.E27 plot_ql = gsn_csm_xy(wks,t,data_0(:,:),res) miniql = 1.E27 maxiql =-1.E27 plot_rho = gsn_csm_xy(wks,t,data_0(:,:),res) plot_s = gsn_csm_xy(wks,t,data_0(:,:),res) plot_sa = gsn_csm_xy(wks,t,data_0(:,:),res) plot_e = gsn_csm_xy(wks,t,data_0(:,:),res) minie = 1.E27 maxie =-1.E27 plot_es = gsn_csm_xy(wks,t,data_0(:,:),res) minie = 1.E27 maxie =-1.E27 plot_km = gsn_csm_xy(wks,t,data_0(:,:),res) minie = 1.E27 maxie =-1.E27 plot_kh = gsn_csm_xy(wks,t,data_0(:,:),res) minie = 1.E27 maxie =-1.E27 plot_l = gsn_csm_xy(wks,t,data_0(:,:),res) plot_wpup = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpup = 1.E27 maxiwpup =-1.E27 plot_wsus = gsn_csm_xy(wks,t,data_0(:,:),res) miniwsus = 1.E27 maxiwsus =-1.E27 plot_wu = gsn_csm_xy(wks,t,data_0(:,:),res) miniwu = 1.E27 maxiwu =-1.E27 plot_wpvp = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpvp = 1.E27 maxiwpvp =-1.E27 plot_wsvs = gsn_csm_xy(wks,t,data_0(:,:),res) miniwsvs = 1.E27 maxiwsvs =-1.E27 plot_wv = gsn_csm_xy(wks,t,data_0(:,:),res) miniwv = 1.E27 maxiwv =-1.E27 plot_wpptp = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpptp = 1.E27 maxiwpptp =-1.E27 plot_wspts = gsn_csm_xy(wks,t,data_0(:,:),res) miniwspts = 1.E27 maxiwspts =-1.E27 plot_wpt = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpt = 1.E27 maxiwpt =-1.E27 plot_wsptsBC = gsn_csm_xy(wks,t,data_0(:,:),res) miniwsptsBC = 1.E27 maxiwsptsBC =-1.E27 plot_wptBC = gsn_csm_xy(wks,t,data_0(:,:),res) miniwptBC = 1.E27 maxiwptBC =-1.E27 plot_wpvptp = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpvptp = 1.E27 maxiwpvptp =-1.E27 plot_wsvpts = gsn_csm_xy(wks,t,data_0(:,:),res) miniwsvpts = 1.E27 maxiewsvpts=-1.E27 plot_wvpt = gsn_csm_xy(wks,t,data_0(:,:),res) miniwvpt = 1.E27 maxiwvpt =-1.E27 plot_wpqp = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpqp = 1.E27 maxiwpqp =-1.E27 plot_wsqs = gsn_csm_xy(wks,t,data_0(:,:),res) miniwsqs = 1.E27 maxiwsqs =-1.E27 plot_wq = gsn_csm_xy(wks,t,data_0(:,:),res) miniwq = 1.E27 maxiwq =-1.E27 plot_wpqvp = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpqvp = 1.E27 maxiwpqvp =-1.E27 plot_wsqvs = gsn_csm_xy(wks,t,data_0(:,:),res) miniwsqvs = 1.E27 maxiwsqvs =-1.E27 plot_wqv = gsn_csm_xy(wks,t,data_0(:,:),res) miniwqv = 1.E27 maxiwqv =-1.E27 plot_wpsp = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpsp = 1.E27 maxiwpsp =-1.E27 plot_wsss = gsn_csm_xy(wks,t,data_0(:,:),res) miniwsss = 1.E27 maxiwsss =-1.E27 plot_ws = gsn_csm_xy(wks,t,data_0(:,:),res) miniws = 1.E27 maxiws =-1.E27 plot_wpsap = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpsap = 1.E27 maxiwpsap =-1.E27 plot_wssas = gsn_csm_xy(wks,t,data_0(:,:),res) miniwssas = 1.E27 maxiwssas =-1.E27 plot_wsa = gsn_csm_xy(wks,t,data_0(:,:),res) miniwsa = 1.E27 maxiwsa =-1.E27 plot_wses = gsn_csm_xy(wks,t,data_0(:,:),res) plot_us2 = gsn_csm_xy(wks,t,data_0(:,:),res) minius2 = 1.E27 maxius2 =-1.E27 plot_vs2 = gsn_csm_xy(wks,t,data_0(:,:),res) minivs2 = 1.E27 maxivs2 =-1.E27 plot_ws2 = gsn_csm_xy(wks,t,data_0(:,:),res) miniws2 = 1.E27 maxiws2 =-1.E27 plot_pts2 = gsn_csm_xy(wks,t,data_0(:,:),res) plot_ws3 = gsn_csm_xy(wks,t,data_0(:,:),res) plot_Sw = gsn_csm_xy(wks,t,data_0(:,:),res) plot_ws2pts = gsn_csm_xy(wks,t,data_0(:,:),res) plot_wspts2 = gsn_csm_xy(wks,t,data_0(:,:),res) plot_wsususodz = gsn_csm_xy(wks,t,data_0(:,:),res) miniwsususodz = 1.E27 maxiwsususodz =-1.E27 plot_wspsodz = gsn_csm_xy(wks,t,data_0(:,:),res) miniwspsodz = 1.E27 maxiwspsodz =-1.E27 plot_wpeodz = gsn_csm_xy(wks,t,data_0(:,:),res) miniwpeodz = 1.E27 maxiwpeodz =-1.E27 end if if (prof3d .EQ. 1)then if (end_x .EQ. -1) then end_x=dimx-2 end if if (end_y .EQ. -1)then end_y=dimy-2 end if if (start_x .LT. 0)then print(" ") print("'start_x' is lower than 0 and set to 0") print(" ") start_x=0 end if if (start_x .GT. dimx-1)then print(" ") print("'start_x' is greater than available x-range and set to maximum of x-range (excluding ghostpoint)") print(" ") start_x=dimx-2 end if if (end_x .EQ. dimx-1)then print(" ") print("'end_x' = "+end_x+" and includes the ghostpoint") print(" ") end if if (end_x .GT. dimx-1)then print(" ") print("'end_x' = "+end_x+" is greater than available x-range and set to maximum of x-range (excluding ghostpoint)") print(" ") end_x=dimx-2 end if if (end_x .LT. start_x)then print(" ") print("'end_x' = "+end_x+" is lower than 'start_x' = "+start_x+" and set to maximum of x-range (excluding ghostpoint)") print(" ") end_x=dimx-2 end if if (start_y .LT. 0)then print(" ") print("'start_y' is lower than 0 and set to 0") print(" ") start_y=0 end if if (start_y .GT. dimy-1)then print(" ") print("'start_y' is greater than available y-range and set to maximum of y-range (excluding ghostpoint)") print(" ") start_x=dimy-2 end if if (end_y .EQ. dimy-1)then print(" ") print("'end_y' = "+end_y+" and includes the ghostpoint") print(" ") end if if (end_y .GT. dimy-1)then print(" ") print("'end_y' = "+end_y+" is greater than available y-range and set to maximum of y-range (excluding ghostpoint)") print(" ") end_x=dimy-2 end if if (end_y .LT. start_y)then print(" ") print("'end_y' = "+end_y+" is lower than 'start_y' = "+start_y+" and set to maximum of y-range (excluding ghostpoint)") print(" ") end_y=dimy-2 end if end if n_o=0 count_var=0 res@xyDashPattern = 1*nof do varn = 0,dim-1 check = True if (prof3d .EQ. 0) then if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then check = False end if else if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then check = False end if end if if (var .NE. "all") then check = isStrSubset( var,","+vNam(varn)+"," ) end if if (combine .EQ. 1) then com=isStrSubset(c_var,","+vNam(varn)+"," ) if (com) then if (prof3d .EQ. 0) then temp = f[:]->$vNam(varn)$(1:,:) temp_att = f_att->$vNam(varn)$ if (log_z .EQ. 1) then data(varn,:,:) = temp(start_time_step:end_time_step,1:dimz-1) else data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz-1) end if else if (log_z .EQ. 1) then do i=1,dimz-1 do j=start_time_step,end_time_step temp= f[:]->$vNam(varn)$ temp_att = f_att->$vNam(varn)$ data_temp = temp(j,i,start_y:end_y,start_x:end_x) data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) end do end do else do i=0,dimz-1 do j=start_time_step,end_time_step temp= f[:]->$vNam(varn)$ temp_att = f_att->$vNam(varn)$ data_temp = temp(j,i,start_y:end_y,start_x:end_x) data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) end do end do end if print(" ") print("Variable for combine '"+vNam(varn)+"' is read") print(" ") end if unit(varn) = temp_att@units if (n_o .GT. number_comb-1) then print(" ") print("Set 'number_comb' to the number of overlaying variables ('c_var' = "+c_var+")") print(" ") exit end if mini(n_o)=min(data(varn,:,:)) maxi(n_o)=max(data(varn,:,:)) n_o=n_o+1 end if end if if(check) then if (isStrSubset(vNam(varn),"_0" ))then print(" ") print("If you have Outputs of statistic regions you cannot overlay variables; 'over' is set to 0") print(" ") over = 0 end if count_var=count_var+1 if (prof3d .EQ. 0) then temp = f[:]->$vNam(varn)$(1:,:) temp_att = f_att->$vNam(varn)$ else if (log_z .EQ. 1) then do i=1,dimz-1 do j=start_time_step,end_time_step temp= f[:]->$vNam(varn)$(j,i,start_y:end_y,start_x:end_x) temp_att = f_att->$vNam(varn)$ data_temp = temp(j,i,start_y:end_y,start_x:end_x) data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) end do end do else do i=0,dimz-1 do j=start_time_step,end_time_step temp= f[:]->$vNam(varn)$;(j,i,start_y:end_y,start_x:end_x) temp_att = f_att->$vNam(varn)$ data_temp = temp(j,i,start_y:end_y,start_x:end_x) data_temp!0 = "t" data_temp!1 = "z" data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp)) end do end do end if print(" ") print("Variable '"+vNam(varn)+"' is read") print(" ") unit(varn) = temp_att@units a=getvardims(temp_att) b=dimsizes(a) end if if (prof3d .EQ. 0) then if (log_z .EQ. 1) then z = f_att->$vNam(varn+1)$(1:dimz-1) unit(varn) = temp_att@units data(varn,:,:) = temp(start_time_step:end_time_step,1:dimz-1) else z = f_att->$vNam(varn+1)$ unit(varn) = temp_att@units data(varn,:,:) = temp(start_time_step:end_time_step,:) end if else do i=0,b-1 if (isStrSubset( a(i),"zu_3d" ))then z_v(varn,:) = z_u if (log_z .EQ. 1) then z = z_v(varn,1:dimz-1) else z = z_v(varn,:) end if else if (isStrSubset( a(i),"zw_3d" ))then z_v(varn,:) = z_w if (log_z .EQ. 1) then z = z_v(varn,1:dimz-1) else z = z_v(varn,:) end if end if end if end do end if if (data(varn,0,0) .GT. 1.E35) then data(varn,0,:) = data(varn,1,:) end if if (nof .EQ. 0) then z_(n,:)=z/norm_z z = z_(n,:) else z=z/norm_z end if if (over .EQ. 0) then res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " res@trYMinF = min_z res@trYMaxF = max_z if (xs .EQ. -1) then res@trXMinF = min(data(varn,:,:)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max(data(varn,:,:)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if if (vNam(varn) .EQ. "u") then miniu=min(data(varn,:,:)) maxiu=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_u = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniu else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiu else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "v") then miniv=min(data(varn,:,:)) maxiv=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_v = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniv else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiv else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "w") then miniw=min(data(varn,:,:)) maxiw=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_w = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniw else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiw else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "pt") then minipt=min(data(varn,:,:)) maxipt=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_pt = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minipt else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxipt else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "vpt") then minivpt=min(data(varn,:,:)) maxivpt=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_vpt = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minivpt else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxivpt else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "lpt") then minilpt=min(data(varn,:,:)) maxilpt=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_lpt = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minilpt else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxilpt else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "q") then miniq=min(data(varn,:,:)) maxiq=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_q = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minilq else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxilq else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "qv") then miniqv=min(data(varn,:,:)) maxiqv=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_qv = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minilqv else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxilqv else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "ql") then miniql=min(data(varn,:,:)) maxiql=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_ql = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniql else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiql else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "e") then minie=min(data(varn,:,:)) maxie=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_e = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minie else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxie else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "es") then minies=min(data(varn,:,:)) maxies=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_es = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minies else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxies else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "km") then minikm=min(data(varn,:,:)) maxikm=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_km = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minikm else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxikm else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "kh") then minikh=min(data(varn,:,:)) maxikh=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_kh = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minikh else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxikh else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpup") then miniwpup=min(data(varn,:,:)) maxiwpup=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wpup = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpup else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpup else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wsus") then miniwsus=min(data(varn,:,:)) maxiwsus=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wsus = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwsus else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwsus else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wu") then miniwu=min(data(varn,:,:)) maxiwu=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_wu = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwu else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwu else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpvp") then miniwpvp=min(data(varn,:,:)) maxiwpvp=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wpvp = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpvp else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpvp else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wsvs") then miniwsvs=min(data(varn,:,:)) maxiwsvs=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wsvs = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwsvs else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwsvs else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wv") then miniwv=min(data(varn,:,:)) maxiwv=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_wv = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwv else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwv else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpptp") then miniwpptp=min(data(varn,:,:)) maxiwpptp=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wpptp = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpptp else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpptp else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wspts") then miniwspts=min(data(varn,:,:)) maxiwspts=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wspts = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwspts else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwspts else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpt") then miniwpt=min(data(varn,:,:)) maxiwpt=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_wpt = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpt else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpt else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wsptsBC") then miniwsptsBC=min(data(varn,:,:)) maxiwsptsBC=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wsptsBC = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwsptsBC else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwsptsBC else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wptBC") then miniwptBC=min(data(varn,:,:)) maxiwptBC=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wptBC = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwptBC else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwptBC else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpvptp") then miniwpvptp=min(data(varn,:,:)) maxiwpvptp=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wpvptp = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpvptp else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpvptp else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wsvpts") then miniwsvpts=min(data(varn,:,:)) maxiwsvpts=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wsvpts = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwsvpts else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwsvpts else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wvpt") then miniwvpt=min(data(varn,:,:)) maxiwvpt=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_wvpt = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwvpt else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwvpt else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpqp") then miniwpqp=min(data(varn,:,:)) maxiwpqp=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wpqp = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpqp else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpqp else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wsqs") then miniwsqs=min(data(varn,:,:)) maxiwsqs=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wsqs = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwsqs else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwsqs else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wq") then miniwq=min(data(varn,:,:)) maxiwq=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_wq = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwq else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwq else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpqvp") then miniwpqvp=min(data(varn,:,:)) maxiwpqvp=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wpqvp = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpqvp else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpqvp else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wsqvs") then miniwsqvs=min(data(varn,:,:)) maxiwsqvs=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wsqvs = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwsqvs else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwsqvs else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wqv") then miniwqv=min(data(varn,:,:)) maxiwqv=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_wqv = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwqv else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwqv else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpsp") then miniwpsp=min(data(varn,:,:)) maxiwpsp=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wpsp = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpsp else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpsp else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wsss") then miniwsss=min(data(varn,:,:)) maxiwsss=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wsss = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwsss else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwsss else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "ws") then miniws=min(data(varn,:,:)) maxiws=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_ws = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniws else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiws else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpsap") then miniwpsap=min(data(varn,:,:)) maxiwpsap=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wpsap = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpsap else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpsap else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wssas") then miniwssas=min(data(varn,:,:)) maxiwssas=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wssas = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwssas else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwssas else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wsa") then miniwsa=min(data(varn,:,:)) maxiwsa=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_wsa = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwsa else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwsa else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "us2") then minius2=min(data(varn,:,:)) maxius2=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_us2 = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minius2 else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxius2 else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "vs2") then minivs2=min(data(varn,:,:)) maxivs2=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_vs2 = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = minivs2 else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxivs2 else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "ws2") then miniws2=min(data(varn,:,:)) maxiws2=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_ws2 = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniws2 else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiws2 else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wsususodz") then miniwsususodz=min(data(varn,:,:)) maxiwsususodz=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 0 plot_wsususodz = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwsususodz else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwsususodz else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wspsodz") then miniwspsodz=min(data(varn,:,:)) maxiwspsodz=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 1 plot_wspsodz = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwspsodz else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwspsodz else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (vNam(varn) .EQ. "wpeodz") then miniwpeodz=min(data(varn,:,:)) maxiwpeodz=max(data(varn,:,:)) if (over .EQ. 1) then res@xyDashPattern = 2 plot_wpeodz = gsn_csm_xy(wks,data(varn,:,:),z,res) else res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = miniwpeodz else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = maxiwpeodz else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) end if end if if (no_files .GT. 1) then multi_plot(nof,n)=plot(n) max_nof(nof,n)=max(data(varn,:,:)) min_nof(nof,n)=min(data(varn,:,:)) name(nof,n) =vNam(varn) unit_(nof,n) =unit(varn) end if if (over .EQ. 0) then n=n+1 end if if (prof3d .EQ. 0)then varn=varn+1 end if delete(temp) end if end do if (no_files .GT. 1) then delete(vNam) delete(files) end if end do ;#########ENDE DO LOOP FOR no_files GT 1############# if (count_var .EQ. 0) then print(" ") print("The variables 'var="+var+"' do not exist on your input file;") print("be sure to have one comma berfore and after each variable") print(" ") exit end if if (no_files .GT. 1) then multi_legend=new(6,string) string_len=new(6,integer) multi_dash=new(no_files,string) multi_legend(0)=" "+name_legend_1 string_len(0)=strlen(multi_legend(0)) multi_legend(1)=" "+name_legend_2 string_len(1)=strlen(multi_legend(1)) multi_legend(2)=" "+name_legend_3 string_len(2)=strlen(multi_legend(2)) multi_legend(3)=" "+name_legend_4 string_len(3)=strlen(multi_legend(3)) multi_legend(4)=" "+name_legend_5 string_len(4)=strlen(multi_legend(4)) multi_legend(5)=" "+name_legend_6 string_len(5)=strlen(multi_legend(5)) do ml=1,no_files multi_dash(ml-1)=ml-1 end do delete(plot) plot = new(dim,graphic) do pl=0,n-1 plot0 = new(1,graphic) res@trXMinF = min(min_nof(:,pl)) res@trXMaxF = max(max_nof(:,pl)) res@gsnLeftString = name(0,pl) res@gsnRightString = unit_(0,pl) plot0 = gsn_csm_xy(wks,data_0(:,:),z_(pl,:),res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = max(string_len)*0.012 lgres@vpHeightF = 0.04*no_files lgres@lgDashIndexes = multi_dash(no_files-1:0) lbid = gsn_create_legend(wks,no_files,multi_legend(no_files-1:0),lgres) amres = True amres@amParallelPosF = max(string_len)*0.01+0.78 amres@amOrthogonalPosF = -0.0315*no_files+0.431 annoid1 = gsn_add_annotation(plot0,lbid,amres) do plo=0,no_files-1 overlay(plot0,multi_plot(plo,pl)) plot(pl)=plot0 end do delete(plot0) end do end if if (count_var .EQ. 0) then print(" ") print("Select a variable 'var=' or use the default value") print(" ") print("Your selection '"+var+"' does not exist on the input file") print(" ") exit end if if (over .EQ. 1 ) then overlay(plot_u,plot_v) overlay(plot_u,plot_w) u=0 overlay(plot_pt,plot_vpt) overlay(plot_pt,plot_lpt) pt=0 overlay(plot_q,plot_qv) overlay(plot_q,plot_ql) q=0 overlay(plot_e,plot_es) e=0 overlay(plot_km,plot_kh) km=0 overlay(plot_wpup,plot_wsus) overlay(plot_wpup,plot_wu) wpup=0 overlay(plot_wpvp,plot_wsvs) overlay(plot_wpvp,plot_wv) wpvp=0 overlay(plot_wpptp,plot_wspts) overlay(plot_wpptp,plot_wpt) wpptp=0 overlay(plot_wsptsBC,plot_wptBC) wsptsBC=0 overlay(plot_wpvptp,plot_wsvpts) overlay(plot_wpvptp,plot_wvpt) wpvptp=0 overlay(plot_wpqp,plot_wsqs) overlay(plot_wpqp,plot_wq) wpqp=0 overlay(plot_wpqvp,plot_wsqvs) overlay(plot_wpqvp,plot_wqv) wpqvp=0 overlay(plot_wpsp,plot_wsss) overlay(plot_wpsp,plot_ws) wpsp=0 overlay(plot_wpsap,plot_wssas) overlay(plot_wpsap,plot_wsa) wpsap=0 overlay(plot_us2,plot_vs2) overlay(plot_us2,plot_ws2) us2=0 overlay(plot_wsususodz,plot_wspsodz) overlay(plot_wsususodz,plot_wpeodz) wsususodz=0 end if if (over .EQ. 1) then do varn = 0,dim-1 check = True if (prof3d .EQ. 0) then if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then check = False end if else if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then check = False end if end if if (var .NE. "all") then check = isStrSubset( var,","+vNam(varn)+"," ) end if if (check)then if (prof3d .EQ. 0) then if (log_z .EQ. 1) then z = f->$vNam(varn+1)$(1:dimz-1) else z = f->$vNam(varn+1)$ end if else do i=0,b-1 if (isStrSubset( a(i),"zu_3d" ))then z_v(varn,:) = z_u if (log_z .EQ. 1) then z = z_v(varn,1:dimz-1) else z = z_v(varn,:) end if else if (isStrSubset( a(i),"zw_3d" ))then z_v(varn,:) = z_w if (log_z .EQ. 1) then z = z_v(varn,1:dimz-1) else z = z_v(varn,:) end if end if end if end do end if z=z/norm_z res@gsnLeftString = vNam(varn) res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " res@trYMinF = min_z res@trYMaxF = max_z if (xs .EQ. -1) then res@trXMinF = min(data(varn,:,:)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max(data(varn,:,:)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) if (vNam(varn) .EQ. "u" .OR. vNam(varn) .EQ. "v" .OR. vNam(varn) .EQ. "w") then if (u .EQ. 0) then res@gsnLeftString = "u, v and w" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniu,miniv,miniw/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiu,maxiv,maxiw/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"u","v","w"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_u) u=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "pt" .OR. vNam(varn) .EQ. "vpt" .OR. vNam(varn) .EQ. "lpt") then if (pt .EQ. 0) then res@gsnLeftString = "pt, vpt and lpt" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/minipt,minivpt,minilpt/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxipt,maxivpt,maxilpt/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"pt","vpt","lpt"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_pt) pt=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "q" .OR. vNam(varn) .EQ. "qv" .OR. vNam(varn) .EQ. "ql") then if (q .EQ. 0) then res@gsnLeftString = "q, qv and ql" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniq,miniqv,miniql/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiq,maxiqv,maxiql/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"q","qv","ql"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_q) q=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es") then if (e .EQ. 0) then res@gsnLeftString = "e and es" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/minie,minies/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxie,maxies/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"e","es"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_e) e=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "km" .OR. vNam(varn) .EQ. "kh") then if (km .EQ. 0) then res@gsnLeftString = "km and kh" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/minikm,minikh/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxikm,maxikh/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"km","kh"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_km) km=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "wu") then if (wpup .EQ. 0) then res@gsnLeftString = "wpup, wsus and wu" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwpup,miniwsus,miniwu/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wpup","wsus","wu"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wpup) wpup=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.vNam(varn) .EQ. "wv") then if (wpvp .EQ. 0) then res@gsnLeftString = "wpvp, wsus and wv" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wpvp","wsvs","wv"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wpvp) wpup=0 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "wpt") then if (wpptp .EQ. 0) then res@gsnLeftString = "wpptp, wspts and wv" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wpptp","wspts","wpt"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wpptp) wpptp=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC") then if (wsptsBC .EQ. 0) then res@gsnLeftString = "wsptsBC and wptBC" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwsptsBC,miniwptBC/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wsptsBC","wptBC"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wsptsBC) wsptsBC=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "wvpt") then if (wpvptp .EQ. 0) then res@gsnLeftString = "wpvptp, wsvpts and wv" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wpvptp","wsvpts","wvpt"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wpvptp) wpvptp=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR. vNam(varn) .EQ. "wq") then if (wpqp .EQ. 0) then res@gsnLeftString = "wpqp, wsqs and wq" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wpqp","wsqs","wq"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wpqp) wpqp=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "wqv") then if (wpqvp .EQ. 0) then res@gsnLeftString = "wpqvp, wsqvs and wqv" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wpqvp","wsqvs","wqv"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wpqvp) wpqvp=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "ws") then if (wpsp .EQ. 0) then res@gsnLeftString = "wpsp, wsss and ws" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwpsp,miniwsss,miniws/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wpsp","wsss","ws"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wpsp) wpsp=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "wsa") then if (wpsap .EQ. 0) then res@gsnLeftString = "wpsap, wssas and wsa" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wpsap","wssas","wsa"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wpsap) wpsap=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "ws2") then if (us2 .EQ. 0) then res@gsnLeftString = "us2, vs2 and ws2" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/minius2,minivs2,miniws2/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxius2,maxivs2,maxiws2/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"us2","vs2","ws2"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_us2) us2=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "wpeodz" ) then if (wsususodz .EQ. 0) then res@gsnLeftString = "wsususodz, wspsodz and ws2" res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/)) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/)) else res@trXMaxF = xe end if plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lgres@lgDashIndexes = (/0,1,2/) lbid = gsn_create_legend(wks,3,(/"wsususodz","wspsodz","wpeodz"/),lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot(n),lbid,amres) overlay(plot(n),plot_wsususodz) wsususodz=1 else if (prof3d .EQ. 0)then varn=varn+1 end if continue end if end if n=n+1 if (prof3d .EQ. 0)then varn=varn+1 end if end if end do end if com_var_avail=new(count_var,string) if (combine .EQ. 1) then co=0 n_o=0 do varn = 0,dim-1 check = True if (prof3d .EQ. 0) then if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then check = False end if else if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then check = False end if end if if (var .NE. "all") then check = isStrSubset( var,","+vNam(varn)+"," ) end if if (check)then if (prof3d .EQ. 0) then if (log_z .EQ. 1) then z = f->$vNam(varn+1)$(1:dimz-1) else z = f->$vNam(varn+1)$ end if else do i=0,b-1 if (isStrSubset( a(i),"zu_3d" ))then z_v(varn,:) = z_u if (log_z .EQ. 1) then z = z_v(varn,1:dimz-1) else z = z_v(varn,:) end if else if (isStrSubset( a(i),"zw_3d" ))then z_v(varn,:) = z_w if (log_z .EQ. 1) then z = z_v(varn,1:dimz-1) else z = z_v(varn,:) end if end if end if end do end if z=z/norm_z com_var_avail(n_o)=vNam(varn) com=isStrSubset( c_var,","+vNam(varn)+"," ) if (com)then co = co+1 if (n_o .EQ. 1) then res@xyDashPattern = 1 else if (n_o .EQ. 2) then res@xyDashPattern = 2 else res@xyDashPattern = 0 res@gsnLeftString = "Combined Plot of "+c_var res@tiXAxisString = "["+unit(varn)+"]" res@gsnRightString = " " if (xs .EQ. -1) then res@trXMinF = min(mini) else res@trXMinF = xs end if if (xe .EQ. -1) then res@trXMaxF = max(maxi) else res@trXMaxF = xe end if end if end if label(n_o)=vNam(varn) color_o(n_o)=237 plot_o(n_o)=gsn_csm_xy(wks,data(varn,:,:),z,res) n_o=n_o+1 end if if (prof3d .EQ. 0)then varn=varn+1 end if end if end do if(number_comb .EQ. 2)then if (co .EQ. 2)then overlay(plot_o(0),plot_o(1)) else print(" ") print("combining is not possible,") print("'c_var'(= "+c_var+") must include two variables of the general plots = ") print("- "+com_var_avail) print("be sure to have one comma berfore and after the variable") print(" ") exit end if end if if(number_comb .EQ. 3)then if (co .EQ. 3)then overlay(plot_o(0),plot_o(1)) overlay(plot_o(0),plot_o(2)) else print(" ") print("combining is not possible,") print("'c_var'(= "+c_var+") must include three variables of the general plots = ") print("- "+com_var_avail) print("be sure to have one comma berfore and after the variable") print(" ") exit end if end if ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgDashIndexes = (/0,1,2/) lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = font_size_legend lgres@vpWidthF = 0.12 lgres@vpHeightF = 0.1 lbid = gsn_create_legend(wks,number_comb,label,lgres) amres = True amres@amParallelPosF = 0.65 amres@amOrthogonalPosF = -0.2 annoid1 = gsn_add_annotation(plot_o(0),lbid,amres) plot(0) = plot_o(0) end if ; *************************************************** ; merge plots onto one page ; *************************************************** do m=0,n-1 plot_(m)=plot(n-1-m) end do if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then gsn_panel(wks,plot_,(/n,1/),resP) else do i = 0,n-1, no_rows*no_columns if( (i+no_rows*no_columns) .gt. (n-1)) then gsn_panel(wks,plot_(i:n-1),(/no_rows,no_columns/),resP) else gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),(/no_rows,no_columns/),resP) end if end do end if print(" ") print("Output to: " + file_out +"."+ format_out) print(" ") end