Changeset 493 in lmdz_wrf for trunk/tools/validation_sim.py


Ignore:
Timestamp:
Jun 15, 2015, 12:27:45 PM (9 years ago)
Author:
lfita
Message:

Adding exact time values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/validation_sim.py

    r492 r493  
    13571357simobstimes = coincident_CFtimes(tsim, obstunits, simtunits)
    13581358
    1359 # Coincident times
     1359#
     1360## Looking for exact/near times
     1361#
     1362
     1363# Exact Coincident times
     1364##
     1365exacttvalues0 = []
     1366for it in range(dimtsim):   
     1367    ot = 0
     1368    for ito in range(ot,dimtobs-1):
     1369        if valdimobs['T'][ito] = simobstimes[it]:
     1370            ot = ito
     1371            exacttvalues0.append([it, ito, simobstimes[it], valdimobs['T'][ito]])
     1372
     1373exacttvalues = np.array(exacttvalues0, dtype=np.float)
     1374Nexactt = len(exacttvalues[:,0])
     1375
     1376print main + ': found',Nexactt,'Temporal same values in simulation and observations'
     1377print '  'exacttvalues
     1378
     1379# Sim Coincident times
    13601380##
    13611381coindtvalues0 = []
     
    13731393
    13741394Ncoindt = len(coindtvalues[:,0])
    1375 print main + ': found',Ncoindt,'coincident times between simulation and observations'
     1395print main + ': found',Ncoindt,'Simulation time-interval (within consecutive ' +     \
     1396  'observed times) coincident times between simulation and observations'
    13761397print '  'coindtvalues
    13771398quit()
Note: See TracChangeset for help on using the changeset viewer.