Changeset 1110 for palm/trunk/SCRIPTS/nc2vdf.ncl
- Timestamp:
- Mar 7, 2013 11:42:45 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/nc2vdf.ncl
r1068 r1110 18 18 ; Current revisions: 19 19 ; ----------------- 20 ; adapted for use on desktop machines 20 21 ; 21 22 ; Former revisions: … … 41 42 ; order to run this script, NCL version 5.2.0 or higher is required. 42 43 ; Default setting will be loaded from .nc2vdf.config. 43 ; Note that on HLRN, vapor is only available on hicegate2, bicegate2 and the UV44 ; sytem.44 ; The script does only work on hicegate2, bicegate2, 45 ; uv, on the imuk server. It can be adapted for use on any desktop machine. 45 46 ;------------------------------------------------------------------------------! 46 47 … … 76 77 print("*** loading " + dimsizes(files) + ":") 77 78 do i=0,dimsizes(files)-1 78 print(" " + i + ") " + files(i)) 79 print(" " + i + ") " + files(i)) 79 80 end do 80 81 … … 87 88 sys = "unknown" 88 89 query = systemfunc("echo $HOSTNAME") 89 check_muk = isStrSubset(query,"muk.uni-hannover.de") 90 check_hice = isStrSubset(query,"hicegate2") 90 check_muk = isStrSubset(query,"muk.uni-hannover.de") 91 check_hice = isStrSubset(query,"hicegate2") 91 92 check_bice = isStrSubset(query,"bicegate2") 92 93 check_huv = isStrSubset(query,"huv") 93 94 check_buv = isStrSubset(query,"buv") 94 check_WS = isStrSubset(query,"kookaburra") ;*** insert name of your workstation here 95 95 96 96 97 … … 108 109 sys = "HLRN" 109 110 else 110 if ( check_ WS.eq. True) then111 if ( check_workstation .eq. True) then 111 112 print("*** nc2vdf will execute on a workstation PC/Mac") 112 113 sys = "workstation" 113 path = "/Applications/VAPOR.app/Contents/MacOS/" ;*** costomize path for WS114 path = install_path 114 115 end if 115 116 end if … … 121 122 end if 122 123 123 124 124 125 workpath = systemfunc("echo $PWD") + "/" 125 126 … … 152 153 153 154 if man then 154 ;**** Get names of variables wanted to appearin the VDF file, then get their dimensions with min/max x,y,z155 ;**** Get names of variables appearing in the VDF file, then get their dimensions with min/max x,y,z 155 156 print(" ") 156 157 print("Choose the *.nc files containing 3D data by typing their indices (seperated by ','). Start with the first files of the timeseries.") … … 190 191 191 192 varNames = getfilevarnames(f) 192 193 193 194 194 195 if man then 195 196 print(" ") … … 205 206 nvars = dimsizes(vars) 206 207 end if; man 207 208 208 209 if (nofiles .eq. 1) then 209 210 if man then … … 219 220 varString(i,n) = varNames(vars(n)) 220 221 end if; man 221 222 222 223 if alt_varnames then 223 224 varString(i,n) = varNames(vars(i,n)) 224 225 end if 225 226 226 227 if (vars3d .ne. "") then 227 228 vars3d = vars3d + ":" + varString(i,n) … … 234 235 dimNames(i,n,:) = getfilevardims(f, varString(i,n)) 235 236 236 237 237 238 238 239 time = f->$dimNames(i,n,0)$ … … 373 374 end if 374 375 375 376 376 377 377 378 ;******************************************************************************* … … 437 438 438 439 delete(f) 439 440 440 441 do i=0,nofiles-1 441 442 … … 447 448 print(" ") 448 449 file_in(i) = files_avail(toint(systemfunc("read file; echo $file"))) 449 450 450 451 end do 451 452 … … 489 490 end do 490 491 end if 491 492 493 492 493 494 494 495 t_end = dimsizes(time)-1 495 496 496 497 497 498 498 499 end if 499 500 … … 539 540 dims2d = getfilevardimsizes(f,varString2d(n)) 540 541 dimNames2d(n,:) = getfilevardims(f,varString2d(n)) 541 542 542 543 543 544 end do … … 556 557 end do 557 558 end do 558 delete(varNames2d) 559 delete(varNames2d) 559 560 end if 560 561
Note: See TracChangeset
for help on using the changeset viewer.