Changeset 1702 in lmdz_wrf


Ignore:
Timestamp:
Dec 8, 2017, 6:24:45 PM (7 years ago)
Author:
lfita
Message:

Fixing and working copy of the script

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diag_tools.py

    r1700 r1702  
    13341334
    13351335            if len(ta.shape) != len(p.shape):
    1336                 p = fill_Narray(p, ta*0., filldim=[0,2,3])
     1336                p = gen.fill_Narray(p, ta*0., filldim=[0,2,3])
    13371337
    13381338            self.values = var_td(ta, p, hur)
  • trunk/tools/get_stations.py

    r1701 r1702  
    393393    if len(Xvarvals.shape) == 1:
    394394        newXvarvals, newYvarvals = np.meshgrid(Xvarvals, Yvarvals)
    395         dimvarvalues[dimvariables[dimvariables[xn]] = newXvarvals
     395        dimvarvalues[dimvariables[xn]] = newXvarvals
     396        if len(Yvarvals.shape) == 1:
     397            dimvarvalues[dimvariables['lat']] = newYvarvals
     398
    396399for yn in axesvars['Y']:
    397400    Xvarvals = dimvarvalues[CFdims['lon']]
     
    399402    if len(Yvarvals.shape) == 1:
    400403        newXvarvals, newYvarvals = np.meshgrid(Xvarvals, Yvarvals)
    401         dimvarvalues[dimvariables[dimvariables[yn]] = newYvarvals
     404        dimvarvalues[dimvariables[yn]] = newYvarvals
    402405
    403406# Retrieving surface data
Note: See TracChangeset for help on using the changeset viewer.