Changeset 194 for palm/trunk/SCRIPTS/NCL/cross_sections.ncl
- Timestamp:
- Aug 28, 2008 12:15:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r190 r194 8 8 ; load ncl_preferences.ncl 9 9 ;*************************************************** 10 10 11 function which_script() 12 local script 13 begin 14 script="cross_section" 15 return(script) 16 end 17 11 18 if (isfilepresent("~/ncl_preferences.ncl")) then 12 19 loadscript("~/ncl_preferences.ncl") … … 21 28 end if 22 29 end if 23 30 24 31 begin 25 26 if (cross_sections .NE. 1 .OR. profiles .NE. 0 .OR. timeseries .NE. 0 .OR. spectra .NE. 0)then27 print(" ")28 print("Please specify the used script in 'ncl_preferences.ncl' (Line 7-10)")29 print(" ")30 print("Set 'cross_sections' equal 1 and the other variables equal 0")31 print(" ")32 exit33 end if34 32 35 33 ; *************************************************** … … 916 914 check = True 917 915 end if 918 919 if (var .NE. "all") then920 check = isStrSubset( var,","+vNam(varn)+"," )921 end if922 916 923 917 if(check) then 924 918 925 919 no_var=no_var+1 926 920 … … 965 959 var_input=new(no_var,string) 966 960 numb=0 961 no_var=0 962 967 963 do varn=dim-1,0,1 968 964 … … 977 973 check = True 978 974 end if 979 980 if (var .NE. "all") then981 check = isStrSubset( var,","+vNam(varn)+"," )982 end if983 975 984 976 if(check) then … … 986 978 numb=numb+1 987 979 end if 980 981 if (var .NE. "all") then 982 check = isStrSubset( var,","+vNam(varn)+"," ) 983 end if 984 985 if (check) then 986 no_var = no_var+1 987 end if 988 988 989 989 end do … … 1000 1000 if (v1 .EQ. 0)then 1001 1001 print(" ") 1002 print("Component 1 for the vector-plot ('vec1') must be one of the input varibles:")1002 print("Component 1 for the vector-plot ('vec1') must be one of the varibles on the input file:") 1003 1003 print("- "+var_input) 1004 1004 print("be sure to have one comma berfore and after the variable") … … 1009 1009 if (v2 .EQ. 0)then 1010 1010 print(" ") 1011 print("Component 2 for the vector-plot ('vec2') must be one of the input varibles:")1011 print("Component 2 for the vector-plot ('vec2') must be one of the varibles on the input file:") 1012 1012 print("- "+var_input) 1013 1013 print("be sure to have one comma berfore and after the variable") … … 1024 1024 gsn_define_colormap(wks_ps,"rainbow+white") 1025 1025 1026 plot=new((/no_time*no_layer*no_var *2/),graphic)1026 plot=new((/no_time*no_layer*no_var/),graphic) 1027 1027 1028 1028 page = 0 … … 1099 1099 1100 1100 if ( sort .eq. "time" ) then 1101 if ( data&z(lo) .eq. -1 ) then 1102 level = "-average" 1101 if ( data&z(lo) .eq. -1)then 1102 if (delta_z .EQ. -1) then 1103 level = "-average" 1104 else 1105 level = "=" + data&z(lo) + "m" 1106 end if 1103 1107 else 1104 1108 level = "=" + data&z(lo) + "m" … … 1122 1126 1123 1127 if ( sort .eq. "layer" ) then 1124 if ( data&z(li) .eq. -1 ) then 1125 level = "-average" 1128 if (data&z(li) .eq. -1) then 1129 if (delta_z .EQ. -1) then 1130 level = "-average" 1131 else 1132 level = "=" + data&z(li) + "m" 1133 end if 1126 1134 else 1127 1135 level = "=" + data&z(li) + "m" … … 1267 1275 ; merge plots onto one page 1268 1276 ; *************************************************** 1269 1277 1270 1278 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec")then 1271 1279 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then … … 1291 1299 else 1292 1300 do np = 0,no_layer*no_time*no_var-1,no_lines*no_columns 1293 if ( np + no_lines*no_columns .gt. (no_layer*no_time*no_var)-1) then 1301 if ( np + no_lines*no_columns .gt. (no_layer*no_time*no_var)-1) then 1294 1302 gsn_panel(wks_ps, plot(np:(no_layer*no_time*no_var)-1),(/no_lines,no_columns/),cs_resP) 1295 1303 else
Note: See TracChangeset
for help on using the changeset viewer.