Changeset 529 for palm


Ignore:
Timestamp:
Mar 31, 2010 10:36:23 AM (15 years ago)
Author:
heinze
Message:

palmplot expects lists which are separated by blanks. The lists have to be enclosed in single quotes in the prompt.

Location:
palm/trunk
Files:
5 edited

Legend:

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

    r526 r529  
    11<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
    22<html><head>
     3
     4
    35
    46
     
    9092   
    9193    <tr>
     94      <td style="vertical-align: top;">31/03/10<br>
     95      </td>
     96      <td style="vertical-align: top;">RH<br>
     97      </td>
     98      <td style="vertical-align: top;">529<br>
     99      </td>
     100      <td style="vertical-align: top;">3.7a<br>
     101      </td>
     102      <td style="vertical-align: top;">C<br>
     103      </td>
     104      <td style="vertical-align: top;">List of variable names have to specified using blank separated lists and single quotes<br>
     105      </td>
     106      <td style="vertical-align: top;">palmplot<br>
     107      </td>
     108    </tr>
     109<tr>
    92110      <td style="vertical-align: top;">30/03/10<br>
    93111      </td>
  • palm/trunk/SCRIPTS/NCL/cross_sections.ncl

    r526 r529  
    15331533               vecres@gsnLeftString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) +"h   "+level
    15341534            end if
    1535             vecres@tiXAxisString    = " "
    1536             if (xyc .EQ. 1)then 
     1535            if (xyc .EQ. 1) then 
     1536               vecres@tiXAxisString = "x [m]"
     1537               vecres@tiYAxisString = "y [m]"   
    15371538               if (sort .EQ. "time")then                                         
    15381539                  plot(n) = gsn_csm_vector(wks_ps,vect1(li,lo-los,:,:),vect2(li,lo-los,:,:),vecres)
     
    15421543            end if
    15431544            if (xzc .EQ. 1) then
     1545               vecres@tiXAxisString = "x [m]"
     1546               vecres@tiYAxisString = "z [m]"
    15441547               if (sort .EQ. "time")then
    15451548                  plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,lo-los,:),vect2(li,:,lo-los,:),vecres)
     
    15491552            end if
    15501553            if (yzc .EQ. 1) then
     1554               vecres@tiXAxisString = "y [m]"
     1555               vecres@tiYAxisString = "z [m]"
    15511556               if (sort .EQ. "time")then
    15521557                  plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,:,lo-los),vect2(li,:,:,lo-los),vecres)
     
    15621567   do varn=dim-1,0,1
    15631568
    1564       if (vector .EQ. 1) then   
     1569      if (vector .EQ. 1 ) then   
    15651570         check_vecp = isStrSubset( plotvec,","+vNam(varn)+",")
    15661571      end if
     
    16781683                        vecres@gsnLeftString    = " "             ; turn off left string
    16791684                        vecres@tiXAxisString    = " "   
    1680                         plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li,:,:),vect2(lo,li,:,:),vecres)
     1685                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li-lis,:,:),vect2(lo,li-lis,:,:),vecres)
    16811686                        overlay(plot(n), plot_vec)
    16821687                     end if
     
    18021807   ; merge plots onto one page
    18031808   ; ***************************************************   
    1804    if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec")then
     1809   if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then
    18051810      if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. no_time*no_layer*(no_var+1) .gt. no_rows*no_columns) then
    18061811         gsn_panel(wks_ps,plot(0:(no_time*no_layer*(no_var+1))-1),(/no_var+1,no_layer*no_time/),cs_resP)
  • palm/trunk/SCRIPTS/palmplot

    r526 r529  
    99    # 30/03/10 - Rieke - substituting double quotes (") with a character
    1010    #                    variable (dq) containing double quotes
     11    # 31/03/10 - Rieke - list of variable names can be specified using
     12    #                    blank separated lists instead of comma
     13    #                    separated lists
    1114
    1215
     
    1619    (printf "\n   palmplot is designed to run the NCL scripts of PALM \n"
    1720     printf "\n   palmplot can be called as follows:"
    18      printf "\n   palmplot script_identifier file_1=OUTPUT/test.nc file_out=test format_out=pdf var=,pt,u, no_rows=2 ...\n"
     21     printf "\n   palmplot script_identifier file_1=OUTPUT/test.nc file_out=test format_out=pdf var='pt w\"pt\" w*pt* u' no_rows=2 ...\n"
    1922     printf "\n   script_identifier has to be one of the following:"
    2023     printf "\n    xy, xz, yz, pr, ts, sp"
     
    3033 a=""
    3134 arg=""
     35 b=""
    3236 key=""
    3337 script=""
     
    4044 STRINGPARAMS_SP=""
    4145 STRINGPARAMS_TS=""
     46 STRINGPARAMS_VA=""
    4247
    4348
     
    4550 # CO: PARAMETERS WHICH ARE COMMON FOR ALL NCL SCRIPTS
    4651 # CS: cross_sections.ncl PR: profiles.ncl SP: spectra.ncl TS: timeseries.ncl
     52 # VA: PARAMETERS WHICH CONTAIN LISTS OF VARIABLE NAMES
    4753 STRINGPARAMS_CO="file_1 format_out file_out var "
    4854 STRINGPARAMS_CS="sort mode fill_mode unit_x unit_y unit_z vec1 vec2 plotvec"
     
    5056 STRINGPARAMS_SP="sort unit_x unit_y"
    5157 STRINGPARAMS_TS="unit_t"
     58 STRINGPARAMS_VA="var c_var vec1 vec2 plotvec"
    5259
    5360
     
    96103    key=${arg%%=*}
    97104    value=${arg#*=}
    98    
     105
    99106    # ALLOWING RELATIVE AND ABSOLUTE FILE PATHS
    100107    if [[ "$key" ==  @(file_*) && "$value" != @(~/*|/*) ]]
     
    108115      if [ "$key" = "$a" ]
    109116      then
     117
     118         # PROCESSING STRINGS CONTAINING LISTS OF VARIABLES
     119         for b in $STRINGPARAMS_VA
     120         do
     121           if [ "$key" = "$b" ]
     122           then
     123              if [[ "$value" != "all" ]]
     124              then
     125                 # SUBSTITUTING BLANKS WITH COMMAS IN
     126                 # PARAMETERS CONTAINING LISTS OF VARIABLES
     127                 value=`echo $value | sed 's/ /,/g'`           
     128                 if [[ "$value" == ${value#,} ]]
     129                 then
     130                    value=,$value
     131                 fi
     132                 if [[ "$value" == ${value%,} ]]
     133                 then
     134                    value=$value,
     135                 fi
     136                 break
     137              fi
     138           fi
     139         done
     140
    110141         # SUBSTITUTING DOUBLE QUOTES - REQUIRED BY NCL
    111142         value=`echo $value | sed 's/\"/\"+dq+\"/g'`
    112143         # SETTING ENTIRE STRING IN DOUBLE QUOTES - REQUIRED BY NCL
    113144         value=\"$value\"
    114          break
    115145      fi
    116146    done
Note: See TracChangeset for help on using the changeset viewer.