Skip to content

Commit

Permalink
v1.2 (linux-compatible code)
Browse files Browse the repository at this point in the history
Version 1.2 includes code distribution for linux compatibility. PC and
MAC installations are unchanged from v1.1.
  • Loading branch information
seanhaythorne committed Dec 10, 2017
1 parent cbbc842 commit 2ad6e7a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
9 changes: 7 additions & 2 deletions PaleoclimateToolDataFileHelper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# BUILD FLAG: Set to True when creating executable packages to ensure dependency work-arounds
# Set to False for code releases to ensure Linux installation is easier to achieve
EXECUTABLE_BUILD_INCLUSION = False

# Python modules
import re
import string
Expand All @@ -11,7 +15,8 @@
# Python extension modules (requires extension installation)
import numpy as np
import pandas as pd
import netCDF4_utils
if EXECUTABLE_BUILD_INCLUSION :
import netCDF4_utils # difficult for Linux installation
import netcdftime
from netCDF4 import Dataset
import docx
Expand Down Expand Up @@ -752,7 +757,7 @@ def loadClimateDataGrids(self, parameter, year_ad, month_indices, correct_bias=F
data_grid = self.loadClimateDataGrid(parameter, year_ad-1, i)
else :
data_grid = self.loadClimateDataGrid(parameter, year_ad, i)
if data_grid != None :
if data_grid is not None : # TODO:CheckMacVersion: data_grid != None : Correction for Linux compatibility
data_grids.append(data_grid)
climate_data_grids = np.array(data_grids)

Expand Down
2 changes: 1 addition & 1 deletion paleo_view_config.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
climate_data_source = local
climate_data_url = http://paleoview.ddns.net:60627/data/
climate_data_url = http://203.83.208.84/paleodata/
climate_data_directory =
climate_data_local_data_type = netcdf
default_file_generation_directory =
Expand Down
6 changes: 3 additions & 3 deletions paleo_view_v1_1.py → paleo_view_v1_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
from matplotlib import rcParams

# Mac version?
MAC_VERSION = False
MAC_VERSION = True # Make True for releases to enable Linux compatibility

# Tool library modules
from PaleoclimateToolDataFileHelper import PaleoclimateToolDataFileHelper

# TEST FLAG: Write stdout and stderr to console (not log files)
DEBUG = False
DEBUG = True

# Code for encrypting/decrypting the proxy password when saved/retrieved from the config file
BLOCK_SIZE = 32
Expand Down Expand Up @@ -6401,7 +6401,7 @@ def isNonNegativetiveFloat(self, string_value) :

## Main program

application_name = 'PaleoView v1.1'
application_name = 'PaleoView v1.2'

# Set user application data directory
if MAC_VERSION :
Expand Down

0 comments on commit 2ad6e7a

Please sign in to comment.