Changeset 583 in lmdz_wrf for trunk/tools
- Timestamp:
- Jul 8, 2015, 11:48:34 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/validation_sim.py
r582 r583 1394 1394 1395 1395 # Temporal statistics 1396 sovs = np.array(sovalues[intv[0]:intv[1]])[:,0] 1397 minv = np.min(sovs) 1398 maxv = np.max(sovs) 1399 meanv = np.mean(sovs) 1400 stdv = np.std(sovs) 1401 1402 fsovalues.append([meanv, np.array(sovalues[intv[0]:intv[1]])[0,1], minv, \ 1403 maxv, stdv]) 1396 if len(np.array(sovalues[intv[0]:intv[1]]).shape) != 1: 1397 sovs = np.array(sovalues[intv[0]:intv[1]])[:,0] 1398 minv = np.min(sovs) 1399 maxv = np.max(sovs) 1400 meanv = np.mean(sovs) 1401 stdv = np.std(sovs) 1402 1403 fsovalues.append([meanv, np.array(sovalues[intv[0]:intv[1]])[0,1], \ 1404 minv, maxv, stdv]) 1405 else: 1406 fsovalues.append([fillValueF, np.ones((2,2),dtype=np.float)*fillValueF\ 1407 , fillValueF, fillValueF, fillValueF]) 1408 1404 1409 if ds.has_key('Z'): 1405 1410 if okind == 'trajectory': … … 1804 1809 print ' ' + main + ': no exact values found!' 1805 1810 Nexactt = 0 1811 quit(-1) 1806 1812 else: 1807 1813 Nexactt = len(exacttvalues[:,0]) … … 1994 2000 if Nexactt == 0: 1995 2001 newvar[:] = np.float64(0.) 1996 simobsSvalues = np.array(np.float(0.))1997 simobsvalues = np.zeros((1,2), dtype=np.float)1998 2002 else: 1999 2003 newvar[:] = exacttvalues[:,3] 2004 if Nexactt == 0: 2005 simobsSvalues = np.zeros((1,2), dtype=np.float) 2006 simobsvalues = np.zeros((1,2), dtype=np.float) 2000 2007 2001 2008 dimt = Nexactt … … 2072 2079 2073 2080 # statisics sim 2081 print 'Lluis shapes: ',arrayvals.shape,':',len(simobsvalues) 2074 2082 simstats[kst,0] = np.min(arrayvals[:,0]) 2075 2083 simstats[kst,1] = np.max(arrayvals[:,0])
Note: See TracChangeset
for help on using the changeset viewer.