Changeset 998 in lmdz_wrf
- Timestamp:
- Aug 10, 2016, 4:20:15 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r989 r998 15917 15917 varname= CF-compilant variable name 15918 15918 onc= netCDF file object from which the variable should be retrieved 15919 printing= whether result should be printed in standard output or no ('true'/'false') 15919 15920 NOTE: on output 'computevardiag', first value of the list is the 'diagnostics.py' name 15920 15921 >>> onc = NetCDFFile('/home/lluis/PY/wrfout_d01_2001-11-11_00:00:00', 'r') … … 15948 15949 diagvars = gen.CFvar_DIAGvar(varname) 15949 15950 15950 # print ' ' + fname + ': Lluis; diagvars:', diagvars15951 15951 computevarmod = [] 15952 15952 if modelvars is not None: … … 15967 15967 if gen.searchInlist(ncvars,cvar): alltrue = True 15968 15968 else: 15969 # print ' ' + fname + ': Lluis; combovar:', combovar[0],' is:',gen.searchInlist(ncvars,combovar[0])15970 15969 if gen.searchInlist(ncvars,combovar[0]): alltrue = True 15971 15970 15972 15971 if alltrue: computevardiag.append([diagn] + combovar) 15973 # print ' ' + fname + ': Lluis; alltrue:', alltrue, 'computevardiag:', computevardiag15974 15972 15975 15973 if len(computevardiag) < 1: computevardiag = None 15976 15974 15977 15975 return computevarmod, computevardiag 15978 #onc = NetCDFFile('/home/lluis/PY/wrfout_d01_2001-11-11_00:00:00', 'r')15979 #mod, diag = var_model('tas', onc)15980 #print mod15981 #print diag15982 #mod, diag = var_model('hurs', onc)15983 #print mod15984 #print diag15985 15976 15986 15977 def computevar_model(values, ncfile):
Note: See TracChangeset
for help on using the changeset viewer.