Changeset 1559 for palm/trunk/SCRIPTS/NCL/timeseries.ncl
- Timestamp:
- Mar 6, 2015 8:22:12 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r1248 r1559 3 3 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" 4 4 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" 5 5 6 ;*************************************************** 7 ; Checking the kind of the script 8 ;*************************************************** 9 10 function which_script() 11 local script 12 begin 13 script = "timeseries" 14 return(script) 15 end 16 17 ;*************************************************** 18 ; Retrieving the NCL version used 19 ;*************************************************** 20 21 ncl_version_ch = systemfunc("ncl -V") 22 ncl_version = stringtofloat(ncl_version_ch) 23 24 ;*************************************************** 25 ; Function for checking file existence in dependence 26 ; on NCL version 27 ;*************************************************** 28 29 function file_exists(version:string,file_name:string) 30 begin 31 if( version .EQ. "6.2.1" ) then 32 existing = fileexists(file_name) 33 else 34 existing = isfilepresent(file_name) 35 end if 36 return(existing) 37 end 38 6 39 ;*************************************************** 7 40 ; load .ncl.config or .ncl.config.default 8 41 ;*************************************************** 9 10 function which_script() 11 local script 12 begin 13 script="timeseries" 14 return(script) 15 end 16 17 if (isfilepresent("$PALM_BIN/../../.ncl.config")) then 42 43 file_name ="$PALM_BIN/../../.ncl.config" 44 existing_file = file_exists(ncl_version_ch,file_name) 45 46 if (existing_file) then 18 47 loadscript("$PALM_BIN/../../.ncl.config") 19 48 else 20 if (isfilepresent("$PALM_BIN/NCL/.ncl.config.default")) then 21 loadscript( "$PALM_BIN/NCL/.ncl.config.default") 22 else 49 file_name = "$PALM_BIN/NCL/.ncl.config.default" 50 existing_file = file_exists(ncl_version_ch,file_name) 51 if (existing_file) then 52 loadscript( "$PALM_BIN/NCL/.ncl.config.default") 53 else 23 54 palm_bin_path = getenv("PALM_BIN") 24 55 print(" ") … … 31 62 exit 32 63 end if 33 end if 34 64 end if 65 35 66 begin 36 37 ;***************************************************38 ; Retrieving the NCL version used39 ;***************************************************40 41 ncl_version_ch = systemfunc("ncl -V")42 ncl_version = stringtofloat(ncl_version_ch)43 67 44 68 ;***************************************************
Note: See TracChangeset
for help on using the changeset viewer.