Ignore:
Timestamp:
Mar 7, 2013 11:42:45 AM (11 years ago)
Author:
maronga
Message:

updates in nc2vdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/nc2vdf.ncl

    r1068 r1110  
    1818; Current revisions:
    1919; -----------------
     20; adapted for use on desktop machines
    2021;
    2122; Former revisions:
     
    4142; order to run this script, NCL version 5.2.0 or higher is required.
    4243; Default setting will be loaded from .nc2vdf.config.
    43 ; Note that on HLRN, vapor is only available on hicegate2, bicegate2 and the UV
    44 ; 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.
    4546;------------------------------------------------------------------------------!
    4647
     
    7677    print("*** loading " + dimsizes(files) + ":")
    7778    do i=0,dimsizes(files)-1
    78        print("    " + i + ") " + files(i)) 
     79       print("    " + i + ") " + files(i))
    7980    end do
    8081
     
    8788    sys        = "unknown"
    8889    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")
    9192    check_bice = isStrSubset(query,"bicegate2")
    9293    check_huv  = isStrSubset(query,"huv")
    9394    check_buv  = isStrSubset(query,"buv")
    94     check_WS   = isStrSubset(query,"kookaburra") ;*** insert name of your workstation here
     95
    9596
    9697
     
    108109             sys = "HLRN"
    109110             else
    110                 if ( check_WS .eq. True) then
     111                if ( check_workstation .eq. True) then
    111112                print("*** nc2vdf will execute on a workstation PC/Mac")
    112113                sys = "workstation"
    113                 path     = "/Applications/VAPOR.app/Contents/MacOS/" ;*** costomize path for WS
     114                path = install_path
    114115          end if
    115116          end if
     
    121122    end if
    122123
    123    
     124
    124125workpath = systemfunc("echo $PWD") + "/"
    125126
     
    152153
    153154if man then
    154     ;**** Get names of variables wanted to appear in the VDF file, then get their dimensions with min/max x,y,z
     155    ;**** Get names of variables appearing in the VDF file, then get their dimensions with min/max x,y,z
    155156    print(" ")
    156157    print("Choose the *.nc files containing 3D data by typing their indices (seperated by ','). Start with the first files of the timeseries.")
     
    190191
    191192    varNames      = getfilevarnames(f)
    192    
    193    
     193
     194
    194195    if man then
    195196    print(" ")
     
    205206    nvars = dimsizes(vars)
    206207    end if; man
    207    
     208
    208209    if (nofiles .eq. 1) then
    209210    if man then
     
    219220       varString(i,n) = varNames(vars(n))
    220221       end if; man
    221        
     222
    222223       if alt_varnames then
    223224            varString(i,n) = varNames(vars(i,n))
    224225       end if
    225        
     226
    226227       if (vars3d .ne. "") then
    227228       vars3d       = vars3d + ":" + varString(i,n)
     
    234235       dimNames(i,n,:) = getfilevardims(f, varString(i,n))
    235236
    236        
     237
    237238
    238239       time     = f->$dimNames(i,n,0)$
     
    373374end if
    374375
    375        
     376
    376377
    377378;*******************************************************************************
     
    437438
    438439    delete(f)
    439          
     440
    440441    do i=0,nofiles-1
    441442
     
    447448        print(" ")
    448449        file_in(i)    = files_avail(toint(systemfunc("read file; echo $file")))
    449        
     450
    450451    end do
    451452
     
    489490       end do
    490491    end if
    491            
    492            
    493            
     492
     493
     494
    494495    t_end       = dimsizes(time)-1
    495496
    496497
    497    
     498
    498499    end if
    499500
     
    539540         dims2d     = getfilevardimsizes(f,varString2d(n))
    540541         dimNames2d(n,:) = getfilevardims(f,varString2d(n))
    541          
     542
    542543
    543544      end do
     
    556557         end do
    557558      end do
    558       delete(varNames2d)     
     559      delete(varNames2d)
    559560   end if
    560561
Note: See TracChangeset for help on using the changeset viewer.