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" begin ; *************************************************** ; read parameter_list ; *************************************************** if (isfilepresent("~/.ncl_preferences")) then parameter = asciiread("~/.ncl_preferences",129,"string") delete(parameter@_FillValue) else if (isfilepresent("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences")) then parameter = asciiread("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences",129,"string") delete(parameter@_FillValue) else print(" ") print("'.ncl_preferences' is not present in '~/palm/current_version/trunk/SRIPTS/NCL/'") print(" ") exit end if end if ; *************************************************** ; set up default parameter values and strings if not assigned in prompt or parameter list ; *************************************************** if ( .not. isvar("no_files") ) then no_files = 1 if (parameter(81) .NE. "1") then no_files = stringtointeger(parameter(81)) if (no_files .LT. 1 .OR. no_files .GT. 12) then print(" ") print("Please assign 'no_files' between 1 and 12") print(" ") exit end if end if else if (no_files .LT. 1 .OR. no_files .GT. 12) then print(" ") print("Please assign 'no_files' between 1 and 12") print(" ") exit end if end if file_in = new(no_files,string) if ( .not. isvar("file_1") ) then if (parameter(7) .EQ. "File in") then print(" ") print("Please provide 1st input file 'file_1=' either in prompt or parameter_list") print(" ") exit else file_in(0) = parameter(7) end if else file_in(0) = file_1 end if if (.not. isfilepresent(file_in(0))) then print(" ") print("Your 1st input file: '"+file_in(0)+"' does not exist") print(" ") exit end if if (no_files .GT. 1) then if (.not. isvar("file_2"))then file_in(1) = parameter(85) if (file_in(1) .EQ. "File in") print(" ") print("Please provide 2nd input file 'file_2=' either in prompt or parameter_list or change 'no_files' to 1") print(" ") exit end if else file_in(1) = file_2 end if if (.not. isfilepresent(file_in(1))) then print(" ") print("Your 2nd input file: '"+file_in(1)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 2) then if (.not. isvar("file_3"))then file_in(2) = parameter(89) if (file_in(2) .EQ. "File in") print(" ") print("Please provide 3rd input file 'file_3=' either in prompt or parameter_list or change 'no_files' to 2") print(" ") exit end if else file_in(2) = file_3 end if if (.not. isfilepresent(file_in(2))) then print(" ") print("Your 3rd input file: '"+file_in(2)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 3) then if (.not. isvar("file_4"))then file_in(3) = parameter(93) if (file_in(3) .EQ. "File in") print(" ") print("Please provide 4th input file 'file_4=' either in prompt or parameter_list or change 'no_files' to 3") print(" ") exit end if else file_in(3) = file_4 end if if (.not. isfilepresent(file_in(3))) then print(" ") print("Your 4th input file: '"+file_in(3)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 4) then if (.not. isvar("file_5"))then file_in(4) = parameter(97) if (file_in(4) .EQ. "File in") print(" ") print("Please provide 5th input file 'file_5=' either in prompt or parameter_list or change 'no_files' to 4") print(" ") exit end if else file_in(4) = file_5 end if if (.not. isfilepresent(file_in(4))) then print(" ") print("Your 5th input file: '"+file_in(4)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 5) then if (.not. isvar("file_6"))then file_in(5) = parameter(101) if (file_in(5) .EQ. "File in") print(" ") print("Please provide 6th input file 'file_6=' either in prompt or parameter_list or change 'no_files' to 5") print(" ") exit end if else file_in(5) = file_6 end if if (.not. isfilepresent(file_in(5))) then print(" ") print("Your 6th input file: '"+file_in(5)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 6) then if (.not. isvar("file_7"))then file_in(6) = parameter(105) if (file_in(6) .EQ. "File in") print(" ") print("Please provide 7th input file 'file_7=' either in prompt or parameter_list or change 'no_files' to 6") print(" ") exit end if else file_in(6) = file_7 end if if (.not. isfilepresent(file_in(6))) then print(" ") print("Your 7th input file: '"+file_in(6)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 7) then if (.not. isvar("file_8"))then file_in(7) = parameter(109) if (file_in(7) .EQ. "File in") print(" ") print("Please provide 8th input file 'file_8=' either in prompt or parameter_list or change 'no_files' to 7") print(" ") exit end if else file_in(7) = file_8 end if if (.not. isfilepresent(file_in(7))) then print(" ") print("Your 8th input file: '"+file_in(7)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 8) then if (.not. isvar("file_9"))then file_in(8) = parameter(113) if (file_in(8) .EQ. "File in") print(" ") print("Please provide 9th input file 'file_9=' either in prompt or parameter_list or change 'no_files' to 8") print(" ") exit end if else file_in(8) = file_9 end if if (.not. isfilepresent(file_in(8))) then print(" ") print("Your 9th input file: '"+file_in(8)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 9) then if (.not. isvar("file_10"))then file_in(9) = parameter(117) if (file_in(9) .EQ. "File in") print(" ") print("Please provide 10th input file 'file_10=' either in prompt or parameter_list or change 'no_files' to 9") print(" ") exit end if else file_in(9) = file_10 end if if (.not. isfilepresent(file_in(9))) then print(" ") print("Your 10th input file: '"+file_in(9)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 10) then if (.not. isvar("file_11"))then file_in(10) = parameter(121) if (file_in(10) .EQ. "File in") print(" ") print("Please provide 11th input file 'file_11=' either in prompt or parameter_list or change 'no_files' to 10") print(" ") exit end if else file_in(10) = file_11 end if if (.not. isfilepresent(file_in(10))) then print(" ") print("Your 11th input file: '"+file_in(10)+"' does not exist") print(" ") exit end if end if if (no_files .GT. 11) then if (.not. isvar("file_12"))then file_in(11) = parameter(125) if (file_in(11) .EQ. "File in") print(" ") print("Please provide 12th input file 'file_12=' either in prompt or parameter_list or change 'no_files' to 11") print(" ") exit end if else file_in(11) = file_12 end if if (.not. isfilepresent(file_in(11))) then print(" ") print("Your 12th input file: '"+file_in(11)+"' does not exist") print(" ") exit end if end if if ( .not. isvar("format_out") ) then format_out = "x11" if (parameter(9) .NE. "x11") then format_out = parameter(9) if (format_out .NE. "x11" .OR. format_out .NE. "pdf" .OR. format_out .NE. "eps" .OR. format_out .NE. "ps" .OR. format_out .NE. "epsi" .OR. format_out .NE. "ncgm")then print(" ") print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") print(" ") end if end if else if (format_out .NE. "x11" .OR. format_out .NE. "pdf" .OR. format_out .NE. "eps" .OR. format_out .NE. "ps" .OR. format_out .NE. "epsi" .OR. format_out .NE. "ncgm")then print(" ") print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") print(" ") end if end if if ( .not. isvar("file_out") ) then file_out = "test" if (parameter(11) .NE. "test_ts") then file_out = parameter(11) end if end if if ( .not. isvar("no_columns") ) then no_columns = 1 if (parameter(17) .NE. "1") then no_columns = stringtointeger(parameter(17)) end if end if if ( .not. isvar("no_lines") ) then ; number of plot-lines on one sheet no_lines = 2 if (parameter(19) .NE. "2") then no_lines = stringtointeger(parameter(19)) end if end if if ( .not. isvar("combine") ) then ; color of lines combine = 0 if (parameter(23) .NE. "0") then combine = stringtointeger(parameter(23)) if (stringtointeger(parameter(23)) .NE. 1) then print(" ") print("Your 'combine'= "+combine+" is invalid and set to 0") print(" ") combine = 0 else if (no_files .GT. 1) then print(" ") print("If you have more than one input file you cannot combine variables: combine is set to 0") print(" ") combine = 0 end if end if end if else 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 end if if (combine .EQ. 1) then if( .not. isvar("c_var") ) then if (parameter(27) .EQ. "c_variables") then print(" ") print("Please select variables for overlaying ('c_var')") print(" ") exit else c_var=parameter(27) end if end if end if if ( .not. isvar("black") ) then ; color of lines black = 0 if (parameter(31) .NE. "0") then black = stringtointeger(parameter(31)) if (stringtointeger(parameter(31)) .NE. 1) then print(" ") print("Your 'black'= "+black+" is invalid and set to 0") print(" ") black = 0 end if end if else if (black .NE. 0 .AND. black .NE. 1)then print(" ") print("Your 'black'= "+black+" is invalid and set to 0") print(" ") black = 0 end if end if if ( .not. isvar("dash") ) then dash = 0 if (parameter(29) .NE. "0") then dash = stringtointeger(parameter(29)) if (stringtointeger(parameter(29)) .NE. 1) then print(" ") print("Your 'dash'= "+dash+" is invalid and set to 0") print(" ") dash = 0 end if end if else if (dash .NE. 0 .AND. dash .NE. 1)then print(" ") print("Your 'dash'= "+dash+" is invalid and set to 0") print(" ") dash = 0 end if end if if ( .not. isvar("over") ) then ; switches overlaying plots on over = 0 if (stringtointeger(parameter(37)) .NE. 0) then over = stringtointeger(parameter(37)) if (stringtointeger(parameter(37)) .NE. 1) then print(" ") print("Your 'over'= "+over+" is invalid and set to 0") print(" ") over = 0 else 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 end if end if else if (over .NE. 0 .AND. over .NE. 1)then print(" ") print("Your 'over'= "+over+" is invalid and set to 0") print(" ") over = 0 end if end if if (.not. isvar("prof3d"))then prof3d = 0 if (stringtointeger(parameter(75)) .NE. 0) then prof3d = stringtointeger(parameter(75)) if (stringtointeger(parameter(75)) .NE. 1) then print(" ") print("Please set 'prof3d' to 0 or 1") print(" ") exit end if end if else if (prof3d .NE. 0 .AND. prof3d .NE. 1)then print(" ") print("Your 'prof3d'= "+prof3d+" is invalid; please set 'prof3d' to 0 or 1") print(" ") exit end if end if if (.not. isvar("logy"))then logy = 0 if (stringtointeger(parameter(77)) .NE. 0) then logy = stringtointeger(parameter(77)) if (stringtointeger(parameter(77)) .NE. 1) then print(" ") print("Your 'logy'= "+logy+" is invalid and set to 0") print(" ") logy = 0 end if end if else if (logy .NE. 0 .AND. logy .NE. 1)then print(" ") print("Your 'logy'= "+logy+" is invalid and set to 0") print(" ") logy = 0 end if end if if ( .not. isvar("norm") ) then norm = 1.0 if (parameter(79) .NE. "1") then norm = stringtofloat(parameter(79)) if (stringtofloat(parameter(79)) .EQ. 0) then print(" ") print("You cannot normalise with 0, 'norm' is set to 1") print(" ") norm = 1.0 end if end if else if (norm .EQ. 0) then print(" ") print("You cannot normalise with 0, 'norm' is set to 1") print(" ") norm = 1.0 end if end if ; *************************************************** ; open input file ; *************************************************** do nof=0,no_files-1 f=addfile( file_in(nof),"r") vNam = getfilevarnames(f) if (nof .EQ. 0)then vNam0=vNam end if if (nof .NE. 0)then if (dim0 .NE. dim)then print(" ") print("Your Input files does not contain the same variables") print(" ") exit else do i=0,dim0-1 if (vNam0(i) .NE. vNam(i))then print(" ") print("Your Input files does not contain the same variables") print(" ") exit end if end do end if end if nof=nof+1 print(" ") print("Variable in input file "+nof+": " + vNam) print(" ") nof=nof-1 dim = dimsizes(vNam) dim0=dim if (dim .EQ. 0) then print(" ") print("There are 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->$vNam(varn+1)$ break else if (vNam(varn) .EQ. "v" .OR. isStrSubset(vNam(varn), "v_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "pt" .OR. isStrSubset(vNam(varn), "pt_"))then z_u = f->$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->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "q" .OR. isStrSubset(vNam(varn), "q_") )then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "qv" .OR. isStrSubset(vNam(varn), "qv_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ql" .OR. isStrSubset(vNam(varn), "ql_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "rho" .OR. isStrSubset(vNam(varn), "rho_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "s" .OR. isStrSubset(vNam(varn), "s_") )then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "sa" .OR. isStrSubset(vNam(varn), "sa_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "e" .OR. isStrSubset(vNam(varn), "e_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "es" .OR. isStrSubset(vNam(varn), "es_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "km" .OR. isStrSubset(vNam(varn), "km_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "kh" .OR. isStrSubset(vNam(varn), "kh_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "l" .OR. isStrSubset(vNam(varn), "l_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "us2" .OR. isStrSubset(vNam(varn), "us2_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "vs2" .OR. isStrSubset(vNam(varn), "vs2_") )then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "pts2" .OR. isStrSubset(vNam(varn), "pts2_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsususodz" .OR. isStrSubset(vNam(varn), "wsususodz_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wspsodz" .OR. isStrSubset(vNam(varn), "wspsodz_"))then z_u = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpeodz" .OR. isStrSubset(vNam(varn), "wpeodz_"))then z_u = f->$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->$vNam(varn+1)$ break else if (vNam(varn) .EQ. "wpup" .OR. isStrSubset(vNam(varn), "wpup_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsus" .OR. isStrSubset(vNam(varn), "wsus_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wu" .OR. isStrSubset(vNam(varn), "wu_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpvp" .OR. isStrSubset(vNam(varn), "wpvp_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsvs" .OR. isStrSubset(vNam(varn), "wsvs_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wv" .OR. isStrSubset(vNam(varn), "wv_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wptpp" .OR. isStrSubset(vNam(varn), "wptpp_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wspts" .OR. isStrSubset(vNam(varn), "wspts_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpt" .OR. isStrSubset(vNam(varn), "wpz_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsptsBC" .OR. isStrSubset(vNam(varn), "wsptsBC_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wptBC" .OR. isStrSubset(vNam(varn), "wptBC_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpvptp" .OR. isStrSubset(vNam(varn), "wpvptp_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsvpts" .OR. isStrSubset(vNam(varn), "wsvpts_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wvpt" .OR. isStrSubset(vNam(varn), "wvpt_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpqp" .OR. isStrSubset(vNam(varn), "wpqp_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsqs" .OR. isStrSubset(vNam(varn), "wsqs_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wq" .OR. isStrSubset(vNam(varn), "wq_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpqvp" .OR. isStrSubset(vNam(varn), "wpqvp_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsqvs" .OR. isStrSubset(vNam(varn), "wsqvs_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wqv" .OR. isStrSubset(vNam(varn), "wqv_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpsp" .OR. isStrSubset(vNam(varn), "wpsp_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsss" .OR. isStrSubset(vNam(varn), "wsss_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ws" .OR. isStrSubset(vNam(varn), "ws_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wpsap" .OR. isStrSubset(vNam(varn), "wpsap_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wssas" .OR. isStrSubset(vNam(varn), "wssas_") )then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wsa" .OR. isStrSubset(vNam(varn), "wsa_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wses" .OR. isStrSubset(vNam(varn), "wses_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ws2" .OR. isStrSubset(vNam(varn), "ws2_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ws3" .OR. isStrSubset(vNam(varn), "ws3_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "Sw" .OR. isStrSubset(vNam(varn), "Sw_"))then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "ws2pts".OR. isStrSubset(vNam(varn), "ws2pts_") )then z_w = f->$vNam(varn+1)$ break else if(vNam(varn) .EQ. "wspts2" .OR. isStrSubset(vNam(varn), "wspts2_"))then z_w = f->$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") ) then zu = 0 else zu = 1 end if if ( .not. isvar("z_w") ) then zw = 0 else zw = 1 end if if (zu .EQ. 0 .AND. zw .EQ. 0) then co=0 do varn=0,dim-1 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then check = False else if (.not. isvar("var")) then check = True if (parameter(21) .NE. "variables") then var=parameter(21) check = isStrSubset( var,","+vNam(varn)+"," ) end if else check = isStrSubset( var,","+vNam(varn)+"," ) end if end if if (check)then co=co+1 z = f->$vNam(varn+1)$ 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(" ") 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->zu_3d dimz = dimsizes(z_u) else if (vNam(varn) .EQ. "zw_3d")then z_w = f->zw_3d dimz = dimsizes(z_w) end if end if end do end if t_all = f->time 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 ( .not. isvar("start_time_step") ) then start_time_step=t_all(0)/3600 if (parameter(13) .NE. "t(0)") then if (stringtodouble(parameter(13)) .GT. t_all(nt-1)/3600)then print(" ") print("'start_time_step' = "+ parameter(13) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") print(" ") print("Please select another 'start_time_step'") print(" ") exit end if if (stringtofloat(parameter(13)) .LT. t_all(0)/3600)then print(" ") print("'start_time_step' = "+ parameter(13) +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") exit end if start_time_step=stringtodouble(parameter(13)) end if 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("Please 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") exit end if end if start_time_step = start_time_step*3600 do i=0,nt-1 if (start_time_step .GE. t_all(i)-delta_t/2 .AND. start_time_step .LT. t_all(i)+delta_t/2)then st=i break end if end do ; **************************************************** ; end of time step and different types of mistakes that could be done ; **************************************************** if ( .not. isvar("end_time_step") ) then end_time_step = t_all(nt-1)/3600 if (parameter(15) .NE. "t(end)") then if (stringtodouble(parameter(15)) .GT. t_all(nt-1)/3600)then print(" ") print("'end_time_step' = "+ parameter(15) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") print(" ") print("Please select another 'end_time_step'") print(" ") exit end if if (stringtodouble(parameter(15)) .LT. start_time_step/3600)then print(" ") print("'end_time_step' = "+ parameter(15) +"h is lower than 'start_time_step' = "+start_time_step/3600+"h") print(" ") print("Please select another 'start_time_step' or 'end_time_step'") print(" ") exit end if end_time_step = stringtodouble(parameter(15)) end if 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("Please 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("Please select another 'start_time_step' or 'end_time_step'") print(" ") exit end if end if end_time_step = end_time_step*3600 do i=0,nt-1 if (end_time_step .GE. t_all(i)-delta_t/2 .AND. end_time_step .LT. t_all(i)+delta_t/2)then et=i break end if end do 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,2,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 res@pmLegendDisplayMode = "Always" 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 = .02 res@txFontHeightF = 0.02 res@tiXAxisFontHeightF = 0.02 res@tiYAxisFontHeightF = 0.02 res@tiXAxisString = " " if ( black .eq. 0 ) then res@xyLineColors = ispan(2,237,235/np) end if if (norm .EQ. 1)then res@tiYAxisString = "Height [m]" else res@tiYAxisString = "Height / "+norm+" [m]" end if if (logy .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 resP = True resP@txFont = "helvetica" resP@txString = f@title resP@txFuncCode = "~" resP@txFontHeightF = 0.014 ; *************************************************** ; set up graphics for plot ; *************************************************** if (combine .EQ. 1) then if ( .not. isvar("number_comb") ) then if (parameter(25) .EQ. "0") then print(" ") print("Please set 'number_comb' to 2 or 3 if you would like to overlay 2 or 3 variables in one plot") print(" ") exit else number_comb=stringtointeger(parameter(25)) plot_o = new(number_comb,graphic) end if else if(number_comb .EQ. 2 .OR. number_comb .EQ. 3) then plot_o = new(number_comb,graphic) else print(" ") print("Please set 'number_comb' to 2 or 3 if you would like to overlay 2 or 3 variables in one plot") print(" ") exit end if end if 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 (logy .EQ. 1)then if (.not. isvar("min_z"))then if (isvar("z_u"))then min_z=z_u(1) else min_z=z_w(1) end if if (stringtofloat(parameter(33)) .NE. z_u(1) .OR. stringtofloat(parameter(33)) .NE. z_w(1)) then if (stringtofloat(parameter(33)) .EQ. 0) then if (isvar("z_u"))then min_z=z_u(1) else min_z=z_w(1) end if else if (stringtofloat(parameter(33)) .GE. max(z_u) ) then print(" ") print("Minimum of height ('min_z'="+stringtofloat(parameter(33))+") is greater than available heights (="+max(z_u)+")") print(" ") exit end if if (stringtofloat(parameter(33)) .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 min_z=stringtofloat(parameter(33)) end if 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 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 end if else if (.not. isvar("min_z"))then min_z=0.0 if (stringtofloat(parameter(33)) .NE. 0) then if (stringtofloat(parameter(33)) .GE. max(z_u) ) then print(" ") print("Minimum of height ('min_z'="+stringtofloat(parameter(33))+") is greater than available heights (="+max(z_u)+")") print(" ") exit end if if (stringtofloat(parameter(33)) .LT. 0 ) then print(" ") print("Begin minimum of height 'min_z' with 0") print(" ") exit end if min_z=stringtofloat(parameter(33)) 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 if (min_z .LT. 0 ) then print(" ") print("Begin minimum of height 'min_z' with 0") print(" ") exit end if end if end if if (.not. isvar("max_z"))then max_z=max(z_u) if ((parameter(35)) .NE. "max(z_u)") then if (stringtofloat(parameter(35)) .GE. max(z_u) ) then print(" ") print("Maximum of height ('max_z'="+parameter(35)+") is greater than available heights (="+max(z_u)+")") print(" ") exit end if if (stringtofloat(parameter(35)) .LE. 0 ) then print(" ") print("Maximum of height 'max_z' should be at least 1") print(" ") exit end if max_z=stringtofloat(parameter(35)) end if else if (max_z .GE. max(z_u) ) then print(" ") print("Maximum of height ('max_z'="+max_z+") is greater than available heights (="+max(z_u)+")") print(" ") exit end if if (max_z .LE. 0 ) then print(" ") print("Maximum of height 'max_z' should be at least 1") print(" ") exit end if end if min_z=min_z/norm max_z=max_z/norm ; *************************************************** ; 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 (logy .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 n_o=0 count_var=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 (.not. isvar("var")) then if (parameter(21) .NE. "variables") then var=parameter(21) check = isStrSubset( var,","+vNam(varn)+"," ) end if else 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)$ if (logy .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 (logy .EQ. 1) then do i=1,dimz-1 do j=start_time_step,end_time_step temp= f->$vNam(varn)$(j,i,:,:) data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(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,:,:) data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) end do end do end if print(" ") print("Variable for combine '"+vNam(varn)+"' is read") print(" ") end if unit(varn) = temp@units if (n_o .GT. number_comb-1) then print(" ") print("Please set 'number_comb' to the right number of overlaying variables ('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)$ else if (logy .EQ. 1) then do i=1,dimz-1 do j=start_time_step,end_time_step temp= f->$vNam(varn)$(j,i,:,:) data(varn,j-start_time_step,i-1) = dim_avg_Wrap(dim_avg_Wrap(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,:,:) data(varn,j-start_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) end do end do end if print(" ") print("Variable '"+vNam(varn)+"' is read") print(" ") unit(varn) = temp@units a=getvaratts(temp) b=dimsizes(a) end if if (prof3d .EQ. 0) then if (logy .EQ. 1) then z = f->$vNam(varn+1)$(1:dimz-1) unit(varn) = temp@units data(varn,:,:) = temp(start_time_step:end_time_step,1:dimz-1) else z = f->$vNam(varn+1)$ unit(varn) = temp@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 (logy .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 (logy .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_(n,:) else z=z/norm end if if (over .EQ. 0) then res@xyDashPattern = nof res@gsnLeftString = vNam(varn) res@gsnRightString = unit(varn) res@trYMinF = min_z res@trYMaxF = max_z if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min(data(varn,:,:)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max(data(varn,:,:)) end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniu end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiu end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniv end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiv end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniw end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiw end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minipt end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxipt end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minivpt end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxivpt end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minilpt end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxilpt end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minilq end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxilq end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minilqv end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxilqv end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniql end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiql end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minie end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxie end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minies end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxies end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minikm end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxikm end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minikh end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxikh end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpup end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpup end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwsus end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwsus end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwu end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwu end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpvp end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpvp end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwsvs end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwsvs end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwv end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwv end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpptp end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpptp end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwspts end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwspts end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpt end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpt end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwsptsBC end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwsptsBC end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwptBC end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwptBC end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpvptp end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpvptp end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwsvpts end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwsvpts end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwvpt end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwvpt end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpqp end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpqp end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwsqs end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwsqs end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwq end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwq end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpqvp end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpqvp end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwsqvs end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwsqvs end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwqv end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwqv end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpsp end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpsp end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwsss end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwsss end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniws end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiws end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpsap end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpsap end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwssas end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwssas end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwsa end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwsa end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minius2 end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxius2 end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = minivs2 end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxivs2 end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniws2 end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiws2 end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwsususodz end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwsususodz end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwspsodz end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwspsodz end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = miniwpeodz end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = maxiwpeodz end if 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) end if end do if (count_var .EQ. 0) then print(" ") print("The variables 'var=°"+var+"°' do not exist on your input file") print(" ") exit end if if (no_files .GT. 1) then multi_legend=new(12,string) string_len=new(12,integer) multi_dash=new(no_files,string) if (.not. isvar("name_legend_1")) multi_legend(0)=" "+parameter(83) else multi_legend(0)=" "+name_legend_1 end if string_len(0)=strlen(multi_legend(0)) if (.not. isvar("name_legend_2")) multi_legend(1)=" "+parameter(87) else multi_legend(1)=" "+name_legend_2 end if string_len(1)=strlen(multi_legend(1)) if (.not. isvar("name_legend_3")) multi_legend(2)=" "+parameter(91) else multi_legend(2)=" "+name_legend_3 end if string_len(2)=strlen(multi_legend(2)) if (.not. isvar("name_legend_4")) multi_legend(3)=" "+parameter(95) else multi_legend(3)=" "+name_legend_4 end if string_len(3)=strlen(multi_legend(3)) if (.not. isvar("name_legend_5")) multi_legend(4)=" "+parameter(99) else multi_legend(4)=" "+name_legend_5 end if string_len(4)=strlen(multi_legend(4)) if (.not. isvar("name_legend_6")) multi_legend(5)=" "+parameter(103) else multi_legend(5)=" "+name_legend_6 end if string_len(5)=strlen(multi_legend(5)) if (.not. isvar("name_legend_7")) multi_legend(6)=" "+parameter(107) else multi_legend(6)=" "+name_legend_7 end if string_len(6)=strlen(multi_legend(6)) if (.not. isvar("name_legend_8")) multi_legend(7)=" "+parameter(111) else multi_legend(7)=" "+name_legend_8 end if string_len(7)=strlen(multi_legend(7)) if (.not. isvar("name_legend_9")) multi_legend(8)=" "+parameter(115) else multi_legend(8)=" "+name_legend_9 end if string_len(8)=strlen(multi_legend(8)) if (.not. isvar("name_legend_10")) multi_legend(9)=" "+parameter(119) else multi_legend(9)=" "+name_legend_10 end if string_len(9)=strlen(multi_legend(9)) if (.not. isvar("name_legend_11")) multi_legend(10)=" "+parameter(123) else multi_legend(10)=" "+name_legend_11 end if string_len(10)=strlen(multi_legend(10)) if (.not. isvar("name_legend_12")) multi_legend(11)=" "+parameter(127) else multi_legend(11)=" "+name_legend_12 end if string_len(11)=strlen(multi_legend(11)) 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 = .2 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("Please 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 (.not. isvar("var")) then if (parameter(21) .NE. "variables") then var=parameter(21) check = isStrSubset( var,","+vNam(varn)+"," ) end if else check = isStrSubset( var,","+vNam(varn)+"," ) end if if (check)then if (prof3d .EQ. 0) then if (logy .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 (logy .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 (logy .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 res@gsnLeftString = vNam(varn) res@gsnRightString = unit(varn) res@trYMinF = min_z res@trYMaxF = max_z if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min(data(varn,:,:)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max(data(varn,:,:)) end if 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniu,miniv,miniw/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiu,maxiv,maxiw/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/minipt,minivpt,minilpt/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxipt,maxivpt,maxilpt/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniq,miniqv,miniql/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiq,maxiqv,maxiql/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/minie,minies/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxie,maxies/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/minikm,minikh/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxikm,maxikh/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwpup,miniwsus,miniwu/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwsptsBC,miniwptBC/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwpsp,miniwsss,miniws/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/minius2,minivs2,miniws2/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxius2,maxivs2,maxiws2/)) end if 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 = .1 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/)) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/)) end if 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 = .1 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 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 (.not. isvar("var")) then if (parameter(21) .NE. "variables") then var=parameter(21) check = isStrSubset( var,","+vNam(varn)+"," ) end if else check = isStrSubset( var,","+vNam(varn)+"," ) end if if (check)then if (prof3d .EQ. 0) then if (logy .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 (logy .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 (logy .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 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@gsnRightString = unit(varn) if (.not. isvar("xs")) then if (parameter(63) .NE. "x0") then res@trXMinF = stringtofloat(parameter(63)) else res@trXMinF = min(mini) end if else res@trXMinF = xs end if if (.not. isvar("xe")) then if (parameter(65) .NE. "xdim") then res@trXMaxF = stringtofloat(parameter(65)) else res@trXMaxF = max(maxi) end if 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 if (.not. isvar("var") .AND. parameter(21) .EQ. "variables") then print(" ") print("'c_var'(= "+c_var+") is not conform with existing variables on the input file") print(" ") else print(" ") print("'c_var'(= "+c_var+") must include two variables of the general plots ('var' = "+var+")") print(" ") end if 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 if (.not. isvar("var") .AND. parameter(21) .EQ. "variables") then print(" ") print("'c_var'(= "+c_var+") is not conform with existing variables on the input file") print(" ") else print(" ") print("'c_var'(= "+c_var+") must include three variables of the general plots ('var' = "+var+")") print(" ") end if end if end if ; *************************************************** ; legend for combined plot ; *************************************************** lgres = True lgMonoDashIndex = False lgres@lgDashIndexes = (/0,1,2/) lgres@lgLabelFont = "helvetica" lgres@lgLabelFontHeightF = .1 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_lines*no_columns if( (i+no_lines*no_columns) .gt. (n-1)) then gsn_panel(wks,plot_(i:n-1),(/no_lines,no_columns/),resP) else gsn_panel(wks,plot_(i:i+no_lines*no_columns-1),(/no_lines,no_columns/),resP) end if end do end if print(" ") print("Output to: " + file_out +"."+ format_out) print(" ") end