4141from matplotlib import rcParams
4242
4343# Mac version?
44- MAC_VERSION = False # Make True for releases to enable Linux compatibility
44+ MAC_VERSION = True # Make True for releases to enable Linux compatibility
4545
4646# Tool library modules
4747from PaleoclimateToolDataFileHelper import PaleoclimateToolDataFileHelper
5757DecodeAES = lambda c , e : c .decrypt (base64 .b64decode (e )).rstrip (PADDING )
5858PASSWORDKEY = '\xe7 Z\xb2 \xc9 \x03 \xb4 \x8c \x04 A\xfe \x97 \xc3 \xf9 \xc7 \xd2 \x1c \xb9 \x1e h\xd0 \x91 E/\xdb \xc9 \x9f \xf0 \xda \x8e \x06 \xae \xd5 ' # set using os.urandom(BLOCK_SIZE)
5959
60+ # Allow open interval step and size (set to False for releases)
61+ OPEN_INTERVALS = False
62+
6063## Application GUI
6164## * Constructs tool GUI components
6265## * Performs tool operations utilising climate data helper module
@@ -799,9 +802,12 @@ def createPeriodIntervalFrame(self) :
799802 for i , selection in enumerate (self .period_postfix_keys ) :
800803 self .period_postfix_menu ['from' ]['menu' ].entryconfigure (i , command = (select_period_postfix , 'from' , selection ))
801804 self .period_postfix_menu ['until' ]['menu' ].entryconfigure (i , command = (select_period_postfix , 'until' , selection ))
802- self .period_postfix_menu ['until' ]['menu' ].entryconfigure (0 , state = tk .DISABLED )
805+ # self.period_postfix_menu['until']['menu'].entryconfigure(0, state=tk.DISABLED) # use if initial from is AD
803806
804- self .interval_step_range = { 'min' : 10 , 'max' : 10000 }
807+ if OPEN_INTERVALS :
808+ self .interval_step_range = { 'min' : 1 , 'max' : 10000 }
809+ else :
810+ self .interval_step_range = { 'min' : 10 , 'max' : 10000 }
805811 self .interval_step_values = [10 , 20 , 50 , 100 , 200 , 500 , 1000 , 2000 , 5000 , 10000 ]
806812 self .current_interval_step_values = [10 , 20 , 50 , 100 ]
807813 self .current_valid_interval_step_value = 20
@@ -811,7 +817,10 @@ def createPeriodIntervalFrame(self) :
811817 self .interval_step_entry .config (command = (interval_step_spinbox_arrow_press ))
812818 self .current_interval_steps = 8
813819
814- self .interval_size_range = { 'min' : 10 , 'max' : 100 }
820+ if OPEN_INTERVALS :
821+ self .interval_size_range = { 'min' : 1 , 'max' : 10000 }
822+ else :
823+ self .interval_size_range = { 'min' : 10 , 'max' : 100 }
815824 self .interval_size_values = [10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 , 100 ]
816825 self .current_interval_size_values = [10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 ]
817826 self .current_valid_interval_size_value = 30
@@ -5845,7 +5854,6 @@ def generateDataFiles(self) :
58455854 all_months = self .time_unit_is_all_months ,
58465855 correct_bias = self .utilise_bias_correction .get ())
58475856 self .parameter_data = parameter_data [0 ].copy ()
5848- self .data_file_helper .clearNetCdfDataCache ()
58495857 except Exception , e :
58505858 self .data_file_helper .clearNetCdfDataCache ()
58515859 showerror ('Data extraction error' , str (e ))
@@ -5893,6 +5901,9 @@ def generateDataFiles(self) :
58935901 self .updateToolGenerationLogEntry (grids_generated = { 'number' : generated_file_count , 'expected' : len (period_years_ad ) })
58945902 self .updateToolGenerationLogs ()
58955903
5904+ # Clear netCDF cache
5905+ self .data_file_helper .clearNetCdfDataCache ()
5906+
58965907 else : # Collect series data then generate file
58975908
58985909 # Collect series data
@@ -6409,7 +6420,7 @@ def isNonNegativetiveFloat(self, string_value) :
64096420
64106421## Main program
64116422
6412- application_name = 'PaleoView v1.3 '
6423+ application_name = 'PaleoView v1.4 '
64136424
64146425# Set user application data directory
64156426if MAC_VERSION :
0 commit comments