Changeset 526


Ignore:
Timestamp:
Mar 30, 2010 2:04:38 PM (14 years ago)
Author:
heinze
Message:

Adjustment of the NCL scripts and palmplot to allow for the use of special characters in NetCDF variable names

Location:
palm/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/DOC/tec/technical_documentation.html

    r525 r526  
    11<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
    22<html><head>
     3
    34
    45
     
    9192      <td style="vertical-align: top;">30/03/10<br>
    9293      </td>
     94      <td style="vertical-align: top;">RH<br>
     95      </td>
     96      <td style="vertical-align: top;">526<br>
     97      </td>
     98      <td style="vertical-align: top;">3.7a<br>
     99      </td>
     100      <td style="vertical-align: top;">C<br>
     101      </td>
     102      <td style="vertical-align: top;">Adjustment of the NCL scripts and <span style="font-family: Courier New,Courier,monospace;">palmplot </span>to allow for special characters in NetCDF variable names <br>
     103      </td>
     104      <td style="vertical-align: top;">palmplot, .ncl.config.default, cross_sections.ncl, profiles.ncl, timeseries.ncl, spectra.ncl<br>
     105      </td>
     106    </tr>
     107<tr>
     108      <td style="vertical-align: top;">30/03/10<br>
     109      </td>
    93110      <td style="vertical-align: top;">SR<br>
    94111      </td>
     
    185202      <td style="vertical-align: top;">NCL scripts can be run with the shell script <span style="font-family: Courier New,Courier,monospace;">palmplot.</span><br>
    186203      </td>
    187       <td style="vertical-align: top;">palmplot .ncl.config.default cross_sections.ncl profiles.ncl<br>
     204      <td style="vertical-align: top;">palmplot, .ncl.config.default, cross_sections.ncl, profiles.ncl<br>
    188205      </td>
    189206    </tr>
  • palm/trunk/SCRIPTS/NCL/.ncl.config.default

    r517 r526  
    1515
    1616script=which_script
     17
     18   ;******************************************************
     19   ; BE AWARE: NCl uses double quotes (") to denote strings
     20   ;       to retrieve the double quote character - use dq:
     21
     22    dq=str_get_dq()
     23
     24   ;******************************************************
    1725   
    1826;*********************************************************
     
    219227      ; OPTIONAL --var-- OUTPUT VARIABLES
    220228      ;
    221       ; names of output variables; inidcate them with one comma before
    222       ; and after
    223       ; each variable
     229      ; names of output variables;
     230      ; inidcate them with one comma before and after each variable;
     231      ; if the name contains double quotes (") use dq and the '+' operation to
     232      ; concatenate the strings
    224233      ;
    225234      ; data type: string
     
    868877      ; names of output variables;
    869878      ; inidcate them with one comma before and after each variable
     879      ; if the name contains double quotes (") use dq and the '+' operation to
     880      ; concatenate the strings
    870881      ;
    871882      ; data type: string
    872883      ;
    873       ; example: var = ",u,v,w,";
     884      ; example: var = ",u,v,w,w*pt*,w"+dq+"pt"+dq+",wpt,"
    874885      ;
    875886      ; default:   "all" (all available variables are plotted)
     
    16631674      ; REQUIRED IF combine=1 --c_var-- VARIABLES FOR COMBINING
    16641675      ;
    1665       ; names of variables; inidcate them with one comma before and
    1666       ; after each variable;
    1667       ;
    1668       ; data type: string
    1669       ;
    1670       ; example: c_var = ",u,v,"
     1676      ; names of variables;
     1677      ; inidcate them with one comma before and after each variable
     1678      ; if the name contains double quotes (") use dq and the '+' operation to
     1679      ; concatenate the strings
     1680      ;
     1681      ; data type: string
     1682      ;
     1683      ; example: c_var = ",u,v,w,w*pt*,w"+dq+"pt"+dq+",wpt,"
    16711684      ;
    16721685      ; default:   "c_variables"
     
    19081921      ; OPTIONAL --var-- OUTPUT VARIABLES
    19091922      ;
    1910       ; names of output variables; inidcate them with one comma before
    1911       ; and after each variable
     1923      ; names of output variables;
     1924      ; inidcate them with one comma before and after each variable
     1925      ; if the name contains double quotes (") use dq and the '+' operation to
     1926      ; concatenate the strings
    19121927      ;
    19131928      ; data type: string
     
    23442359      ; OPTIONAL --var-- OUTPUT VARIABLES
    23452360      ;
    2346       ; names of output variables; inidcate them with one comma before
    2347       ; and after each variable
     2361      ; names of output variables;
     2362      ; inidcate them with one comma before and after each variable
     2363      ; if the name contains double quotes (") use dq and the '+' operation to
     2364      ; concatenate the strings
    23482365      ;
    23492366      ; data type: string
    23502367      ;
    2351       ; example: var = ",u,v,w,"
     2368      ; example: var = ",umax,vmax,wmax,w"+dq+"pt"+dq+"0,"
    23522369      ;
    23532370      ; default:   "all" (all available variables are plotted)
  • palm/trunk/SCRIPTS/NCL/cross_sections.ncl

    r514 r526  
    3434
    3535begin
     36
     37   ; ***************************************************
     38   ; Retrieving the double quote character
     39   ; ***************************************************
     40   
     41   dq=str_get_dq()
    3642
    3743   ; ***************************************************
     
    13211327              .or. vNam(varn) .eq. "prrs_xy" .or. vNam(varn) .eq. "qsws_xy" \
    13221328              .or. vNam(varn) .eq. "shfs_xy" .or. vNam(varn) .eq. "ts_xy"   \
    1323               .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy") then
     1329              .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy"    \
     1330              .or. vNam(varn) .eq. "lwp*_xy" .or. vNam(varn) .eq. "pra*_xy" \
     1331              .or. vNam(varn) .eq. "prr*_xy" .or. vNam(varn) .eq. "qsws*_xy"\
     1332              .or. vNam(varn) .eq. "shf*_xy" .or. vNam(varn) .eq. "t*_xy"   \
     1333              .or. vNam(varn) .eq. "u*_xy" .or. vNam(varn) .eq. "z0*_xy") then
    13241334              ;these variables depend on zu1_xy and that's why they have only one z-layer
    13251335              data(varn,:,0,:,:)=temp(:,0,ys:ye,xs:xe)
     
    16061616                         .or. vNam(varn) .eq. "prrs_xy" .or. vNam(varn) .eq. "qsws_xy" \
    16071617                         .or. vNam(varn) .eq. "shfs_xy" .or. vNam(varn) .eq. "ts_xy"   \
    1608                          .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy") then
     1618                         .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy"    \
     1619                         .or. vNam(varn) .eq. "lwp*_xy" .or. vNam(varn) .eq. "pra*_xy" \
     1620                         .or. vNam(varn) .eq. "prr*_xy" .or. vNam(varn) .eq. "qsws*_xy"\
     1621                         .or. vNam(varn) .eq. "shf*_xy" .or. vNam(varn) .eq. "t*_xy"   \
     1622                         .or. vNam(varn) .eq. "u*_xy" .or. vNam(varn) .eq. "z0*_xy") then
    16091623                         loe = 0
    16101624                         level = "=" + zu1(0) + "m"
     
    16421656                         .or. vNam(varn) .eq. "prrs_xy" .or. vNam(varn) .eq. "qsws_xy" \
    16431657                         .or. vNam(varn) .eq. "shfs_xy" .or. vNam(varn) .eq. "ts_xy"   \
    1644                          .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy") then
     1658                         .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy"    \
     1659                         .or. vNam(varn) .eq. "lwp*_xy" .or. vNam(varn) .eq. "pra*_xy" \
     1660                         .or. vNam(varn) .eq. "prr*_xy" .or. vNam(varn) .eq. "qsws*_xy"\
     1661                         .or. vNam(varn) .eq. "shf*_xy" .or. vNam(varn) .eq. "t*_xy"   \
     1662                         .or. vNam(varn) .eq. "u*_xy" .or. vNam(varn) .eq. "z0*_xy") then
    16451663                         lie = 0
    16461664                         level = "=" + zu1(0) + "m"
  • palm/trunk/SCRIPTS/NCL/profiles.ncl

    r523 r526  
    3333   
    3434begin
     35
     36   ;***************************************************
     37   ; Retrieving the double quote character
     38   ;***************************************************
     39   
     40   dq=str_get_dq()
    3541
    3642   ;***************************************************
     
    590596                                    else
    591597                                       if(vNam(varn) .EQ. "e" .OR. isStrSubset(vNam(varn), "e_"))then
     598                                         
    592599                                          z_u = f_att->$vNam(varn+1)$
    593600                                          break
    594601                                       else
    595                                           if(vNam(varn) .EQ. "es" .OR. isStrSubset(vNam(varn), "es_"))then
     602                                          if(vNam(varn) .EQ. "es" .OR. isStrSubset(vNam(varn), "es_")\
     603                                             .OR. vNam(varn) .EQ. "e*" .OR. isStrSubset(vNam(varn), "e*_"))then
    596604                                             z_u = f_att->$vNam(varn+1)$
    597605                                             break
     
    609617                                                      break
    610618                                                   else
    611                                                       if(vNam(varn) .EQ. "us2" .OR. isStrSubset(vNam(varn), "us2_"))then
     619                                                      if(vNam(varn) .EQ. "us2" .OR. isStrSubset(vNam(varn), "us2_")\
     620                                                         .OR. vNam(varn) .EQ. "u*2" .OR. isStrSubset(vNam(varn), "u*2_"))then
    612621                                                         z_u = f_att->$vNam(varn+1)$
    613622                                                         break
    614623                                                      else
    615                                                          if(vNam(varn) .EQ. "vs2" .OR. isStrSubset(vNam(varn), "vs2_") )then
     624                                                         if(vNam(varn) .EQ. "vs2" .OR. isStrSubset(vNam(varn), "vs2_")\
     625                                                            .OR. vNam(varn) .EQ. "v*2" .OR. isStrSubset(vNam(varn), "v*2_"))then
    616626                                                            z_u = f_att->$vNam(varn+1)$
    617627                                                            break
    618628                                                         else
    619                                                             if(vNam(varn) .EQ. "pts2" .OR. isStrSubset(vNam(varn), "pts2_"))then
     629                                                            if(vNam(varn) .EQ. "pts2" .OR. isStrSubset(vNam(varn), "pts2_")\
     630                                                               .OR. vNam(varn) .EQ. "pt*2" .OR. isStrSubset(vNam(varn), "pt*2_"))then
    620631                                                               z_u = f_att->$vNam(varn+1)$
    621632                                                               break
    622633                                                            else
    623                                                                if(vNam(varn) .EQ. "wsususodz" .OR. isStrSubset(vNam(varn), "wsususodz_"))then
     634                                                               if(vNam(varn) .EQ. "wsususodz" .OR. isStrSubset(vNam(varn), "wsususodz_")\
     635                                                                  .OR. vNam(varn) .EQ. "w*u*u*:dz" .OR. isStrSubset(vNam(varn), "w*u*u*:dz_"))then
    624636                                                                  z_u = f_att->$vNam(varn+1)$
    625637                                                                  break
    626638                                                               else
    627                                                                   if(vNam(varn) .EQ. "wspsodz" .OR. isStrSubset(vNam(varn), "wspsodz_"))then
     639                                                                  if(vNam(varn) .EQ. "wspsodz" .OR. isStrSubset(vNam(varn), "wspsodz_")\
     640                                                                     .OR. vNam(varn) .EQ. "w*p*:dz" .OR. isStrSubset(vNam(varn), "w*p*:dz_"))then
    628641                                                                     z_u = f_att->$vNam(varn+1)$
    629642                                                                     break
    630643                                                                  else
    631                                                                      if(vNam(varn) .EQ. "wpeodz" .OR. isStrSubset(vNam(varn), "wpeodz_"))then
     644                                                                     if(vNam(varn) .EQ. "wpeodz" .OR. isStrSubset(vNam(varn), "wpeodz_")\
     645                                                                        .OR. vNam(varn) .EQ. "w"+dq+"e:dz" .OR. isStrSubset(vNam(varn), "w"+dq+"e:dz_"))then
    632646                                                                        z_u = f_att->$vNam(varn+1)$
    633647                                                                        break                                                                       
     
    664678         break
    665679      else
    666          if (vNam(varn) .EQ. "wpup" .OR. isStrSubset(vNam(varn), "wpup_"))then
     680         if (vNam(varn) .EQ. "wpup" .OR. isStrSubset(vNam(varn), "wpup_")\
     681            .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"u"+dq+"_"))then
    667682            z_w = f_att->$vNam(varn+1)$
    668683            break
    669684         else
    670             if(vNam(varn) .EQ. "wsus" .OR. isStrSubset(vNam(varn), "wsus_"))then
     685            if(vNam(varn) .EQ. "wsus" .OR. isStrSubset(vNam(varn), "wsus_")\
     686               .OR. vNam(varn) .EQ. "w*u*" .OR. isStrSubset(vNam(varn), "w*u*_"))then
    671687               z_w = f_att->$vNam(varn+1)$
    672688               break
     
    676692                  break
    677693               else
    678                   if(vNam(varn) .EQ. "wpvp" .OR. isStrSubset(vNam(varn), "wpvp_"))then
     694                  if(vNam(varn) .EQ. "wpvp" .OR. isStrSubset(vNam(varn), "wpvp_")\
     695                     .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"v"+dq+"_"))then
    679696                     z_w = f_att->$vNam(varn+1)$
    680697                     break
    681698                  else   
    682                      if(vNam(varn) .EQ. "wsvs" .OR. isStrSubset(vNam(varn), "wsvs_"))then
     699                     if(vNam(varn) .EQ. "wsvs" .OR. isStrSubset(vNam(varn), "wsvs_")\
     700                        .OR. vNam(varn) .EQ. "w*v*" .OR. isStrSubset(vNam(varn), "w*v*_"))then
    683701                        z_w = f_att->$vNam(varn+1)$
    684702                        break
     
    688706                           break
    689707                        else
    690                            if(vNam(varn) .EQ. "wptpp" .OR. isStrSubset(vNam(varn), "wptpp_"))then
     708                           if(vNam(varn) .EQ. "wptpp" .OR. isStrSubset(vNam(varn), "wptpp_")\
     709                              .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"pt"+dq+"_"))then
    691710                              z_w = f_att->$vNam(varn+1)$
    692711                              break
    693712                           else
    694                               if(vNam(varn) .EQ. "wspts" .OR. isStrSubset(vNam(varn), "wspts_"))then
     713                              if(vNam(varn) .EQ. "wspts" .OR. isStrSubset(vNam(varn), "wspts_")\
     714                                 .OR. vNam(varn) .EQ. "w*pt*" .OR. isStrSubset(vNam(varn), "w*pt*_"))then
    695715                                 z_w = f_att->$vNam(varn+1)$
    696716                                 break
    697717                              else
    698                                  if(vNam(varn) .EQ. "wpt" .OR. isStrSubset(vNam(varn), "wpz_"))then
     718                                 if(vNam(varn) .EQ. "wpt" .OR. isStrSubset(vNam(varn), "wpt_"))then
    699719                                    z_w = f_att->$vNam(varn+1)$
    700720                                    break
    701721                                 else
    702                                     if(vNam(varn) .EQ. "wsptsBC" .OR. isStrSubset(vNam(varn), "wsptsBC_"))then
     722                                    if(vNam(varn) .EQ. "wsptsBC" .OR. isStrSubset(vNam(varn), "wsptsBC_")\
     723                                       .OR. vNam(varn) .EQ. "w*pt*BC" .OR. isStrSubset(vNam(varn), "w*pt*BC_"))then
    703724                                       z_w = f_att->$vNam(varn+1)$
    704725                                       break
     
    708729                                          break
    709730                                       else
    710                                           if(vNam(varn) .EQ. "wpvptp" .OR. isStrSubset(vNam(varn), "wpvptp_"))then
     731                                          if(vNam(varn) .EQ. "wpvptp" .OR. isStrSubset(vNam(varn), "wpvptp_")\
     732                                              .OR. vNam(varn) .EQ. "w"+dq+"vpt"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"vpt"+dq+"_"))then
    711733                                             z_w = f_att->$vNam(varn+1)$
    712734                                             break
    713735                                          else
    714                                              if(vNam(varn) .EQ. "wsvpts" .OR. isStrSubset(vNam(varn), "wsvpts_"))then
     736                                             if(vNam(varn) .EQ. "wsvpts" .OR. isStrSubset(vNam(varn), "wsvpts_")\
     737                                               .OR. vNam(varn) .EQ. "w*vpt*" .OR. isStrSubset(vNam(varn), "w*vpt*_"))then
    715738                                                z_w = f_att->$vNam(varn+1)$
    716739                                                break
     
    720743                                                   break
    721744                                                else
    722                                                    if(vNam(varn) .EQ. "wpqp" .OR. isStrSubset(vNam(varn), "wpqp_"))then
     745                                                   if(vNam(varn) .EQ. "wpqp" .OR. isStrSubset(vNam(varn), "wpqp_")\
     746                                                      .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"q"+dq+"_"))then
    723747                                                      z_w = f_att->$vNam(varn+1)$
    724748                                                      break
    725749                                                   else
    726                                                       if(vNam(varn) .EQ. "wsqs" .OR. isStrSubset(vNam(varn), "wsqs_"))then
     750                                                      if(vNam(varn) .EQ. "wsqs" .OR. isStrSubset(vNam(varn), "wsqs_")\
     751                                                         .OR. vNam(varn) .EQ. "w*q*" .OR. isStrSubset(vNam(varn), "w*q*_"))then
    727752                                                         z_w = f_att->$vNam(varn+1)$
    728753                                                         break
     
    732757                                                            break
    733758                                                         else
    734                                                             if(vNam(varn) .EQ. "wpqvp" .OR. isStrSubset(vNam(varn), "wpqvp_"))then
     759                                                            if(vNam(varn) .EQ. "wpqvp" .OR. isStrSubset(vNam(varn), "wpqvp_")\
     760                                                               .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"qv"+dq+"_"))then
    735761                                                               z_w = f_att->$vNam(varn+1)$
    736762                                                               break
    737763                                                            else
    738                                                                if(vNam(varn) .EQ. "wsqvs" .OR. isStrSubset(vNam(varn), "wsqvs_"))then
     764                                                               if(vNam(varn) .EQ. "wsqvs" .OR. isStrSubset(vNam(varn), "wsqvs_")\
     765                                                                  .OR. vNam(varn) .EQ. "w*qv*" .OR. isStrSubset(vNam(varn), "w*qv*_"))then
    739766                                                                  z_w = f_att->$vNam(varn+1)$
    740767                                                                  break
     
    744771                                                                     break
    745772                                                                  else
    746                                                                      if(vNam(varn) .EQ. "wpsp" .OR. isStrSubset(vNam(varn), "wpsp_"))then
     773                                                                     if(vNam(varn) .EQ. "wpsp" .OR. isStrSubset(vNam(varn), "wpsp_")\
     774                                                                        .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"s"+dq+"_"))then
    747775                                                                        z_w = f_att->$vNam(varn+1)$
    748776                                                                        break
    749777                                                                     else
    750                                                                         if(vNam(varn) .EQ. "wsss" .OR. isStrSubset(vNam(varn), "wsss_"))then
     778                                                                        if(vNam(varn) .EQ. "wsss" .OR. isStrSubset(vNam(varn), "wsss_")\
     779                                                                            .OR. vNam(varn) .EQ. "w*s*" .OR. isStrSubset(vNam(varn), "w*s*_"))then
    751780                                                                           z_w = f_att->$vNam(varn+1)$
    752781                                                                           break
     
    756785                                                                              break
    757786                                                                           else
    758                                                                               if(vNam(varn) .EQ. "wpsap" .OR. isStrSubset(vNam(varn), "wpsap_"))then
     787                                                                              if(vNam(varn) .EQ. "wpsap" .OR. isStrSubset(vNam(varn), "wpsap_")\
     788                                                                                  .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"sa"+dq+"_"))then
    759789                                                                                 z_w = f_att->$vNam(varn+1)$
    760790                                                                                 break
    761791                                                                              else
    762                                                                                  if(vNam(varn) .EQ. "wssas" .OR. isStrSubset(vNam(varn), "wssas_") )then
     792                                                                                 if(vNam(varn) .EQ. "wssas" .OR. isStrSubset(vNam(varn), "wssas_")\
     793                                                                                     .OR. vNam(varn) .EQ. "w*sa*" .OR. isStrSubset(vNam(varn), "w*sa*_"))then
    763794                                                                                    z_w = f_att->$vNam(varn+1)$
    764795                                                                                    break
     
    768799                                                                                       break
    769800                                                                                    else
    770                                                                                        if(vNam(varn) .EQ. "wses" .OR. isStrSubset(vNam(varn), "wses_"))then
     801                                                                                       if(vNam(varn) .EQ. "wses" .OR. isStrSubset(vNam(varn), "wses_")\
     802                                                                                          .OR. vNam(varn) .EQ. "w*e*" .OR. isStrSubset(vNam(varn), "w*e*_"))then
    771803                                                                                          z_w = f_att->$vNam(varn+1)$
    772804                                                                                          break
    773805                                                                                       else
    774                                                                                           if(vNam(varn) .EQ. "ws2" .OR. isStrSubset(vNam(varn), "ws2_"))then
     806                                                                                          if(vNam(varn) .EQ. "ws2" .OR. isStrSubset(vNam(varn), "ws2_")\
     807                                                                                             .OR. vNam(varn) .EQ. "w*2" .OR. isStrSubset(vNam(varn), "w*2_"))then
    775808                                                                                             z_w = f_att->$vNam(varn+1)$
    776809                                                                                             break
    777810                                                                                          else
    778                                                                                              if(vNam(varn) .EQ. "ws3" .OR. isStrSubset(vNam(varn), "ws3_"))then
     811                                                                                             if(vNam(varn) .EQ. "ws3" .OR. isStrSubset(vNam(varn), "ws3_")\
     812                                                                                                .OR. vNam(varn) .EQ. "w*3" .OR. isStrSubset(vNam(varn), "w*3_"))then
    779813                                                                                                z_w = f_att->$vNam(varn+1)$
    780814                                                                                                break
     
    784818                                                                                                   break
    785819                                                                                                else
    786                                                                                                    if(vNam(varn) .EQ. "ws2pts".OR. isStrSubset(vNam(varn), "ws2pts_") )then
     820                                                                                                   if(vNam(varn) .EQ. "ws2pts".OR. isStrSubset(vNam(varn), "ws2pts_")\
     821                                                                                                      .OR. vNam(varn) .EQ. "w*2pt*" .OR. isStrSubset(vNam(varn), "w*2pt*_"))then
    787822                                                                                                      z_w = f_att->$vNam(varn+1)$
    788823                                                                                                      break
    789824                                                                                                   else
    790                                                                                                       if(vNam(varn) .EQ. "wspts2" .OR. isStrSubset(vNam(varn), "wspts2_"))then
     825                                                                                                      if(vNam(varn) .EQ. "wspts2" .OR. isStrSubset(vNam(varn), "wspts2_")\
     826                                                                                                         .OR. vNam(varn) .EQ. "w*pt*2" .OR. isStrSubset(vNam(varn), "w*pt*2_"))then
    791827                                                                                                         z_w = f_att->$vNam(varn+1)$
    792828                                                                                                         break                                           
     
    20342070               end if
    20352071            end if
    2036             if (vNam(varn) .EQ. "es") then
     2072            if (vNam(varn) .EQ. "es" .OR. vNam(varn) .EQ. "e*") then
    20372073               minies=min(data(varn,:,min_z_int:max_z_int))-min_value
    20382074               maxies=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    21052141            end if
    21062142
    2107             if (vNam(varn) .EQ. "wpup") then
     2143            if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "w"+dq+"u"+dq) then
    21082144               miniwpup=min(data(varn,:,min_z_int:max_z_int))-min_value
    21092145               maxiwpup=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    21282164               end if
    21292165            end if
    2130             if (vNam(varn) .EQ. "wsus") then
     2166            if (vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "w*u*") then
    21312167               miniwsus=min(data(varn,:,min_z_int:max_z_int))-min_value
    21322168               maxiwsus=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    21752211            end if
    21762212
    2177             if (vNam(varn) .EQ. "wpvp") then
     2213            if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "w"+dq+"v"+dq) then
    21782214               miniwpvp=min(data(varn,:,min_z_int:max_z_int))-min_value
    21792215               maxiwpvp=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    21982234               end if
    21992235            end if
    2200             if (vNam(varn) .EQ. "wsvs") then
     2236            if (vNam(varn) .EQ. "wsvs" .OR. vNam(varn) .EQ. "w*v*") then
    22012237               miniwsvs=min(data(varn,:,min_z_int:max_z_int))-min_value
    22022238               maxiwsvs=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    22452281            end if
    22462282
    2247             if (vNam(varn) .EQ. "wpptp") then
     2283            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq) then
    22482284               miniwpptp=min(data(varn,:,min_z_int:max_z_int))-min_value
    22492285               maxiwpptp=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    22682304               end if
    22692305            end if
    2270             if (vNam(varn) .EQ. "wspts") then
     2306            if (vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "w*pt*") then
    22712307               miniwspts=min(data(varn,:,min_z_int:max_z_int))-min_value
    22722308               maxiwspts=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    23152351            end if
    23162352
    2317             if (vNam(varn) .EQ. "wsptsBC") then
     2353            if (vNam(varn) .EQ. "wsptsBC".OR. vNam(varn) .EQ. "w*pt*BC" ) then
    23182354               miniwsptsBC=min(data(varn,:,min_z_int:max_z_int))-min_value
    23192355               maxiwsptsBC=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    23622398            end if
    23632399
    2364             if (vNam(varn) .EQ. "wpvptp") then
     2400            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "w"+dq+"vpt"+dq) then
    23652401               miniwpvptp=min(data(varn,:,min_z_int:max_z_int))-min_value
    23662402               maxiwpvptp=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    23852421               end if
    23862422            end if
    2387             if (vNam(varn) .EQ. "wsvpts") then
     2423            if (vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "w*vpt*") then
    23882424               miniwsvpts=min(data(varn,:,min_z_int:max_z_int))-min_value
    23892425               maxiwsvpts=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    24322468            end if
    24332469
    2434             if (vNam(varn) .EQ. "wpqp") then
     2470            if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "w"+dq+"q"+dq) then
    24352471               miniwpqp=min(data(varn,:,min_z_int:max_z_int))-min_value
    24362472               maxiwpqp=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    24552491               end if
    24562492            end if
    2457             if (vNam(varn) .EQ. "wsqs") then
     2493            if (vNam(varn) .EQ. "wsqs".OR. vNam(varn) .EQ. "w*s*" ) then
    24582494               miniwsqs=min(data(varn,:,min_z_int:max_z_int))-min_value
    24592495               maxiwsqs=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    25022538            end if
    25032539
    2504             if (vNam(varn) .EQ. "wpqvp") then
     2540            if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq) then
    25052541               miniwpqvp=min(data(varn,:,min_z_int:max_z_int))-min_value
    25062542               maxiwpqvp=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    25252561               end if
    25262562            end if
    2527             if (vNam(varn) .EQ. "wsqvs") then
     2563            if (vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "w*qv*") then
    25282564               miniwsqvs=min(data(varn,:,min_z_int:max_z_int))-min_value
    25292565               maxiwsqvs=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    25722608            end if
    25732609
    2574             if (vNam(varn) .EQ. "wpsp") then
     2610            if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "w"+dq+"s"+dq) then
    25752611               miniwpsp=min(data(varn,:,min_z_int:max_z_int))-min_value
    25762612               maxiwpsp=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    25952631               end if
    25962632            end if
    2597             if (vNam(varn) .EQ. "wsss") then
     2633            if (vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "w*s*" ) then
    25982634               miniwsss=min(data(varn,:,min_z_int:max_z_int))-min_value
    25992635               maxiwsss=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    26422678            end if
    26432679
    2644             if (vNam(varn) .EQ. "wpsap") then
     2680            if (vNam(varn) .EQ. "wpsap" .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq) then
    26452681               miniwpsap=min(data(varn,:,min_z_int:max_z_int))-min_value
    26462682               maxiwpsap=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    26652701               end if
    26662702            end if
    2667             if (vNam(varn) .EQ. "wssas") then
     2703            if (vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "w*sa*") then
    26682704               miniwssas=min(data(varn,:,min_z_int:max_z_int))-min_value
    26692705               maxiwssas=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    27122748            end if
    27132749
    2714             if (vNam(varn) .EQ. "us2") then
     2750            if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "u*2") then
    27152751               minius2=min(data(varn,:,min_z_int:max_z_int))-min_value
    27162752               maxius2=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    27352771               end if
    27362772            end if
    2737             if (vNam(varn) .EQ. "vs2") then
     2773            if (vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "v*2") then
    27382774               minivs2=min(data(varn,:,min_z_int:max_z_int))-min_value
    27392775               maxivs2=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    27582794               end if
    27592795            end if
    2760             if (vNam(varn) .EQ. "ws2") then
     2796            if (vNam(varn) .EQ. "ws2" .OR. vNam(varn) .EQ. "w*2") then
    27612797               miniws2=min(data(varn,:,min_z_int:max_z_int))-min_value
    27622798               maxiws2=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    27822818            end if
    27832819
    2784             if (vNam(varn) .EQ. "wsususodz") then
     2820            if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "w*u*u*:dz") then
    27852821               miniwsususodz=min(data(varn,:,min_z_int:max_z_int))-min_value
    27862822               maxiwsususodz=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    28052841               end if 
    28062842            end if
    2807             if (vNam(varn) .EQ. "wspsodz") then
     2843            if (vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "w*p*:dz") then
    28082844               miniwspsodz=min(data(varn,:,min_z_int:max_z_int))-min_value
    28092845               maxiwspsodz=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    28282864               end if
    28292865            end if
    2830             if (vNam(varn) .EQ. "wpeodz") then
     2866            if (vNam(varn) .EQ. "wpeodz" .OR. vNam(varn) .EQ. "w"+dq+"p:dz") then
    28312867               miniwpeodz=min(data(varn,:,min_z_int:max_z_int))-min_value
    28322868               maxiwpeodz=max(data(varn,:,min_z_int:max_z_int))+max_value
     
    32553291            end if   
    32563292           
    3257             if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es") then
     3293            if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es" .OR. vNam(varn) .EQ. "e*" ) then
    32583294               if (e .EQ. 0) then
    3259                   res@gsnLeftString      = "e and es"
     3295                  res@gsnLeftString      = "e and e*"
    32603296                  res@tiXAxisString      = "["+unit(varn)+"]"
    32613297                  res@gsnRightString     = " "
     
    32863322                  lgres@vpHeightF          = 0.08         
    32873323                  lgres@lgDashIndexes      = (/0,1,2/)
    3288                   lbid = gsn_create_legend(wks,2,(/"e","es"/),lgres)       
     3324                  lbid = gsn_create_legend(wks,2,(/"e","e*"/),lgres)       
    32893325
    32903326                  amres = True
     
    33483384            end if           
    33493385           
    3350             if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "wu") then
     3386            if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "wu" \
     3387                .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. vNam(varn) .EQ. "w*u*") then
    33513388               if (wpup .EQ. 0) then
    3352                   res@gsnLeftString      = "wpup, wsus and wu"
     3389                  res@gsnLeftString      = "w"+dq+"u"+dq+", w*u* and wu"
    33533390                  res@tiXAxisString      = "["+unit(varn)+"]"
    33543391                  res@gsnRightString     = " "
     
    33823419                  lgres@vpHeightF          = 0.12         
    33833420                  lgres@lgDashIndexes      = (/0,1,2/)
    3384                   lbid = gsn_create_legend(wks,3,(/"wpup","wsus","wu"/),lgres)       
     3421                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"u"+dq,"w*u*","wu"/),lgres)       
    33853422
    33863423                  amres = True
     
    33973434               end if
    33983435            end if
    3399             if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.vNam(varn) .EQ. "wv") then
     3436            if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.vNam(varn) .EQ. "wv"\
     3437                .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. vNam(varn) .EQ. "w*v*") then
    34003438               if (wpvp .EQ. 0) then
    3401                   res@gsnLeftString      = "wpvp, wsvs and wv"
     3439                  res@gsnLeftString      = "w"+dq+"v"+dq+", w*v* and wv"
    34023440                  res@tiXAxisString      = "["+unit(varn)+"]"
    34033441                  res@gsnRightString     = " "
     
    34313469                  lgres@vpHeightF          = 0.12         
    34323470                  lgres@lgDashIndexes      = (/0,1,2/)
    3433                   lbid = gsn_create_legend(wks,3,(/"wpvp","wsvs","wv"/),lgres)       
     3471                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"v"+dq,"w*v*","wv"/),lgres)       
    34343472
    34353473                  amres = True
     
    34463484               end if
    34473485            end if
    3448             if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "wpt") then
    3449                if (wpptp .EQ. 0) then
    3450                   res@gsnLeftString      = "wpptp, wspts and wpt"
     3486            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "wpt"\
     3487                .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR. vNam(varn) .EQ. "w*pt*") then
     3488               if (wpptp .EQ. 0) then                 
     3489                  res@gsnLeftString      = "w"+dq+"pt"+dq+", w*pt* and wpt"
    34513490                  res@tiXAxisString      = "["+unit(varn)+"]"
    34523491                  res@gsnRightString     = " "
     
    34613500                     res@trXMaxF = xe 
    34623501                  end if
    3463                   if (vNam(varn) .EQ. "wspts")then
     3502                  if (vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "w*pt*")then
    34643503                     res@xyDashPattern = 1
    34653504                  end if
    34663505                  if (vNam(varn) .EQ. "wpt")then
     3506                     res@xyDashPattern = 2
     3507                  end if
     3508                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
     3509
     3510                  ; ***************************************************
     3511                  ; legend for combined plot
     3512                  ; ***************************************************
     3513     
     3514                  lgres                    = True
     3515                  lgMonoDashIndex          = False
     3516                  lgres@lgLabelFont        = "helvetica"   
     3517                  lgres@lgLabelFontHeightF = font_size_legend           
     3518                  lgres@vpWidthF           = 0.09           
     3519                  lgres@vpHeightF          = 0.12         
     3520                  lgres@lgDashIndexes      = (/0,1,2/)             
     3521                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"pt"+dq,"w*pt*","wpt"/),lgres)     
     3522
     3523                  amres = True
     3524                  amres@amParallelPosF   = 0.65             
     3525                  amres@amOrthogonalPosF = -0.2           
     3526                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3527                  overlay(plot(n),plot_wpptp)
     3528                  wpptp=1
     3529               else
     3530                  if (prof3d .EQ. 0)then
     3531                     varn=varn+1
     3532                  end if
     3533                  continue   
     3534               end if
     3535            end if
     3536            if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC" .OR. vNam(varn) .EQ. "w*pt*BC") then
     3537               if (wsptsBC .EQ. 0) then
     3538                  res@gsnLeftString      = "w*pt*BC and wptBC"
     3539                  res@tiXAxisString      = "["+unit(varn)+"]"
     3540                  res@gsnRightString     = " "
     3541                  if (xs .EQ. -1) then
     3542                     res@trXMinF = min((/miniwsptsBC,miniwptBC/))
     3543                  else
     3544                     res@trXMinF = xs
     3545                  end if
     3546                  if (xe .EQ. -1) then
     3547                     res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/))
     3548                  else
     3549                     res@trXMaxF = xe 
     3550                  end if
     3551                  if (vNam(varn) .EQ. "wptBC")then
     3552                     res@xyDashPattern = 1
     3553                  end if
     3554                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
     3555
     3556                  ; ***************************************************
     3557                  ; legend for combined plot
     3558                  ; ***************************************************
     3559     
     3560                  lgres                    = True
     3561                  lgMonoDashIndex          = False
     3562                  lgres@lgLabelFont        = "helvetica"   
     3563                  lgres@lgLabelFontHeightF = font_size_legend           
     3564                  lgres@vpWidthF           = 0.1           
     3565                  lgres@vpHeightF          = 0.12         
     3566                  lgres@lgDashIndexes      = (/0,1,2/)
     3567                  lbid = gsn_create_legend(wks,3,(/"w*pt*BC","wptBC"/),lgres)       
     3568
     3569                  amres = True
     3570                  amres@amParallelPosF   = 0.65             
     3571                  amres@amOrthogonalPosF = -0.2           
     3572                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3573                  overlay(plot(n),plot_wsptsBC)
     3574                  wsptsBC=1
     3575               else
     3576                  if (prof3d .EQ. 0)then
     3577                     varn=varn+1
     3578                  end if
     3579                  continue   
     3580               end if 
     3581            end if             
     3582            if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "wvpt"\
     3583                .OR. vNam(varn) .EQ. "w"+dq+"vpt"+dq .OR. vNam(varn) .EQ. "w*vpt*") then
     3584               if (wpvptp .EQ. 0) then
     3585                  res@gsnLeftString      = "w"+dq+"vpt"+dq+", w*vpt* and wvpt"
     3586                  res@tiXAxisString      = "["+unit(varn)+"]"
     3587                  res@gsnRightString     = " "
     3588                  if (xs .EQ. -1) then
     3589                     res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/))
     3590                  else
     3591                     res@trXMinF = xs
     3592                  end if
     3593                  if (xe .EQ. -1) then
     3594                     res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/))
     3595                  else
     3596                     res@trXMaxF = xe 
     3597                  end if
     3598                  if (vNam(varn) .EQ. "wsvpts")then
     3599                     res@xyDashPattern = 1
     3600                  end if
     3601                  if (vNam(varn) .EQ. "wvpt")then
     3602                     res@xyDashPattern = 2
     3603                  end if
     3604                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
     3605
     3606                  ; ***************************************************
     3607                  ; legend for combined plot
     3608                  ; ***************************************************
     3609     
     3610                  lgres                    = True
     3611                  lgMonoDashIndex          = False
     3612                  lgres@lgLabelFont        = "helvetica"   
     3613                  lgres@lgLabelFontHeightF = font_size_legend           
     3614                  lgres@vpWidthF           = 0.1           
     3615                  lgres@vpHeightF          = 0.12         
     3616                  lgres@lgDashIndexes      = (/0,1,2/)
     3617                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"vpt"+dq,"w*vpt*","wvpt"/),lgres)       
     3618
     3619                  amres = True
     3620                  amres@amParallelPosF   = 0.65             
     3621                  amres@amOrthogonalPosF = -0.2           
     3622                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3623                  overlay(plot(n),plot_wpvptp)
     3624                  wpvptp=1
     3625               else
     3626                  if (prof3d .EQ. 0)then
     3627                     varn=varn+1
     3628                  end if
     3629                  continue   
     3630               end if
     3631            end if
     3632            if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR. vNam(varn) .EQ. "wq"\
     3633                 .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. vNam(varn) .EQ. "w*q*") then
     3634               if (wpqp .EQ. 0) then
     3635                  res@gsnLeftString      = "w"+dq+"q"+dq+", w*q* and wq"
     3636                  res@tiXAxisString      = "["+unit(varn)+"]"
     3637                  res@gsnRightString     = " "
     3638                  if (xs .EQ. -1) then
     3639                     res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/))
     3640                  else
     3641                     res@trXMinF = xs
     3642                  end if
     3643                  if (xe .EQ. -1) then
     3644                     res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/))
     3645                  else
     3646                     res@trXMaxF = xe 
     3647                  end if 
     3648                  if (vNam(varn) .EQ. "wsqs")then
     3649                     res@xyDashPattern = 1
     3650                  end if
     3651                  if (vNam(varn) .EQ. "wq")then
     3652                     res@xyDashPattern = 2
     3653                  end if
     3654                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
     3655
     3656                  ; ***************************************************
     3657                  ; legend for combined plot
     3658                  ; ***************************************************
     3659     
     3660                  lgres                    = True
     3661                  lgMonoDashIndex          = False
     3662                  lgres@lgLabelFont        = "helvetica"   
     3663                  lgres@lgLabelFontHeightF = font_size_legend           
     3664                  lgres@vpWidthF           = 0.08           
     3665                  lgres@vpHeightF          = 0.12         
     3666                  lgres@lgDashIndexes      = (/0,1,2/)
     3667                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"q"+dq,"w*q*","wq"/),lgres)       
     3668
     3669                  amres = True
     3670                  amres@amParallelPosF   = 0.65             
     3671                  amres@amOrthogonalPosF = -0.2           
     3672                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3673                  overlay(plot(n),plot_wpqp)
     3674                  wpqp=1
     3675               else
     3676                  if (prof3d .EQ. 0)then
     3677                     varn=varn+1
     3678                  end if
     3679                  continue   
     3680               end if
     3681            end if
     3682            if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "wqv"\
     3683                .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR. vNam(varn) .EQ. "w*qv*") then
     3684               if (wpqvp .EQ. 0) then
     3685                  res@gsnLeftString      ="w"+dq+"qv"+dq+" , w*qv* and wqv"
     3686                  res@tiXAxisString      = "["+unit(varn)+"]"
     3687                  res@gsnRightString     = " "
     3688                  if (xs .EQ. -1) then
     3689                     res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/))
     3690                  else
     3691                     res@trXMinF = xs
     3692                  end if
     3693                  if (xe .EQ. -1) then
     3694                     res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/))
     3695                  else
     3696                     res@trXMaxF = xe 
     3697                  end if
     3698                  if (vNam(varn) .EQ. "wsqvs")then
     3699                     res@xyDashPattern = 1
     3700                  end if
     3701                  if (vNam(varn) .EQ. "wqv")then
     3702                     res@xyDashPattern = 2
     3703                  end if
     3704                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
     3705
     3706                  ; ***************************************************
     3707                  ; legend for combined plot
     3708                  ; ***************************************************
     3709     
     3710                  lgres                    = True
     3711                  lgMonoDashIndex          = False
     3712                  lgres@lgLabelFont        = "helvetica"   
     3713                  lgres@lgLabelFontHeightF = font_size_legend           
     3714                  lgres@vpWidthF           = 0.09           
     3715                  lgres@vpHeightF          = 0.12         
     3716                  lgres@lgDashIndexes      = (/0,1,2/)
     3717                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"qv"+dq,"w*qv*","wqv"/),lgres)       
     3718
     3719                  amres = True
     3720                  amres@amParallelPosF   = 0.65             
     3721                  amres@amOrthogonalPosF = -0.2           
     3722                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3723                  overlay(plot(n),plot_wpqvp)
     3724                  wpqvp=1
     3725               else
     3726                  if (prof3d .EQ. 0)then
     3727                     varn=varn+1
     3728                  end if
     3729                  continue   
     3730               end if
     3731            end if
     3732            if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "ws"\
     3733                .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR. vNam(varn) .EQ. "w*s*") then
     3734               if (wpsp .EQ. 0) then
     3735                  res@gsnLeftString      = "w"+dq+"s"+dq+", w*s* and ws"
     3736                  res@tiXAxisString      = "["+unit(varn)+"]"
     3737                  res@gsnRightString     = " "
     3738                  if (xs .EQ. -1) then
     3739                     res@trXMinF = min((/miniwpsp,miniwsss,miniws/))
     3740                  else
     3741                     res@trXMinF = xs
     3742                  end if
     3743                  if (xe .EQ. -1) then
     3744                     res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/))
     3745                  else
     3746                     res@trXMaxF = xe 
     3747                  end if
     3748                  if (vNam(varn) .EQ. "wsss")then
     3749                     res@xyDashPattern = 1
     3750                  end if
     3751                  if (vNam(varn) .EQ. "ws")then
     3752                     res@xyDashPattern = 2
     3753                  end if
     3754                  plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
     3755
     3756                  ; ***************************************************
     3757                  ; legend for combined plot
     3758                  ; ***************************************************
     3759     
     3760                  lgres                    = True
     3761                  lgMonoDashIndex          = False
     3762                  lgres@lgLabelFont        = "helvetica"   
     3763                  lgres@lgLabelFontHeightF = font_size_legend           
     3764                  lgres@vpWidthF           = 0.08           
     3765                  lgres@vpHeightF          = 0.12         
     3766                  lgres@lgDashIndexes      = (/0,1,2/)
     3767                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"s"+dq,"w*s*","ws"/),lgres)       
     3768
     3769                  amres = True
     3770                  amres@amParallelPosF   = 0.65             
     3771                  amres@amOrthogonalPosF = -0.2           
     3772                  annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
     3773                  overlay(plot(n),plot_wpsp)
     3774                  wpsp=1
     3775               else
     3776                  if (prof3d .EQ. 0)then
     3777                     varn=varn+1
     3778                  end if
     3779                  continue   
     3780               end if
     3781            end if
     3782            if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "wsa"\
     3783                .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR. vNam(varn) .EQ. "w*sa*") then
     3784               if (wpsap .EQ. 0) then
     3785                  res@gsnLeftString      = "w"+dq+"sa"+dq+", w*sa* and wsa"
     3786                  res@tiXAxisString      = "["+unit(varn)+"]"
     3787                  res@gsnRightString     = " "
     3788                  if (xs .EQ. -1) then
     3789                     res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/))
     3790                  else
     3791                     res@trXMinF = xs
     3792                  end if
     3793                  if (xe .EQ. -1) then
     3794                     res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/))
     3795                  else
     3796                     res@trXMaxF = xe 
     3797                  end if
     3798                  if (vNam(varn) .EQ. "wssas")then
     3799                     res@xyDashPattern = 1
     3800                  end if
     3801                  if (vNam(varn) .EQ. "wsa")then
    34673802                     res@xyDashPattern = 2
    34683803                  end if
     
    34803815                  lgres@vpHeightF          = 0.12         
    34813816                  lgres@lgDashIndexes      = (/0,1,2/)
    3482                   lbid = gsn_create_legend(wks,3,(/"wpptp","wspts","wpt"/),lgres)       
    3483 
    3484                   amres = True
    3485                   amres@amParallelPosF   = 0.65             
    3486                   amres@amOrthogonalPosF = -0.2           
    3487                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
    3488                   overlay(plot(n),plot_wpptp)
    3489                   wpptp=1
    3490                else
    3491                   if (prof3d .EQ. 0)then
    3492                      varn=varn+1
    3493                   end if
    3494                   continue   
    3495                end if
    3496             end if
    3497             if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC") then
    3498                if (wsptsBC .EQ. 0) then
    3499                   res@gsnLeftString      = "wsptsBC and wptBC"
    3500                   res@tiXAxisString      = "["+unit(varn)+"]"
    3501                   res@gsnRightString     = " "
    3502                   if (xs .EQ. -1) then
    3503                      res@trXMinF = min((/miniwsptsBC,miniwptBC/))
    3504                   else
    3505                      res@trXMinF = xs
    3506                   end if
    3507                   if (xe .EQ. -1) then
    3508                      res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/))
    3509                   else
    3510                      res@trXMaxF = xe 
    3511                   end if
    3512                   if (vNam(varn) .EQ. "wptBC")then
    3513                      res@xyDashPattern = 1
    3514                   end if
    3515                   plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
    3516 
    3517                   ; ***************************************************
    3518                   ; legend for combined plot
    3519                   ; ***************************************************
    3520      
    3521                   lgres                    = True
    3522                   lgMonoDashIndex          = False
    3523                   lgres@lgLabelFont        = "helvetica"   
    3524                   lgres@lgLabelFontHeightF = font_size_legend           
    3525                   lgres@vpWidthF           = 0.1           
    3526                   lgres@vpHeightF          = 0.12         
    3527                   lgres@lgDashIndexes      = (/0,1,2/)
    3528                   lbid = gsn_create_legend(wks,3,(/"wsptsBC","wptBC"/),lgres)       
    3529 
    3530                   amres = True
    3531                   amres@amParallelPosF   = 0.65             
    3532                   amres@amOrthogonalPosF = -0.2           
    3533                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
    3534                   overlay(plot(n),plot_wsptsBC)
    3535                   wsptsBC=1
    3536                else
    3537                   if (prof3d .EQ. 0)then
    3538                      varn=varn+1
    3539                   end if
    3540                   continue   
    3541                end if 
    3542             end if             
    3543             if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "wvpt") then
    3544                if (wpvptp .EQ. 0) then
    3545                   res@gsnLeftString      = "wpvptp, wsvpts and wvpt"
    3546                   res@tiXAxisString      = "["+unit(varn)+"]"
    3547                   res@gsnRightString     = " "
    3548                   if (xs .EQ. -1) then
    3549                      res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/))
    3550                   else
    3551                      res@trXMinF = xs
    3552                   end if
    3553                   if (xe .EQ. -1) then
    3554                      res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/))
    3555                   else
    3556                      res@trXMaxF = xe 
    3557                   end if
    3558                   if (vNam(varn) .EQ. "wsvpts")then
    3559                      res@xyDashPattern = 1
    3560                   end if
    3561                   if (vNam(varn) .EQ. "wvpt")then
    3562                      res@xyDashPattern = 2
    3563                   end if
    3564                   plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
    3565 
    3566                   ; ***************************************************
    3567                   ; legend for combined plot
    3568                   ; ***************************************************
    3569      
    3570                   lgres                    = True
    3571                   lgMonoDashIndex          = False
    3572                   lgres@lgLabelFont        = "helvetica"   
    3573                   lgres@lgLabelFontHeightF = font_size_legend           
    3574                   lgres@vpWidthF           = 0.1           
    3575                   lgres@vpHeightF          = 0.12         
    3576                   lgres@lgDashIndexes      = (/0,1,2/)
    3577                   lbid = gsn_create_legend(wks,3,(/"wpvptp","wsvpts","wvpt"/),lgres)       
    3578 
    3579                   amres = True
    3580                   amres@amParallelPosF   = 0.65             
    3581                   amres@amOrthogonalPosF = -0.2           
    3582                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
    3583                   overlay(plot(n),plot_wpvptp)
    3584                   wpvptp=1
    3585                else
    3586                   if (prof3d .EQ. 0)then
    3587                      varn=varn+1
    3588                   end if
    3589                   continue   
    3590                end if
    3591             end if
    3592             if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR. vNam(varn) .EQ. "wq") then
    3593                if (wpqp .EQ. 0) then
    3594                   res@gsnLeftString      = "wpqp, wsqs and wq"
    3595                   res@tiXAxisString      = "["+unit(varn)+"]"
    3596                   res@gsnRightString     = " "
    3597                   if (xs .EQ. -1) then
    3598                      res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/))
    3599                   else
    3600                      res@trXMinF = xs
    3601                   end if
    3602                   if (xe .EQ. -1) then
    3603                      res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/))
    3604                   else
    3605                      res@trXMaxF = xe 
    3606                   end if 
    3607                   if (vNam(varn) .EQ. "wsqs")then
    3608                      res@xyDashPattern = 1
    3609                   end if
    3610                   if (vNam(varn) .EQ. "wq")then
    3611                      res@xyDashPattern = 2
    3612                   end if
    3613                   plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
    3614 
    3615                   ; ***************************************************
    3616                   ; legend for combined plot
    3617                   ; ***************************************************
    3618      
    3619                   lgres                    = True
    3620                   lgMonoDashIndex          = False
    3621                   lgres@lgLabelFont        = "helvetica"   
    3622                   lgres@lgLabelFontHeightF = font_size_legend           
    3623                   lgres@vpWidthF           = 0.08           
    3624                   lgres@vpHeightF          = 0.12         
    3625                   lgres@lgDashIndexes      = (/0,1,2/)
    3626                   lbid = gsn_create_legend(wks,3,(/"wpqp","wsqs","wq"/),lgres)       
    3627 
    3628                   amres = True
    3629                   amres@amParallelPosF   = 0.65             
    3630                   amres@amOrthogonalPosF = -0.2           
    3631                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
    3632                   overlay(plot(n),plot_wpqp)
    3633                   wpqp=1
    3634                else
    3635                   if (prof3d .EQ. 0)then
    3636                      varn=varn+1
    3637                   end if
    3638                   continue   
    3639                end if
    3640             end if
    3641             if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "wqv") then
    3642                if (wpqvp .EQ. 0) then
    3643                   res@gsnLeftString      = "wpqvp, wsqvs and wqv"
    3644                   res@tiXAxisString      = "["+unit(varn)+"]"
    3645                   res@gsnRightString     = " "
    3646                   if (xs .EQ. -1) then
    3647                      res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/))
    3648                   else
    3649                      res@trXMinF = xs
    3650                   end if
    3651                   if (xe .EQ. -1) then
    3652                      res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/))
    3653                   else
    3654                      res@trXMaxF = xe 
    3655                   end if
    3656                   if (vNam(varn) .EQ. "wsqvs")then
    3657                      res@xyDashPattern = 1
    3658                   end if
    3659                   if (vNam(varn) .EQ. "wqv")then
    3660                      res@xyDashPattern = 2
    3661                   end if
    3662                   plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
    3663 
    3664                   ; ***************************************************
    3665                   ; legend for combined plot
    3666                   ; ***************************************************
    3667      
    3668                   lgres                    = True
    3669                   lgMonoDashIndex          = False
    3670                   lgres@lgLabelFont        = "helvetica"   
    3671                   lgres@lgLabelFontHeightF = font_size_legend           
    3672                   lgres@vpWidthF           = 0.09           
    3673                   lgres@vpHeightF          = 0.12         
    3674                   lgres@lgDashIndexes      = (/0,1,2/)
    3675                   lbid = gsn_create_legend(wks,3,(/"wpqvp","wsqvs","wqv"/),lgres)       
    3676 
    3677                   amres = True
    3678                   amres@amParallelPosF   = 0.65             
    3679                   amres@amOrthogonalPosF = -0.2           
    3680                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
    3681                   overlay(plot(n),plot_wpqvp)
    3682                   wpqvp=1
    3683                else
    3684                   if (prof3d .EQ. 0)then
    3685                      varn=varn+1
    3686                   end if
    3687                   continue   
    3688                end if
    3689             end if
    3690             if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "ws") then
    3691                if (wpsp .EQ. 0) then
    3692                   res@gsnLeftString      = "wpsp, wsss and ws"
    3693                   res@tiXAxisString      = "["+unit(varn)+"]"
    3694                   res@gsnRightString     = " "
    3695                   if (xs .EQ. -1) then
    3696                      res@trXMinF = min((/miniwpsp,miniwsss,miniws/))
    3697                   else
    3698                      res@trXMinF = xs
    3699                   end if
    3700                   if (xe .EQ. -1) then
    3701                      res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/))
    3702                   else
    3703                      res@trXMaxF = xe 
    3704                   end if
    3705                   if (vNam(varn) .EQ. "wsss")then
    3706                      res@xyDashPattern = 1
    3707                   end if
    3708                   if (vNam(varn) .EQ. "ws")then
    3709                      res@xyDashPattern = 2
    3710                   end if
    3711                   plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
    3712 
    3713                   ; ***************************************************
    3714                   ; legend for combined plot
    3715                   ; ***************************************************
    3716      
    3717                   lgres                    = True
    3718                   lgMonoDashIndex          = False
    3719                   lgres@lgLabelFont        = "helvetica"   
    3720                   lgres@lgLabelFontHeightF = font_size_legend           
    3721                   lgres@vpWidthF           = 0.08           
    3722                   lgres@vpHeightF          = 0.12         
    3723                   lgres@lgDashIndexes      = (/0,1,2/)
    3724                   lbid = gsn_create_legend(wks,3,(/"wpsp","wsss","ws"/),lgres)       
    3725 
    3726                   amres = True
    3727                   amres@amParallelPosF   = 0.65             
    3728                   amres@amOrthogonalPosF = -0.2           
    3729                   annoid1 = gsn_add_annotation(plot(n),lbid,amres)                 
    3730                   overlay(plot(n),plot_wpsp)
    3731                   wpsp=1
    3732                else
    3733                   if (prof3d .EQ. 0)then
    3734                      varn=varn+1
    3735                   end if
    3736                   continue   
    3737                end if
    3738             end if
    3739             if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "wsa") then
    3740                if (wpsap .EQ. 0) then
    3741                   res@gsnLeftString      = "wpsap, wssas and wsa"
    3742                   res@tiXAxisString      = "["+unit(varn)+"]"
    3743                   res@gsnRightString     = " "
    3744                   if (xs .EQ. -1) then
    3745                      res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/))
    3746                   else
    3747                      res@trXMinF = xs
    3748                   end if
    3749                   if (xe .EQ. -1) then
    3750                      res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/))
    3751                   else
    3752                      res@trXMaxF = xe 
    3753                   end if
    3754                   if (vNam(varn) .EQ. "wssas")then
    3755                      res@xyDashPattern = 1
    3756                   end if
    3757                   if (vNam(varn) .EQ. "wsa")then
    3758                      res@xyDashPattern = 2
    3759                   end if
    3760                   plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res)
    3761 
    3762                   ; ***************************************************
    3763                   ; legend for combined plot
    3764                   ; ***************************************************
    3765      
    3766                   lgres                    = True
    3767                   lgMonoDashIndex          = False
    3768                   lgres@lgLabelFont        = "helvetica"   
    3769                   lgres@lgLabelFontHeightF = font_size_legend           
    3770                   lgres@vpWidthF           = 0.09           
    3771                   lgres@vpHeightF          = 0.12         
    3772                   lgres@lgDashIndexes      = (/0,1,2/)
    3773                   lbid = gsn_create_legend(wks,3,(/"wpsap","wssas","wsa"/),lgres)       
     3817                  lbid = gsn_create_legend(wks,3,(/"w"+dq+"sa"+dq,"w*sa*","wsa"/),lgres)       
    37743818
    37753819                  amres = True
     
    37873831            end if
    37883832         
    3789             if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "ws2") then
     3833            if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "ws2" \
     3834                .OR. vNam(varn) .EQ. "u*2" .OR. vNam(varn) .EQ. "v*2" .OR. vNam(varn) .EQ. "w*2" ) then
    37903835               if (us2 .EQ. 0) then
    3791                   res@gsnLeftString      = "us2, vs2 and ws2"
     3836                  res@gsnLeftString      = "u*2, v*2 and w*2"
    37923837                  res@tiXAxisString      = "["+unit(varn)+"]"
    37933838                  res@gsnRightString     = " "
     
    38213866                  lgres@vpHeightF          = 0.12         
    38223867                  lgres@lgDashIndexes      = (/0,1,2/)
    3823                   lbid = gsn_create_legend(wks,3,(/"us2","vs2","ws2"/),lgres)       
     3868                  lbid = gsn_create_legend(wks,3,(/"u*2","v*2","w*2"/),lgres)       
    38243869
    38253870                  amres = True
     
    38373882            end if
    38383883           
    3839             if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "wpeodz" ) then
     3884            if (vNam(varn) .EQ. "wsususodz" .OR. vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "wpeodz" \
     3885               .OR. vNam(varn) .EQ. "w*u*u*:dz" .OR. vNam(varn) .EQ. "w*p*:dz" .OR. vNam(varn) .EQ. "w"+dq+"e:dz") then
    38403886               if (wsususodz .EQ. 0) then
    3841                   res@gsnLeftString      = "wsususodz, wspsodz and wpeodz"
     3887                  res@gsnLeftString      = "w*u*u*:dz, w*p*:dz and w"+dq+"e:dz"
    38423888                  res@tiXAxisString      = "["+unit(varn)+"]"
    38433889                  res@gsnRightString     = " "
     
    38713917                  lgres@vpHeightF          = 0.12         
    38723918                  lgres@lgDashIndexes      = (/0,1,2/)
    3873                   lbid = gsn_create_legend(wks,3,(/"wsususodz","wspsodz","wpeodz"/),lgres)       
     3919                  lbid = gsn_create_legend(wks,3,(/"w*u*u*:dz","w*p*:dz","w"+dq+"e:dz"/),lgres)       
    38743920
    38753921                  amres = True
  • palm/trunk/SCRIPTS/NCL/spectra.ncl

    r418 r526  
    3232
    3333begin
     34
     35   ;***************************************************
     36   ; Retrieving the double quote character
     37   ;***************************************************
     38   
     39   dq=str_get_dq()
    3440
    3541   ;***************************************************
  • palm/trunk/SCRIPTS/NCL/timeseries.ncl

    r418 r526  
    3333   
    3434begin
     35
     36   ;***************************************************
     37   ; Retrieving the double quote character
     38   ;***************************************************
     39   
     40   dq=str_get_dq()
    3541
    3642   ;***************************************************
     
    344350      plot_pt_0_   = gsn_csm_xy(wks_ps,t,data_0(:),res)
    345351      plot_pt_zp_  = gsn_csm_xy(wks_ps,t,data_0(:),res)
    346       plot_splptx  = gsn_csm_xy(wks_ps,t,data_0(:),res)
    347       plot_splpty  = gsn_csm_xy(wks_ps,t,data_0(:),res)
    348       plot_splptz  = gsn_csm_xy(wks_ps,t,data_0(:),res)
    349352   end if
    350353
     
    435438            maxi(varn) = max(data(varn,:))
    436439           
    437             if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es") then
     440            if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") then
    438441               if (mini(varn) .EQ. maxi(varn)) then
    439442                  if (min(data(varn,:)) .EQ. 0)then
     
    454457            end if
    455458
    456             if (vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "ws") then
     459            if (vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "ws"\
     460                .OR. vNam(varn) .EQ. "u*" .OR. vNam(varn) .EQ. "w*") then
    457461               if (mini(varn) .EQ. maxi(varn)) then
    458462                  if (min(data(varn,:)) .EQ. 0)then
     
    511515            end if
    512516
    513             if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wpt") then
     517            if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wpt"\
     518               .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq ) then
    514519               if (mini(varn) .EQ. maxi(varn)) then
    515520                  if (min(data(varn,:)) .EQ. 0)then
     
    530535            end if
    531536
    532             if (vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt_zp_") then
     537            if (vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt_zp_"\
     538               .OR. vNam(varn) .EQ. "pt(0)" .OR. vNam(varn) .EQ. "pt(zp)") then
    533539               if (mini(varn) .EQ. maxi(varn)) then
    534540                  if (min(data(varn,:)) .EQ. 0)then
     
    547553               minp=min((/minp,mini(varn)/))
    548554               maxp=max((/maxp,maxi(varn)/))
    549             end if
    550 
    551             if (vNam(varn) .EQ. "splptx" .OR. vNam(varn) .EQ. "splpty" .OR. vNam(varn) .EQ. "splptz") then
    552                if (mini(varn) .EQ. maxi(varn)) then
    553                   if (min(data(varn,:)) .EQ. 0)then
    554                      mini(varn)= mini(varn)-0.1
    555                      maxi(varn)= maxi(varn)+0.1
    556                   end if
    557                   if (min(data(varn,:)) .LT. 0)then
    558                      mini(varn)= mini(varn)-1.+(mini(varn))/2
    559                      maxi(varn)= maxi(varn)+1.-(maxi(varn))/2
    560                   end if
    561                   if (min(data(varn,:)) .GT. 0)then
    562                      mini(varn)= mini(varn)-1.-(mini(varn))/2
    563                      maxi(varn)= maxi(varn)+1.+(maxi(varn))/2
    564                   end if
    565                end if
    566                mins=min((/mins,mini(varn)/))
    567                maxs=max((/maxs,maxi(varn)/))
    568555            end if
    569556           
     
    617604               plot_E = gsn_csm_xy(wks_ps,t,data(varn,:),res)
    618605            end if
    619             if (vNam(varn) .EQ. "Es")
     606            if (vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*")
    620607               Es=0
    621608               res@xyLineColors            = (/144/)
     
    625612            end if
    626613             
    627             if (vNam(varn) .EQ. "us")
     614            if (vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*")
    628615               us=0
    629616               res@xyLineColors            = (/237/)
     
    634621               plot_us = gsn_csm_xy(wks_ps,t,data(varn,:),res)
    635622            end if             
    636             if (vNam(varn) .EQ. "ws")
     623            if (vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*")
    637624               ws=0
    638625               res@xyLineColors            = (/144/)
     
    683670            end if
    684671
    685             if (vNam(varn) .EQ. "wpptp0")
     672            if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" )
    686673               w0=0
    687674               res@xyLineColors            = (/237/)
     
    692679               plot_wpptp0 = gsn_csm_xy(wks_ps,t,data(varn,:),res)
    693680            end if
    694             if (vNam(varn) .EQ. "wpptp")
     681            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq)
    695682               wp=0
    696683               res@xyLineColors            = (/144/)
     
    707694            end if
    708695
    709             if (vNam(varn) .EQ. "pt_0_")
     696            if (vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)")
    710697               p=0
    711698               res@xyLineColors            = (/237/)
     
    716703               plot_pt_0_ = gsn_csm_xy(wks_ps,t,data(varn,:),res) 
    717704            end if
    718             if (vNam(varn) .EQ. "pt_zp_")
     705            if (vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)")
    719706               pz=0
    720707               res@xyLineColors            = (/144/)
     
    722709               res@xyLineLabelFontColor   = 144
    723710               plot_pt_zp_ = gsn_csm_xy(wks_ps,t,data(varn,:),res)
    724             end if
    725 
    726             if (vNam(varn) .EQ. "splptx")
    727                x=0
    728                res@xyLineColors            = (/237/)
    729                res@xyLineLabelFontHeightF = 0.05
    730                res@xyLineLabelFontColor   = 237
    731                res@trYMaxF           = maxs
    732                res@trYMinF           = mins
    733                plot_splptx = gsn_csm_xy(wks_ps,t,data(varn,:),res)   
    734             end if
    735             if (vNam(varn) .EQ. "splpty")
    736                y=0
    737                res@xyLineColors            = (/144/)
    738                res@xyLineLabelFontHeightF = 0.05
    739                res@xyLineLabelFontColor   = 144
    740                plot_splpty = gsn_csm_xy(wks_ps,t,data(varn,:),res)
    741             end if
    742             if (vNam(varn) .EQ. "splptz")
    743                z=0
    744                res@xyLineColors            = (/80/)
    745                res@xyLineLabelFontHeightF = 0.05
    746                res@xyLineLabelFontColor   = 80
    747                plot_splptz = gsn_csm_xy(wks_ps,t,data(varn,:),res)         
    748711            end if
    749712
     
    787750               lgres@lgDashIndexes      = (/0,0,0/)
    788751               lgres@lgLineColors       = (/237,144,80/)
    789                lbid = gsn_create_legend(wks_ps,2,(/"E","Es"/),lgres)       
     752               lbid = gsn_create_legend(wks_ps,2,(/"E","E*"/),lgres)       
    790753
    791754               amres = True
     
    794757               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)           
    795758            end if
    796             if (vNam(varn) .EQ. "Es" .AND. E .NE. 1) then
     759            if ((vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") .AND. E .NE. 1) then
    797760               Es=1
    798761               overlay(plot_E,plot_Es)
     
    812775               lgres@lgDashIndexes      = (/0,0,0/)
    813776               lgres@lgLineColors       = (/237,144,80/)
    814                lbid = gsn_create_legend(wks_ps,2,(/"E","Es"/),lgres)       
     777               lbid = gsn_create_legend(wks_ps,2,(/"E","E*"/),lgres)       
    815778
    816779               amres = True
     
    820783            end if
    821784
    822             if (vNam(varn) .EQ. "us" .AND. ws .NE. 1) then
     785            if ((vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") .AND. ws .NE. 1) then
    823786               us=1
    824787               overlay(plot_us,plot_ws)
     
    838801               lgres@lgDashIndexes      = (/0,0,0/)
    839802               lgres@lgLineColors       = (/237,144,80/)
    840                lbid = gsn_create_legend(wks_ps,2,(/"us","ws"/),lgres)       
     803               lbid = gsn_create_legend(wks_ps,2,(/"u*","w*"/),lgres)       
    841804
    842805               amres = True
     
    845808               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    846809            end if
    847             if (vNam(varn) .EQ. "ws" .AND. us .NE. 1) then
     810            if ((vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") .AND. us .NE. 1) then
    848811               ws=1
    849812               overlay(plot_us,plot_ws)
     
    863826               lgres@lgDashIndexes      = (/0,0,0/)
    864827               lgres@lgLineColors       = (/237,144,80/)
    865                lbid = gsn_create_legend(wks_ps,2,(/"us","ws"/),lgres)       
     828               lbid = gsn_create_legend(wks_ps,2,(/"u*","w*"/),lgres)       
    866829
    867830               amres = True
     
    1008971            end if   
    1009972         
    1010             if (vNam(varn) .EQ. "wpptp0" .AND. wp .NE. 1)
     973            if ((vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0") .AND. wp .NE. 1)
    1011974               if (wt .NE. 1) then
    1012975                  w0=1
     
    1036999               end if           
    10371000            end if
    1038             if (vNam(varn) .EQ. "wpptp" .AND. w0 .NE. 1)
     1001            if ((vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq) .AND. w0 .NE. 1)
    10391002               if (wt .NE. 1) then
    10401003                 wp=1
     
    10931056            end if
    10941057
    1095             if (vNam(varn) .EQ. "pt_0_" .AND. pz .NE. 1) then
     1058            if ((vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") .AND. pz .NE. 1) then
    10961059               p=1     
    10971060               overlay(plot_pt_0_,plot_pt_zp_)
     
    11181081               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    11191082            end if
    1120             if (vNam(varn) .EQ. "pt_zp_" .AND. p .NE. 1) then
     1083            if ((vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") .AND. p .NE. 1) then
    11211084               pz=1       
    11221085               overlay(plot_pt_0_,plot_pt_zp_)
     
    11431106               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    11441107            end if
    1145            
    1146             if (vNam(varn) .EQ. "splptx" .AND. y .NE. 1)
    1147                if (z .NE.1 ) then
    1148                   x=1     
    1149                   overlay(plot_splptx,plot_splpty)
    1150                   overlay(plot_splptx,plot_splptz)
    1151                   n=n+1
    1152                   plot_ps(n) = plot_splptx   
    1153 
    1154                   ; ***************************************************
    1155                   ; legend for combined plot
    1156                   ; ***************************************************
    1157      
    1158                   lgres                    = True
    1159                   lgMonoDashIndex          = False
    1160                   lgres@lgLabelFont        = "helvetica"   
    1161                   lgres@lgLabelFontHeightF = .1           
    1162                   lgres@vpWidthF           = 0.4           
    1163                   lgres@vpHeightF          = 0.4         
    1164                   lgres@lgDashIndexes      = (/0,0,0/)
    1165                   lgres@lgLineColors       = (/237,144,80/)
    1166                   lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres)       
    1167 
    1168                   amres = True
    1169                   amres@amParallelPosF   = 0.6             
    1170                   amres@amOrthogonalPosF = -0.2           
    1171                   annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    1172                end if
    1173             end if
    1174             if (vNam(varn) .EQ. "splpty" .AND. x .NE. 1)
    1175                if(z .NE.1 ) then
    1176                   y=1         
    1177                   overlay(plot_splptx,plot_splpty)
    1178                   overlay(plot_splptx,plot_splptz)
    1179                   n=n+1
    1180                   plot_ps(n) = plot_splptx
    1181 
    1182                   ; ***************************************************
    1183                   ; legend for combined plot
    1184                   ; ***************************************************
    1185      
    1186                   lgres                    = True
    1187                   lgMonoDashIndex          = False
    1188                   lgres@lgLabelFont        = "helvetica"   
    1189                   lgres@lgLabelFontHeightF = .1           
    1190                   lgres@vpWidthF           = 0.4           
    1191                   lgres@vpHeightF          = 0.4         
    1192                   lgres@lgDashIndexes      = (/0,0,0/)
    1193                   lgres@lgLineColors       = (/237,144,80/)
    1194                   lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres)       
    1195 
    1196                   amres = True
    1197                   amres@amParallelPosF   = 0.6             
    1198                   amres@amOrthogonalPosF = -0.2           
    1199                   annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    1200                end if           
    1201             end if
    1202             if (vNam(varn) .EQ. "splptz" .AND. y .NE. 1)
    1203                if(x .NE.1 ) then
    1204                   z=1         
    1205                   overlay(plot_splptx,plot_splpty)
    1206                   overlay(plot_splptx,plot_splptz)
    1207                   n=n+1
    1208                   plot_ps(n) = plot_splptx 
    1209 
    1210                   ; ***************************************************
    1211                   ; legend for combined plot
    1212                   ; ***************************************************
    1213      
    1214                   lgres                    = True
    1215                   lgMonoDashIndex          = False
    1216                   lgres@lgLabelFont        = "helvetica"   
    1217                   lgres@lgLabelFontHeightF = .1           
    1218                   lgres@vpWidthF           = 0.4           
    1219                   lgres@vpHeightF          = 0.4         
    1220                   lgres@lgDashIndexes      = (/0,0,0/)
    1221                   lgres@lgLineColors       = (/237,144,80/)
    1222                   lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres)       
    1223 
    1224                   amres = True
    1225                   amres@amParallelPosF   = 0.6             
    1226                   amres@amOrthogonalPosF = -0.2           
    1227                   annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
    1228                end if       
    1229             end if
    1230 
    1231             if(vNam(varn) .NE. "splptz" .AND. vNam(varn) .NE. "splpty" .AND. vNam(varn) .NE. "splptx" .AND. vNam(varn) .NE. "pt_zp_" .AND. vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND. vNam(varn) .NE. "wpptp0" .AND. vNam(varn) .NE. "z_i_pt" .AND. vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND. vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND. vNam(varn) .NE. "ws" .AND.  vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E") then
     1108
     1109            if(vNam(varn) .NE. "pt_zp_" .AND. vNam(varn) .NE. "pt(zp)" .AND. \
     1110               vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "pt(0)" .AND. \
     1111               vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND. \
     1112               vNam(varn) .NE. "w"+dq+"pt"+dq .AND. vNam(varn) .NE. "wpptp0" .AND. \
     1113               vNam(varn) .NE. "w"+dq+"pt"+dq+"0" .AND. vNam(varn) .NE. "z_i_pt" .AND.\
     1114               vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND. \
     1115               vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND. \
     1116               vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "w*" .AND.  \
     1117               vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "u*" .AND. \
     1118               vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E*" .AND. \
     1119               vNam(varn) .NE. "E") then
     1120
    12321121               n=n+1
    12331122               res@xyLineColors   = (/237/)
  • palm/trunk/SCRIPTS/palmplot

    r513 r526  
    77    # Last changes
    88    # 16/03/10 - Rieke - initial revision
     9    # 30/03/10 - Rieke - substituting double quotes (") with a character
     10    #                    variable (dq) containing double quotes
    911
    1012
     
    101103    fi
    102104     
    103     # SETTING STRINGS IN QUOTATION MARKS - REQUIRED BY NCL
     105    # PROCESSING STRINGS
    104106    for a in $STRINGPARAMS
    105107    do
    106108      if [ "$key" = "$a" ]
    107109      then
     110         # SUBSTITUTING DOUBLE QUOTES - REQUIRED BY NCL
     111         value=`echo $value | sed 's/\"/\"+dq+\"/g'`
     112         # SETTING ENTIRE STRING IN DOUBLE QUOTES - REQUIRED BY NCL
    108113         value=\"$value\"
    109114         break
     
    117122 # EXECUTING THE PARTICULAR NCL SCRIPT
    118123 cd $PALM_BIN/NCL
    119  ncl $script $CMDLINE
     124 ncl 'dq=str_get_dq()' $script $CMDLINE
    120125
    121126
Note: See TracChangeset for help on using the changeset viewer.