Skip to content

Latest commit

 

History

History
93 lines (71 loc) · 2.67 KB

hacking.org

File metadata and controls

93 lines (71 loc) · 2.67 KB

Hacking

Notes

Development Environment

Install Docker

Fetch Data

The data files could be in the VM or external to the VM and accessible by a “shared folder”.

The DATDIR environment variable needs to be set the folder that contains the various data subfolders. On bash, this is done with export DATADIR=/path/to/dir. Run each time or add to ~/.bash_profile so that it is always done for you.

We use the following folders of data in this work.

Check the md5sum hashes reported in ice_discharge.org

tree -d -L 2 ${DATADIR}

Run code

  • Make sure DATADIR is defined
make
make all

After this, results should exist.

  • Figures in ./figs folder
  • Data in ./out/ folder

When comparing results between machines, I have been unable to get bit-reproducibility. GIS-wide results usually change by ~0.1 %. Individual glacier results change by up to 1 %.

Miscellaneous

jupyter+pandas output Org tables

In order for the Babel code blocks to print Org tables (and not HTML tables), the following code needs to be placed into ~/.ipython/profile_default/startup/50-middle.py:

## this make emacs-jupyter only show Org (not HTML) as results
# https://github.com/gregsexton/ob-ipython
try:
  import IPython
  from tabulate import tabulate
  class OrgFormatter(IPython.core.formatters.BaseFormatter):
      def __call__(self, obj):
        try:
          return tabulate(obj, headers='keys', tablefmt='orgtbl', showindex='always')
        except:
          return None

  ip = get_ipython()
  ip.display_formatter.formatters['text/org'] = OrgFormatter()
except ImportError:
  print("no tabulate")