Skip to content

Commit

Permalink
Merge branch 'develop' into dev-fix-PecanProject#1747
Browse files Browse the repository at this point in the history
  • Loading branch information
mdietze committed May 3, 2023
2 parents b42c8c9 + 12d47ff commit 3ab6b41
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 39 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ convert data for a single PFT fixed (#1329, #2974, #2981)
- Fixed a bug in `model2netcdf.ed2()` where .nc file connections were being closed multiple times, printing warnings (#3078)
- Fixed a bug causing the model2netcdf.ED2() step in jobs.sh to be incorrectly written (#3075)
- Fixed a bug where `plant_min_temp` trait value wasn't being converted from ºC to K when writing config file for ED2 (#3110)
* Fixed a bug in `PEcAn.ED2::read_E_files()` affecting `PEcAn.ED2::model2netcdf.ED2()` that resulted in incorrect calculations (#3126)
* DDBH (change in DBH over time) is no longer extracted and summarized from monthly -E- files by `PEcAn.ED2::model2netcdf.ED2()`. We are not sure it makes sense to summarize this variable across cohorts of different sizes.
* The `yr` and `yfiles` arguments of `PEcAn.ED2::read_E_files()` are no longer used and the simulation date is extracted from the names of the .h5 files output by ED2.
- Fixed a bug in `PEcAn.ED2::read_E_files()` affecting `PEcAn.ED2::model2netcdf.ED2()` that resulted in incorrect calculations (#3126)
- DDBH (change in DBH over time) is no longer extracted and summarized from monthly -E- files by `PEcAn.ED2::model2netcdf.ED2()`. We are not sure it makes sense to summarize this variable across cohorts of different sizes.
- The `yr` and `yfiles` arguments of `PEcAn.ED2::read_E_files()` are no longer used and the simulation date is extracted from the names of the .h5 files output by ED2.
- Update Dockerfile for sipnet/maespa/template to use pecan/models:tag to build.

### Changed

Expand All @@ -105,6 +106,7 @@ convert data for a single PFT fixed (#1329, #2974, #2981)

- the check image (used in kubernetes) is removed, please use ncsa/checks instead.
- Unused (and apparently long-broken) function `PEcAn.data.land::find.land` has been removed.
- No longer building r136 sipnet docker image.

## [1.7.2] - 2021-10-04

Expand Down
2 changes: 1 addition & 1 deletion docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ for version in git; do
done

# build sipnet
for version in git r136; do
for version in git; do
${DEBUG} docker build \
--tag pecan/model-sipnet-${version}:${IMAGE_VERSION} \
--build-arg MODEL_VERSION="${version}" \
Expand Down
11 changes: 1 addition & 10 deletions models/maespa/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@ ARG IMAGE_VERSION="latest"
# ----------------------------------------------------------------------
# BUILD MODEL BINARY
# ----------------------------------------------------------------------
FROM debian:stretch as model-binary

# install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
gfortran \
&& rm -rf /var/lib/apt/lists/*
FROM pecan/models:${IMAGE_VERSION} as model-binary

# download, unzip and build ed2
WORKDIR /src
Expand Down
12 changes: 2 additions & 10 deletions models/sipnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,11 @@ ARG IMAGE_VERSION="latest"
# ----------------------------------------------------------------------
# BUILD SIPNET BINARY
# ----------------------------------------------------------------------
FROM debian:stretch as sipnet-binary
FROM pecan/models:${IMAGE_VERSION} as model-binary

# Some variables that can be used to set control the docker build
ARG MODEL_VERSION=git

# install dependencies
RUN apt-get update \
&& apt-get install -y \
gcc \
git \
make \
&& rm -rf /var/lib/apt/lists/*

# download, unzip and build sipnet
WORKDIR /src
RUN git clone https://github.com/PecanProject/sipnet.git \
Expand Down Expand Up @@ -56,4 +48,4 @@ RUN sed -i -e "s/@VERSION@/${MODEL_VERSION}/g" \
-e "s#@BINARY@#/usr/local/bin/sipnet.${MODEL_VERSION}#g" /work/model.json

# COPY sipnet binary
COPY --from=sipnet-binary /src/sipnet/sipnet /usr/local/bin/sipnet.${MODEL_VERSION}
COPY --from=model-binary /src/sipnet/sipnet /usr/local/bin/sipnet.${MODEL_VERSION}
26 changes: 11 additions & 15 deletions models/template/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ ARG IMAGE_VERSION="latest"
# ----------------------------------------------------------------------
# BUILD MODEL BINARY
# ----------------------------------------------------------------------
FROM debian:stretch as model-binary
FROM pecan/models:${IMAGE_VERSION} as model-binary

# Some variables that can be used to set control the docker build
ARG MODEL_VERSION=git

# install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
gfortran \
git \
libhdf5-dev \
libopenmpi-dev \
&& rm -rf /var/lib/apt/lists/*
#RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# libhdf5-dev \
# libopenmpi-dev \
# && rm -rf /var/lib/apt/lists/*

# download, unzip and build ed2
WORKDIR /src
Expand All @@ -45,11 +41,11 @@ FROM pecan/models:${IMAGE_VERSION}
# INSTALL MODEL SPECIFIC PIECES
# ----------------------------------------------------------------------

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libgfortran3 \
libopenmpi2 \
&& rm -rf /var/lib/apt/lists/*
#RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# libgfortran3 \
# libopenmpi2 \
# && rm -rf /var/lib/apt/lists/*

# ----------------------------------------------------------------------
# SETUP FOR SPECIFIC MODEL
Expand Down

0 comments on commit 3ab6b41

Please sign in to comment.