Ignore:
Timestamp:
Sep 30, 2010 1:37:58 PM (14 years ago)
Author:
heinze
Message:

Formatting of all NCL scripts.
Items of .ncl.config are re-sorted and xyc, xzc and yzc are no parameters any more.
Parameters start_f_1/end_f_1 are renamed to start_f/end_f in profiles.ncl.
Bugfix in cross_sections: enable vector plot if var is set explicitly.
Deletion of NCL user guide because guide is no available online.

File:
1 edited

Legend:

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

    r534 r566  
    2424      print("Neither the personal configuration file '.ncl.config' exists in")
    2525      print("~/palm/current_version")
    26       print("nor the default configuration file '.ncl.config.default' exists in")
     26      print("nor the default configuration file '.ncl.config.default' "+\
     27            "exists in")
    2728      print(palm_bin_path + "/NCL")
    2829      print(" ")
     
    6061   file_in   = new(no_files,string)
    6162   file_in_1 = new(no_files,logical)
    62    start_f  = new(no_files,integer)
    63    end_f     = new(no_files,integer)
     63   start_f_t = new(no_files,integer)
     64   end_f_t   = new(no_files,integer)
    6465   
    6566   if (file_1 .EQ. "File in") then
     
    7374   file_in_1(0) = False
    7475   if (isStrSubset(file_in(0), ".nc"))then
    75       start_f_1 = -2
    76       end_f_1 = -2
     76      start_f = -2
     77      end_f = -2
    7778      file_in_1(0) = True     
    7879   end if 
    79    if (start_f_1 .EQ. -1)then
    80       print(" ")
    81       print("'start_f_1' must be one of the cyclic numbers (at least 0) of your input file(s)")
     80   if (start_f .EQ. -1)then
     81      print(" ")
     82      print("'start_f' must be one of the cyclic numbers (at least 0) "+\
     83            "of your input file(s)")
    8284      print(" ") 
    8385      exit
    8486   end if
    85    if (end_f_1 .EQ. -1)then
    86       print(" ")
    87       print("'end_f_1' must be one of the cyclic numbers (at least 0) of your input file(s)")
     87   if (end_f .EQ. -1)then
     88      print(" ")
     89      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
     90            "your input file(s)")
    8891      print(" ") 
    8992      exit
    9093   end if           
    91    start_f(0) = start_f_1
    92    end_f(0) = end_f_1    
     94   start_f_t(0) = start_f
     95   end_f_t(0) = end_f   
    9396 
    9497   if (no_files .GT. 1) then
     
    109112      if (start_f_2 .EQ. -1)then
    110113         print(" ")
    111          print("'start_f_2' must be one of the cyclic numbers (at least 0) of your input file(s)")
     114         print("'start_f_2' must be one of the cyclic numbers (at least 0) "+\
     115              "of your input file(s)")
    112116         print(" ") 
    113117         exit
     
    115119      if (end_f_2 .EQ. -1)then
    116120         print(" ")
    117          print("'end_f_2' must be one of the cyclic numbers (at least 0) of your input file(s)")
     121         print("'end_f_2' must be one of the cyclic numbers (at least 0) "+\
     122               "of your input file(s)")
    118123         print(" ") 
    119124         exit
     
    140145      if (start_f_3 .EQ. -1)then
    141146         print(" ")
    142          print("'start_f_3' must be one of the cyclic numbers (at least 0) of your input file(s)")
     147         print("'start_f_3' must be one of the cyclic numbers (at least 0) "+\
     148               "of your input file(s)")
    143149         print(" ") 
    144150         exit
     
    146152      if (end_f_3 .EQ. -1)then
    147153         print(" ")
    148          print("'end_f_3' must be one of the cyclic numbers (at least 0) of your input file(s)")
     154         print("'end_f_3' must be one of the cyclic numbers (at least 0) "+\
     155               "of your input file(s)")
    149156         print(" ") 
    150157         exit
     
    171178      if (start_f_4 .EQ. -1)then
    172179         print(" ")
    173          print("'start_f_4' must be one of the cyclic numbers (at least 0) of your input file(s)")
     180         print("'start_f_4' must be one of the cyclic numbers (at least 0) "+\
     181               "of your input file(s)")
    174182         print(" ") 
    175183         exit
     
    177185      if (end_f_4 .EQ. -1)then
    178186         print(" ")
    179          print("'end_f_4' must be one of the cyclic numbers (at least 0) of your input file(s)")
     187         print("'end_f_4' must be one of the cyclic numbers (at least 0) "+\
     188               "of your input file(s)")
    180189         print(" ") 
    181190         exit
     
    202211      if (start_f_5 .EQ. -1)then
    203212         print(" ")
    204          print("'start_f_5' must be one of the cyclic numbers (at least 0) of your input file(s)")
     213         print("'start_f_5' must be one of the cyclic numbers (at least 0) "+\
     214               "of your input file(s)")
    205215         print(" ") 
    206216         exit
     
    208218      if (end_f_5 .EQ. -1)then
    209219         print(" ")
    210          print("'end_f_5' must be one of the cyclic numbers (at least 0) of your input file(s)")
     220         print("'end_f_5' must be one of the cyclic numbers (at least 0) "+\
     221               "of your input file(s)")
    211222         print(" ") 
    212223         exit
     
    233244      if (start_f_6 .EQ. -1)then
    234245         print(" ")
    235          print("'start_f_6' must be one of the cyclic numbers (at least 0) of your input file(s)")
     246         print("'start_f_6' must be one of the cyclic numbers (at least 0) "+\
     247               "of your input file(s)")
    236248         print(" ") 
    237249         exit
     
    239251      if (end_f_6 .EQ. -1)then
    240252         print(" ")
    241          print("'end_f_6' must be one of the cyclic numbers (at least 0) of your input file(s)")
     253         print("'end_f_6' must be one of the cyclic numbers (at least 0) "+\
     254               "of your input file(s)")
    242255         print(" ") 
    243256         exit
     
    248261
    249262   
    250    if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. format_out .NE. "png")then
     263   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.  \
     264      format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
     265      format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
     266      format_out .NE. "png")then
    251267      print(" ")
    252268      print("'format_out = "+format_out+"' is invalid and set to'x11'")
     
    273289      over = 0
    274290      print(" ")
    275       print("If you have more than one input file - you cannot overlay variables: over is set to 0")
     291      print("If you have more than one input file - you cannot overlay "+\
     292            "variables: over is set to 0")
    276293      print(" ")
    277294   end if
     
    286303      combine = 0
    287304      print(" ")
    288       print("If you have more than one input file you cannot combine variables: combine is set to 0")
     305      print("If you have more than one input file you cannot combine "+\
     306            "variables: combine is set to 0")
    289307      print(" ")
    290308   end if   
     
    336354   do nof=0,no_files-1
    337355
    338    files=new(end_f(nof)-start_f(nof)+1,string)
     356   files=new(end_f_t(nof)-start_f_t(nof)+1,string)
    339357   if (file_in_1(nof))then
    340358      if (isfilepresent(file_in(nof)))then
     
    347365      end if
    348366   else
    349       if (start_f(nof) .EQ. 0)then
     367      if (start_f_t(nof) .EQ. 0)then
    350368         if (isfilepresent(file_in(nof)+".nc"))then
    351369            files(0)=file_in(nof)+".nc"
    352             do i=1,end_f(nof)
     370            do i=1,end_f_t(nof)
    353371               if (isfilepresent(file_in(nof)+"."+i+".nc"))then   
    354372                  files(i)=file_in(nof)+"."+i+".nc"
    355373               else
    356374                  print(" ")
    357                   print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist")
     375                  print("Input file: '"+file_in(nof)+"."+i+".nc' does not "+\
     376                        "exist")
    358377                  print(" ")
    359378                  exit 
     
    367386         end if
    368387      else
    369          do i=start_f(nof),end_f(nof)
     388         do i=start_f_t(nof),end_f_t(nof)
    370389            if (isfilepresent(file_in(nof)+"."+i+".nc"))then   
    371                files(i-start_f(nof))=file_in(nof)+"."+i+".nc"
     390               files(i-start_f_t(nof))=file_in(nof)+"."+i+".nc"
    372391            else
    373392               print(" ")
     
    392411      if (dim0 .NE. dim)then
    393412         print(" ")
    394          print("There are 'no_files'="+no_files+" input files but they do not contain the same variables")
     413         print("There are 'no_files'="+no_files+" input files but they do "+\
     414               "not contain the same variables")
    395415         print(" ")
    396416         exit
     
    399419            if (vNam0(i) .NE. vNam(i))then
    400420               print(" ")
    401                print("There are 'no_files'="+no_files+" input files but they do not contain the same variables")
     421               print("There are 'no_files'="+no_files+" input files but "+\
     422                     "they do not contain the same variables")
    402423               print(" ")
    403424               exit
     
    423444   prof3d = 0
    424445   do varn = dim-1,0,1
    425       if ( isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then
     446      if ( isStrSubset( vNam(varn), "zu_3d") .OR. \
     447           isStrSubset( vNam(varn), "zw_3d")) then
    426448         prof3d = 1
    427449         break
     
    475497
    476498      do j=0,comma-2
    477          vNam_temp(j) = charactertostring(var_char(indices(j)+1:indices(j+1)-1))
     499         vNam_temp(j) = charactertostring(\
     500                                   var_char(indices(j)+1:indices(j+1)-1))
    478501      end do
    479502
     
    548571    end if
    549572
    550    ;-----------------------------------------------------below steps only for first file -> nof=0
     573   ;---------below steps only for first file -> nof=0
    551574   if (nof .EQ. 0) then
    552575
     
    564587 
    565588   do varn=0,dim-1
    566       if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
     589      if ( isStrSubset( vNam(varn), "time") .OR. \
     590           isStrSubset( vNam(varn), "NORM")) then
    567591         continue
    568592      end if
     
    616640                                          break
    617641                                       else
    618                                           if(vNam(varn) .EQ. "es" .OR. isStrSubset(vNam(varn), "es_")\
    619                                              .OR. vNam(varn) .EQ. "e*" .OR. isStrSubset(vNam(varn), "e*_"))then
     642                                          if(vNam(varn) .EQ. "es" .OR. \
     643                                           isStrSubset(vNam(varn), "es_") .OR. vNam(varn) .EQ. "e*" .OR. isStrSubset(vNam(varn), "e*_"))then
    620644                                             z_u = f_att->$vNam(varn+1)$
    621645                                             break
     
    881905      co=0
    882906      do varn=0,dim-1     
    883          if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
     907         if ( isStrSubset( vNam(varn), "time") .OR. \
     908              isStrSubset( vNam(varn), "NORM")) then
    884909            check = False
    885910         else
     
    9831008      if (start_time_step .GT. t_all(nt-1)/3600)then
    9841009         print(" ")
    985          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")
     1010         print("'start_time_step' = "+ start_time_step +"h is greater "+\
     1011               "than last time step = " \
     1012               + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
    9861013         print(" ")
    9871014         print("Select another 'start_time_step'")
     
    9911018      if (start_time_step .LT. t_all(0)/3600)then
    9921019         print(" ")
    993          print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
     1020         print("'start_time_step' = "+ start_time_step +"h is lower "+\
     1021               "than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
    9941022         print(" ")
    9951023         exit
     
    9981026
    9991027   do i=0,nt-1   
    1000       if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
     1028      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\
     1029          start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
    10011030         st=i
    10021031         break
     
    10211050      if (end_time_step .GT. t_all(nt-1)/3600)then
    10221051         print(" ")
    1023          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")
     1052         print("'end_time_step' = "+ end_time_step +"h is greater "+\
     1053               "than last time step = " +\
     1054                t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
    10241055         print(" ")
    10251056         print("Select another 'end_time_step'") 
     
    10291060      if (end_time_step .LT. start_time_step/3600)then
    10301061         print(" ")
    1031          print("'end_time_step' = "+ end_time_step +"h is lower than 'start_time_step' = "+start_time_step+"h")
     1062         print("'end_time_step' = "+ end_time_step +"h is lower "+\
     1063               "than 'start_time_step' = "+start_time_step+"h")
    10321064         print(" ")
    10331065         print("Select another 'start_time_step' or 'end_time_step'")
     
    10381070
    10391071   do i=0,nt-1     
    1040       if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
     1072      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\
     1073          end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
    10411074         et=i
    10421075         break
     
    10721105   if (time_stride .GE. no_time) then
    10731106      print(" ")
    1074       print("'time_stride' is greater equal than number of available time steps,")
     1107      print("'time_stride' is greater equal than number of available "+\
     1108           "time steps,")
    10751109      print("=> 'time_stride' is set to 1")
    10761110      time_stride = 1
    10771111   end if
    10781112
    1079    ti_in = ispan(start_time_step,end_time_step,time_stride) ;ti_in contents the time indices to plot
     1113   ti_in = ispan(start_time_step,end_time_step,time_stride) ;ti_in contents
     1114                                                            ;the time indices
     1115                                                            ;to plot
    10801116   np    = dimsizes(ti_in) 
    10811117
    10821118   print(" ")
    1083    print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step)
    1084    print("                     till "+t_all(ti_in(np-1))/3600+" h = "+t_all(ti_in(np-1))+" s => index = "+end_time_step)
     1119   print("Output of time steps from "+t_all(start_time_step)/3600+\
     1120         " h = "+t_all(start_time_step)+" s => index = "+start_time_step)
     1121   print("                     till "+t_all(ti_in(np-1))/3600+" h = "\
     1122        +t_all(ti_in(np-1))+" s => index = "+end_time_step)
    10851123   print("                     with temporal stride = "+time_stride)
    10861124   print(" ")
     
    10911129   ; ****************************************************
    10921130   
    1093    legend_label=new(np,double)
     1131   legend_label=new(np,string)
    10941132   do p=0, np-1
    1095       legend_label(p)=decimalPlaces(t_all(ti_in(p))/3600,3,True)         
     1133      legend_label(p)=sprintf("%6.2f", t_all(ti_in(p))/3600)
    10961134   end do
    1097    
    10981135
    10991136   ; ***************************************************
     
    11501187         res@xyMonoDashPattern       = True 
    11511188         print(" ")
    1152          print("If you use more than one file, patterns for different timesteps cannot be used")
     1189         print("If you use more than one file, patterns for different "+\
     1190               "timesteps cannot be used")
    11531191         print(" ")
    11541192      end if       
     
    12021240            if (min_z .GE. max(z_w) ) then
    12031241               print(" ")
    1204                print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_w)+")")
     1242               print("Minimum of height ('min_z'="+min_z+") is greater "+\
     1243                     "than available heights (="+max(z_w)+")")
    12051244               print(" ")
    12061245               exit
     
    12091248            if (min_z .GE. max(z_u) ) then
    12101249               print(" ")
    1211                print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_u)+")")
     1250               print("Minimum of height ('min_z'="+min_z+") is greater "+\
     1251                     "than available heights (="+max(z_u)+")")
    12121252               print(" ")
    12131253               exit
     
    12171257            if (min_z .LT. z_u(1) ) then
    12181258               print(" ")
    1219                print("Begin height 'min_z' at least at level k=1 (="+z_u(1)+"m) due to the logarithmic scale of the y-axis")
     1259               print("Begin height 'min_z' at least at level k=1 (="+\
     1260                     z_u(1)+"m) due to the logarithmic scale of the y-axis")
    12201261               print(" ")
    12211262               exit
     
    12241265            if (min_z .LT. z_w(1) ) then
    12251266               print(" ")
    1226                print("Begin height 'min_z' at least at level k=1 (="+z_w(1)+"m) due to the logarithmic scale of the y-axis")
     1267               print("Begin height 'min_z' at least at level k=1 (="+\
     1268                     z_w(1)+"m) due to the logarithmic scale of the y-axis")
    12271269               print(" ")
    12281270               exit
     
    12441286         if (min_z .GE. max(z_w) ) then
    12451287            print(" ")
    1246             print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_w)+")")
     1288            print("Minimum of height ('min_z'="+min_z+") is greater than "+\
     1289                  "available heights (="+max(z_w)+")")
    12471290            print(" ")
    12481291            exit
     
    12541297         if (min_z .GE. max(z_u) ) then
    12551298            print(" ")
    1256             print("Minimum of height ('min_z'="+min_z+") is greater than available heights (="+max(z_u)+")")
     1299            print("Minimum of height ('min_z'="+min_z+") is greater than "+\
     1300                  "available heights (="+max(z_u)+")")
    12571301            print(" ")
    12581302            exit
     
    12741318      if (max_z .GT. max(z_w) ) then
    12751319         print(" ")
    1276          print("Maximum of height ('max_z'="+max_z+") is greater than available heights (="+max(z_w)+")")
     1320         print("Maximum of height ('max_z'="+max_z+") is greater than "+\
     1321               "available heights (="+max(z_w)+")")
    12771322         print(" ")
    12781323         exit
     
    13591404
    13601405   end if
    1361    ;------------------------------------------------------ above steps only for first file
     1406   ;-------above steps only for first file
    13621407
    13631408   ; ***************************************************
     
    15351580   if (start_x .GT. dimx-1)then
    15361581      print(" ")
    1537       print("'start_x' is greater than available x-range and set to maximum of x-range (excluding ghostpoint)")
     1582      print("'start_x' is greater than available x-range and set to "+\
     1583            "maximum of x-range (excluding ghostpoint)")
    15381584      print(" ")
    15391585      start_x=dimx-2
     
    15461592   if (end_x .GT. dimx-1)then
    15471593      print(" ")
    1548       print("'end_x' = "+end_x+" is greater than available x-range and set to maximum of x-range (excluding ghostpoint)")
     1594      print("'end_x' = "+end_x+" is greater than available x-range and set "+\
     1595            "to maximum of x-range (excluding ghostpoint)")
    15491596      print(" ")
    15501597      end_x=dimx-2
     
    15521599   if (end_x .LT. start_x)then
    15531600      print(" ")
    1554       print("'end_x' = "+end_x+" is lower than 'start_x' = "+start_x+" and set to maximum of x-range (excluding ghostpoint)")
     1601      print("'end_x' = "+end_x+" is lower than 'start_x' = "+start_x+\
     1602            " and set to maximum of x-range (excluding ghostpoint)")
    15551603      print(" ")
    15561604      end_x=dimx-2
     
    15641612   if (start_y .GT. dimy-1)then
    15651613      print(" ")
    1566       print("'start_y' is greater than available y-range and set to maximum of y-range (excluding ghostpoint)")
     1614      print("'start_y' is greater than available y-range and set to "+\
     1615            "maximum of y-range (excluding ghostpoint)")
    15671616      print(" ")
    15681617      start_x=dimy-2
     
    15751624   if (end_y .GT. dimy-1)then
    15761625      print(" ")
    1577       print("'end_y' = "+end_y+" is greater than available y-range and set to maximum of y-range (excluding ghostpoint)")
     1626      print("'end_y' = "+end_y+" is greater than available y-range and "+\
     1627            "set to maximum of y-range (excluding ghostpoint)")
    15781628      print(" ")
    15791629      end_x=dimy-2
     
    15811631   if (end_y .LT. start_y)then
    15821632      print(" ")
    1583       print("'end_y' = "+end_y+" is lower than 'start_y' = "+start_y+" and set to maximum of y-range (excluding ghostpoint)")
     1633      print("'end_y' = "+end_y+" is lower than 'start_y' = "+start_y+\
     1634            " and set to maximum of y-range (excluding ghostpoint)")
    15841635      print(" ")
    15851636      end_y=dimy-2
     
    16031654     
    16041655      if (prof3d .EQ. 0) then
    1605          if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
     1656         if ( isStrSubset( vNam(varn), "time") .OR. \
     1657              isStrSubset( vNam(varn), "NORM")) then
    16061658            check = False
    16071659         end if
    16081660      else
    1609          if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then
     1661         if ( isStrSubset( vNam(varn), "time") .OR.  \
     1662              isStrSubset( vNam(varn), "zusi") .OR.  \
     1663              isStrSubset( vNam(varn), "zwwi") .OR.  \
     1664              isStrSubset( vNam(varn), "x") .OR.     \
     1665              isStrSubset( vNam(varn), "xu") .OR.    \
     1666              isStrSubset( vNam(varn), "y") .OR.     \
     1667              isStrSubset( vNam(varn), "yv") .OR.    \
     1668              isStrSubset( vNam(varn), "zu_3d") .OR. \
     1669              isStrSubset( vNam(varn), "zw_3d")) then
    16101670            check = False
    16111671         end if
     
    16371697                        temp = f[:]->$vNam(varn)$
    16381698                        temp_att = f_att->$vNam(varn)$
    1639                         data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x)
    1640                         data(varn,j,i-1) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
     1699                        data_temp = temp(ti_in(j),i,\
     1700                                         start_y:end_y,start_x:end_x)
     1701                        data(varn,j,i-1) = dim_avg_Wrap(\
     1702                                                   dim_avg_Wrap(data_temp))
    16411703                     end do
    16421704                  end do
     
    16461708                        temp = f[:]->$vNam(varn)$
    16471709                        temp_att = f_att->$vNam(varn)$
    1648                         data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x)
     1710                        data_temp = temp(ti_in(j),i,\
     1711                                            start_y:end_y,start_x:end_x)
    16491712                        data(varn,j,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
    16501713                     end do
     
    16581721            if (n_o .GT. number_comb-1) then
    16591722               print(" ")
    1660                print("Set 'number_comb' to the number of overlaying variables ('c_var' = "+c_var+")")
     1723               print("Set 'number_comb' to the number of overlaying "+\
     1724                     "variables ('c_var' = "+c_var+")")
    16611725               print(" ")
    16621726               exit
     
    16661730               max_value = abs(0.01*max(data(varn,:,:)))
    16671731            else
    1668                if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. abs(max(data(varn,:,:))) .GT. 0.01)then
     1732               if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. \
     1733                   abs(max(data(varn,:,:))) .GT. 0.01)then
    16691734                  min_value = abs(0.1*max(data(varn,:,:)))
    16701735                  max_value = abs(0.1*max(data(varn,:,:)))
    16711736               else
    1672                   if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. abs(min(data(varn,:,:))) .GT. 0.01)then
     1737                  if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. \
     1738                      abs(min(data(varn,:,:))) .GT. 0.01)then
    16731739                     min_value = abs(0.1*min(data(varn,:,:)))
    16741740                     max_value = abs(0.1*min(data(varn,:,:)))
     
    16791745               end if
    16801746            end if
    1681             if (min(data(varn,:,:)) .EQ. 0 .AND. max(data(varn,:,:)) .EQ. 0)then
     1747            if (min(data(varn,:,:)) .EQ. 0 .AND. \
     1748                max(data(varn,:,:)) .EQ. 0)then
    16821749               min_value = 0.1
    16831750               max_value = 0.1
     
    17821849         if(max_z_int .eq. min_z_int)
    17831850             print(" ")
    1784              print("Please increase 'max_z' or decrease 'min_z' so that there are")
     1851             print("Please increase 'max_z' or decrease 'min_z' so that "+\
     1852                   "there are")
    17851853             print("at least two layers for the z-axis to plot")
    17861854             print(" ")
     
    18431911            res@trYMaxF            = max_z
    18441912            if (xs .EQ. -1) then
    1845                res@trXMinF            = min(data(varn,:,min_z_int:max_z_int))-min_value
     1913               res@trXMinF            = min(data(varn,:,min_z_int:max_z_int))-\
     1914                                                                      min_value
    18461915            else
    18471916               res@trXMinF            = xs     
    18481917            end if
    18491918            if (xe .EQ. -1) then
    1850                res@trXMaxF            = max(data(varn,:,min_z_int:max_z_int))+max_value
     1919               res@trXMaxF            = max(data(varn,:,min_z_int:max_z_int))+\
     1920                                                                      max_value
    18511921            else
    18521922               res@trXMaxF            = xe 
     
    23012371            end if
    23022372
    2303             if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq) then
     2373            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) \
     2374               .EQ. "w"+dq+"pt"+dq) then
    23042375               miniwpptp=min(data(varn,:,min_z_int:max_z_int))-min_value
    23052376               maxiwpptp=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    24182489            end if
    24192490
    2420             if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "w"+dq+"vpt"+dq) then
     2491            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) \
     2492                .EQ. "w"+dq+"vpt"+dq) then
    24212493               miniwpvptp=min(data(varn,:,min_z_int:max_z_int))-min_value
    24222494               maxiwpvptp=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    25582630            end if
    25592631
    2560             if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq) then
     2632            if (vNam(varn) .EQ. "wpqvp" .OR. \
     2633               vNam(varn) .EQ. "w"+dq+"qv"+dq) then
    25612634               miniwpqvp=min(data(varn,:,min_z_int:max_z_int))-min_value
    25622635               maxiwpqvp=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    26982771            end if
    26992772
    2700             if (vNam(varn) .EQ. "wpsap" .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq) then
     2773            if (vNam(varn) .EQ. "wpsap" .OR. \
     2774                vNam(varn) .EQ. "w"+dq+"sa"+dq) then
    27012775               miniwpsap=min(data(varn,:,min_z_int:max_z_int))-min_value
    27022776               maxiwpsap=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    28382912            end if
    28392913
    2840             if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "w*u*u*:dz") then
     2914            if (vNam(varn) .EQ. "wsususodz" .OR. \
     2915                vNam(varn) .EQ. "w*u*u*:dz") then
    28412916               miniwsususodz=min(data(varn,:,min_z_int:max_z_int))-min_value
    28422917               maxiwsususodz=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    28842959               end if
    28852960            end if
    2886             if (vNam(varn) .EQ. "wpeodz" .OR. vNam(varn) .EQ. "w"+dq+"p:dz") then
     2961            if (vNam(varn) .EQ. "wpeodz" .OR. \
     2962                vNam(varn) .EQ. "w"+dq+"p:dz") then
    28872963               miniwpeodz=min(data(varn,:,min_z_int:max_z_int))-min_value
    28882964               maxiwpeodz=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    29353011   if (isStrSubset(data@long_name," SR " ) .and. over_remind) then
    29363012      print(" ")
    2937       print("If you have outputs of statistic regions you cannot overlay variables;")
     3013      print("If you have outputs of statistic regions you cannot overlay "+\
     3014            "variables;")
    29383015      print("'over' is set to 0" )
    29393016      print(" ")
     
    29923069         lgres@vpHeightF          = 0.03*no_files         
    29933070         lgres@lgDashIndexes      = multi_dash(no_files-1:0)
    2994          lbid = gsn_create_legend(wks,no_files,multi_legend(no_files-1:0),lgres)       
     3071         lbid = gsn_create_legend(\
     3072                            wks,no_files,multi_legend(no_files-1:0),lgres)
    29953073
    29963074         amres = True
     
    30733151     
    30743152         if (prof3d .EQ. 0) then
    3075             if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
     3153            if ( isStrSubset( vNam(varn), "time") .OR. \
     3154                 isStrSubset( vNam(varn), "NORM")) then
    30763155               check = False
    30773156            end if
    30783157         else
    3079             if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then
     3158            if ( isStrSubset( vNam(varn), "time") .OR.  \
     3159                 isStrSubset( vNam(varn), "zusi") .OR.  \
     3160                 isStrSubset( vNam(varn), "zwwi") .OR.  \
     3161                 isStrSubset( vNam(varn), "x") .OR.     \
     3162                 isStrSubset( vNam(varn), "xu") .OR.    \
     3163                 isStrSubset( vNam(varn), "y") .OR.     \
     3164                 isStrSubset( vNam(varn), "yv") .OR.    \
     3165                 isStrSubset( vNam(varn), "zu_3d") .OR. \
     3166                 isStrSubset( vNam(varn), "zw_3d")) then
    30803167               check = False
    30813168            end if
     
    31623249            plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
    31633250           
    3164             if (vNam(varn) .EQ. "u" .OR. vNam(varn) .EQ. "v" .OR. vNam(varn) .EQ. "w") then
     3251            if (vNam(varn) .EQ. "u" .OR. vNam(varn) .EQ. "v" .OR. \
     3252                vNam(varn) .EQ. "w") then
    31653253               if (u .EQ. 0) then
    31663254                  res@gsnLeftString      = "u, v and w"
     
    31863274
    31873275                  ; ***************************************************
    3188                   ; legend for combined plot
     3276                  ; legend for overlaid plot
    31893277                  ; ***************************************************
    31903278     
     
    31933281                  lgres@lgLabelFont        = "helvetica"   
    31943282                  lgres@lgLabelFontHeightF = font_size_legend           
    3195                   lgres@vpWidthF           = 0.06           
     3283                  lgres@vpWidthF           = 0.07           
    31963284                  lgres@vpHeightF          = 0.12         
    31973285                  lgres@lgDashIndexes      = (/0,1,2/)
     
    31993287
    32003288                  amres = True
    3201                   amres@amParallelPosF   = 0.65             
    3202                   amres@amOrthogonalPosF = -0.2           
    3203                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3289                  amres@amParallelPosF   = 0.88             
     3290                  amres@amOrthogonalPosF = 0.33           
     3291                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    32043292                  overlay(plot(n),plot_u)
    32053293                  u=1
     
    32123300            end if 
    32133301     
    3214             if (vNam(varn) .EQ. "pt" .OR. vNam(varn) .EQ. "vpt" .OR. vNam(varn) .EQ. "lpt") then
     3302            if (vNam(varn) .EQ. "pt" .OR. vNam(varn) .EQ. "vpt" .OR. \
     3303                vNam(varn) .EQ. "lpt") then
    32153304               if (pt .EQ. 0) then
    32163305                  res@gsnLeftString      = "pt, vpt and lpt"
     
    32363325
    32373326                  ; ***************************************************
    3238                   ; legend for combined plot
     3327                  ; legend for overlaid plot
    32393328                  ; ***************************************************
    32403329     
     
    32463335                  lgres@vpHeightF          = 0.12         
    32473336                  lgres@lgDashIndexes      = (/0,1,2/)
    3248                   lbid = gsn_create_legend(wks,3,(/"pt","vpt","lpt"/),lgres)       
    3249 
     3337                  lbid = gsn_create_legend(wks,3,(/"pt","vpt","lpt"/),lgres)
    32503338                  amres = True
    3251                   amres@amParallelPosF   = 0.65            
    3252                   amres@amOrthogonalPosF = -0.2           
    3253                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3339                  amres@amParallelPosF   = 0.88     
     3340                  amres@amOrthogonalPosF = 0.33           
     3341                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    32543342                  overlay(plot(n),plot_pt)
    32553343                  pt=1
     
    32613349               end if
    32623350            end if           
    3263             if (vNam(varn) .EQ. "q" .OR. vNam(varn) .EQ. "qv" .OR. vNam(varn) .EQ. "ql") then
     3351            if (vNam(varn) .EQ. "q" .OR. vNam(varn) .EQ. "qv" .OR. \
     3352                vNam(varn) .EQ. "ql") then
    32643353               if (q .EQ. 0) then
    32653354                  res@gsnLeftString      = "q, qv and ql"
     
    32853374
    32863375                  ; ***************************************************
    3287                   ; legend for combined plot
     3376                  ; legend for overlaid plot
    32883377                  ; ***************************************************
    32893378     
     
    32923381                  lgres@lgLabelFont        = "helvetica"   
    32933382                  lgres@lgLabelFontHeightF = font_size_legend           
    3294                   lgres@vpWidthF           = 0.06         
     3383                  lgres@vpWidthF           = 0.07         
    32953384                  lgres@vpHeightF          = 0.12         
    32963385                  lgres@lgDashIndexes      = (/0,1,2/)
    3297                   lbid = gsn_create_legend(wks,3,(/"q","qv","ql"/),lgres)       
     3386                  lbid = gsn_create_legend(wks,3,(/"q","qv","ql"/),lgres)
    32983387
    32993388                  amres = True
    3300                   amres@amParallelPosF   = 0.65             
    3301                   amres@amOrthogonalPosF = -0.2           
    3302                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3389                  amres@amParallelPosF   = 0.88             
     3390                  amres@amOrthogonalPosF = 0.33           
     3391                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    33033392                  overlay(plot(n),plot_q)
    33043393                  q=1
     
    33113400            end if   
    33123401           
    3313             if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es" .OR. vNam(varn) .EQ. "e*" ) then
     3402            if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es" .OR. \
     3403                vNam(varn) .EQ. "e*" ) then
    33143404               if (e .EQ. 0) then
    33153405                  res@gsnLeftString      = "e and e*"
     
    33323422
    33333423                  ; ***************************************************
    3334                   ; legend for combined plot
     3424                  ; legend for overlaid plot
    33353425                  ; ***************************************************
    33363426     
     
    33393429                  lgres@lgLabelFont        = "helvetica"   
    33403430                  lgres@lgLabelFontHeightF = font_size_legend           
    3341                   lgres@vpWidthF           = 0.06           
     3431                  lgres@vpWidthF           = 0.07           
    33423432                  lgres@vpHeightF          = 0.08         
    33433433                  lgres@lgDashIndexes      = (/0,1,2/)
     
    33453435
    33463436                  amres = True
    3347                   amres@amParallelPosF   = 0.65             
    3348                   amres@amOrthogonalPosF = -0.2           
    3349                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3437                  amres@amParallelPosF   = 0.88             
     3438                  amres@amOrthogonalPosF = 0.365           
     3439                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    33503440                  overlay(plot(n),plot_e)
    33513441                  e=1
     
    33783468
    33793469                  ; ***************************************************
    3380                   ; legend for combined plot
     3470                  ; legend for overlaid plot
    33813471                  ; ***************************************************
    33823472     
     
    33853475                  lgres@lgLabelFont        = "helvetica"   
    33863476                  lgres@lgLabelFontHeightF = font_size_legend           
    3387                   lgres@vpWidthF           = 0.06           
     3477                  lgres@vpWidthF           = 0.07           
    33883478                  lgres@vpHeightF          = 0.08         
    33893479                  lgres@lgDashIndexes      = (/0,1,2/)
     
    33913481
    33923482                  amres = True
    3393                   amres@amParallelPosF   = 0.65             
    3394                   amres@amOrthogonalPosF = -0.2           
    3395                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3483                  amres@amParallelPosF   = 0.88             
     3484                  amres@amOrthogonalPosF = 0.365           
     3485                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    33963486                  overlay(plot(n),plot_km)
    33973487                  km=1
     
    34043494            end if           
    34053495           
    3406             if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "wu" \
    3407                 .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. vNam(varn) .EQ. "w*u*") then
     3496            if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR.      \
     3497                vNam(varn) .EQ. "wu" .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. \
     3498                vNam(varn) .EQ. "w*u*") then
    34083499               if (wpup .EQ. 0) then
    34093500                  res@gsnLeftString      = "w"+dq+"u"+dq+", w*u* and wu"
     
    34293520
    34303521                  ; ***************************************************
    3431                   ; legend for combined plot
     3522                  ; legend for overlaid plot
    34323523                  ; ***************************************************
    34333524     
     
    34393530                  lgres@vpHeightF          = 0.12         
    34403531                  lgres@lgDashIndexes      = (/0,1,2/)
    3441                   lbid = gsn_create_legend(wks,3,(/"w"+dq+"u"+dq,"w*u*","wu"/),lgres)       
     3532                  lbid = gsn_create_legend(\
     3533                                wks,3,(/"w"+dq+"u"+dq,"w*u*","wu"/),lgres)
    34423534
    34433535                  amres = True
    3444                   amres@amParallelPosF   = 0.65             
    3445                   amres@amOrthogonalPosF = -0.2           
    3446                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3536                  amres@amParallelPosF   = 0.88             
     3537                  amres@amOrthogonalPosF = 0.33           
     3538                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    34473539                  overlay(plot(n),plot_wpup)
    34483540                  wpup=1
     
    34543546               end if
    34553547            end if
    3456             if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.vNam(varn) .EQ. "wv"\
    3457                 .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. vNam(varn) .EQ. "w*v*") then
     3548            if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.     \
     3549               vNam(varn) .EQ. "wv" .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. \
     3550               vNam(varn) .EQ. "w*v*") then
    34583551               if (wpvp .EQ. 0) then
    34593552                  res@gsnLeftString      = "w"+dq+"v"+dq+", w*v* and wv"
     
    34793572
    34803573                  ; ***************************************************
    3481                   ; legend for combined plot
     3574                  ; legend for overlaid plot
    34823575                  ; ***************************************************
    34833576     
     
    34893582                  lgres@vpHeightF          = 0.12         
    34903583                  lgres@lgDashIndexes      = (/0,1,2/)
    3491                   lbid = gsn_create_legend(wks,3,(/"w"+dq+"v"+dq,"w*v*","wv"/),lgres)       
     3584                  lbid = gsn_create_legend(\
     3585                             wks,3,(/"w"+dq+"v"+dq,"w*v*","wv"/),lgres)       
    34923586
    34933587                  amres = True
    3494                   amres@amParallelPosF   = 0.65             
    3495                   amres@amOrthogonalPosF = -0.2           
    3496                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3588                  amres@amParallelPosF   = 0.88             
     3589                  amres@amOrthogonalPosF = 0.33           
     3590                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    34973591                  overlay(plot(n),plot_wpvp)
    34983592                  wpvp=1
     
    35043598               end if
    35053599            end if
    3506             if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "wpt"\
    3507                 .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR. vNam(varn) .EQ. "w*pt*") then
     3600            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR.     \
     3601                vNam(varn) .EQ. "wpt" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR.\
     3602                vNam(varn) .EQ. "w*pt*") then
    35083603               if (wpptp .EQ. 0) then                 
    35093604                  res@gsnLeftString      = "w"+dq+"pt"+dq+", w*pt* and wpt"
     
    35293624
    35303625                  ; ***************************************************
    3531                   ; legend for combined plot
     3626                  ; legend for overlaid plot
    35323627                  ; ***************************************************
    35333628     
     
    35393634                  lgres@vpHeightF          = 0.12         
    35403635                  lgres@lgDashIndexes      = (/0,1,2/)             
    3541                   lbid = gsn_create_legend(wks,3,(/"w"+dq+"pt"+dq,"w*pt*","wpt"/),lgres)     
     3636                  lbid = gsn_create_legend(\
     3637                               wks,3,(/"w"+dq+"pt"+dq,"w*pt*","wpt"/),lgres)
    35423638
    35433639                  amres = True
    3544                   amres@amParallelPosF   = 0.65             
    3545                   amres@amOrthogonalPosF = -0.2           
    3546                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3640                  amres@amParallelPosF   = 0.88             
     3641                  amres@amOrthogonalPosF = 0.33           
     3642                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    35473643                  overlay(plot(n),plot_wpptp)
    35483644                  wpptp=1
     
    35543650               end if
    35553651            end if
    3556             if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC" .OR. vNam(varn) .EQ. "w*pt*BC") then
     3652            if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC" .OR.\
     3653                vNam(varn) .EQ. "w*pt*BC") then
    35573654               if (wsptsBC .EQ. 0) then
    35583655                  res@gsnLeftString      = "w*pt*BC and wptBC"
     
    35753672
    35763673                  ; ***************************************************
    3577                   ; legend for combined plot
     3674                  ; legend for overlaid plot
    35783675                  ; ***************************************************
    35793676     
     
    35853682                  lgres@vpHeightF          = 0.12         
    35863683                  lgres@lgDashIndexes      = (/0,1,2/)
    3587                   lbid = gsn_create_legend(wks,3,(/"w*pt*BC","wptBC"/),lgres)       
     3684                  lbid = gsn_create_legend(\
     3685                                        wks,3,(/"w*pt*BC","wptBC"/),lgres)
    35883686
    35893687                  amres = True
    3590                   amres@amParallelPosF   = 0.65             
    3591                   amres@amOrthogonalPosF = -0.2           
    3592                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3688                  amres@amParallelPosF   = 0.88             
     3689                  amres@amOrthogonalPosF = 0.33           
     3690                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    35933691                  overlay(plot(n),plot_wsptsBC)
    35943692                  wsptsBC=1
     
    36003698               end if 
    36013699            end if             
    3602             if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "wvpt"\
    3603                 .OR. vNam(varn) .EQ. "w"+dq+"vpt"+dq .OR. vNam(varn) .EQ. "w*vpt*") then
     3700            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. \
     3701                vNam(varn) .EQ. "wvpt" .OR. vNam(varn) .EQ. \
     3702                "w"+dq+"vpt"+dq .OR. vNam(varn) .EQ. "w*vpt*") then
    36043703               if (wpvptp .EQ. 0) then
    36053704                  res@gsnLeftString      = "w"+dq+"vpt"+dq+", w*vpt* and wvpt"
     
    36253724
    36263725                  ; ***************************************************
    3627                   ; legend for combined plot
     3726                  ; legend for overlaid plot
    36283727                  ; ***************************************************
    36293728     
     
    36353734                  lgres@vpHeightF          = 0.12         
    36363735                  lgres@lgDashIndexes      = (/0,1,2/)
    3637                   lbid = gsn_create_legend(wks,3,(/"w"+dq+"vpt"+dq,"w*vpt*","wvpt"/),lgres)       
    3638 
     3736                  lbid = gsn_create_legend(\
     3737                             wks,3,(/"w"+dq+"vpt"+dq,"w*vpt*","wvpt"/),lgres)
    36393738                  amres = True
    3640                   amres@amParallelPosF   = 0.65             
    3641                   amres@amOrthogonalPosF = -0.2           
    3642                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3739                  amres@amParallelPosF   = 0.88             
     3740                  amres@amOrthogonalPosF = 0.33           
     3741                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    36433742                  overlay(plot(n),plot_wpvptp)
    36443743                  wpvptp=1
     
    36503749               end if
    36513750            end if
    3652             if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR. vNam(varn) .EQ. "wq"\
    3653                  .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. vNam(varn) .EQ. "w*q*") then
     3751            if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR.      \
     3752                vNam(varn) .EQ. "wq" .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. \
     3753                vNam(varn) .EQ. "w*q*") then
    36543754               if (wpqp .EQ. 0) then
    36553755                  res@gsnLeftString      = "w"+dq+"q"+dq+", w*q* and wq"
     
    36753775
    36763776                  ; ***************************************************
    3677                   ; legend for combined plot
     3777                  ; legend for overlaid plot
    36783778                  ; ***************************************************
    36793779     
     
    36853785                  lgres@vpHeightF          = 0.12         
    36863786                  lgres@lgDashIndexes      = (/0,1,2/)
    3687                   lbid = gsn_create_legend(wks,3,(/"w"+dq+"q"+dq,"w*q*","wq"/),lgres)       
     3787                  lbid = gsn_create_legend(\
     3788                             wks,3,(/"w"+dq+"q"+dq,"w*q*","wq"/),lgres)       
    36883789
    36893790                  amres = True
    3690                   amres@amParallelPosF   = 0.65             
    3691                   amres@amOrthogonalPosF = -0.2           
    3692                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3791                  amres@amParallelPosF   = 0.88             
     3792                  amres@amOrthogonalPosF = 0.33           
     3793                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    36933794                  overlay(plot(n),plot_wpqp)
    36943795                  wpqp=1
     
    37003801               end if
    37013802            end if
    3702             if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "wqv"\
    3703                 .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR. vNam(varn) .EQ. "w*qv*") then
     3803            if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR.     \
     3804                vNam(varn) .EQ. "wqv" .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR.\
     3805                vNam(varn) .EQ. "w*qv*") then
    37043806               if (wpqvp .EQ. 0) then
    37053807                  res@gsnLeftString      ="w"+dq+"qv"+dq+" , w*qv* and wqv"
     
    37253827
    37263828                  ; ***************************************************
    3727                   ; legend for combined plot
     3829                  ; legend for overlaid plot
    37283830                  ; ***************************************************
    37293831     
     
    37353837                  lgres@vpHeightF          = 0.12         
    37363838                  lgres@lgDashIndexes      = (/0,1,2/)
    3737                   lbid = gsn_create_legend(wks,3,(/"w"+dq+"qv"+dq,"w*qv*","wqv"/),lgres)       
     3839                  lbid = gsn_create_legend(\
     3840                                wks,3,(/"w"+dq+"qv"+dq,"w*qv*","wqv"/),lgres)
    37383841
    37393842                  amres = True
    3740                   amres@amParallelPosF   = 0.65             
    3741                   amres@amOrthogonalPosF = -0.2           
    3742                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3843                  amres@amParallelPosF   = 0.88             
     3844                  amres@amOrthogonalPosF = 0.33           
     3845                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    37433846                  overlay(plot(n),plot_wpqvp)
    37443847                  wpqvp=1
     
    37503853               end if
    37513854            end if
    3752             if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "ws"\
    3753                 .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR. vNam(varn) .EQ. "w*s*") then
     3855            if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR.     \
     3856                vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR.\
     3857                vNam(varn) .EQ. "w*s*") then
    37543858               if (wpsp .EQ. 0) then
    37553859                  res@gsnLeftString      = "w"+dq+"s"+dq+", w*s* and ws"
     
    37753879
    37763880                  ; ***************************************************
    3777                   ; legend for combined plot
     3881                  ; legend for overlaid plot
    37783882                  ; ***************************************************
    37793883     
     
    37853889                  lgres@vpHeightF          = 0.12         
    37863890                  lgres@lgDashIndexes      = (/0,1,2/)
    3787                   lbid = gsn_create_legend(wks,3,(/"w"+dq+"s"+dq,"w*s*","ws"/),lgres)       
     3891                  lbid = gsn_create_legend(\
     3892                           wks,3,(/"w"+dq+"s"+dq,"w*s*","ws"/),lgres)       
    37883893
    37893894                  amres = True
    3790                   amres@amParallelPosF   = 0.65             
    3791                   amres@amOrthogonalPosF = -0.2           
    3792                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3895                  amres@amParallelPosF   = 0.88             
     3896                  amres@amOrthogonalPosF = 0.33           
     3897                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    37933898                  overlay(plot(n),plot_wpsp)
    37943899                  wpsp=1
     
    38003905               end if
    38013906            end if
    3802             if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "wsa"\
    3803                 .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR. vNam(varn) .EQ. "w*sa*") then
     3907            if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR.      \
     3908                vNam(varn) .EQ. "wsa" .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR.\
     3909                vNam(varn) .EQ. "w*sa*") then
    38043910               if (wpsap .EQ. 0) then
    38053911                  res@gsnLeftString      = "w"+dq+"sa"+dq+", w*sa* and wsa"
     
    38253931
    38263932                  ; ***************************************************
    3827                   ; legend for combined plot
     3933                  ; legend for overlaid plot
    38283934                  ; ***************************************************
    38293935     
     
    38353941                  lgres@vpHeightF          = 0.12         
    38363942                  lgres@lgDashIndexes      = (/0,1,2/)
    3837                   lbid = gsn_create_legend(wks,3,(/"w"+dq+"sa"+dq,"w*sa*","wsa"/),lgres)       
    3838 
     3943                  lbid = gsn_create_legend(\
     3944                             wks,3,(/"w"+dq+"sa"+dq,"w*sa*","wsa"/),lgres)
    38393945                  amres = True
    3840                   amres@amParallelPosF   = 0.65             
    3841                   amres@amOrthogonalPosF = -0.2           
    3842                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3946                  amres@amParallelPosF   = 0.88             
     3947                  amres@amOrthogonalPosF = 0.33           
     3948                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    38433949                  overlay(plot(n),plot_wpsap)
    38443950                  wpsap=1
     
    38513957            end if
    38523958         
    3853             if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "ws2" \
    3854                 .OR. vNam(varn) .EQ. "u*2" .OR. vNam(varn) .EQ. "v*2" .OR. vNam(varn) .EQ. "w*2" ) then
     3959            if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. \
     3960                vNam(varn) .EQ. "ws2" .OR. vNam(varn) .EQ. "u*2" .OR. \
     3961                vNam(varn) .EQ. "v*2" .OR. vNam(varn) .EQ. "w*2" ) then
    38553962               if (us2 .EQ. 0) then
    38563963                  res@gsnLeftString      = "u*2, v*2 and w*2"
     
    38763983
    38773984                  ; ***************************************************
    3878                   ; legend for combined plot
     3985                  ; legend for overlaid plot
    38793986                  ; ***************************************************
    38803987     
     
    38863993                  lgres@vpHeightF          = 0.12         
    38873994                  lgres@lgDashIndexes      = (/0,1,2/)
    3888                   lbid = gsn_create_legend(wks,3,(/"u*2","v*2","w*2"/),lgres)       
    3889 
     3995                  lbid = gsn_create_legend(wks,3,(/"u*2","v*2","w*2"/),lgres)
    38903996                  amres = True
    3891                   amres@amParallelPosF   = 0.65             
    3892                   amres@amOrthogonalPosF = -0.2           
    3893                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3997                  amres@amParallelPosF   = 0.88             
     3998                  amres@amOrthogonalPosF = 0.33           
     3999                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    38944000                  overlay(plot(n),plot_us2)
    38954001                  us2=1
     
    39024008            end if
    39034009           
    3904             if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "wpeodz" \
    3905                .OR. vNam(varn) .EQ. "w*u*u*:dz" .OR. vNam(varn) .EQ. "w*p*:dz" .OR. vNam(varn) .EQ. "w"+dq+"e:dz") then
     4010            if (vNam(varn) .EQ. "wsususodz" .OR. \
     4011                vNam(varn) .EQ. "wspsodz" .OR.   \
     4012                vNam(varn) .EQ. "wpeodz" .OR.    \
     4013                vNam(varn) .EQ. "w*u*u*:dz" .OR. \
     4014                vNam(varn) .EQ. "w*p*:dz" .OR.   \
     4015                vNam(varn) .EQ. "w"+dq+"e:dz") then
    39064016               if (wsususodz .EQ. 0) then
    39074017                  res@gsnLeftString      = "w*u*u*:dz, w*p*:dz and w"+dq+"e:dz"
     
    39094019                  res@gsnRightString     = " "
    39104020                  if (xs .EQ. -1) then
    3911                      res@trXMinF = min((/miniwsususodz,miniwspsodz,miniwpeodz/))
     4021                     res@trXMinF = min((/miniwsususodz,\
     4022                                                   miniwspsodz,miniwpeodz/))
    39124023                  else
    39134024                     res@trXMinF = xs
    39144025                  end if
    39154026                  if (xe .EQ. -1) then
    3916                      res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,maxiwpeodz/))
     4027                     res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,\
     4028                                                               maxiwpeodz/))
    39174029                  else
    39184030                     res@trXMaxF = xe 
     
    39274039
    39284040                  ; ***************************************************
    3929                   ; legend for combined plot
     4041                  ; legend for overlaid plot
    39304042                  ; ***************************************************
    39314043     
     
    39374049                  lgres@vpHeightF          = 0.12         
    39384050                  lgres@lgDashIndexes      = (/0,1,2/)
    3939                   lbid = gsn_create_legend(wks,3,(/"w*u*u*:dz","w*p*:dz","w"+dq+"e:dz"/),lgres)       
    3940 
     4051                  lbid = gsn_create_legend(\
     4052                           wks,3,(/"w*u*u*:dz","w*p*:dz","w"+dq+"e:dz"/),lgres)
    39414053                  amres = True
    3942                   amres@amParallelPosF   = 0.65             
    3943                   amres@amOrthogonalPosF = -0.2           
    3944                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     4054                  amres@amParallelPosF   = 0.88             
     4055                  amres@amOrthogonalPosF = 0.33           
     4056                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)
    39454057                  overlay(plot(n),plot_wsususodz)
    39464058                  wsususodz=1
     
    39704082     
    39714083         if (prof3d .EQ. 0) then
    3972             if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
     4084            if ( isStrSubset( vNam(varn), "time") .OR. \
     4085                 isStrSubset( vNam(varn), "NORM")) then
    39734086               check = False
    39744087            end if
    39754088         else
    3976             if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then
     4089            if ( isStrSubset( vNam(varn), "time") .OR.  \
     4090                 isStrSubset( vNam(varn), "zusi") .OR.  \
     4091                 isStrSubset( vNam(varn), "zwwi") .OR.  \
     4092                 isStrSubset( vNam(varn), "x") .OR.     \
     4093                 isStrSubset( vNam(varn), "xu") .OR.    \
     4094                 isStrSubset( vNam(varn), "y") .OR.     \
     4095                 isStrSubset( vNam(varn), "yv") .OR.    \
     4096                 isStrSubset( vNam(varn), "zu_3d") .OR. \
     4097                 isStrSubset( vNam(varn), "zw_3d")) then
    39774098               check = False
    39784099            end if
     
    40594180            print(" ")
    40604181            print("combining is not possible,")
    4061             print("'c_var'(= "+c_var+") must include two variables of the general plots = ")
     4182            print("'c_var'(= "+c_var+") must include two variables of "+\
     4183                  "the general plots = ")
    40624184            print("- "+com_var_avail)
    40634185            print("be sure to have one comma before and after the variable")
     
    40734195            print(" ")
    40744196            print("combining is not possible,")
    4075             print("'c_var'(= "+c_var+") must include three variables of the general plots = ")
     4197            print("'c_var'(= "+c_var+") must include three variables of "+\
     4198                  "the general plots = ")
    40764199            print("- "+com_var_avail)
    40774200            print("be sure to have one comma before and after the variable")
     
    41144237   no_frames = 0
    41154238
    4116    if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. n .gt. no_rows*no_columns) then
     4239   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
     4240       n .gt. no_rows*no_columns) then
    41174241      gsn_panel(wks,plot_,(/n,1/),resP)
    41184242      print(" ")
     
    41254249            no_frames = no_frames + 1 
    41264250         else
    4127             gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),(/no_rows,no_columns/),resP)
     4251            gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),\
     4252                                                (/no_rows,no_columns/),resP)
    41284253            no_frames = no_frames + 1 
    41294254         end if
Note: See TracChangeset for help on using the changeset viewer.