Changeset 2169 in lmdz_wrf


Ignore:
Timestamp:
Oct 5, 2018, 10:26:17 PM (7 years ago)
Author:
lfita
Message:

Fixing `retrieve_stations' when data does not have height

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r2168 r2169  
    2583425834    olat = donc.variables[datavlatn]
    2583525835    lat0 = olat[:]
    25836     oheight = donc.variables[datavheightn]
    25837     height0 = oheight[:]
    2583825836
    2583925837    lon, lat = gen.lonlat2D(lon0, lat0)
     
    2584225840
    2584325841    if datavheightn != 'None':
     25842        oheight = donc.variables[datavheightn]
     25843        height0 = oheight[:]
    2584425844        if len(height0.shape) == 3: height = height0[0,:,:]
    2584525845        elif len(height0.shape) == 2: height = height0[:]
     
    2610026100
    2610126101            stgridvals[0] = ist
    26102             if ist == 1:
    26103                 print 'Lluis shapes ____'
    26104                 print 'newvar:', newvar.shape
    26105                 print 'vslice:', vslice
    26106                 print 'vstslice:', vstslice
    26107                 print 'stgridvals:', stgridvals
    26108                 print 'varvalues:', varvalues.shape
    26109                 print 'weights:', vwghts.shape
    26110                 print 'stvarv:', stvarv.shape
    26111                 vvv =  varvalues*vwghts
    26112                 print ' Lluis shape prod:', vvv.shape
    26113 
    2611426102            newvar[tuple(stgridvals)] = stvarv[:]
    2611526103            onewnc.sync()
Note: See TracChangeset for help on using the changeset viewer.