Ignore:
Timestamp:
Apr 30, 2008 1:41:13 PM (16 years ago)
Author:
letzel
Message:
  • NCL scripts in trunk/SCRIPTS/NCL updated
File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/NCL/profiles.ncl

    r161 r162  
    107107   if ( .not. isvar("over") ) then                      ; switches overlaying plots on
    108108      over = 0
    109       if (stringtointeger(parameter(73)) .NE. 0) then
    110          over = stringtointeger(parameter(73))
    111          if (stringtointeger(parameter(73)) .NE. 1) then
     109      if (stringtointeger(parameter(37)) .NE. 0) then
     110         over = stringtointeger(parameter(37))
     111         if (stringtointeger(parameter(37)) .NE. 1) then
    112112            print(" ")
    113113            print("Please set 'over' to 0 or 1")
     
    456456      end do
    457457   end if
    458  
    459    dimz  = dimsizes(z_w)
    460    dimz  = dimsizes(z_u)
     458   if (isvar("z_u") ) then
     459      dimz  = dimsizes(z_u)
     460   else
     461      if (isvar("z_w"))then
     462         dimz  = dimsizes(z_w)
     463      end if
     464   end if
    461465   t_all = f->time
    462466   nt    = dimsizes(t_all)
     467   delta_t=t_all(nt-1)/nt
    463468 
    464469   ; ****************************************************       
     
    467472
    468473   if ( .not. isvar("start_time_step") ) then           
    469       start_time_step = 1
    470       if (parameter(13) .NE. "1") then
    471          if (parameter(13) .LE. "1")
     474      start_time_step=t_all(1)/3600
     475      if (parameter(13) .NE. "t(0)") then
     476         if (stringtodouble(parameter(13)) .GT. t_all(nt-1)/3600)
    472477            print(" ")
    473             print("Begin at least with time step 2")
     478            print("'start_time_step' = "+ parameter(13) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
     479            print(" ")
     480            print("Please select another 'start_time_step'")
    474481            print(" ")
    475482            exit
    476483         end if
    477          if (stringtointeger(parameter(13)) .GE. nt)
     484         if (stringtofloat(parameter(13)) .LE. t_all(0)/3600)
    478485            print(" ")
    479             print("'start_time_step' = "+ parameter(13) +" is greater than available time steps = " + (nt-1))
     486            print("'start_time_step' = "+ parameter(13) +"h is equal or lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
     487            print(" ")
     488            print("Please start profiles at least with second time step = "+t_all(1)+"s = "+t_all(1)/3600+"h")
    480489            print(" ")
    481490            exit
    482491         end if
    483          start_time_step = stringtointeger(parameter(13))-1
     492         start_time_step=stringtodouble(parameter(13))
    484493      end if
    485494   else
    486       if (start_time_step .LE. 0)
     495      if (start_time_step .GT. t_all(nt-1)/3600)
    487496         print(" ")
    488          print("Begin at least with time step 1")
     497         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")
     498         print(" ")
     499         print("Please select another 'start_time_step'")
    489500         print(" ")
    490501         exit
    491502      end if
    492       if (start_time_step .GE. nt)
     503      if (start_time_step .LE. t_all(0)/3600)
    493504         print(" ")
    494          print("'start_time_step' = "+ start_time_step +" is greater than available time steps = " + (nt-1))
     505         print("'start_time_step' = "+ start_time_step +"h is equal or lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
     506         print(" ")
     507         print("Please start profiles at least with second time step = "+t_all(1)+"s = "+t_all(1)/3600+"h")
    495508         print(" ")
    496509         exit
    497510      end if
    498       start_time_step = start_time_step - 1
    499511   end if
    500 
     512   start_time_step = start_time_step*3600
     513   if (start_time_step .GT. t_all(0) .AND. start_time_step .LT. t_all(1)+delta_t/2)then
     514      st=1
     515   end if
     516   do i=2,nt-1     
     517      if (start_time_step .GE. t_all(i)-delta_t/2 .AND. start_time_step .LT. t_all(i)+delta_t/2)then
     518         st=i
     519         break
     520      end if
     521   end do
     522 
    501523   ; ****************************************************
    502524   ; end of time step and different types of mistakes that could be done
     
    504526
    505527   if ( .not. isvar("end_time_step") ) then             
    506       end_time_step = nt-1
    507       if (parameter(15) .NE. "nt") then
    508          if (parameter(15) .LE. "0")
    509             print(" ")
    510             print("'end_time_step' = "+parameter(15)+ " is too small; 'end_time_step' should be at least 1 ")
    511             print(" ")
    512             exit
    513          end if
    514          if (stringtointeger(parameter(15)) .GE. nt)
     528      end_time_step = t_all(nt-1)/3600
     529      if (parameter(15) .NE. "t(end)") then
     530         if (stringtodouble(parameter(15)) .GT. t_all(nt-1)/3600)
    515531            print(" ")
    516             print("'end_time_step' = "+ parameter(15) +" is greater than available time steps = " + (nt-1))
     532            print("'end_time_step' = "+ parameter(15) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
     533            print(" ")
     534            print("Please select another 'end_time_step'") 
    517535            print(" ")
    518536            exit
    519537         end if
    520          if (stringtointeger(parameter(15)) .LT. stringtointeger(parameter(13)) )
     538         if (stringtodouble(parameter(15)) .LT. start_time_step/3600)
    521539            print(" ")
    522             print("'end_time_step' = "+ parameter(15) +" is lower than 'start_time_step' = "+parameter(13))
     540            print("'end_time_step' = "+ parameter(15) +"h is lower than 'start_time_step' = "+parameter(13)+"h")
     541            print(" ")
     542            print("Please select another 'start_time_step' or 'end_time_step'")
    523543            print(" ")
    524544            exit
    525545         end if
    526          end_time_step = stringtointeger(parameter(15)) 
     546         end_time_step = stringtodouble(parameter(15))
    527547      end if   
    528548   else
    529       if (end_time_step .LE. 0)
     549      if (end_time_step .GT. t_all(nt-1)/3600)
    530550         print(" ")
    531          print("'end_time_step' = "+end_time_step+ " is too small; 'end_time_step' should be at least 1 ")
     551         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")
     552         print(" ")
     553         print("Please select another 'end_time_step'") 
    532554         print(" ")
    533555         exit
    534556      end if
    535       if (end_time_step .GE. nt)
     557      if (end_time_step .LT. start_time_step/3600)
    536558         print(" ")
    537          print("'end_time_step' = "+ end_time_step +" is greater than available time steps = "+(nt-1))
     559         print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h")
     560         print(" ")
     561         print("Please select another 'start_time_step' or 'end_time_step'")
    538562         print(" ")
    539563         exit
    540564      end if
    541       if (end_time_step .LT. start_time_step)
    542             print(" ")
    543             print("'end_time_step' = "+end_time_step +" is lower than 'start_time_step' = "+start_time_step)
    544             print(" ")
    545             exit
     565   end if
     566   end_time_step = end_time_step*3600
     567   if (end_time_step .GT. t_all(0) .AND. end_time_step .LT. t_all(1)+delta_t/2)then
     568      et=1
     569   end if
     570   do i=2,nt-1     
     571      if (end_time_step .GE. t_all(i)-delta_t/2 .AND. end_time_step .LT. t_all(i)+delta_t/2)then
     572         et=i
     573         break
    546574      end if
    547       end_time_step = end_time_step - 1
    548    end if
     575   end do
     576
     577   delete(start_time_step)
     578   start_time_step=round(st,3)
     579   delete(end_time_step)
     580   end_time_step=round(et,3)
    549581
    550582   ; ****************************************************
     
    557589   end do
    558590   
    559    np = end_time_step-start_time_step 
     591   np = end_time_step-start_time_step+1 
    560592   if ( black .eq. 0 ) then
    561593      res=True     
     
    887919 
    888920   n_o=0
     921   count_var=0
    889922   do varn = 0,dim-1
    890923       
     
    908941         com=isStrSubset(c_var,","+vNam(varn)+"," )     
    909942         if (com)                       
    910             check = False
    911943            data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz-1)
    912944            unit(varn) = temp@units
     
    919951            mini(n_o)=min(data(varn,:,:))
    920952            maxi(n_o)=max(data(varn,:,:))
    921             varn=varn+1
    922953            n_o=n_o+1
    923954         end if
     
    925956
    926957      if(check) then
    927                
     958         count_var=count_var+1
     959     
    928960         z = f->$vNam(varn+1)$
    929961 
     
    935967            res@gsnRightString     = unit(varn)
    936968            res@trYMinF            = min_z
    937             res@trYMaxF            = max_z 
    938             res@trXMinF            = min(data(varn,:,:))
    939             res@trXMaxF            = max(data(varn,:,:))       
     969            res@trYMaxF            = max_z
     970            if (.not. isvar("xs")) then
     971               if (parameter(63) .NE. "x0") then
     972                  res@trXMinF = stringtofloat(parameter(63))
     973               else
     974                  res@trXMinF            = min(data(varn,:,:))
     975               end if
     976            else
     977               res@trXMinF            = xs
     978            end if
     979            if (.not. isvar("xe")) then
     980               if (parameter(65) .NE. "xdim") then
     981                  res@trXMaxF = stringtofloat(parameter(65))
     982               else
     983                  res@trXMaxF            = max(data(varn,:,:))
     984               end if
     985            else
     986               res@trXMaxF            = xe 
     987            end if                     
    940988            plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
    941989         end if       
     
    950998                  res@gsnLeftString      = vNam(varn)
    951999                  res@gsnRightString     = unit(varn)
    952                   res@trXMinF            = miniu
    953                   res@trXMaxF            = maxiu                 
     1000                  if (.not. isvar("xs")) then
     1001                     if (parameter(63) .NE. "x0") then
     1002                        res@trXMinF = stringtofloat(parameter(63))
     1003                     else
     1004                        res@trXMinF            = miniu
     1005                     end if
     1006                  else
     1007                     res@trXMinF            = xs
     1008                  end if
     1009                  if (.not. isvar("xe")) then
     1010                     if (parameter(65) .NE. "xdim") then
     1011                        res@trXMaxF = stringtofloat(parameter(65))
     1012                     else
     1013                        res@trXMaxF            = maxiu
     1014                     end if
     1015                  else
     1016                     res@trXMaxF            = xe 
     1017                  end if               
    9541018                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res) 
    9551019               end if
     
    9641028                  res@gsnLeftString      = vNam(varn)
    9651029                  res@gsnRightString     = unit(varn)
    966                   res@trXMinF            = miniv
    967                   res@trXMaxF            = maxiv                   
     1030                  if (.not. isvar("xs")) then
     1031                     if (parameter(63) .NE. "x0") then
     1032                        res@trXMinF = stringtofloat(parameter(63))
     1033                     else
     1034                        res@trXMinF            = miniv
     1035                     end if
     1036                  else
     1037                     res@trXMinF            = xs
     1038                  end if
     1039                  if (.not. isvar("xe")) then
     1040                     if (parameter(65) .NE. "xdim") then
     1041                        res@trXMaxF = stringtofloat(parameter(65))
     1042                     else
     1043                        res@trXMaxF            = maxiv
     1044                     end if
     1045                  else
     1046                     res@trXMaxF            = xe 
     1047                  end if               
    9681048                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    9691049               end if 
     
    9781058                  res@gsnLeftString      = vNam(varn)
    9791059                  res@gsnRightString     = unit(varn)
    980                   res@trXMinF            = miniw
    981                   res@trXMaxF            = maxiw                   
     1060                  if (.not. isvar("xs")) then
     1061                     if (parameter(63) .NE. "x0") then
     1062                        res@trXMinF = stringtofloat(parameter(63))
     1063                     else
     1064                        res@trXMinF            = miniw
     1065                     end if
     1066                  else
     1067                     res@trXMinF            = xs
     1068                  end if
     1069                  if (.not. isvar("xe")) then
     1070                     if (parameter(65) .NE. "xdim") then
     1071                        res@trXMaxF = stringtofloat(parameter(65))
     1072                     else
     1073                        res@trXMaxF            = maxiw
     1074                     end if
     1075                  else
     1076                     res@trXMaxF            = xe 
     1077                  end if           
    9821078                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    9831079               end if   
     
    9931089                  res@gsnLeftString      = vNam(varn)
    9941090                  res@gsnRightString     = unit(varn)
    995                   res@trXMinF            = minipt
    996                   res@trXMaxF            = maxipt
     1091                  if (.not. isvar("xs")) then
     1092                     if (parameter(63) .NE. "x0") then
     1093                        res@trXMinF = stringtofloat(parameter(63))
     1094                     else
     1095                        res@trXMinF            = minipt
     1096                     end if
     1097                  else
     1098                     res@trXMinF            = xs
     1099                  end if
     1100                  if (.not. isvar("xe")) then
     1101                     if (parameter(65) .NE. "xdim") then
     1102                        res@trXMaxF = stringtofloat(parameter(65))
     1103                     else
     1104                        res@trXMaxF            = maxipt
     1105                     end if
     1106                  else
     1107                     res@trXMaxF            = xe 
     1108                  end if
    9971109                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    9981110               end if 
     
    10071119                  res@gsnLeftString      = vNam(varn)
    10081120                  res@gsnRightString     = unit(varn)
    1009                   res@trXMinF            = minivpt
    1010                   res@trXMaxF            = maxivpt
     1121                  if (.not. isvar("xs")) then
     1122                     if (parameter(63) .NE. "x0") then
     1123                        res@trXMinF = stringtofloat(parameter(63))
     1124                     else
     1125                        res@trXMinF            = minivpt
     1126                     end if
     1127                  else
     1128                     res@trXMinF            = xs
     1129                  end if
     1130                  if (.not. isvar("xe")) then
     1131                     if (parameter(65) .NE. "xdim") then
     1132                        res@trXMaxF = stringtofloat(parameter(65))
     1133                     else
     1134                        res@trXMaxF            = maxivpt
     1135                     end if
     1136                  else
     1137                     res@trXMaxF            = xe 
     1138                  end if
    10111139                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    10121140               end if
     
    10211149                  res@gsnLeftString      = vNam(varn)
    10221150                  res@gsnRightString     = unit(varn)
    1023                   res@trXMinF            = minilpt
    1024                   res@trXMaxF            = maxilpt
     1151                  if (.not. isvar("xs")) then
     1152                     if (parameter(63) .NE. "x0") then
     1153                        res@trXMinF = stringtofloat(parameter(63))
     1154                     else
     1155                        res@trXMinF            = minilpt
     1156                     end if
     1157                  else
     1158                     res@trXMinF            = xs
     1159                  end if
     1160                  if (.not. isvar("xe")) then
     1161                     if (parameter(65) .NE. "xdim") then
     1162                        res@trXMaxF = stringtofloat(parameter(65))
     1163                     else
     1164                        res@trXMaxF            = maxilpt
     1165                     end if
     1166                  else
     1167                     res@trXMaxF            = xe 
     1168                  end if
    10251169                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    10261170               end if
     
    10361180                  res@gsnLeftString      = vNam(varn)
    10371181                  res@gsnRightString     = unit(varn)
    1038                   res@trXMinF            = miniq
    1039                   res@trXMaxF            = maxiq
     1182                  if (.not. isvar("xs")) then
     1183                     if (parameter(63) .NE. "x0") then
     1184                        res@trXMinF = stringtofloat(parameter(63))
     1185                     else
     1186                        res@trXMinF            = minilq
     1187                     end if
     1188                  else
     1189                     res@trXMinF            = xs
     1190                  end if
     1191                  if (.not. isvar("xe")) then
     1192                     if (parameter(65) .NE. "xdim") then
     1193                        res@trXMaxF = stringtofloat(parameter(65))
     1194                     else
     1195                        res@trXMaxF            = maxilq
     1196                     end if
     1197                  else
     1198                     res@trXMaxF            = xe 
     1199                  end if
    10401200                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    10411201               end if
     
    10501210                  res@gsnLeftString      = vNam(varn)
    10511211                  res@gsnRightString     = unit(varn)
    1052                   res@trXMinF            = miniqv
    1053                   res@trXMaxF            = maxiqv
     1212                  if (.not. isvar("xs")) then
     1213                     if (parameter(63) .NE. "x0") then
     1214                        res@trXMinF = stringtofloat(parameter(63))
     1215                     else
     1216                        res@trXMinF            = minilqv
     1217                     end if
     1218                  else
     1219                     res@trXMinF            = xs
     1220                  end if
     1221                  if (.not. isvar("xe")) then
     1222                     if (parameter(65) .NE. "xdim") then
     1223                        res@trXMaxF = stringtofloat(parameter(65))
     1224                     else
     1225                        res@trXMaxF            = maxilqv
     1226                     end if
     1227                  else
     1228                     res@trXMaxF            = xe 
     1229                  end if
    10541230                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    10551231               end if
     
    10641240                  res@gsnLeftString      = vNam(varn)
    10651241                  res@gsnRightString     = unit(varn)
    1066                   res@trXMinF            = miniql
    1067                   res@trXMaxF            = maxiql
    1068                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    1069                end if
    1070             end if
    1071 
    1072             if (vNam(varn) .EQ. "rho") then               
    1073                if (over .EQ. 1) then
    1074                   res@gsnLeftString      = vNam(varn)
    1075                   res@gsnRightString     = unit(varn)
    1076                   res@trXMinF            = min(data(varn,:,:))
    1077                   res@trXMaxF            = max(data(varn,:,:))
    1078                   plot_q = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    1079                else
    1080                   res@gsnLeftString      = vNam(varn)
    1081                   res@gsnRightString     = unit(varn)
    1082                   res@trXMinF            = min(data(varn,:,:))
    1083                   res@trXMaxF            = max(data(varn,:,:))
    1084                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    1085                end if
    1086             end if
    1087 
    1088             if (vNam(varn) .EQ. "s") then               
    1089                if (over .EQ. 1) then
    1090                   res@gsnLeftString      = vNam(varn)
    1091                   res@gsnRightString     = unit(varn)
    1092                   res@trXMinF            = min(data(varn,:,:))
    1093                   res@trXMaxF            = max(data(varn,:,:))
    1094                   plot_s = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    1095                else
    1096                   res@gsnLeftString      = vNam(varn)
    1097                   res@gsnRightString     = unit(varn)
    1098                   res@trXMinF            = min(data(varn,:,:))
    1099                   res@trXMaxF            = max(data(varn,:,:))
    1100                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    1101                end if
    1102             end if
    1103 
    1104             if (vNam(varn) .EQ. "sa") then                 
    1105                if (over .EQ. 1) then
    1106                   res@gsnLeftString      = vNam(varn)
    1107                   res@gsnRightString     = unit(varn)
    1108                   res@trXMinF            = min(data(varn,:,:))
    1109                   res@trXMaxF            = max(data(varn,:,:))
    1110                   plot_sa = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    1111                else
    1112                   res@gsnLeftString      = vNam(varn)
    1113                   res@gsnRightString     = unit(varn)
    1114                   res@trXMinF            = min(data(varn,:,:))
    1115                   res@trXMaxF            = max(data(varn,:,:)) 
     1242                  if (.not. isvar("xs")) then
     1243                     if (parameter(63) .NE. "x0") then
     1244                        res@trXMinF = stringtofloat(parameter(63))
     1245                     else
     1246                        res@trXMinF            = miniql
     1247                     end if
     1248                  else
     1249                     res@trXMinF            = xs
     1250                  end if
     1251                  if (.not. isvar("xe")) then
     1252                     if (parameter(65) .NE. "xdim") then
     1253                        res@trXMaxF = stringtofloat(parameter(65))
     1254                     else
     1255                        res@trXMaxF            = maxiql
     1256                     end if
     1257                  else
     1258                     res@trXMaxF            = xe 
     1259                  end if
    11161260                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    11171261               end if
     
    11271271                  res@gsnLeftString      = vNam(varn)
    11281272                  res@gsnRightString     = unit(varn)
    1129                   res@trXMinF            = minie
    1130                   res@trXMaxF            = maxie
     1273                  if (.not. isvar("xs")) then
     1274                     if (parameter(63) .NE. "x0") then
     1275                        res@trXMinF = stringtofloat(parameter(63))
     1276                     else
     1277                        res@trXMinF            = minie
     1278                     end if
     1279                  else
     1280                     res@trXMinF            = xs
     1281                  end if
     1282                  if (.not. isvar("xe")) then
     1283                     if (parameter(65) .NE. "xdim") then
     1284                        res@trXMaxF = stringtofloat(parameter(65))
     1285                     else
     1286                        res@trXMaxF            = maxie
     1287                     end if
     1288                  else
     1289                     res@trXMaxF            = xe 
     1290                  end if
    11311291                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    11321292               end if
     
    11411301                  res@gsnLeftString      = vNam(varn)
    11421302                  res@gsnRightString     = unit(varn)
    1143                   res@trXMinF            = minies
    1144                   res@trXMaxF            = maxies
     1303                  if (.not. isvar("xs")) then
     1304                     if (parameter(63) .NE. "x0") then
     1305                        res@trXMinF = stringtofloat(parameter(63))
     1306                     else
     1307                        res@trXMinF            = minies
     1308                     end if
     1309                  else
     1310                     res@trXMinF            = xs
     1311                  end if
     1312                  if (.not. isvar("xe")) then
     1313                     if (parameter(65) .NE. "xdim") then
     1314                        res@trXMaxF = stringtofloat(parameter(65))
     1315                     else
     1316                        res@trXMaxF            = maxies
     1317                     end if
     1318                  else
     1319                     res@trXMaxF            = xe 
     1320                  end if
    11451321                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    11461322               end if
     
    11561332                  res@gsnLeftString      = vNam(varn)
    11571333                  res@gsnRightString     = unit(varn)
    1158                   res@trXMinF            = minikm
    1159                   res@trXMaxF            = maxikm
     1334                  if (.not. isvar("xs")) then
     1335                     if (parameter(63) .NE. "x0") then
     1336                        res@trXMinF = stringtofloat(parameter(63))
     1337                     else
     1338                        res@trXMinF            = minikm
     1339                     end if
     1340                  else
     1341                     res@trXMinF            = xs
     1342                  end if
     1343                  if (.not. isvar("xe")) then
     1344                     if (parameter(65) .NE. "xdim") then
     1345                        res@trXMaxF = stringtofloat(parameter(65))
     1346                     else
     1347                        res@trXMaxF            = maxikm
     1348                     end if
     1349                  else
     1350                     res@trXMaxF            = xe 
     1351                  end if
    11601352                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    11611353               end if
     
    11701362                  res@gsnLeftString      = vNam(varn)
    11711363                  res@gsnRightString     = unit(varn)
    1172                   res@trXMinF            = minikh
    1173                   res@trXMaxF            = maxikh
     1364                  if (.not. isvar("xs")) then
     1365                     if (parameter(63) .NE. "x0") then
     1366                        res@trXMinF = stringtofloat(parameter(63))
     1367                     else
     1368                        res@trXMinF            = minikh
     1369                     end if
     1370                  else
     1371                     res@trXMinF            = xs
     1372                  end if
     1373                  if (.not. isvar("xe")) then
     1374                     if (parameter(65) .NE. "xdim") then
     1375                        res@trXMaxF = stringtofloat(parameter(65))
     1376                     else
     1377                        res@trXMaxF            = maxikh
     1378                     end if
     1379                  else
     1380                     res@trXMaxF            = xe 
     1381                  end if
    11741382                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    1175                end if
    1176             end if
    1177 
    1178             if (vNam(varn) .EQ. "l") then                 
    1179                if (over .EQ. 1) then
    1180                   res@gsnLeftString      = vNam(varn)
    1181                   res@gsnRightString     = unit(varn)
    1182                   res@trXMinF            = min(data(varn,:,:))
    1183                   res@trXMaxF            = max(data(varn,:,:))
    1184                   plot_l = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    1185                else
    1186                   res@gsnLeftString      = vNam(varn)
    1187                   res@gsnRightString     = unit(varn)
    1188                   res@trXMinF            = min(data(varn,:,:))
    1189                   res@trXMaxF            = max(data(varn,:,:))
    1190                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    11911383               end if
    11921384            end if
     
    12011393                  res@gsnLeftString      = vNam(varn)
    12021394                  res@gsnRightString     = unit(varn)
    1203                   res@trXMinF            = miniwpup
    1204                   res@trXMaxF            = maxiwpup
     1395                  if (.not. isvar("xs")) then
     1396                     if (parameter(63) .NE. "x0") then
     1397                        res@trXMinF = stringtofloat(parameter(63))
     1398                     else
     1399                        res@trXMinF            = miniwpup
     1400                     end if
     1401                  else
     1402                     res@trXMinF            = xs
     1403                  end if
     1404                  if (.not. isvar("xe")) then
     1405                     if (parameter(65) .NE. "xdim") then
     1406                        res@trXMaxF = stringtofloat(parameter(65))
     1407                     else
     1408                        res@trXMaxF            = maxiwpup
     1409                     end if
     1410                  else
     1411                     res@trXMaxF            = xe 
     1412                  end if
    12051413                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    12061414               end if
     
    12151423                  res@gsnLeftString      = vNam(varn)
    12161424                  res@gsnRightString     = unit(varn)
    1217                   res@trXMinF            = miniwsus
    1218                   res@trXMaxF            = maxiwsus
     1425                  if (.not. isvar("xs")) then
     1426                     if (parameter(63) .NE. "x0") then
     1427                        res@trXMinF = stringtofloat(parameter(63))
     1428                     else
     1429                        res@trXMinF            = miniwsus
     1430                     end if
     1431                  else
     1432                     res@trXMinF            = xs
     1433                  end if
     1434                  if (.not. isvar("xe")) then
     1435                     if (parameter(65) .NE. "xdim") then
     1436                        res@trXMaxF = stringtofloat(parameter(65))
     1437                     else
     1438                        res@trXMaxF            = maxiwsus
     1439                     end if
     1440                  else
     1441                     res@trXMaxF            = xe 
     1442                  end if
    12191443                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    12201444               end if
     
    12291453                  res@gsnLeftString      = vNam(varn)
    12301454                  res@gsnRightString     = unit(varn)
    1231                   res@trXMinF            = miniwu
    1232                   res@trXMaxF            = maxiwu
     1455                  if (.not. isvar("xs")) then
     1456                     if (parameter(63) .NE. "x0") then
     1457                        res@trXMinF = stringtofloat(parameter(63))
     1458                     else
     1459                        res@trXMinF            = miniwu
     1460                     end if
     1461                  else
     1462                     res@trXMinF            = xs
     1463                  end if
     1464                  if (.not. isvar("xe")) then
     1465                     if (parameter(65) .NE. "xdim") then
     1466                        res@trXMaxF = stringtofloat(parameter(65))
     1467                     else
     1468                        res@trXMaxF            = maxiwu
     1469                     end if
     1470                  else
     1471                     res@trXMaxF            = xe 
     1472                  end if
    12331473                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    12341474               end if
     
    12441484                  res@gsnLeftString      = vNam(varn)
    12451485                  res@gsnRightString     = unit(varn)
    1246                   res@trXMinF            = miniwpvp
    1247                   res@trXMaxF            = maxiwpvp
     1486                  if (.not. isvar("xs")) then
     1487                     if (parameter(63) .NE. "x0") then
     1488                        res@trXMinF = stringtofloat(parameter(63))
     1489                     else
     1490                        res@trXMinF            = miniwpvp
     1491                     end if
     1492                  else
     1493                     res@trXMinF            = xs
     1494                  end if
     1495                  if (.not. isvar("xe")) then
     1496                     if (parameter(65) .NE. "xdim") then
     1497                        res@trXMaxF = stringtofloat(parameter(65))
     1498                     else
     1499                        res@trXMaxF            = maxiwpvp
     1500                     end if
     1501                  else
     1502                     res@trXMaxF            = xe 
     1503                  end if
    12481504                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    12491505               end if
     
    12581514                  res@gsnLeftString      = vNam(varn)
    12591515                  res@gsnRightString     = unit(varn)
    1260                   res@trXMinF            = miniwsvs
    1261                   res@trXMaxF            = maxiwsvs
     1516                  if (.not. isvar("xs")) then
     1517                     if (parameter(63) .NE. "x0") then
     1518                        res@trXMinF = stringtofloat(parameter(63))
     1519                     else
     1520                        res@trXMinF            = miniwsvs
     1521                     end if
     1522                  else
     1523                     res@trXMinF            = xs
     1524                  end if
     1525                  if (.not. isvar("xe")) then
     1526                     if (parameter(65) .NE. "xdim") then
     1527                        res@trXMaxF = stringtofloat(parameter(65))
     1528                     else
     1529                        res@trXMaxF            = maxiwsvs
     1530                     end if
     1531                  else
     1532                     res@trXMaxF            = xe 
     1533                  end if
    12621534                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    12631535               end if
     
    12721544                  res@gsnLeftString      = vNam(varn)
    12731545                  res@gsnRightString     = unit(varn)
    1274                   res@trXMinF            = miniwv
    1275                   res@trXMaxF            = maxiwv
     1546                  if (.not. isvar("xs")) then
     1547                     if (parameter(63) .NE. "x0") then
     1548                        res@trXMinF = stringtofloat(parameter(63))
     1549                     else
     1550                        res@trXMinF            = miniwv
     1551                     end if
     1552                  else
     1553                     res@trXMinF            = xs
     1554                  end if
     1555                  if (.not. isvar("xe")) then
     1556                     if (parameter(65) .NE. "xdim") then
     1557                        res@trXMaxF = stringtofloat(parameter(65))
     1558                     else
     1559                        res@trXMaxF            = maxiwv
     1560                     end if
     1561                  else
     1562                     res@trXMaxF            = xe 
     1563                  end if
    12761564                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    12771565               end if
     
    12871575                  res@gsnLeftString      = vNam(varn)
    12881576                  res@gsnRightString     = unit(varn)
    1289                   res@trXMinF            = miniwpptp
    1290                   res@trXMaxF            = maxiwpptp
     1577                  if (.not. isvar("xs")) then
     1578                     if (parameter(63) .NE. "x0") then
     1579                        res@trXMinF = stringtofloat(parameter(63))
     1580                     else
     1581                        res@trXMinF            = miniwpptp
     1582                     end if
     1583                  else
     1584                     res@trXMinF            = xs
     1585                  end if
     1586                  if (.not. isvar("xe")) then
     1587                     if (parameter(65) .NE. "xdim") then
     1588                        res@trXMaxF = stringtofloat(parameter(65))
     1589                     else
     1590                        res@trXMaxF            = maxiwpptp
     1591                     end if
     1592                  else
     1593                     res@trXMaxF            = xe 
     1594                  end if
    12911595                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    12921596               end if
     
    13011605                  res@gsnLeftString      = vNam(varn)
    13021606                  res@gsnRightString     = unit(varn)
    1303                   res@trXMinF            = miniwspts
    1304                   res@trXMaxF            = maxiwspts
     1607                  if (.not. isvar("xs")) then
     1608                     if (parameter(63) .NE. "x0") then
     1609                        res@trXMinF = stringtofloat(parameter(63))
     1610                     else
     1611                        res@trXMinF            = miniwspts
     1612                     end if
     1613                  else
     1614                     res@trXMinF            = xs
     1615                  end if
     1616                  if (.not. isvar("xe")) then
     1617                     if (parameter(65) .NE. "xdim") then
     1618                        res@trXMaxF = stringtofloat(parameter(65))
     1619                     else
     1620                        res@trXMaxF            = maxiwspts
     1621                     end if
     1622                  else
     1623                     res@trXMaxF            = xe 
     1624                  end if
    13051625                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    13061626               end if
     
    13151635                  res@gsnLeftString      = vNam(varn)
    13161636                  res@gsnRightString     = unit(varn)
    1317                   res@trXMinF            = miniwpt
    1318                   res@trXMaxF            = maxiwpt
     1637                  if (.not. isvar("xs")) then
     1638                     if (parameter(63) .NE. "x0") then
     1639                        res@trXMinF = stringtofloat(parameter(63))
     1640                     else
     1641                        res@trXMinF            = miniwpt
     1642                     end if
     1643                  else
     1644                     res@trXMinF            = xs
     1645                  end if
     1646                  if (.not. isvar("xe")) then
     1647                     if (parameter(65) .NE. "xdim") then
     1648                        res@trXMaxF = stringtofloat(parameter(65))
     1649                     else
     1650                        res@trXMaxF            = maxiwpt
     1651                     end if
     1652                  else
     1653                     res@trXMaxF            = xe 
     1654                  end if
    13191655                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    13201656               end if
     
    13301666                  res@gsnLeftString      = vNam(varn)
    13311667                  res@gsnRightString     = unit(varn)
    1332                   res@trXMinF            = miniwsptsBC
    1333                   res@trXMaxF            = maxiwsptsBC
     1668                  if (.not. isvar("xs")) then
     1669                     if (parameter(63) .NE. "x0") then
     1670                        res@trXMinF = stringtofloat(parameter(63))
     1671                     else
     1672                        res@trXMinF            = miniwsptsBC
     1673                     end if
     1674                  else
     1675                     res@trXMinF            = xs
     1676                  end if
     1677                  if (.not. isvar("xe")) then
     1678                     if (parameter(65) .NE. "xdim") then
     1679                        res@trXMaxF = stringtofloat(parameter(65))
     1680                     else
     1681                        res@trXMaxF            = maxiwsptsBC
     1682                     end if
     1683                  else
     1684                     res@trXMaxF            = xe 
     1685                  end if
    13341686                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    13351687               end if
     
    13441696                  res@gsnLeftString      = vNam(varn)
    13451697                  res@gsnRightString     = unit(varn)
    1346                   res@trXMinF            = miniwptBC
    1347                   res@trXMaxF            = maxiwptBC
     1698                  if (.not. isvar("xs")) then
     1699                     if (parameter(63) .NE. "x0") then
     1700                        res@trXMinF = stringtofloat(parameter(63))
     1701                     else
     1702                        res@trXMinF            = miniwptBC
     1703                     end if
     1704                  else
     1705                     res@trXMinF            = xs
     1706                  end if
     1707                  if (.not. isvar("xe")) then
     1708                     if (parameter(65) .NE. "xdim") then
     1709                        res@trXMaxF = stringtofloat(parameter(65))
     1710                     else
     1711                        res@trXMaxF            = maxiwptBC
     1712                     end if
     1713                  else
     1714                     res@trXMaxF            = xe 
     1715                  end if
    13481716                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    13491717               end if
     
    13591727                  res@gsnLeftString      = vNam(varn)
    13601728                  res@gsnRightString     = unit(varn)
    1361                   res@trXMinF            = miniwpvptp
    1362                   res@trXMaxF            = maxiwpvptp
     1729                  if (.not. isvar("xs")) then
     1730                     if (parameter(63) .NE. "x0") then
     1731                        res@trXMinF = stringtofloat(parameter(63))
     1732                     else
     1733                        res@trXMinF            = miniwpvptp
     1734                     end if
     1735                  else
     1736                     res@trXMinF            = xs
     1737                  end if
     1738                  if (.not. isvar("xe")) then
     1739                     if (parameter(65) .NE. "xdim") then
     1740                        res@trXMaxF = stringtofloat(parameter(65))
     1741                     else
     1742                        res@trXMaxF            = maxiwpvptp
     1743                     end if
     1744                  else
     1745                     res@trXMaxF            = xe 
     1746                  end if
    13631747                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    13641748               end if
     
    13731757                  res@gsnLeftString      = vNam(varn)
    13741758                  res@gsnRightString     = unit(varn)
    1375                   res@trXMinF            = miniwsvpts
    1376                   res@trXMaxF            = maxiwsvpts
     1759                  if (.not. isvar("xs")) then
     1760                     if (parameter(63) .NE. "x0") then
     1761                        res@trXMinF = stringtofloat(parameter(63))
     1762                     else
     1763                        res@trXMinF            = miniwsvpts
     1764                     end if
     1765                  else
     1766                     res@trXMinF            = xs
     1767                  end if
     1768                  if (.not. isvar("xe")) then
     1769                     if (parameter(65) .NE. "xdim") then
     1770                        res@trXMaxF = stringtofloat(parameter(65))
     1771                     else
     1772                        res@trXMaxF            = maxiwsvpts
     1773                     end if
     1774                  else
     1775                     res@trXMaxF            = xe 
     1776                  end if
    13771777                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    13781778               end if
     
    13871787                  res@gsnLeftString      = vNam(varn)
    13881788                  res@gsnRightString     = unit(varn)
    1389                   res@trXMinF            = miniwvpt
    1390                   res@trXMaxF            = maxiwvpt
     1789                  if (.not. isvar("xs")) then
     1790                     if (parameter(63) .NE. "x0") then
     1791                        res@trXMinF = stringtofloat(parameter(63))
     1792                     else
     1793                        res@trXMinF            = miniwvpt
     1794                     end if
     1795                  else
     1796                     res@trXMinF            = xs
     1797                  end if
     1798                  if (.not. isvar("xe")) then
     1799                     if (parameter(65) .NE. "xdim") then
     1800                        res@trXMaxF = stringtofloat(parameter(65))
     1801                     else
     1802                        res@trXMaxF            = maxiwvpt
     1803                     end if
     1804                  else
     1805                     res@trXMaxF            = xe 
     1806                  end if
    13911807                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    13921808               end if
     
    14021818                  res@gsnLeftString      = vNam(varn)
    14031819                  res@gsnRightString     = unit(varn)
    1404                   res@trXMinF            = miniwpqp
    1405                   res@trXMaxF            = maxiwpqp
     1820                  if (.not. isvar("xs")) then
     1821                     if (parameter(63) .NE. "x0") then
     1822                        res@trXMinF = stringtofloat(parameter(63))
     1823                     else
     1824                        res@trXMinF            = miniwpqp
     1825                     end if
     1826                  else
     1827                     res@trXMinF            = xs
     1828                  end if
     1829                  if (.not. isvar("xe")) then
     1830                     if (parameter(65) .NE. "xdim") then
     1831                        res@trXMaxF = stringtofloat(parameter(65))
     1832                     else
     1833                        res@trXMaxF            = maxiwpqp
     1834                     end if
     1835                  else
     1836                     res@trXMaxF            = xe 
     1837                  end if
    14061838                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    14071839               end if
     
    14161848                  res@gsnLeftString      = vNam(varn)
    14171849                  res@gsnRightString     = unit(varn)
    1418                   res@trXMinF            = miniwsqs
    1419                   res@trXMaxF            = maxiwsqs
     1850                  if (.not. isvar("xs")) then
     1851                     if (parameter(63) .NE. "x0") then
     1852                        res@trXMinF = stringtofloat(parameter(63))
     1853                     else
     1854                        res@trXMinF            = miniwsqs
     1855                     end if
     1856                  else
     1857                     res@trXMinF            = xs
     1858                  end if
     1859                  if (.not. isvar("xe")) then
     1860                     if (parameter(65) .NE. "xdim") then
     1861                        res@trXMaxF = stringtofloat(parameter(65))
     1862                     else
     1863                        res@trXMaxF            = maxiwsqs
     1864                     end if
     1865                  else
     1866                     res@trXMaxF            = xe 
     1867                  end if
    14201868                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    14211869               end if
     
    14301878                  res@gsnLeftString      = vNam(varn)
    14311879                  res@gsnRightString     = unit(varn)
    1432                   res@trXMinF            = miniwq
    1433                   res@trXMaxF            = maxiwq
     1880                  if (.not. isvar("xs")) then
     1881                     if (parameter(63) .NE. "x0") then
     1882                        res@trXMinF = stringtofloat(parameter(63))
     1883                     else
     1884                        res@trXMinF            = miniwq
     1885                     end if
     1886                  else
     1887                     res@trXMinF            = xs
     1888                  end if
     1889                  if (.not. isvar("xe")) then
     1890                     if (parameter(65) .NE. "xdim") then
     1891                        res@trXMaxF = stringtofloat(parameter(65))
     1892                     else
     1893                        res@trXMaxF            = maxiwq
     1894                     end if
     1895                  else
     1896                     res@trXMaxF            = xe 
     1897                  end if
    14341898                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    14351899               end if
     
    14451909                  res@gsnLeftString      = vNam(varn)
    14461910                  res@gsnRightString     = unit(varn)
    1447                   res@trXMinF            = miniwpqvp
    1448                   res@trXMaxF            = maxiwpqvp
     1911                  if (.not. isvar("xs")) then
     1912                     if (parameter(63) .NE. "x0") then
     1913                        res@trXMinF = stringtofloat(parameter(63))
     1914                     else
     1915                        res@trXMinF            = miniwpqvp
     1916                     end if
     1917                  else
     1918                     res@trXMinF            = xs
     1919                  end if
     1920                  if (.not. isvar("xe")) then
     1921                     if (parameter(65) .NE. "xdim") then
     1922                        res@trXMaxF = stringtofloat(parameter(65))
     1923                     else
     1924                        res@trXMaxF            = maxiwpqvp
     1925                     end if
     1926                  else
     1927                     res@trXMaxF            = xe 
     1928                  end if
    14491929                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    14501930               end if
     
    14591939                  res@gsnLeftString      = vNam(varn)
    14601940                  res@gsnRightString     = unit(varn)
    1461                   res@trXMinF            = miniwsqvs
    1462                   res@trXMaxF            = maxiwsqvs
     1941                  if (.not. isvar("xs")) then
     1942                     if (parameter(63) .NE. "x0") then
     1943                        res@trXMinF = stringtofloat(parameter(63))
     1944                     else
     1945                        res@trXMinF            = miniwsqvs
     1946                     end if
     1947                  else
     1948                     res@trXMinF            = xs
     1949                  end if
     1950                  if (.not. isvar("xe")) then
     1951                     if (parameter(65) .NE. "xdim") then
     1952                        res@trXMaxF = stringtofloat(parameter(65))
     1953                     else
     1954                        res@trXMaxF            = maxiwsqvs
     1955                     end if
     1956                  else
     1957                     res@trXMaxF            = xe 
     1958                  end if
    14631959                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    14641960               end if
     
    14731969                  res@gsnLeftString      = vNam(varn)
    14741970                  res@gsnRightString     = unit(varn)
    1475                   res@trXMinF            = miniwqv
    1476                   res@trXMaxF            = maxiwqv
     1971                  if (.not. isvar("xs")) then
     1972                     if (parameter(63) .NE. "x0") then
     1973                        res@trXMinF = stringtofloat(parameter(63))
     1974                     else
     1975                        res@trXMinF            = miniwqv
     1976                     end if
     1977                  else
     1978                     res@trXMinF            = xs
     1979                  end if
     1980                  if (.not. isvar("xe")) then
     1981                     if (parameter(65) .NE. "xdim") then
     1982                        res@trXMaxF = stringtofloat(parameter(65))
     1983                     else
     1984                        res@trXMaxF            = maxiwqv
     1985                     end if
     1986                  else
     1987                     res@trXMaxF            = xe 
     1988                  end if
    14771989                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    14781990               end if
     
    14882000                  res@gsnLeftString      = vNam(varn)
    14892001                  res@gsnRightString     = unit(varn)
    1490                   res@trXMinF            = miniwpsp
    1491                   res@trXMaxF            = maxiwpsp
     2002                  if (.not. isvar("xs")) then
     2003                     if (parameter(63) .NE. "x0") then
     2004                        res@trXMinF = stringtofloat(parameter(63))
     2005                     else
     2006                        res@trXMinF            = miniwpsp
     2007                     end if
     2008                  else
     2009                     res@trXMinF            = xs
     2010                  end if
     2011                  if (.not. isvar("xe")) then
     2012                     if (parameter(65) .NE. "xdim") then
     2013                        res@trXMaxF = stringtofloat(parameter(65))
     2014                     else
     2015                        res@trXMaxF            = maxiwpsp
     2016                     end if
     2017                  else
     2018                     res@trXMaxF            = xe 
     2019                  end if
    14922020                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    14932021               end if
     
    15022030                  res@gsnLeftString      = vNam(varn)
    15032031                  res@gsnRightString     = unit(varn)
    1504                   res@trXMinF            = miniwsss
    1505                   res@trXMaxF            = maxiwsss
     2032                  if (.not. isvar("xs")) then
     2033                     if (parameter(63) .NE. "x0") then
     2034                        res@trXMinF = stringtofloat(parameter(63))
     2035                     else
     2036                        res@trXMinF            = miniwsss
     2037                     end if
     2038                  else
     2039                     res@trXMinF            = xs
     2040                  end if
     2041                  if (.not. isvar("xe")) then
     2042                     if (parameter(65) .NE. "xdim") then
     2043                        res@trXMaxF = stringtofloat(parameter(65))
     2044                     else
     2045                        res@trXMaxF            = maxiwsss
     2046                     end if
     2047                  else
     2048                     res@trXMaxF            = xe 
     2049                  end if
    15062050                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    15072051               end if
     
    15162060                  res@gsnLeftString      = vNam(varn)
    15172061                  res@gsnRightString     = unit(varn)
    1518                   res@trXMinF            = miniws
    1519                   res@trXMaxF            = maxiws
     2062                  if (.not. isvar("xs")) then
     2063                     if (parameter(63) .NE. "x0") then
     2064                        res@trXMinF = stringtofloat(parameter(63))
     2065                     else
     2066                        res@trXMinF            = miniws
     2067                     end if
     2068                  else
     2069                     res@trXMinF            = xs
     2070                  end if
     2071                  if (.not. isvar("xe")) then
     2072                     if (parameter(65) .NE. "xdim") then
     2073                        res@trXMaxF = stringtofloat(parameter(65))
     2074                     else
     2075                        res@trXMaxF            = maxiws
     2076                     end if
     2077                  else
     2078                     res@trXMaxF            = xe 
     2079                  end if
    15202080                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    15212081               end if
     
    15312091                  res@gsnLeftString      = vNam(varn)
    15322092                  res@gsnRightString     = unit(varn)
    1533                   res@trXMinF            = miniwpsap
    1534                   res@trXMaxF            = maxiwpsap
     2093                  if (.not. isvar("xs")) then
     2094                     if (parameter(63) .NE. "x0") then
     2095                        res@trXMinF = stringtofloat(parameter(63))
     2096                     else
     2097                        res@trXMinF            = miniwpsap
     2098                     end if
     2099                  else
     2100                     res@trXMinF            = xs
     2101                  end if
     2102                  if (.not. isvar("xe")) then
     2103                     if (parameter(65) .NE. "xdim") then
     2104                        res@trXMaxF = stringtofloat(parameter(65))
     2105                     else
     2106                        res@trXMaxF            = maxiwpsap
     2107                     end if
     2108                  else
     2109                     res@trXMaxF            = xe 
     2110                  end if
    15352111                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    15362112               end if
     
    15452121                  res@gsnLeftString      = vNam(varn)
    15462122                  res@gsnRightString     = unit(varn)
    1547                   res@trXMinF            = miniwssas
    1548                   res@trXMaxF            = maxiwssas
     2123                  if (.not. isvar("xs")) then
     2124                     if (parameter(63) .NE. "x0") then
     2125                        res@trXMinF = stringtofloat(parameter(63))
     2126                     else
     2127                        res@trXMinF            = miniwssas
     2128                     end if
     2129                  else
     2130                     res@trXMinF            = xs
     2131                  end if
     2132                  if (.not. isvar("xe")) then
     2133                     if (parameter(65) .NE. "xdim") then
     2134                        res@trXMaxF = stringtofloat(parameter(65))
     2135                     else
     2136                        res@trXMaxF            = maxiwssas
     2137                     end if
     2138                  else
     2139                     res@trXMaxF            = xe 
     2140                  end if
    15492141                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    15502142               end if
     
    15592151                  res@gsnLeftString      = vNam(varn)
    15602152                  res@gsnRightString     = unit(varn)
    1561                   res@trXMinF            = miniwsa
    1562                   res@trXMaxF            = maxiwsa
    1563                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1564                end if
    1565             end if
    1566 
    1567             if (vNam(varn) .EQ. "wses") then               
    1568                if (over .EQ. 1) then
    1569                   res@gsnLeftString      = vNam(varn)
    1570                   res@gsnRightString     = unit(varn)
    1571                   res@trXMinF            = min(data(varn,:,:))
    1572                   res@trXMaxF            = max(data(varn,:,:))
    1573                   plot_wses = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1574                else
    1575                   res@gsnLeftString      = vNam(varn)
    1576                   res@gsnRightString     = unit(varn)
    1577                   res@trXMinF            = min(data(varn,:,:))
    1578                   res@trXMaxF            = max(data(varn,:,:))
     2153                  if (.not. isvar("xs")) then
     2154                     if (parameter(63) .NE. "x0") then
     2155                        res@trXMinF = stringtofloat(parameter(63))
     2156                     else
     2157                        res@trXMinF            = miniwsa
     2158                     end if
     2159                  else
     2160                     res@trXMinF            = xs
     2161                  end if
     2162                  if (.not. isvar("xe")) then
     2163                     if (parameter(65) .NE. "xdim") then
     2164                        res@trXMaxF = stringtofloat(parameter(65))
     2165                     else
     2166                        res@trXMaxF            = maxiwsa
     2167                     end if
     2168                  else
     2169                     res@trXMaxF            = xe 
     2170                  end if
    15792171                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    15802172               end if
     
    15902182                  res@gsnLeftString      = vNam(varn)
    15912183                  res@gsnRightString     = unit(varn)
    1592                   res@trXMinF            = minius2
    1593                   res@trXMaxF            = maxius2
     2184                  if (.not. isvar("xs")) then
     2185                     if (parameter(63) .NE. "x0") then
     2186                        res@trXMinF = stringtofloat(parameter(63))
     2187                     else
     2188                        res@trXMinF            = minius2
     2189                     end if
     2190                  else
     2191                     res@trXMinF            = xs
     2192                  end if
     2193                  if (.not. isvar("xe")) then
     2194                     if (parameter(65) .NE. "xdim") then
     2195                        res@trXMaxF = stringtofloat(parameter(65))
     2196                     else
     2197                        res@trXMaxF            = maxius2
     2198                     end if
     2199                  else
     2200                     res@trXMaxF            = xe 
     2201                  end if
    15942202                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    15952203               end if
     
    16042212                  res@gsnLeftString      = vNam(varn)
    16052213                  res@gsnRightString     = unit(varn)
    1606                   res@trXMinF            = minivs2
    1607                   res@trXMaxF            = maxivs2
     2214                  if (.not. isvar("xs")) then
     2215                     if (parameter(63) .NE. "x0") then
     2216                        res@trXMinF = stringtofloat(parameter(63))
     2217                     else
     2218                        res@trXMinF            = minivs2
     2219                     end if
     2220                  else
     2221                     res@trXMinF            = xs
     2222                  end if
     2223                  if (.not. isvar("xe")) then
     2224                     if (parameter(65) .NE. "xdim") then
     2225                        res@trXMaxF = stringtofloat(parameter(65))
     2226                     else
     2227                        res@trXMaxF            = maxivs2
     2228                     end if
     2229                  else
     2230                     res@trXMaxF            = xe 
     2231                  end if
    16082232                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    16092233               end if
     
    16182242                  res@gsnLeftString      = vNam(varn)
    16192243                  res@gsnRightString     = unit(varn)
    1620                   res@trXMinF            = miniws2
    1621                   res@trXMaxF            = maxiws2
    1622                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1623                end if
    1624             end if
    1625 
    1626             if (vNam(varn) .EQ. "pts2") then
    1627                minipts2=min(data(varn,:,:))
    1628                maxipts2=max(data(varn,:,:))                 
    1629                if (over .EQ. 1) then
    1630                   res@gsnLeftString      = vNam(varn)
    1631                   res@gsnRightString     = unit(varn)
    1632                   res@trXMinF            = minipts2
    1633                   res@trXMaxF            = maxipts2
    1634                   plot_pts2 = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1635                else
    1636                   res@gsnLeftString      = vNam(varn)
    1637                   res@gsnRightString     = unit(varn)
    1638                   res@trXMinF            = minipts2
    1639                   res@trXMaxF            = maxipts2
    1640                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1641                end if
    1642             end if
    1643 
    1644             if (vNam(varn) .EQ. "ws3") then
    1645                miniws3=min(data(varn,:,:))
    1646                maxiws3=max(data(varn,:,:))                 
    1647                if (over .EQ. 1) then
    1648                   res@gsnLeftString      = vNam(varn)
    1649                   res@gsnRightString     = unit(varn)
    1650                   res@trXMinF            = miniws3
    1651                   res@trXMaxF            = maxiws3
    1652                   plot_ws3 = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1653                else
    1654                   res@gsnLeftString      = vNam(varn)
    1655                   res@gsnRightString     = unit(varn)
    1656                   res@trXMinF            = miniws3
    1657                   res@trXMaxF            = maxiws3
    1658                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1659                end if
    1660             end if
    1661 
    1662             if (vNam(varn) .EQ. "Sw") then
    1663                miniSw=min(data(varn,:,:))
    1664                maxiSw=max(data(varn,:,:))                 
    1665                if (over .EQ. 1) then
    1666                   res@gsnLeftString      = vNam(varn)
    1667                   res@gsnRightString     = unit(varn)
    1668                   res@trXMinF            = miniSw
    1669                   res@trXMaxF            = maxiSw
    1670                   plot_Sw = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1671                else
    1672                   res@gsnLeftString      = vNam(varn)
    1673                   res@gsnRightString     = unit(varn)
    1674                   res@trXMinF            = miniSw
    1675                   res@trXMaxF            = maxiSw
    1676                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1677                end if
    1678             end if
    1679 
    1680             if (vNam(varn) .EQ. "ws2pts") then
    1681                miniws2pts=min(data(varn,:,:))
    1682                maxiws2pts=max(data(varn,:,:))                 
    1683                if (over .EQ. 1) then
    1684                   res@gsnLeftString      = vNam(varn)
    1685                   res@gsnRightString     = unit(varn)
    1686                   res@trXMinF            = miniws2pts
    1687                   res@trXMaxF            = maxiws2pts
    1688                   plot_ws2pts = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1689                else
    1690                   res@gsnLeftString      = vNam(varn)
    1691                   res@gsnRightString     = unit(varn)
    1692                   res@trXMinF            = miniws2pts
    1693                   res@trXMaxF            = maxiws2pts
    1694                   plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1695                end if
    1696             end if
    1697 
    1698             if (vNam(varn) .EQ. "wspts2") then
    1699                miniwspts2=min(data(varn,:,:))
    1700                maxiwspts2=max(data(varn,:,:))                 
    1701                if (over .EQ. 1) then
    1702                   res@gsnLeftString      = vNam(varn)
    1703                   res@gsnRightString     = unit(varn)
    1704                   res@trXMinF            = miniwspts2
    1705                   res@trXMaxF            = maxiwspts2
    1706                   plot_wspts2 = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    1707                else
    1708                   res@gsnLeftString      = vNam(varn)
    1709                   res@gsnRightString     = unit(varn)
    1710                   res@trXMinF            = miniwspts2
    1711                   res@trXMaxF            = maxiwspts2
     2244                  if (.not. isvar("xs")) then
     2245                     if (parameter(63) .NE. "x0") then
     2246                        res@trXMinF = stringtofloat(parameter(63))
     2247                     else
     2248                        res@trXMinF            = miniws2
     2249                     end if
     2250                  else
     2251                     res@trXMinF            = xs
     2252                  end if
     2253                  if (.not. isvar("xe")) then
     2254                     if (parameter(65) .NE. "xdim") then
     2255                        res@trXMaxF = stringtofloat(parameter(65))
     2256                     else
     2257                        res@trXMaxF            = maxiws2
     2258                     end if
     2259                  else
     2260                     res@trXMaxF            = xe 
     2261                  end if
    17122262                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    17132263               end if
     
    17232273                  res@gsnLeftString      = vNam(varn)
    17242274                  res@gsnRightString     = unit(varn)
    1725                   res@trXMinF            = miniwsususodz
    1726                   res@trXMaxF            = maxiwsususodz
     2275                  if (.not. isvar("xs")) then
     2276                     if (parameter(63) .NE. "x0") then
     2277                        res@trXMinF = stringtofloat(parameter(63))
     2278                     else
     2279                        res@trXMinF            = miniwsususodz
     2280                     end if
     2281                  else
     2282                     res@trXMinF            = xs
     2283                  end if
     2284                  if (.not. isvar("xe")) then
     2285                     if (parameter(65) .NE. "xdim") then
     2286                        res@trXMaxF = stringtofloat(parameter(65))
     2287                     else
     2288                        res@trXMaxF            = maxiwsususodz
     2289                     end if
     2290                  else
     2291                     res@trXMaxF            = xe 
     2292                  end if
    17272293                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    17282294               end if 
     
    17372303                  res@gsnLeftString      = vNam(varn)
    17382304                  res@gsnRightString     = unit(varn)
    1739                   res@trXMinF            = miniwspsodz
    1740                   res@trXMaxF            = maxiwspsodz
     2305                  if (.not. isvar("xs")) then
     2306                     if (parameter(63) .NE. "x0") then
     2307                        res@trXMinF = stringtofloat(parameter(63))
     2308                     else
     2309                        res@trXMinF            = miniwspsodz
     2310                     end if
     2311                  else
     2312                     res@trXMinF            = xs
     2313                  end if
     2314                  if (.not. isvar("xe")) then
     2315                     if (parameter(65) .NE. "xdim") then
     2316                        res@trXMaxF = stringtofloat(parameter(65))
     2317                     else
     2318                        res@trXMaxF            = maxiwspsodz
     2319                     end if
     2320                  else
     2321                     res@trXMaxF            = xe 
     2322                  end if
    17412323                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_u,res)
    17422324               end if
     
    17512333                  res@gsnLeftString      = vNam(varn)
    17522334                  res@gsnRightString     = unit(varn)
    1753                   res@trXMinF            = miniwpeodz
    1754                   res@trXMaxF            = maxiwpeodz
     2335                  if (.not. isvar("xs")) then
     2336                     if (parameter(63) .NE. "x0") then
     2337                        res@trXMinF = stringtofloat(parameter(63))
     2338                     else
     2339                        res@trXMinF            = miniwpeodz
     2340                     end if
     2341                  else
     2342                     res@trXMinF            = xs
     2343                  end if
     2344                  if (.not. isvar("xe")) then
     2345                     if (parameter(65) .NE. "xdim") then
     2346                        res@trXMaxF = stringtofloat(parameter(65))
     2347                     else
     2348                        res@trXMaxF            = maxiwpeodz
     2349                     end if
     2350                  else
     2351                     res@trXMaxF            = xe 
     2352                  end if
    17552353                  plot(n) = gsn_csm_xy(wks,data(varn,:,:),z_w,res)
    17562354               end if
     
    17632361      delete(temp)
    17642362   end do
    1765    
     2363
     2364   if (count_var .EQ. 0) then
     2365      print(" ")
     2366      print("Please select a variable 'var=' or use the default value")
     2367      print(" ")
     2368      print("Your selection '"+var+"' does not exist on the input file")
     2369      print(" ")
     2370      exit
     2371   end if
     2372
    17662373   if (over .EQ. 1 ) then
    17672374
     
    18362443            z = f->$vNam(varn+1)$
    18372444           
    1838             ;res@gsnLeftString      = vNam(varn)
     2445            res@gsnLeftString      = vNam(varn)
    18392446            res@gsnRightString     = unit(varn)
    18402447            res@trYMinF            = min_z
    18412448            res@trYMaxF            = max_z 
    1842             res@trXMinF            = min(data(varn,:,:))
    1843             res@trXMaxF            = max(data(varn,:,:))
     2449            if (.not. isvar("xs")) then
     2450               if (parameter(63) .NE. "x0") then
     2451                  res@trXMinF = stringtofloat(parameter(63))
     2452               else
     2453                  res@trXMinF = min(data(varn,:,:))
     2454               end if
     2455            else
     2456               res@trXMinF = xs
     2457            end if
     2458            if (.not. isvar("xe")) then
     2459               if (parameter(65) .NE. "xdim") then
     2460                  res@trXMaxF = stringtofloat(parameter(65))
     2461               else
     2462                  res@trXMaxF = max(data(varn,:,:))
     2463            end if
     2464            else
     2465               res@trXMaxF = xe 
     2466            end if
    18442467            plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
    18452468           
     
    18482471                  res@gsnLeftString      = "u, v and w"
    18492472                  res@gsnRightString     = unit(varn)
    1850                   res@trXMinF            = min((/miniu,miniv,miniw/))
    1851                   res@trXMaxF            = max((/maxiu,maxiv,maxiw/))
     2473                  if (.not. isvar("xs")) then
     2474                     if (parameter(63) .NE. "x0") then
     2475                        res@trXMinF = stringtofloat(parameter(63))
     2476                     else
     2477                        res@trXMinF = min((/miniu,miniv,miniw/))
     2478                     end if
     2479                  else
     2480                     res@trXMinF = xs
     2481                  end if
     2482                  if (.not. isvar("xe")) then
     2483                     if (parameter(65) .NE. "xdim") then
     2484                        res@trXMaxF = stringtofloat(parameter(65))
     2485                     else
     2486                        res@trXMaxF = max((/maxiu,maxiv,maxiw/))
     2487                     end if
     2488                  else
     2489                     res@trXMaxF = xe 
     2490                  end if
    18522491                  if (vNam(varn) .EQ. "w") then
    18532492                     plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    18852524                  res@gsnLeftString      = "pt, vpt and lpt"
    18862525                  res@gsnRightString     = unit(varn)
    1887                   res@trXMinF            = min((/minipt,minivpt,minilpt/))
    1888                   res@trXMaxF            = max((/maxipt,maxivpt,maxilpt/))
     2526                  if (.not. isvar("xs")) then
     2527                     if (parameter(63) .NE. "x0") then
     2528                        res@trXMinF = stringtofloat(parameter(63))
     2529                     else
     2530                        res@trXMinF = min((/minipt,minivpt,minilpt/))
     2531                     end if
     2532                  else
     2533                     res@trXMinF = xs
     2534                  end if
     2535                  if (.not. isvar("xe")) then
     2536                     if (parameter(65) .NE. "xdim") then
     2537                        res@trXMaxF = stringtofloat(parameter(65))
     2538                     else
     2539                        res@trXMaxF = max((/maxipt,maxivpt,maxilpt/))
     2540                     end if
     2541                  else
     2542                     res@trXMaxF = xe 
     2543                  end if
    18892544
    18902545                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_u,res)
     
    19182573                  res@gsnLeftString      = "q, qv and ql"
    19192574                  res@gsnRightString     = unit(varn)
    1920                   res@trXMinF            = min((/miniq,miniqv,miniql/))
    1921                   res@trXMaxF            = max((/maxiq,maxiqv,maxiql/))
     2575                  if (.not. isvar("xs")) then
     2576                     if (parameter(63) .NE. "x0") then
     2577                        res@trXMinF = stringtofloat(parameter(63))
     2578                     else
     2579                        res@trXMinF = min((/miniq,miniqv,miniql/))
     2580                     end if
     2581                  else
     2582                     res@trXMinF = xs
     2583                  end if
     2584                  if (.not. isvar("xe")) then
     2585                     if (parameter(65) .NE. "xdim") then
     2586                        res@trXMaxF = stringtofloat(parameter(65))
     2587                     else
     2588                        res@trXMaxF = max((/maxiq,maxiqv,maxiql/))
     2589                     end if
     2590                  else
     2591                     res@trXMaxF = xe 
     2592                  end if
    19222593
    19232594                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_u,res)
     
    19462617                  continue   
    19472618               end if
    1948             end if           
    1949             if (vNam(varn) .EQ. "rho") then
    1950                plot(n) = plot_rho
    1951             end if
    1952             if (vNam(varn) .EQ. "s") then
    1953                plot(n) = plot_s
    1954             end if
    1955             if (vNam(varn) .EQ. "sa") then
    1956                plot(n) = plot_sa
    1957             end if
     2619            end if   
     2620           
    19582621            if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es") then
    19592622               if (e .EQ. 0) then
    19602623                  res@gsnLeftString      = "e and es"
    19612624                  res@gsnRightString     = unit(varn)
    1962                   res@trXMinF            = min((/minie,minies/))
    1963                   res@trXMaxF            = max((/maxie,maxies/))
     2625                  if (.not. isvar("xs")) then
     2626                     if (parameter(63) .NE. "x0") then
     2627                        res@trXMinF = stringtofloat(parameter(63))
     2628                     else
     2629                        res@trXMinF = min((/minie,minies/))
     2630                     end if
     2631                  else
     2632                     res@trXMinF = xs
     2633                  end if
     2634                  if (.not. isvar("xe")) then
     2635                     if (parameter(65) .NE. "xdim") then
     2636                        res@trXMaxF = stringtofloat(parameter(65))
     2637                     else
     2638                        res@trXMaxF = max((/maxie,maxies/))
     2639                     end if
     2640                  else
     2641                     res@trXMaxF = xe 
     2642                  end if
    19642643
    19652644                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_u,res)
     
    19932672                  res@gsnLeftString      = "km and kh"
    19942673                  res@gsnRightString     = unit(varn)
    1995                   res@trXMinF            = min((/minikm,minikh/))
    1996                   res@trXMaxF            = max((/maxikm,maxikh/))
     2674                  if (.not. isvar("xs")) then
     2675                     if (parameter(63) .NE. "x0") then
     2676                        res@trXMinF = stringtofloat(parameter(63))
     2677                     else
     2678                        res@trXMinF = min((/minikm,minikh/))
     2679                     end if
     2680                  else
     2681                     res@trXMinF = xs
     2682                  end if
     2683                  if (.not. isvar("xe")) then
     2684                     if (parameter(65) .NE. "xdim") then
     2685                        res@trXMaxF = stringtofloat(parameter(65))
     2686                     else
     2687                        res@trXMaxF = max((/maxikm,maxikh/))
     2688                     end if
     2689                  else
     2690                     res@trXMaxF = xe 
     2691                  end if
    19972692
    19982693                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_u,res)
     
    20222717               end if
    20232718            end if           
    2024             if (vNam(varn) .EQ. "l") then
    2025                plot(n) = plot_l
    2026             end if
     2719           
    20272720            if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "wu") then
    20282721               if (wpup .EQ. 0) then
    20292722                  res@gsnLeftString      = "wpup, wsus and wu"
    20302723                  res@gsnRightString     = unit(varn)
    2031                   res@trXMinF            = min((/miniwpup,miniwsus,miniwu/))
    2032                   res@trXMaxF            = max((/maxiwpup,maxiwsus,maxiwu/))
     2724                  if (.not. isvar("xs")) then
     2725                     if (parameter(63) .NE. "x0") then
     2726                        res@trXMinF = stringtofloat(parameter(63))
     2727                     else
     2728                        res@trXMinF = min((/miniwpup,miniwsus,miniwu/))
     2729                     end if
     2730                  else
     2731                     res@trXMinF = xs
     2732                  end if
     2733                  if (.not. isvar("xe")) then
     2734                     if (parameter(65) .NE. "xdim") then
     2735                        res@trXMaxF = stringtofloat(parameter(65))
     2736                     else
     2737                        res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/))
     2738                     end if
     2739                  else
     2740                     res@trXMaxF = xe 
     2741                  end if
    20332742
    20342743                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    20622771                  res@gsnLeftString      = "wpvp, wsus and wv"
    20632772                  res@gsnRightString     = unit(varn)
    2064                   res@trXMinF            = min((/miniwpvp,miniwsvs,miniwv/))
    2065                   res@trXMaxF            = max((/maxiwpvp,maxiwsvs,maxiwv/))
     2773                  if (.not. isvar("xs")) then
     2774                     if (parameter(63) .NE. "x0") then
     2775                        res@trXMinF = stringtofloat(parameter(63))
     2776                     else
     2777                        res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/))
     2778                     end if
     2779                  else
     2780                     res@trXMinF = xs
     2781                  end if
     2782                  if (.not. isvar("xe")) then
     2783                     if (parameter(65) .NE. "xdim") then
     2784                        res@trXMaxF = stringtofloat(parameter(65))
     2785                     else
     2786                        res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/))
     2787                     end if
     2788                  else
     2789                     res@trXMaxF = xe 
     2790                  end if
    20662791
    20672792                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    20952820                  res@gsnLeftString      = "wpptp, wspts and wv"
    20962821                  res@gsnRightString     = unit(varn)
    2097                   res@trXMinF            = min((/miniwpptp,miniwspts,miniwpt/))
    2098                   res@trXMaxF            = max((/maxiwpptp,maxiwspts,maxiwpt/))
     2822                  if (.not. isvar("xs")) then
     2823                     if (parameter(63) .NE. "x0") then
     2824                        res@trXMinF = stringtofloat(parameter(63))
     2825                     else
     2826                        res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/))
     2827                     end if
     2828                  else
     2829                     res@trXMinF = xs
     2830                  end if
     2831                  if (.not. isvar("xe")) then
     2832                     if (parameter(65) .NE. "xdim") then
     2833                        res@trXMaxF = stringtofloat(parameter(65))
     2834                     else
     2835                        res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/))
     2836                     end if
     2837                  else
     2838                     res@trXMaxF = xe 
     2839                  end if
    20992840
    21002841                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    21282869                  res@gsnLeftString      = "wsptsBC and wptBC"
    21292870                  res@gsnRightString     = unit(varn)
    2130                   res@trXMinF            = min((/miniwsptsBC,miniwptBC/))
    2131                   res@trXMaxF            = max((/maxiwsptsBC,maxiwptBC/))
     2871                  if (.not. isvar("xs")) then
     2872                     if (parameter(63) .NE. "x0") then
     2873                        res@trXMinF = stringtofloat(parameter(63))
     2874                     else
     2875                        res@trXMinF = min((/miniwsptsBC,miniwptBC/))
     2876                     end if
     2877                  else
     2878                     res@trXMinF = xs
     2879                  end if
     2880                  if (.not. isvar("xe")) then
     2881                     if (parameter(65) .NE. "xdim") then
     2882                        res@trXMaxF = stringtofloat(parameter(65))
     2883                     else
     2884                        res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/))
     2885                     end if
     2886                  else
     2887                     res@trXMaxF = xe 
     2888                  end if
    21322889
    21332890                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    21612918                  res@gsnLeftString      = "wpvptp, wsvpts and wv"
    21622919                  res@gsnRightString     = unit(varn)
    2163                   res@trXMinF            = min((/miniwpvptp,miniwsvpts,miniwvpt/))
    2164                   res@trXMaxF            = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/))
     2920                  if (.not. isvar("xs")) then
     2921                     if (parameter(63) .NE. "x0") then
     2922                        res@trXMinF = stringtofloat(parameter(63))
     2923                     else
     2924                        res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/))
     2925                     end if
     2926                  else
     2927                     res@trXMinF = xs
     2928                  end if
     2929                  if (.not. isvar("xe")) then
     2930                     if (parameter(65) .NE. "xdim") then
     2931                        res@trXMaxF = stringtofloat(parameter(65))
     2932                     else
     2933                        res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/))
     2934                     end if
     2935                  else
     2936                     res@trXMaxF = xe 
     2937                  end if
    21652938
    21662939                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    21942967                  res@gsnLeftString      = "wpqp, wsqs and wq"
    21952968                  res@gsnRightString     = unit(varn)
    2196                   res@trXMinF            = min((/miniwpqp,miniwsqs,miniwq/))
    2197                   res@trXMaxF            = max((/maxiwpqp,maxiwsqs,maxiwq/))
     2969                  if (.not. isvar("xs")) then
     2970                     if (parameter(63) .NE. "x0") then
     2971                        res@trXMinF = stringtofloat(parameter(63))
     2972                     else
     2973                        res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/))
     2974                     end if
     2975                  else
     2976                     res@trXMinF = xs
     2977                  end if
     2978                  if (.not. isvar("xe")) then
     2979                     if (parameter(65) .NE. "xdim") then
     2980                        res@trXMaxF = stringtofloat(parameter(65))
     2981                     else
     2982                        res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/))
     2983                     end if
     2984                  else
     2985                     res@trXMaxF = xe 
     2986                  end if
    21982987
    21992988                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    22273016                  res@gsnLeftString      = "wpqvp, wsqvs and wqv"
    22283017                  res@gsnRightString     = unit(varn)
    2229                   res@trXMinF            = min((/miniwpqp,miniwsqvs,miniwqv/))
    2230                   res@trXMaxF            = max((/maxiwpqp,maxiwsqvs,maxiwqv/))
     3018                  if (.not. isvar("xs")) then
     3019                     if (parameter(63) .NE. "x0") then
     3020                        res@trXMinF = stringtofloat(parameter(63))
     3021                     else
     3022                        res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/))
     3023                     end if
     3024                  else
     3025                     res@trXMinF = xs
     3026                  end if
     3027                  if (.not. isvar("xe")) then
     3028                     if (parameter(65) .NE. "xdim") then
     3029                        res@trXMaxF = stringtofloat(parameter(65))
     3030                     else
     3031                        res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/))
     3032                     end if
     3033                  else
     3034                     res@trXMaxF = xe 
     3035                  end if
    22313036
    22323037                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    22603065                  res@gsnLeftString      = "wpsp, wsss and ws"
    22613066                  res@gsnRightString     = unit(varn)
    2262                   res@trXMinF            = min((/miniwpsp,miniwsss,miniws/))
    2263                   res@trXMaxF            = max((/maxiwpsp,maxiwsss,maxiws/))
     3067                  if (.not. isvar("xs")) then
     3068                     if (parameter(63) .NE. "x0") then
     3069                        res@trXMinF = stringtofloat(parameter(63))
     3070                     else
     3071                        res@trXMinF = min((/miniwpsp,miniwsss,miniws/))
     3072                     end if
     3073                  else
     3074                     res@trXMinF = xs
     3075                  end if
     3076                  if (.not. isvar("xe")) then
     3077                     if (parameter(65) .NE. "xdim") then
     3078                        res@trXMaxF = stringtofloat(parameter(65))
     3079                     else
     3080                        res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/))
     3081                     end if
     3082                  else
     3083                     res@trXMaxF = xe 
     3084                  end if
    22643085
    22653086                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    22933114                  res@gsnLeftString      = "wpsap, wssas and wsa"
    22943115                  res@gsnRightString     = unit(varn)
    2295                   res@trXMinF            = min((/miniwpsap,miniwssas,miniwsa/))
    2296                   res@trXMaxF            = max((/maxiwpsap,maxiwssas,maxiwsa/))
     3116                  if (.not. isvar("xs")) then
     3117                     if (parameter(63) .NE. "x0") then
     3118                        res@trXMinF = stringtofloat(parameter(63))
     3119                     else
     3120                        res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/))
     3121                     end if
     3122                  else
     3123                     res@trXMinF = xs
     3124                  end if
     3125                  if (.not. isvar("xe")) then
     3126                     if (parameter(65) .NE. "xdim") then
     3127                        res@trXMaxF = stringtofloat(parameter(65))
     3128                     else
     3129                        res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/))
     3130                     end if
     3131                  else
     3132                     res@trXMaxF = xe 
     3133                  end if
    22973134
    22983135                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    23223159               end if
    23233160            end if
    2324             if (vNam(varn) .EQ. "wses") then
    2325                plot(n) = plot_wses
    2326             end if
     3161         
    23273162            if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "ws2") then
    23283163               if (us2 .EQ. 0) then
    23293164                  res@gsnLeftString      = "us2, vs2 and ws2"
    23303165                  res@gsnRightString     = unit(varn)
    2331                   res@trXMinF            = min((/minius2,minivs2,miniws2/))
    2332                   res@trXMaxF            = max((/maxius2,maxivs2,maxiws2/))
     3166                  if (.not. isvar("xs")) then
     3167                     if (parameter(63) .NE. "x0") then
     3168                        res@trXMinF = stringtofloat(parameter(63))
     3169                     else
     3170                        res@trXMinF = min((/minius2,minivs2,miniws2/))
     3171                     end if
     3172                  else
     3173                     res@trXMinF = xs
     3174                  end if
     3175                  if (.not. isvar("xe")) then
     3176                     if (parameter(65) .NE. "xdim") then
     3177                        res@trXMaxF = stringtofloat(parameter(65))
     3178                     else
     3179                        res@trXMaxF = max((/maxius2,maxivs2,maxiws2/))
     3180                     end if
     3181                  else
     3182                     res@trXMaxF = xe 
     3183                  end if
    23333184
    23343185                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    23583209               end if
    23593210            end if
    2360             if (vNam(varn) .EQ. "pts2") then
    2361                plot(n) = plot_pts2
    2362             end if
    2363             if (vNam(varn) .EQ. "ws3") then
    2364                plot(n) = plot_ws3
    2365             end if
    2366             if (vNam(varn) .EQ. "Sw") then
    2367                plot(n) = plot_Sw
    2368             end if
    2369             if (vNam(varn) .EQ. "ws2pts") then
    2370                plot(n) = plot_ws2pts
    2371             end if
    2372             if (vNam(varn) .EQ. "wspts2") then
    2373                plot(n) = plot_wspts2
    2374             end if
     3211           
    23753212            if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "wpeodz" ) then
    23763213               if (wsususodz .EQ. 0) then
    23773214                  res@gsnLeftString      = "wsususodz, wspsodz and ws2"
    23783215                  res@gsnRightString     = unit(varn)
    2379                   res@trXMinF            = min((/miniwsususodz,miniwspsodz,miniwpeodz/))
    2380                   res@trXMaxF            = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/))
     3216                  if (.not. isvar("xs")) then
     3217                     if (parameter(63) .NE. "x0") then
     3218                        res@trXMinF = stringtofloat(parameter(63))
     3219                     else
     3220                        res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/))
     3221                     end if
     3222                  else
     3223                     res@trXMinF = xs
     3224                  end if
     3225                  if (.not. isvar("xe")) then
     3226                     if (parameter(65) .NE. "xdim") then
     3227                        res@trXMaxF = stringtofloat(parameter(65))
     3228                     else
     3229                        res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/))
     3230                     end if
     3231                  else
     3232                     res@trXMaxF = xe 
     3233                  end if
    23813234
    23823235                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z_w,res)
     
    24493302                     res@gsnLeftString  = c_var
    24503303                     res@gsnRightString = unit(varn)
    2451                      res@trXMinF        = min(mini)
    2452                      res@trXMaxF        = max(maxi)
     3304                     if (.not. isvar("xs")) then
     3305                        if (parameter(63) .NE. "x0") then
     3306                           res@trXMinF = stringtofloat(parameter(63))
     3307                        else
     3308                           res@trXMinF = min(mini)
     3309                        end if
     3310                     else
     3311                        res@trXMinF = xs
     3312                     end if
     3313                     if (.not. isvar("xe")) then
     3314                        if (parameter(65) .NE. "xdim") then
     3315                           res@trXMaxF = stringtofloat(parameter(65))
     3316                        else
     3317                           res@trXMaxF = max(maxi)
     3318                        end if
     3319                     else
     3320                        res@trXMaxF = xe 
     3321                     end if
    24533322                  end if
    24543323               end if
     
    24963365   ; merge plots onto one page
    24973366   ; ***************************************************
    2498  print(n)
     3367
    24993368   do m=0,n-1
    25003369      plot_(m)=plot(n-1-m)
Note: See TracChangeset for help on using the changeset viewer.