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",77,"string") delete(parameter@_FillValue) else print(" ") print("'.ncl_preferences' is not existent") print(" ") exit end if ; *************************************************** ; set up default parameter values and strings if not assigned in prompt or parameter list ; *************************************************** if ( .not. isvar("file_in") ) then ; path+name of input file if (parameter(7) .EQ. "input file") then print(" ") print("Please provide input file 'file_in = ' either in prompt or parameter_list") print(" ") exit else file_in = parameter(7) end if end if if ( .not. isvar("format_out") ) then ; format of output file format_out = "x11" if (parameter(9) .NE. "x11") then format_out = parameter(9) end if end if if ( .not. isvar("file_out") ) then ; path+name of output file file_out = "test" if (parameter(11) .NE. "test_ts") then file_out = parameter(11) end if end if if ( .not. isvar("no_columns") ) then ; number of plots in one row 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("Please set 'combine' to 0 or 1") print(" ") exit end if 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("Please set 'black' to 0 or 1") print(" ") exit end if end if end if if ( .not. isvar("dash") ) then ; pattern of lines dash = 0 if (parameter(29) .NE. "0") then dash = stringtointeger(parameter(29)) if (stringtointeger(parameter(29)) .NE. 1) then print(" ") print("Please set 'dash' to 0 or 1") print(" ") exit end if 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("Please set 'over' to 0 or 1") print(" ") exit end if 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 end if ; *************************************************** ; open input file ; *************************************************** f=addfile( file_in,"r") vNam = getfilevarnames(f) print(" ") print("Variable on netCDF file: " + vNam) print(" ") dim = dimsizes(vNam) if (dim .EQ. 0) then print(" ") print("There are no data on file") print(" ") 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_")) 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_")) 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 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) z = f->$vNam(varn+1)$ dimz = dimsizes(z) break end if end do 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") z_u = f->zu_3d dimz = dimsizes(z_u) else if (vNam(varn) .EQ. "zw_3d") 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) 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) 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) 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) 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 ;if (start_time_step .GE. t_all(0) .AND. start_time_step .LT. t_all(1)+delta_t/2)then ; st=0 ;end if 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) 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) 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) 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) 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 ;if (end_time_step .GE. t_all(0) .AND. end_time_step .LT. t_all(1)+delta_t/2)then ; et=1 ;end if 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) ; **************************************************** ; set up legend and colors ; **************************************************** legend_label=new(nt,double) do p=start_time_step,end_time_step legend_label(p-start_time_step)=t_all(p) end do np = end_time_step-start_time_step+1 if ( black .eq. 0 ) then res=True res@xyLineColors = ispan(2,237,235/np) end if ; *************************************************** ; set up recourses ; *************************************************** 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.3 res@lgLabelFontHeightF = .02 res@txFontHeightF = 0.02 res@tiXAxisFontHeightF = 0.02 res@tiYAxisFontHeightF = 0.02 res@tiXAxisString = " " res@tiYAxisString = "Height [z]" if ( dash .eq. 0 ) then res@xyMonoDashPattern = True end if resP = True resP@txFont = "helvetica" resP@txString = f@title resP@txFuncCode = "~" resP@txFontHeightF = 0.014 ; *************************************************** ; set up graphics for plot ; *************************************************** plot = new(dim,graphic) plot_ = new(dim,graphic) 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") ; *************************************************** ; indicate plot number ; *************************************************** if (combine .EQ. 1) then n = 1 else n = 0 end if ; *************************************************** ; set up minimum and maximum height ; *************************************************** if (.not. isvar("min_z")) min_z=0 if (stringtointeger(parameter(33)) .NE. 0) then if (stringtointeger(parameter(33)) .GE. max(z_u) ) then print(" ") print("Minimum of height ('min_z'="+stringtointeger(parameter(33))+") is greater than available heights (="+max(z_u)+")") print(" ") exit end if if (stringtointeger(parameter(33)) .LT. 0 ) then print(" ") print("Begin minimum of height 'min_z' with 0") print(" ") exit end if min_z=stringtointeger(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 if (.not. isvar("max_z")) 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 (stringtointeger(parameter(35)) .LE. 0 ) then print(" ") print("Maximum of height 'max_z' should be at least 1") print(" ") exit end if max_z=stringtointeger(parameter(35)) end if else if (max_z .GE. max(z_pr) ) 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 ; *************************************************** ; 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 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) z_v = new((/dim,dimz/),double) 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) if (prof3d .EQ. 0) then temp = f->$vNam(varn)$ data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz-1) 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 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 count_var=count_var+1 if (prof3d .EQ. 0) then temp = f->$vNam(varn)$ 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 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 z = f->$vNam(varn+1)$ unit(varn) = temp@units data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz-1) else do i=0,b-1 if (isStrSubset( a(i),"zu_3d" )) z_v(varn,:) = z_u z = z_v(varn,:) else if (isStrSubset( a(i),"zw_3d" )) z_v(varn,:) = z_w z = z_v(varn,:) end if end if end do end if if (over .EQ. 0) then 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_u,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_u,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_u,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_u,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_w,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_w,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_u,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_u,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_u,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_u,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_u,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_w,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_w,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_u,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_u,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_u,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_u,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_w,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_w,res) end if 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 (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) if (prof3d .EQ. 1) then end if if (prof3d .EQ. 0) then z = f->$vNam(varn+1)$ else z = z_v(varn,:) end if 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 if (vNam(varn) .EQ. "w") then plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res) else plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) end if ; *************************************************** ; 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_u,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_u,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_u,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_u,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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_w,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) if (prof3d .EQ. 0) then z = f->$vNam(varn+1)$ else z = z_v(varn,:) end if com=isStrSubset( c_var,","+vNam(varn)+"," ) if (com) 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 = 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 print("'c_var' is not conform with existing variables on the input file") end if end if if(number_comb .EQ. 3)then if (co .EQ. 3)then overlay(plot_o(0),plot_o(1)) overlay(plot_o(0),plot_o(2)) else print("'c_var' is not conform with existing variables on the input file") 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_(0:n-1),(/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