Skip to content

Commit

Permalink
update musica
Browse files Browse the repository at this point in the history
  • Loading branch information
boulderdaze committed Dec 21, 2023
1 parent 7d299b6 commit d503eba
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
4 changes: 3 additions & 1 deletion Externals_CAM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ required = True
local_path = src/physics/ncar_ccpp
protocol = git
repo_url = https://github.com/ESCOMP/atmospheric_physics
tag = atmos_phys0_01_000
# tag = atmos_phys0_01_000
# TODO(jiwon)
branch = update_micm_interface
required = True

[externals_description]
Expand Down
3 changes: 2 additions & 1 deletion cime_config/buildlib
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def _build_cam():
case.get_value("COMP_INTERFACE")),
os.path.join(atm_root, "src", "dynamics", "utils"),
os.path.join(atm_root, "src", "physics", "utils"),
os.path.join(atm_root, "src", "utils")]
os.path.join(atm_root, "src", "utils"),
os.path.join("/usr/local/musica-0.4.0/fortran_include/")]
for path in phys_dirs:
if path not in paths:
paths.append(path)
Expand Down
24 changes: 17 additions & 7 deletions docker/Dockerfile.musica
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ RUN dnf -y update \
git \
hostname \
m4 \
python \
python3.11 \
sudo \
svn \
tree \
vim \
json-devel \
&& dnf clean all

##################################################
# Set symlink to the specific python version
# that supports a deprecated pacakge for cime (distuitls)
##################################################
RUN ln -fs /usr/bin/python3.11 /usr/bin/python3

###################################################
## Make sure the mpi compilers can be found
###################################################
Expand Down Expand Up @@ -54,18 +61,21 @@ RUN ln -s /usr/local/jsonfortran-gnu-8.2.0/lib/libjsonfortran.a /usr/local/lib/l
## Build and install MUSICA
###################################################

RUN git clone https://github.com/NCAR/musica.git
# TODO(jiwon): update after musica & atmospheric_phys PRs are approved
# RUN git clone https://github.com/NCAR/musica.git
RUN git clone -b update_for_ccpp_wrapper --depth 1 https://github.com/NCAR/musica.git
RUN mkdir /musica/build \
&& cd /musica/build \
&& export JSON_FORTRAN_HOME="/usr/local/jsonfortran-gnu-8.2.0" \
&& cmake \
-D ENABLE_TESTS=OFF \
-D ENABLE_TUVX=OFF \
.. \
-D MAKE_MUSICA_FORTRAN_INSTALLABLE=ON \
-D ENABLE_TESTS=OFF \
-D ENABLE_TUVX=OFF \
.. \
&& make install -j 8

# add a symlink
RUN ln -s /usr/local/musica-0.3.0/lib64/libmusica.a /usr/local/lib/libmusica.a
RUN ln -s /usr/local/musica-0.4.0/lib64/libmusica.a /usr/local/lib/libmusica.a

###################################################
## Build CAM-SIMA
Expand Down Expand Up @@ -116,4 +126,4 @@ RUN /home/cam_sima_user/CAM-SIMA/docker/ftp_download.sh
# # add the snapshot file
RUN echo "ncdata='/home/cam_sima_user/run_heldsuarez_cam6_nt2_bigg_try005.cam.h5.0001-01-01-00000.nc'" >> user_nl_cam

RUN ./case.build
RUN ./case.build

0 comments on commit d503eba

Please sign in to comment.