Changeset 1698 in lmdz_wrf
- Timestamp:
- Dec 8, 2017, 1:51:42 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/get_stations.py
r1694 r1698 394 394 dimvarvalues[dimvariables['lon']] = newXvarvals 395 395 dimvarvalues[dimvariables['lat']] = newYvarvals 396 dx = newXvarvals.shape[1] 397 dy = newXvarvals.shape[0] 398 399 # Looking for 4D 'plev' variable for calculation of diagnostics 400 Zvarvals = dimvarvalues[dimvariables['plev']] 401 Tvarvals = dimvarvalues[dimvariables['time']] 402 if len(Zvarvals.shape) == 1: 403 dz = Zvarvals.shape[0] 404 dt = Tvarvals.shape[0] 405 newZvarvals = np.zeros((dt, dz, dy, dx), dtype=np.float) 406 for it in range(dt): 407 for iy in range(dy): 408 for ix in range(dx): 409 newZvarvals[it,:,iy,ix] = Zvarvals 410 dimvarvalues[dimvariables['plev']] = newZvarvals 396 411 397 412 # Retrieving surface data
Note: See TracChangeset
for help on using the changeset viewer.