Changeset 175 for palm/trunk/SCRIPTS/NCL/timeseries.ncl
- Timestamp:
- Jul 8, 2008 8:29:06 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r174 r175 10 10 ; *************************************************** 11 11 12 if (isfilepresent(" .ncl_preferences")) then13 parameter = asciiread(" .ncl_preferences",77,"string")12 if (isfilepresent("~/.ncl_preferences")) then 13 parameter = asciiread("~/.ncl_preferences",129,"string") 14 14 delete(parameter@_FillValue) 15 15 else 16 print(" ") 17 print("'.ncl_preferences' is not existent") 18 print(" ") 19 exit 16 if (isfilepresent("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences")) then 17 parameter = asciiread("~/palm/current_version/trunk/SRIPTS/NCL/.ncl_preferences",129,"string") 18 delete(parameter@_FillValue) 19 else 20 print(" ") 21 print("'.ncl_preferences' is not present in '~/palm/current_version/trunk/SRIPTS/NCL/'") 22 print(" ") 23 exit 24 end if 20 25 end if 21 26 … … 24 29 ; *************************************************** 25 30 26 if ( .not. isvar("file_ in") ) then ; path+name of input file27 if (parameter(7) .EQ. " input file") then28 print(" ") 29 print("Please provide input file 'file_in =' either in prompt or parameter_list")31 if ( .not. isvar("file_1") ) then 32 if (parameter(7) .EQ. "File in") then 33 print(" ") 34 print("Please provide 1st input file 'file_1=' either in prompt or parameter_list") 30 35 print(" ") 31 36 exit 32 37 else 33 38 file_in = parameter(7) 34 end if 35 end if 36 if ( .not. isvar("format_out") ) then ; format of output file 39 end if 40 else 41 file_in = file_1 42 end if 43 if (.not. isfilepresent(file_in)) then 44 print(" ") 45 print("Your 1st input file: '"+file_in+"' does not exist") 46 print(" ") 47 exit 48 end if 49 50 if ( .not. isvar("format_out") ) then 37 51 format_out = "x11" 38 52 if (parameter(9) .NE. "x11") then 39 53 format_out = parameter(9) 54 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then 55 print(" ") 56 print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") 57 print(" ") 58 end if 40 59 end if 41 end if 60 else 61 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm")then 62 print(" ") 63 print("Your 'format_out = "+format_out+"' is invalid and set to'x11'") 64 print(" ") 65 end if 66 end if 67 42 68 if ( .not. isvar("file_out") ) then ; path+name of output file 43 69 file_out = "test" … … 46 72 end if 47 73 end if 74 48 75 if ( .not. isvar("no_columns") ) then ; number of plots in one row 49 76 no_columns = 1 … … 52 79 end if 53 80 end if 81 54 82 if ( .not. isvar("no_lines") ) then ; number of plot-lines on one sheet 55 83 no_lines = 2 … … 58 86 end if 59 87 end if 88 60 89 if ( .not. isvar("var") ) then ; variable name 61 90 check = True 62 91 end if 92 63 93 if ( .not. isvar("over") ) then ; switches overlaying plots on 64 94 over = 0 … … 67 97 if (stringtointeger(parameter(37)) .NE. 1) then 68 98 print(" ") 69 print(" Please set 'over' to 0 or 1")70 print(" ") 71 exit99 print("Your 'over'= "+over+" is invalid and set to 0") 100 print(" ") 101 over = 0 72 102 end if 73 103 end if 74 end if 75 104 else 105 if (over .NE. 0 .AND. over .NE. 1)then 106 print(" ") 107 print("Your 'over'= "+over+" is invalid and set to 0") 108 print(" ") 109 over = 0 110 end if 111 end if 112 76 113 ; *************************************************** 77 114 ; open input file … … 220 257 delete(end_time_step) 221 258 end_time_step=round(et,3) 259 260 print(" ") 261 print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step) 262 print(" till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step) 263 print(" ") 222 264 223 265 t = f->time(start_time_step:end_time_step) … … 477 519 if (count_var .EQ. 0) then 478 520 print(" ") 479 print("Please select a variable 'var=' or use the default value") 480 print(" ") 481 print("Your selection '"+var+"' does not exist on the input file") 521 print("The variables 'var=°"+var+"°' do not exist on your input file") 482 522 print(" ") 483 523 exit 484 end if 524 end if 485 525 486 526 do varn = dim-1,0,1 … … 500 540 501 541 if(check) then 542 543 if (isStrSubset(vNam(varn),"_0" ))then 544 print(" ") 545 print("If you have Outputs of statistic regions you cannot overlay variables; 'over' is set to 0") 546 print(" ") 547 over = 0 548 end if 502 549 503 550 if (over .EQ. 1) then
Note: See TracChangeset
for help on using the changeset viewer.