1 | #!/usr/bin/env python |
---|
2 | # -*- coding: utf-8 -*- |
---|
3 | import string |
---|
4 | import numpy as np |
---|
5 | import matplotlib.pyplot as plt |
---|
6 | from pylab import * |
---|
7 | from mpl_toolkits.basemap import Basemap |
---|
8 | from mpl_toolkits.basemap import shiftgrid, cm |
---|
9 | from netCDF4 import Dataset |
---|
10 | |
---|
11 | |
---|
12 | ##################### |
---|
13 | ## read daily data ## |
---|
14 | ##################### |
---|
15 | month = array(['JANUARY', 'FEBRUARY', 'MARCH', 'APRIL', 'MAY', 'JUNE', 'JULY']) |
---|
16 | len_month = np.array([31, 28, 31, 30, 31, 30, 31]) |
---|
17 | |
---|
18 | ## JANUARY ## |
---|
19 | imo = 0 |
---|
20 | ncfile = Dataset('/net/argos/data/parvati/lahlod/AMUSUA_CH1-CH15_' + month[imo] + '_ANTARC.nc', 'r', format = 'NETCDF4') |
---|
21 | lon = ncfile.variables['longitude'][:] |
---|
22 | lat = ncfile.variables['latitude'][:] |
---|
23 | chan = ncfile.variables['channels'][:] |
---|
24 | jrs_JAN = ncfile.variables['day'][:] |
---|
25 | emis_JAN = ncfile.variables['emissivity'][:] |
---|
26 | ncfile.close() |
---|
27 | |
---|
28 | ## FEBRUARY ## |
---|
29 | imo = 1 |
---|
30 | ncfile = Dataset('/net/argos/data/parvati/lahlod/AMUSUA_CH1-CH15_' + month[imo] + '_ANTARC.nc', 'r', format = 'NETCDF4') |
---|
31 | lon = ncfile.variables['longitude'][:] |
---|
32 | lat = ncfile.variables['latitude'][:] |
---|
33 | chan = ncfile.variables['channels'][:] |
---|
34 | jrs_FEB = ncfile.variables['day'][:] |
---|
35 | emis_FEB = ncfile.variables['emissivity'][:] |
---|
36 | ncfile.close() |
---|
37 | |
---|
38 | ## MARCH ## |
---|
39 | imo = 2 |
---|
40 | ncfile = Dataset('/net/argos/data/parvati/lahlod/AMUSUA_CH1-CH15_' + month[imo] + '_ANTARC.nc', 'r', format = 'NETCDF4') |
---|
41 | lon = ncfile.variables['longitude'][:] |
---|
42 | lat = ncfile.variables['latitude'][:] |
---|
43 | chan = ncfile.variables['channels'][:] |
---|
44 | jrs_MAR = ncfile.variables['day'][:] |
---|
45 | emis_MAR = ncfile.variables['emissivity'][:] |
---|
46 | ncfile.close() |
---|
47 | |
---|
48 | ## APRIL ## |
---|
49 | imo = 3 |
---|
50 | ncfile = Dataset('/net/argos/data/parvati/lahlod/AMUSUA_CH1-CH15_' + month[imo] + '_ANTARC.nc', 'r', format = 'NETCDF4') |
---|
51 | lon = ncfile.variables['longitude'][:] |
---|
52 | lat = ncfile.variables['latitude'][:] |
---|
53 | chan = ncfile.variables['channels'][:] |
---|
54 | jrs_APR = ncfile.variables['day'][:] |
---|
55 | emis_APR = ncfile.variables['emissivity'][:] |
---|
56 | ncfile.close() |
---|
57 | |
---|
58 | ## MAY ## |
---|
59 | imo = 4 |
---|
60 | ncfile = Dataset('/net/argos/data/parvati/lahlod/AMUSUA_CH1-CH15_' + month[imo] + '_ANTARC.nc', 'r', format = 'NETCDF4') |
---|
61 | lon = ncfile.variables['longitude'][:] |
---|
62 | lat = ncfile.variables['latitude'][:] |
---|
63 | chan = ncfile.variables['channels'][:] |
---|
64 | jrs_MAY = ncfile.variables['day'][:] |
---|
65 | emis_MAY = ncfile.variables['emissivity'][:] |
---|
66 | ncfile.close() |
---|
67 | |
---|
68 | ## JUNE ## |
---|
69 | imo = 5 |
---|
70 | ncfile = Dataset('/net/argos/data/parvati/lahlod/AMUSUA_CH1-CH15_' + month[imo] + '_ANTARC.nc', 'r', format = 'NETCDF4') |
---|
71 | lon = ncfile.variables['longitude'][:] |
---|
72 | lat = ncfile.variables['latitude'][:] |
---|
73 | chan = ncfile.variables['channels'][:] |
---|
74 | jrs_JUN = ncfile.variables['day'][:] |
---|
75 | emis_JUN = ncfile.variables['emissivity'][:] |
---|
76 | ncfile.close() |
---|
77 | |
---|
78 | ## JULY ## |
---|
79 | imo = 6 |
---|
80 | ncfile = Dataset('/net/argos/data/parvati/lahlod/AMUSUA_CH1-CH15_' + month[imo] + '_ANTARC.nc', 'r', format = 'NETCDF4') |
---|
81 | lon = ncfile.variables['longitude'][:] |
---|
82 | lat = ncfile.variables['latitude'][:] |
---|
83 | chan = ncfile.variables['channels'][:] |
---|
84 | jrs_JUL = ncfile.variables['day'][:] |
---|
85 | emis_JUL = ncfile.variables['emissivity'][:] |
---|
86 | ncfile.close() |
---|
87 | |
---|
88 | |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | ####################### |
---|
93 | ## read monthly data ## |
---|
94 | ####################### |
---|
95 | |
---|
96 | ncfile = Dataset ('/net/argos/data/parvati/lahlod/AMUSUA_CH1-CH15_JAN-MAR-MAY-JUN_ANTARC.nc', 'r', format = 'NETCDF4') |
---|
97 | lon = ncfile.variables['longitude'][:] |
---|
98 | lat = ncfile.variables['latitude'][:] |
---|
99 | chan = ncfile.variables['channels'][:] |
---|
100 | mon = ncfile.variables['month'][:] |
---|
101 | emis_moy1 = ncfile.variables['emissivity'][:] |
---|
102 | ncfile.close() |
---|
103 | |
---|
104 | |
---|
105 | ncfile = Dataset ('/net/argos/data/parvati/lahlod/AMUSUA_CH1-CH15_FEB-APR-JUL_ANTARC.nc', 'w', format = 'NETCDF4') |
---|
106 | lon = ncfile.variables['longitude'][:] |
---|
107 | lat = ncfile.variables['latitude'][:] |
---|
108 | chan = ncfile.variables['channels'][:] |
---|
109 | mon = ncfile.variables['month'][:] |
---|
110 | emis_moy2 = ncfile.variables['emissivity'][:] |
---|
111 | ncfile.close() |
---|
112 | |
---|