Changeset 1938 in lmdz_wrf for trunk


Ignore:
Timestamp:
Jul 17, 2018, 3:02:46 AM (6 years ago)
Author:
lfita
Message:

Fixing consectuvie times?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/UWyoming_snd_nc.py

    r1926 r1938  
    9696idate = 0
    9797
     98# List with the dates of  the soundings, to keep them consecutive!!
     99Tsoundings = []
     100
    98101for line in osnd:
    99102    if line[0:1] != '#' and line[0:1] != '<' and line[0:1] != '-' and len(line) > 1:
     
    119122                        print ic, ':', txtvals[ic]
    120123
     124                Tsoundings.append(stationdateS)
    121125                soundings[stationdateS] = [pvals, txtvals]
    122126                if len(soundings.keys()) == 1:
     
    222226
    223227# Getting measured values
    224 Ntimes = len(soundings.keys())
     228Ntimes = len(Tsoundings)
    225229Npres = len(presvals)
    226230Nvals = len(varns)
     
    228232sndvals = np.ones((Ntimes, Npres, Nvals), dtype=np.float)*gen.fillValueF
    229233for it in range(Ntimes):
    230     snditS = soundings.keys()[it]
     234    snditS = Tsoundings[it]
    231235    sndvs = soundings[snditS]
    232236    sndv = sndvs[0]
     
    271275tvals = []
    272276for it in range(Ntimes):
    273     snditS = soundings.keys()[it]
     277    snditS = Tsoundings[it]
    274278    sndvs = soundings[snditS]
    275279    sndc = sndvs[1]
Note: See TracChangeset for help on using the changeset viewer.