Changeset 581 in lmdz_wrf for trunk/tools
- Timestamp:
- Jul 7, 2015, 12:36:59 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/validation_sim.py
r580 r581 1980 1980 print ' ' + prestdescsim[kst] + ' ...' 1981 1981 1982 if stdescsim[kst] == 'E' and Nexactt != 0:1982 if stdescsim[kst] == 'E': 1983 1983 # Observed and simualted exact times 1984 1984 simobsvalues, simobsSvalues, simobsTtvalues, trjsim = \ … … 1992 1992 'simulation', obstunits) 1993 1993 set_attribute(newvar, 'calendar', 'standard') 1994 newvar[:] = exacttvalues[:,3] 1994 if Nexactt == 0: 1995 newvar[:] = np.float64(0.) 1996 simobsSvalues = np.array(np.float(0.)) 1997 simobsvalues = [np.float(0.)] 1998 else: 1999 newvar[:] = exacttvalues[:,3] 1995 2000 1996 2001 dimt = Nexactt … … 2002 2007 ovobs, closesttvalues, oFillValue, Ngrid, 'instantaneous') 2003 2008 dimt = Nclosest 2004 2005 2009 2006 2010 if ivar == 0: … … 2157 2161 descvar = prestdescsim[kst] + ' time simulated: ' + valvars[ivar][0] 2158 2162 basicvardef(newvar, valvars[ivar][0], descvar, ovobs.getncattr('units')) 2159 newvar[:] = arrayvals[:,0] 2163 if stdescsim[kst] == 'E' and Nexactt == 0: 2164 newvar[:] = fillValueF 2165 else: 2166 newvar[:] = arrayvals[:,0] 2160 2167 2161 2168 # obs Values to netCDF … … 2169 2176 descvar = prestdescsim[kst] + ' time observed: ' + valvars[ivar][1] 2170 2177 basicvardef(newvar, valvars[ivar][1], descvar, ovobs.getncattr('units')) 2171 newvar[:] = arrayvals[:,1] 2178 2179 if stdescsim[kst] == 'E' and Nexactt == 0: 2180 newvar[:] = fillValueF 2181 else: 2182 newvar[:] = arrayvals[:,1] 2172 2183 2173 2184 # Around values … … 2189 2200 valvars[ivar][0] 2190 2201 basicvardef(newvar, vname, descvar, ovobs.getncattr('units')) 2191 newvar[:] = simobsSvalues 2202 2203 if stdescsim[kst] == 'E' and Nexactt == 0: 2204 newvar[:] = np.ones((0,Ngrid*2+1,Ngrid*2+1))*fillValueF 2205 else: 2206 newvar[:] = simobsSvalues 2192 2207 2193 2208 … … 2205 2220 basicvardef(newvar, vname, descvar, ovobs.getncattr('units')) 2206 2221 set_attribute(newvar, 'cell_methods', 'time_bnds') 2207 newvar[:] = aroundstats.transpose() 2222 if stdescsim[kst] == 'E' and Nexactt == 0: 2223 newvar[:] = np.ones((0,5))*fillValueF 2224 else: 2225 newvar[:] = aroundstats.transpose() 2208 2226 2209 2227 if stdescsim[kst] == 'B':
Note: See TracChangeset
for help on using the changeset viewer.