Changeset 529
- Timestamp:
- Mar 31, 2010 10:36:23 AM (15 years ago)
- Location:
- palm/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/DOC/tec/technical_documentation.html
r526 r529 1 1 <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> 2 2 <html><head> 3 4 3 5 4 6 … … 90 92 91 93 <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> 92 110 <td style="vertical-align: top;">30/03/10<br> 93 111 </td> -
palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r526 r529 1533 1533 vecres@gsnLeftString = "t=" + decimalPlaces(t_all(lo)/3600,2,True) +"h "+level 1534 1534 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]" 1537 1538 if (sort .EQ. "time")then 1538 1539 plot(n) = gsn_csm_vector(wks_ps,vect1(li,lo-los,:,:),vect2(li,lo-los,:,:),vecres) … … 1542 1543 end if 1543 1544 if (xzc .EQ. 1) then 1545 vecres@tiXAxisString = "x [m]" 1546 vecres@tiYAxisString = "z [m]" 1544 1547 if (sort .EQ. "time")then 1545 1548 plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,lo-los,:),vect2(li,:,lo-los,:),vecres) … … 1549 1552 end if 1550 1553 if (yzc .EQ. 1) then 1554 vecres@tiXAxisString = "y [m]" 1555 vecres@tiYAxisString = "z [m]" 1551 1556 if (sort .EQ. "time")then 1552 1557 plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,:,lo-los),vect2(li,:,:,lo-los),vecres) … … 1562 1567 do varn=dim-1,0,1 1563 1568 1564 if (vector .EQ. 1 ) then1569 if (vector .EQ. 1 ) then 1565 1570 check_vecp = isStrSubset( plotvec,","+vNam(varn)+",") 1566 1571 end if … … 1678 1683 vecres@gsnLeftString = " " ; turn off left string 1679 1684 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) 1681 1686 overlay(plot(n), plot_vec) 1682 1687 end if … … 1802 1807 ; merge plots onto one page 1803 1808 ; *************************************************** 1804 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then1809 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then 1805 1810 if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. no_time*no_layer*(no_var+1) .gt. no_rows*no_columns) then 1806 1811 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 9 9 # 30/03/10 - Rieke - substituting double quotes (") with a character 10 10 # 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 11 14 12 15 … … 16 19 (printf "\n palmplot is designed to run the NCL scripts of PALM \n" 17 20 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" 19 22 printf "\n script_identifier has to be one of the following:" 20 23 printf "\n xy, xz, yz, pr, ts, sp" … … 30 33 a="" 31 34 arg="" 35 b="" 32 36 key="" 33 37 script="" … … 40 44 STRINGPARAMS_SP="" 41 45 STRINGPARAMS_TS="" 46 STRINGPARAMS_VA="" 42 47 43 48 … … 45 50 # CO: PARAMETERS WHICH ARE COMMON FOR ALL NCL SCRIPTS 46 51 # CS: cross_sections.ncl PR: profiles.ncl SP: spectra.ncl TS: timeseries.ncl 52 # VA: PARAMETERS WHICH CONTAIN LISTS OF VARIABLE NAMES 47 53 STRINGPARAMS_CO="file_1 format_out file_out var " 48 54 STRINGPARAMS_CS="sort mode fill_mode unit_x unit_y unit_z vec1 vec2 plotvec" … … 50 56 STRINGPARAMS_SP="sort unit_x unit_y" 51 57 STRINGPARAMS_TS="unit_t" 58 STRINGPARAMS_VA="var c_var vec1 vec2 plotvec" 52 59 53 60 … … 96 103 key=${arg%%=*} 97 104 value=${arg#*=} 98 105 99 106 # ALLOWING RELATIVE AND ABSOLUTE FILE PATHS 100 107 if [[ "$key" == @(file_*) && "$value" != @(~/*|/*) ]] … … 108 115 if [ "$key" = "$a" ] 109 116 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 110 141 # SUBSTITUTING DOUBLE QUOTES - REQUIRED BY NCL 111 142 value=`echo $value | sed 's/\"/\"+dq+\"/g'` 112 143 # SETTING ENTIRE STRING IN DOUBLE QUOTES - REQUIRED BY NCL 113 144 value=\"$value\" 114 break115 145 fi 116 146 done
Note: See TracChangeset
for help on using the changeset viewer.