コード例 #1
0
ファイル: parameters.py プロジェクト: sonyawellby/anu_honours
"""
A file to define parameters which require input from the user.

Submitted by Sonya Wellby for ENVS4055, 2015.
Last updated 26 August 2015.
"""
from cwd import cwdInFunction
cwdInFunction()
"""
BASE PERIOD
------------
Choose numbers which match years interested in, between 0-104.
NB: 0 = 1900-1901, 104 = 2004-2005
NB: if want 1970 as end period, choose '70' (code in tpi.py accounts for
    python slicing).
"""
#Base period for whole study (1961-1990)
baseStart = 61
baseEnd = 90
"""
#Base period TPI/Nino3.4 for this analysis:
baseStart =
baseEnd =

#Base period TPI (Henley) - 1971-2000
baseStart = 71 #June 1971-May 1972
baseEnd = 100 #June 2000-May 2001

#Base period IPO (Mantua) - 1947-1995
baseStart = 47
baseEnd = 95
コード例 #2
0
     awap_January,awap_February,awap_March,awap_April,awap_May

from access_trimmed import trim_Annual,trim_June, trim_July,\
     trim_August,trim_September,trim_October,trim_November,\
     trim_December,trim_January,trim_February,trim_March,\
     trim_April,trim_May,trim_JJA,trim_SON,trim_DJF,trim_MAM

from comparison_stratified_rainfall import had_ENSO_array,had_IPO_array,\
     R1_ENSO_array,R1_IPO_array,R2_ENSO_array,R2_IPO_array,R3_ENSO_array,\
     R3_IPO_array

from ENSO_IPO_corr import hadISST_ENSO,R1_ENSO,R2_ENSO,R3_ENSO,\
     hadISST_IPO,R1_IPO,R2_IPO,R3_IPO

from cwd import cwdInFunction
cwdInFunction()

#If reprinting these graphs, change maps_sub.py: saveFig - y=1.08 and
# savefig - bbox_inches = 'tight'

def stratifyCorr(rainfall,ENSO_index_strat,IPO_index_strat,ENSO_index,IPO_index,num,num2,rainfall_dataset,rainfall_data_short,time,sd,std):

    ENSO_pos = stratify(rainfall,ENSO_index_strat[0][num])
    plotCorrStratified(ENSO_pos,IPO_index[num2],rainfall_dataset+': ENSO positive '+time+' rainfall & TPI'+std,\
             "stratified_correlation/"+sd+"/"+rainfall_data_short+"/"+time+"/ENSO_positive")

    ENSO_neg = stratify(rainfall,ENSO_index_strat[1][num])
    plotCorrStratified(ENSO_neg,IPO_index[num2],rainfall_dataset+': ENSO negative '+time+' rainfall & TPI'+std,\
             "stratified_correlation/"+sd+"/"+rainfall_data_short+"/"+time+"/ENSO_negative")

    ENSO_neutral = stratify(rainfall,ENSO_index_strat[2][num])