Changeset 528 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Jun 22, 2015, 4:26:14 PM (9 years ago)
Author:
lfita
Message:

Using the right values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/validation_sim.py

    r527 r528  
    1414import numpy.ma as ma
    1515
    16 main = 'validarion_sim.py'
     16main = 'validation_sim.py'
    1717errormsg = 'ERROR -- errror -- ERROR -- error'
    1818warnmsg = 'WARNING -- warning -- WARNING -- warning'
     
    17731773Nexactt = len(exacttvalues[:,0])
    17741774
    1775 print main + ': found',Nexactt,'Temporal same values in simulation and observations'
     1775print main + ': found',Nexactt,'Temporal exact values in simulation and observations'
    17761776
    17771777# Sim Closest times
     
    19391939        oFillValue = None
    19401940
    1941     simstats = np.zeros((Nstsim,5), dtype=np.float)
    1942     obsstats = np.zeros((Nstsim,5), dtype=np.float)
    1943     simobsstats = np.zeros((Nstsim,13), dtype=np.float)
    1944     aroundstats = np.zeros((5,dimt), dtype=np.float)
    1945 
    19461941    for kst in range(Nstsim):
    19471942        timedn = prestdescsim[kst] + 'time'
     
    19911986              getting_ValidationValues(obskind, Ncoindt, dims, trajpos, ovsim, ovobs,\
    19921987              coindtvalues, oFillValue, Ngrid, 'tbackwardSmean')
    1993             dimt = Ncoindt
     1988            dimt = simobsSvalues.shape[0]
    19941989
    19951990            if ivar == 0:
     
    20062001                basicvardef(newvar, vname, 'observed between time', obstunits )
    20072002                set_attribute(newvar, 'calendar', 'standard')
    2008                 newvar[:] = np.unique(coindtvalues[:,2])
     2003                newvar[:] = np.unique(coindtvalues[:,3])
    20092004
    20102005# Re-arranging values...
     
    20282023                print '  ' + fname + ": operation '"+valvars[ivar][2]+"' not ready!!"
    20292024                quit(-1)
     2025
     2026        if kst == 0:
     2027            simstats = np.zeros((Nstsim,5), dtype=np.float)
     2028            obsstats = np.zeros((Nstsim,5), dtype=np.float)
     2029            simobsstats = np.zeros((Nstsim,13), dtype=np.float)
    20302030
    20312031# statisics sim
     
    21052105
    21062106# Statistics around sim values
     2107        aroundstats = np.zeros((5,dimt), dtype=np.float)
     2108        print 'Lluis dimt:',dimt,simobsSvalues.shape
    21072109        for it in range(dimt):
    21082110            aroundstats[0,it] = np.min(simobsSvalues[it,])
Note: See TracChangeset for help on using the changeset viewer.