Commit 3ae60fe2 authored by abuddenberg's avatar abuddenberg

Cleaned up docstrings. Added support for new data files provided by Michael Wehner on May 21, 2013

parent ddac3071
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 2.7.3 (/Library/Frameworks/Python.framework/Versions/2.7/bin/python)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
'''
"""
Created on Nov 20, 2012
@author: abuddenberg
'''
"""
DATA_DIR = '/Users/abuddenberg/workspace/plot_precip_maps/data/'
NA_PRECIP_FILES = [
(DATA_DIR + 'pr_rcp85_2071-2099_percent_change.nc_hatched_north_america_ar5_white.nc', 'pr_rcp85_2071-2099_NA_{}.eps'),
(DATA_DIR + 'pr_rcp26_2071-2099_percent_change.nc_hatched_north_america_ar5_white.nc', 'pr_rcp26_2071-2099_NA_{}.eps'),
(DATA_DIR + 'pr_sresa2_2071-2099_percent_change.nc_hatched_north_america_ar5_white.nc', 'pr_sresa2_2071-2099_NA_{}.eps')
(DATA_DIR + 'pr_rcp85_1970-1999_2071-2099_percent_change.nc_hatched_North_America_AR5_white.nc', 'pr_rcp85_2071-2099_NA_{}.eps'),
(DATA_DIR + 'pr_rcp26_1970-1999_2071-2099_percent_change.nc_hatched_North_America_AR5_white.nc', 'pr_rcp26_2071-2099_NA_{}.eps'),
(DATA_DIR + 'pr_sresa2_1970-1999_2071-2099_percent_change.nc_hatched_North_America_AR5_white.nc', 'pr_sresa2_2071-2099_NA_{}.eps')
]
......
'''
"""
Created on Nov 30, 2012
@author: abuddenberg
'''
"""
from scipy.io.netcdf import netcdf_file
from mpl_toolkits.basemap import Basemap
from numpy import meshgrid
......@@ -66,5 +66,5 @@ for infilename, outfilename in GLOBAL_PRECIP_FILES:
# print np.any(np.logical_and(third_cat_mask, stipples_mask))
plt.savefig('../dist/' + outfilename.format('categories'), format='eps', dpi=200)
# plt.show()
\ No newline at end of file
# plt.savefig('../dist/' + outfilename.format('categories'), format='eps', dpi=200)
plt.show()
\ No newline at end of file
'''
"""
Created on Nov 21, 2012
@author: abuddenberg
......@@ -7,9 +7,9 @@ Creates a contour plot of projected precipitation change
globally for each emmissions scenario at the end of the
21st century vs the base period (presumably 1971-1999).
The hatched area denotes areas of higher statistical significance.
The hatched area denotes areas of higher statistical significance.
'''
"""
from scipy.io.netcdf import netcdf_file
from mpl_toolkits.basemap import Basemap
from numpy import meshgrid
......@@ -55,5 +55,5 @@ for infilename, outfilename in GLOBAL_PRECIP_FILES:
# m.colorbar(hatching,location='right',pad="5%")
plt.savefig('../dist/' + outfilename.format('percent_change'), format='eps', dpi=200)
# plt.show()
\ No newline at end of file
# plt.savefig('../dist/' + outfilename.format('percent_change'), format='eps', dpi=200)
plt.show()
\ No newline at end of file
'''
"""
Created on Nov 27, 2012
@author: abuddenberg
'''
"""
from scipy.io.netcdf import netcdf_file
from mpl_toolkits.basemap import Basemap
from numpy import meshgrid
......
'''
"""
Created on Nov 30, 2012
@author: abuddenberg
'''
"""
from scipy.io.netcdf import netcdf_file
from mpl_toolkits.basemap import Basemap
from numpy import meshgrid
import matplotlib.pyplot as plt
from config import GLOBAL_PRECIP_FILES, SEASONS
from config import GLOBAL_PRECIP_FILES
for infilename, outfilename in GLOBAL_PRECIP_FILES:
nc = netcdf_file(infilename)
......
'''
"""
Created on Nov 29, 2012
@author: abuddenberg
......@@ -16,7 +16,7 @@ The categories are as follows:
3.0 denotes areas of statistical significance
Fun stuff
'''
"""
from scipy.io.netcdf import netcdf_file
from mpl_toolkits.basemap import Basemap
from numpy import meshgrid
......
'''
"""
Created on Nov 16, 2012
@author: abuddenberg
......@@ -7,9 +7,9 @@ Creates a very lovely contour plot of projected precipitation change
over North American for each emmissions scenario at the end of the
21st century vs the base period (presumably 1971-1999).
The hatched area denotes areas of higher statistical significance.
The hatched area denotes areas of higher statistical significance.
'''
"""
from scipy.io.netcdf import netcdf_file
from mpl_toolkits.basemap import Basemap
from numpy import meshgrid
......@@ -39,7 +39,7 @@ for infilename, outfilename in NA_PRECIP_FILES:
lat_0=37.5,
lat_1=29.5,
lat_2=45.5,
# lat_ts=median(lats),
# lat_ts=median(lats),
llcrnrlat=12,
urcrnrlat=80,
llcrnrlon=-135,
......@@ -64,4 +64,4 @@ for infilename, outfilename in NA_PRECIP_FILES:
plt.savefig('../dist/' + outfilename.format('percent_change'), format='eps', dpi=200)
# plt.show()
\ No newline at end of file
# plt.show()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment