Last change
on this file since 531 was
294,
checked in by aslmd, 13 years ago
|
MESOSCALE: python graphics, housekeeping.
|
-
Property svn:executable set to
*
|
File size:
758 bytes
|
Line | |
---|
1 | #! /usr/bin/env python |
---|
2 | |
---|
3 | from netCDF4 import Dataset |
---|
4 | import matplotlib.pyplot as mpl |
---|
5 | import numpy as np |
---|
6 | |
---|
7 | nc = Dataset("geo_em.d01.nc") |
---|
8 | #ti = np.ravel(nc.variables["THERMAL_INERTIA"][:,:]) |
---|
9 | #alb = np.ravel(nc.variables["ALBEDO_GCM"][:,:]) |
---|
10 | |
---|
11 | #lat = np.ravel(nc.variables["XLAT_M"][:,:]) |
---|
12 | |
---|
13 | #alb = alb[ lat < 80.] |
---|
14 | #ti = ti[ lat < 80. ] |
---|
15 | |
---|
16 | #alb = np.log(alb) |
---|
17 | #ti = np.log(ti) |
---|
18 | |
---|
19 | #mpl.plot(ti,alb,'b.') |
---|
20 | #mpl.plot(ti,lat,'b.') |
---|
21 | |
---|
22 | |
---|
23 | limalb = 0.28 |
---|
24 | limti = 800. |
---|
25 | icealb = 0.45 |
---|
26 | |
---|
27 | ti = nc.variables["THERMAL_INERTIA"][0,:,:] |
---|
28 | alb = nc.variables["ALBEDO_GCM"][0,:,:] |
---|
29 | ti [ alb > limalb ] = limti |
---|
30 | ti [ ti > limti ] = limti |
---|
31 | alb [ alb > limalb ] = icealb |
---|
32 | |
---|
33 | mpl.figure() |
---|
34 | mpl.subplot(121) |
---|
35 | mpl.contourf(ti,100) |
---|
36 | mpl.colorbar() |
---|
37 | mpl.subplot(122) |
---|
38 | mpl.contourf(alb,100) |
---|
39 | mpl.colorbar() |
---|
40 | |
---|
41 | mpl.show() |
---|
Note: See
TracBrowser
for help on using the repository browser.