From 219041246d9fbac3d6f41935b7bdf83f18383fe4 Mon Sep 17 00:00:00 2001 From: Bill Ladwig Date: Mon, 29 Jan 2018 15:32:48 -0700 Subject: [PATCH] Fix doc printing of fill values. Update recipe based on Travis CI failures with sizes executable. --- conda_recipe/build.sh | 10 ++++++---- src/wrf/constants.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/conda_recipe/build.sh b/conda_recipe/build.sh index eefecaf..feace2b 100644 --- a/conda_recipe/build.sh +++ b/conda_recipe/build.sh @@ -1,12 +1,16 @@ #!/bin/bash cd fortran/build_help -gfortran -o sizes -fopenmp omp_sizes.f90 +if [ `uname` == Darwin ]; then + gfortran -o sizes -fopenmp omp_sizes.f90 -Wl,-rpath,${CONDA_PREFIX}/lib +else + gfortran -o sizes -fopenmp omp_sizes.f90 +fi python sub_sizes.py cd .. gfortran -E ompgen.F90 -fopenmp -cpp -o omp.f90 -f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature +f2py *.f90 -m _wrffortran -h wrffortran.pyf --overwrite-signature cd .. if [ `uname` == Darwin ]; then @@ -16,5 +20,3 @@ fi $PYTHON setup.py config_fc --f90flags="-mtune=generic -fopenmp" build_ext --libraries="gomp" build $PYTHON setup.py install --single-version-externally-managed --record=record.txt - - diff --git a/src/wrf/constants.py b/src/wrf/constants.py index 6a6dc90..cedc62a 100755 --- a/src/wrf/constants.py +++ b/src/wrf/constants.py @@ -76,7 +76,7 @@ else: # Add the integers based on python 2.x or 3.x def default_fill(dtype=None): dt = np.dtype(dtype) if dtype is not None else None - return _DEFAULT_FILL_MAP.get(dt, 0) + return _DEFAULT_FILL_MAP.get(dt, Constants.DEFAULT_FILL)