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