Changeset 194
- Timestamp:
- Aug 28, 2008 12:15:13 PM (16 years ago)
- Location:
- palm/trunk/SCRIPTS/NCL
- Files:
-
- 5 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 -
palm/trunk/SCRIPTS/NCL/ncl_preferences.ncl
r190 r194 1 1 begin 2 2 3 ;*********************************************************4 ; Please specify the used script by setting it to 1:5 3 ;********************************************************* 6 7 cross_sections = 0 8 profiles = 0 9 timeseries = 0 10 spectra = 0 4 5 script=which_script 11 6 12 7 ;********************************************************* 13 8 14 9 ;****************************************************** 15 10 ; parameters used by CROSS_SECTIONS 16 11 ;****************************************************** 17 12 18 if ( cross_sections .EQ. 1)then13 if (script .EQ. "cross_section")then 19 14 20 15 ;*************************************************** … … 28 23 ;*************************************************** 29 24 if(.not. isvar("file_1"))then 30 31 25 26 32 27 file_1 = "File in" 33 28 34 29 35 30 end if 36 31 ;*************************************************** … … 81 76 ; data type: string 82 77 ; 83 ; default: "~/test "78 ; default: "~/test_cs" 84 79 ;*************************************************** 85 80 if(.not. isvar("file_out"))then … … 264 259 ; OPTIONAL --zs-- MINIMUM Z-AXIS 265 260 ; 266 ; value for minimum of z-axis, selectable if there are NO preseted layers for z (as for XZ or YZ 2D-DATA); 267 ; you don't have to specify a precise meter value from the input file, it will be rounded to the next 268 ; existent value 261 ; index for minimum of z-axis, selectable if there are NO preseted layers for z (as for XZ or YZ 2D-DATA); 262 ; you cannot specify a meter value from the input file due to grid stretching 269 263 ; 270 264 ; data type: integer … … 282 276 ; OPTIONAL --ze-- MAXIMUM Z-AXIS 283 277 ; 284 ; value for maximum of z-axis, selectable if there are NO preseted layers for z (as for XZ or YZ 2D-DATA); 285 ; you don't have to specify a precise meter value from the input file, it will be rounded to the next 286 ; existent value 278 ; index for maximum of z-axis, selectable if there are NO preseted layers for z (as for XZ or YZ 2D-DATA); 279 ; you cannot specify a meter value from the input file due to grid stretching 287 280 ; 288 281 ; data type: integer … … 417 410 end if 418 411 ;*************************************************** 419 412 420 413 end if 421 414 … … 424 417 ;****************************************************** 425 418 426 if ( profiles .EQ. 1)then427 419 if (script .EQ. "profiles")then 420 428 421 ;*************************************************** 429 422 ; REQUIRED --file_1-- INPUT FILE … … 481 474 ; data type: string 482 475 ; 483 ; default: "~/test "476 ; default: "~/test_pr" 484 477 ;*************************************************** 485 478 if (.not. isvar("file_out"))then … … 1157 1150 1158 1151 end if 1159 1152 1160 1153 ;****************************************************** 1161 1154 ; parameters used by SPECTRA 1162 1155 ;****************************************************** 1163 1156 1164 if (s pectra .EQ. 1) then1165 1157 if (script .EQ. "spectra") then 1158 1166 1159 ;*************************************************** 1167 1160 ; REQUIRED --file_1-- INPUT FILE … … 1203 1196 ; data type: string 1204 1197 ; 1205 ; default: "~/test "1198 ; default: "~/test_sp" 1206 1199 ;*************************************************** 1207 1200 if (.not. isvar("file_out"))then … … 1428 1421 1429 1422 end if 1430 1431 1423 1432 1424 ;****************************************************** 1433 1425 ; parameters used by TIMESERIES 1434 1426 ;****************************************************** 1435 1427 1436 if ( timeseries .EQ. 1) then1437 1428 if (script .EQ. "timeseries") then 1429 1438 1430 ;*************************************************** 1439 1431 ; REQUIRED --file_1-- INPUT FILE … … 1475 1467 ; data type: string 1476 1468 ; 1477 ; default: "~/test "1469 ; default: "~/test_ts" 1478 1470 ;*************************************************** 1479 1471 if (.not. isvar("file_out"))then … … 1587 1579 1588 1580 end if 1589 1590 1581 1591 1582 ;********************************************************* -
palm/trunk/SCRIPTS/NCL/profiles.ncl
r190 r194 6 6 ; load ncl_preferences.ncl 7 7 ;*************************************************** 8 9 function which_script() 10 local script 11 begin 12 script="profiles" 13 return(script) 14 end 8 15 9 16 if (isfilepresent("~/ncl_preferences.ncl")) then … … 22 29 begin 23 30 24 if (cross_sections .NE. 0 .OR. profiles .NE. 1 .OR. timeseries .NE. 0 .OR. spectra .NE. 0)then25 print(" ")26 print("Please specify the used script in 'ncl_preferences.ncl' (Line 7-10)")27 print(" ")28 print("Set 'profiles' equal 1 and the other variables equal 0")29 print(" ")30 exit31 end if32 33 31 ;*************************************************** 34 32 ; set up default parameter values and strings -
palm/trunk/SCRIPTS/NCL/spectra.ncl
r190 r194 6 6 ; load ncl_preferences.ncl 7 7 ;*************************************************** 8 9 function which_script() 10 local script 11 begin 12 script="spectra" 13 return(script) 14 end 8 15 9 16 if (isfilepresent("~/ncl_preferences.ncl")) then … … 21 28 22 29 begin 23 24 if (cross_sections .NE. 0 .OR. profiles .NE. 0 .OR. timeseries .NE. 0 .OR. spectra .NE. 1)then25 print(" ")26 print("Please specify the used script in 'ncl_preferences.ncl' (Line 7-10)")27 print(" ")28 print("Set 'spectra' equal 1 and the other variables equal 0")29 print(" ")30 exit31 end if32 30 33 31 ;*************************************************** … … 339 337 end do 340 338 end if 341 342 step=round(235/(np-1),3) 343 if (black .eq. 0 ) then 344 res@xyLineColors = ispan(2,237,step) 339 340 if (black .eq. 0 ) then 341 if (np .EQ. 1)then 342 res@xyLineColors = 237 343 else 344 step=round(235/(np-1),3) 345 res@xyLineColors = ispan(2,237,step) 346 end if 345 347 end if 346 348 if ( dash .eq. 0 ) then -
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r190 r194 1 6load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"1 load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl" 2 2 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" 3 3 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" … … 7 7 ; load ncl_preferences.ncl 8 8 ;*************************************************** 9 10 function which_script() 11 local script 12 begin 13 script="timeseries" 14 return(script) 15 end 9 16 10 17 if (isfilepresent("~/ncl_preferences.ncl")) then … … 22 29 23 30 begin 24 25 if (cross_sections .NE. 0 .OR. profiles .NE. 0 .OR. timeseries .NE. 1 .OR. spectra .NE. 0)then26 print(" ")27 print("Please specify the used script in 'ncl_preferences.ncl' (Line 7-10)")28 print(" ")29 print("Set 'timeseries' equal 1 and the other variables equal 0")30 print(" ")31 exit32 end if33 31 34 32 ;***************************************************
Note: See TracChangeset
for help on using the changeset viewer.