-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from changliao1025/development
fix slash
- Loading branch information
Showing
4 changed files
with
70 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
pyflowline/external/pyearth/system/define_global_variables.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
""" | ||
this module will be used to define all the global variables | ||
""" | ||
|
||
import platform | ||
from pathlib import Path | ||
import getpass | ||
sPlatform_os = platform.system() | ||
|
||
sUsername = getpass.getuser() | ||
|
||
sWorkspace_home = str(Path.home()) | ||
|
||
if sPlatform_os == 'Windows': #windows | ||
slash = '\\' | ||
sMachine ='None' | ||
|
||
sWorkspace_scratch = 'C:' | ||
else: #linux or unix | ||
slash = '/' | ||
|
||
if (sPlatform_os == 'Linux'): | ||
sWorkspace_scratch = sWorkspace_home + slash + 'scratch' | ||
|
||
else: | ||
if (sPlatform_os == 'Darwin'): | ||
sMachine ='mac' | ||
sWorkspace_scratch = sWorkspace_home + slash + 'scratch' | ||
else: | ||
pass | ||
|
||
#data file type | ||
sExtension_txt = '.txt' | ||
sExtension_envi = '.dat' | ||
sExtension_tiff = '.tif' | ||
sExtension_header ='.hdr' | ||
sExtension_netcdf = '.nc' | ||
sExtension_shapefile = '.shp' | ||
sExtension_json = '.json' | ||
|
||
#graphics format | ||
|
||
sExtension_png = '.png' | ||
sExtension_jpg = '.jpg' | ||
sExtension_ps = '.ps' | ||
sExtension_vtk = '.vtk' | ||
|
||
|
||
#constant values | ||
missing_value = -9999.0 | ||
|
||
nmonth = 12 #be careful with this one | ||
|
||
#unit conversion | ||
|
||
iMonth_start = 1 | ||
iMonth_end = 12 | ||
mms2mmd = 24 * 3600.0 | ||
feet2meter = 0.3048 | ||
inch2mm = 25.4 | ||
cms2cmd = 24 * 3600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters