Skip to content
Snippets Groups Projects
Commit ce3652f5 authored by Peters, Wouter's avatar Peters, Wouter
Browse files

minor changes to work on cartesius, new country_dictoinary file created by Ingrid on cape grim

parent 294251e8
Branches
No related tags found
No related merge requests found
No preview for this file type
......@@ -44,7 +44,7 @@ def nice_alt(cls):
return string.strip('%10.1f masl' % round(cls, -1))
def summarize_obs(dacycle, printfmt='html'):
def summarize_obs(analysisdir, printfmt='html'):
"""***************************************************************************************
Call example:
......
......@@ -25,6 +25,9 @@ by oceans, sea, or open water. The aggregation will thus work best on arrays tha
import sys
import cPickle
import os
sys.path.append('../../')
rootdir = os.getcwd().split('da/')[0]
analysisdir = os.path.join(rootdir, 'da/analysis')
from numpy import sum, array
try:
......@@ -136,12 +139,12 @@ def get_countrydict():
countrydict = countryinfo('Test')
file = os.path.join('country_dictionary.dat')
file = os.path.join(analysisdir,'country_dictionary.dat')
try:
countrydict = cPickle.load(open(file, 'rb'))
except:
db = dbf.Dbf(os.path.join('GRIDCTRY.DBF'))
db = dbf.Dbf(os.path.join(analysisdir,'GRIDCTRY.DBF'))
countrydict = {}
for n, rec in enumerate(db):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment