source: configs/testing/python/post_DCMIP41.py @ 502

Last change on this file since 502 was 502, checked in by dubos, 8 years ago

configs/testing : towards first working version

File size: 669 bytes
Line 
1from common import *
2
3def plot_T850(day, lon,lat,T850):  # T850 at final time
4    print 'Reading data ...'
5    lon, lat, T850 = lon[:], lat[:], T850[day-1, :, :]
6    print '... done.'
7    plt.figure(figsize=(12,5))
8    plt.contourf(lon,lat,T850)
9    plt.colorbar() 
10    plt.title('T850')
11    axis_longitude()
12    axis_latitude()
13    plt.savefig('T850_day%d.png'%day)
14
15gridfile = 'netcdf/output_dcmip2016_regular.nc'
16nc = cdf.Dataset(gridfile, "r")
17llm, nlon, nlat, ntime = getdims(nc, 'lev','lon','lat','time_counter')
18lon, lat, T850, T, Phi = getvars(nc, 'lon','lat','T850', 'T', 'PHI')
19
20plot_T850(7,lon,lat,T850)
21plot_T850(10,lon,lat,T850)
22plot_T850(30,lon,lat,T850)
Note: See TracBrowser for help on using the repository browser.