- Timestamp:
- Nov 28, 2016, 4:16:51 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1354 r1358 13171 13171 [fold]: folder with the location of the netCDF files 13172 13172 [ncfile]= header of the name of the files to concatenate [ncfile]* 13173 [varn]= name of the variable Time ('WRFt ', for WRF time)13173 [varn]= name of the variable Time ('WRFtime', for WRF time) 13174 13174 """ 13175 13175 import subprocess as sub … … 13199 13199 ncf = NetCDFFile(filename, 'r') 13200 13200 datesv = [] 13201 if varn == 'WRFt ':13201 if varn == 'WRFtime': 13202 13202 fdates = ncf.variables['Times'][:] 13203 13203 for it in range(fdates.shape[0]): … … 13682 13682 """ Function to get a section (values along multiple variables) of a given data-set 13683 13683 values= [varn1],[beg1],[end1],[int1]@[...[[varnM],[begM],[endM],[intM]]] 13684 [varni]: name of the variable ('WRFt ', for WRF time varibale)13684 [varni]: name of the variable ('WRFtime', for WRF time varibale) 13685 13685 [begi],[endi],[inti]: beginning, end and interval along the variable 13686 13686 [endi] = -1, maximum value … … 13697 13697 13698 13698 # Variables not to check in the file 13699 NOcheck = ['WRFt ']13699 NOcheck = ['WRFtime'] 13700 13700 13701 13701 if values == 'h': … … 13794 13794 quit(-1) 13795 13795 13796 if varns[ivar] == 'WRFt ':13796 if varns[ivar] == 'WRFtime': 13797 13797 ovar = nciobj.variables['Times'][:] 13798 13798 vals = [] … … 13911 13911 13912 13912 #DataSetSection_multivars('XTIME,4380,4800,-1','/home/lluis/PY/wrfout_d01_2001-11-11_00:00:00','T2') 13913 #DataSetSection_multivars('WRFt ,20011111060000,20011111180000,-1','/home/lluis/PY/wrfout_d01_2001-11-11_00:00:00','all')13913 #DataSetSection_multivars('WRFtime,20011111060000,20011111180000,-1','/home/lluis/PY/wrfout_d01_2001-11-11_00:00:00','all') 13914 13914 #quit() 13915 13915
Note: See TracChangeset
for help on using the changeset viewer.