Changeset 610 in lmdz_wrf
- Timestamp:
- Jul 20, 2015, 1:18:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/validation_sim.py
r609 r610 1937 1937 iobst = CFtimes_datetime_NOfile([valdimobs['T'][0]], obstunits, 'standard') 1938 1938 fobst = CFtimes_datetime_NOfile([valdimobs['T'][dimtobs-1]], obstunits, 'standard') 1939 print 'Lluis:', simobstimes[0],'tobs:',obstunits1940 1939 isimt = CFtimes_datetime_NOfile([simobstimes[0]], obstunits, 'standard') 1941 1940 fsimt = CFtimes_datetime_NOfile([simobstimes[dimtsim-1]], obstunits, 'standard') … … 1963 1962 1964 1963 exacttvalues = np.array(exacttvalues0, dtype=np.float) 1965 print 'Lluis: shapes exactvalues:',exacttvalues.shape1966 1964 1967 1965 if len(exacttvalues) == 0: … … 2218 2216 arrayvals = np.zeros((len(simobsvalues),2), dtype=np.float) 2219 2217 for it in range(len(simobsvalues)): 2220 arrayvals[it,:] = simobsvalues[it][0: 1]2218 arrayvals[it,:] = simobsvalues[it][0:2] 2221 2219 2222 2220 if len(valvars[ivar]) > 2: … … 2238 2236 print ' ' + fname + ": operation '"+valvars[ivar][2]+"' not ready!!" 2239 2237 quit(-1) 2238 2239 # for it in range(len(arrayvals[:,0])): 2240 # print it,arrayvals[it,:],':',simobsvalues[it] 2241 # quit() 2240 2242 2241 2243 if kst == 0: … … 2355 2357 newvar[:] = arrayvals[:,1] 2356 2358 2359 # Including statistics of the between simulated values 2360 if stdescsim[kst] == 'B': 2361 if not searchInlist(onewnc.dimensions, 'Bstats'): 2362 newdim = onewnc.createDimension('Bstats',3) 2363 2364 newvar = onewnc.createVariable('Bstats','c',('Bstats','StrLength')) 2365 descvar = prestdescsim[kst] + ' time simulated: ' + valvars[ivar][0] 2366 basicvardef(newvar, 'Bstats', 'Between values statistics', \ 2367 ovobs.getncattr('units')) 2368 Bstsvals=['minimum','maximum','stdandard deviation'] 2369 writing_str_nc(newvar,Bstsvals,StringLength) 2370 2371 newvar = onewnc.createVariable(valvars[ivar][0] + '_Bstats_sim', 'f', \ 2372 (timedn,'Bstats'), fill_value=fillValueF) 2373 descvar = prestdescsim[kst] + ' time simulated: ' + valvars[ivar][0] + \ 2374 ' statistics' 2375 basicvardef(newvar, valvars[ivar][0], descvar, ovobs.getncattr('units')) 2376 newvar[0,:] = [fillValueF, fillValueF, fillValueF] 2377 for it in range(dimt-1): 2378 newvar[it+1,:] = simobsvalues[it][2:5] 2379 2357 2380 # Around values 2358 2381 if not onewnc.variables.has_key(valvars[ivar][0] + 'around'):
Note: See TracChangeset
for help on using the changeset viewer.