Changeset 501 in lmdz_wrf for trunk/tools/validation_sim.py
- Timestamp:
- Jun 15, 2015, 5:38:25 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/validation_sim.py
r500 r501 1672 1672 1673 1673 # Observed values temporally around coincident times 1674 # simobsvalues, simobsSvalues, simobsTvalues, simobsTtvalues, trjsim = \ 1675 # getting_ValidationValues(obskind, Nexactt, dims, trajpos, ovsim, ovobs, \ 1676 # exacttvalues, oFillValue, Ngrid) 1677 1678 # Observed values temporally around coincident times 1674 1679 simobsvalues, simobsSvalues, simobsTvalues, simobsTtvalues, trjsim = \ 1675 1680 getting_ValidationValues(obskind, Ncoindt, dims, trajpos, ovsim, ovobs, \ … … 1706 1711 1707 1712 # statisics obs 1708 obsmask = ma.masked_equal(arrayvals[:,1], fillValueF) 1713 # Masking 'nan' 1714 obsmask0 = np.where(arrayvals[:,1] != arrayvals[:,1], fillValueF, arrayvals[:,1]) 1715 obsmask = ma.masked_equal(obsmask0, fillValueF) 1709 1716 obsmask2 = obsmask*obsmask 1710 1717 … … 1715 1722 obsstats[3] = obsmask2.mean() 1716 1723 obsstats[4] = np.sqrt(obsstats[3] - obsstats[2]*obsstats[2]) 1717 1724 1718 1725 # Statistics sim-obs 1719 1726 simobsstats = np.zeros((9), dtype=np.float) … … 1729 1736 simobsstats[5] = np.mean(np.abs(diffvals)) 1730 1737 simobsstats[6] = np.sqrt(np.mean(diffvals*diffvals)) 1731 simobsstats[7], simobsstats[8] = sts. pearsonr(arrayvals[:,0], arrayvals[:,1])1738 simobsstats[7], simobsstats[8] = sts.mstats.pearsonr(arrayvals[:,0], arrayvals[:,1]) 1732 1739 1733 1740 # Statistics around sim values
Note: See TracChangeset
for help on using the changeset viewer.