Changeset 1702 in lmdz_wrf for trunk/tools/get_stations.py


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

Fixing and working copy of the script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.