Skip to content

Commit

Permalink
Merge remote-tracking branch 'Consortium/master' into feature/updcice
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed Mar 14, 2021
2 parents 1e4d393 + 5a0a559 commit 66546ae
Show file tree
Hide file tree
Showing 87 changed files with 2,109 additions and 1,197 deletions.
135 changes: 135 additions & 0 deletions .github/workflows/test-cice.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: GHActions

# This workflow is triggered on pushes, pull-requeust, and releases
# ghactions* branch names will trigger this to support development testing
# To Do: get it working with bash and ubuntu

on:
push:
branches:
- master
- 'CICE*'
- 'ghactions*'
pull_request:
release:
types:
- created

defaults:
run:
shell: /bin/csh {0}

jobs:
build:
name: "CICETesting"
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest, ubuntu-latest]
os: [macos-latest]
# os: [ubuntu-latest]
include:
- os: macos-latest
envdef: macos
minicond: Miniconda3-latest-MacOSX-x86_64.sh
# - os: ubuntu-latest
# envdef: linux
# minicond: Miniconda3-latest-Linux-x86_64.sh
steps:
- name: reset macos toolchain to commandlinetools
shell: /bin/bash {0}
if: contains( matrix.envdef, 'macos')
run: |
sudo xcode-select -r
sudo xcode-select -s /Library/Developer/CommandLineTools
echo "xcrun --show-sdk-path: $(xcrun --show-sdk-path)"
echo "xcode-select -p: $(xcode-select -p)"
- name: system info
shell: /bin/bash {0}
run: |
type wget
type curl
type csh
echo "readlink \$(which csh): $(python -c 'import os, sys; print os.path.realpath(sys.argv[1])' $(which csh))"
echo "csh --version: $(csh --version)"
echo "uname -a: $(uname -a)"
echo "sw_vers: $(sw_vers)"
echo "HOME: $HOME"
echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
echo "OS: ${{ matrix.os }}"
echo "ENVDEF: ${{ matrix.envdef }}"
echo "MINICOND: ${{ matrix.minicond }}"
- name : install miniconda
shell: /bin/bash {0}
run: |
wget https://repo.anaconda.com/miniconda/${{ matrix.minicond }} -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
- name: clone
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: link
run: |
ln -s ${GITHUB_WORKSPACE}/../CICE ${HOME}/cice
# ls -al ${HOME}/
# ls -al ${GITHUB_WORKSPACE}/
- name: setup conda env
shell: /bin/bash {0}
run: |
cd $HOME && mkdir -p cice-dirs/runs cice-dirs/baseline cice-dirs/input
source $HOME/miniconda/bin/activate
conda init tcsh
cd $HOME/cice
conda env create -f configuration/scripts/machines/environment.yml
- name: check conda env
run: |
conda activate cice && which mpicc && which mpifort && which make
mpifort --version
mpicc --version
make --version
- name: check setup case
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} -c case0 --pes 1x1 -s diag1
- name: check setup test
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} --test smoke --testid c0
# - name: compile case
# run: |
# cd $HOME/cice
# ./cice.setup -m conda -e ${{ matrix.envdef }} -c case1
# cd case1
# ./cice.build
- name: download input data
run: |
cd $HOME/cice-dirs/input
wget https://zenodo.org/record/3728358/files/CICE_data_gx3_grid_ic-20200320.tar.gz && tar xvfz CICE_data_gx3_grid_ic-20200320.tar.gz
wget https://zenodo.org/record/3728362/files/CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz
wget https://zenodo.org/record/3728364/files/CICE_data_gx3_forcing_JRA55-20200320.tar.gz && tar xvfz CICE_data_gx3_forcing_JRA55-20200320.tar.gz
pwd
ls -alR
# - name: run case
# run: |
# cd $HOME/cice
# cd case1
# ./cice.run
- name: run suite
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} --suite travis_suite --testid ${{ matrix.os }}
- name: write output
run: |
cd $HOME/cice
./.github/workflows/write_logfiles.csh
cd testsuite.${{ matrix.os }}
./results.csh
- name: successful run
if: ${{ success() }}
run: |
echo "${{ job.name }} PASSED"
- name: trap failure
if: ${{ failure() }}
run: |
echo "${{ job.name }} FAILED"
exit 99
10 changes: 10 additions & 0 deletions .github/workflows/write_logfiles.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/csh

#echo "hello"

foreach logfile (case*/logs/cice.runlog* testsuite.*/*/logs/cice.runlog*)
echo "### ${logfile} ###"
tail -20 $logfile
echo " "
end

3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "icepack"]
path = icepack
url = https://github.com/NOAA-EMC/Icepack
#url = https://github.com/NOAA-EMC/Icepack
url = https://github.com/DeniseWorthen/Icepack
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ install:

# Fetch forcing data
- "wget https://zenodo.org/record/3728362/files/CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz &&
tar xvfz CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz -C ~"
tar xvfz CICE_data_gx3_forcing_NCAR_bulk-20200320.tar.gz -C ~"

# Fetch jra55_gx3 forcing data
- "wget https://zenodo.org/record/3728364/files/CICE_data_gx3_forcing_JRA55-20200320.tar.gz &&
tar xvfz CICE_data_gx3_forcing_JRA55-20200320.tar.gz -C ~"

# Mirror entire data folder
#- "lftp ftp://anonymous:travis@travis-ci.org@ftp.cgd.ucar.edu
Expand Down
Binary file modified LICENSE.pdf
Binary file not shown.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.org/CICE-Consortium/CICE.svg?branch=master)](https://travis-ci.org/CICE-Consortium/CICE)
[![Travis-CI](https://travis-ci.org/CICE-Consortium/CICE.svg?branch=master)](https://travis-ci.org/CICE-Consortium/CICE)
[![GHActions](https://github.com/CICE-Consortium/CICE/workflows/GHActions/badge.svg)](https://github.com/CICE-Consortium/CICE/actions)
[![Documentation Status](https://readthedocs.org/projects/cice-consortium-cice/badge/?version=master)](http://cice-consortium-cice.readthedocs.io/en/master/?badge=master)
[![lcov](https://img.shields.io/endpoint?url=https://apcraig.github.io/coverage.json)](https://apcraig.github.io)

Expand Down
15 changes: 11 additions & 4 deletions cicecore/cicedynB/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1561,11 +1561,11 @@ subroutine print_state(plabel,i,j,iblk)

real (kind=dbl_kind) :: &
eidebug, esdebug, &
qi, qs, Tsnow, &
qi, qs, Tsnow, si, &
rad_to_deg, puny, rhoi, lfresh, rhos, cp_ice

integer (kind=int_kind) :: n, k, nt_Tsfc, nt_qice, nt_qsno, nt_fsd, &
nt_isosno, nt_isoice
nt_isosno, nt_isoice, nt_sice

logical (kind=log_kind) :: tr_fsd, tr_iso

Expand All @@ -1576,7 +1576,7 @@ subroutine print_state(plabel,i,j,iblk)

call icepack_query_tracer_flags(tr_fsd_out=tr_fsd, tr_iso_out=tr_iso)
call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc, nt_qice_out=nt_qice, &
nt_qsno_out=nt_qsno, nt_fsd_out=nt_fsd, &
nt_qsno_out=nt_qsno, nt_sice_out=nt_sice, nt_fsd_out=nt_fsd, &
nt_isosno_out=nt_isosno, nt_isoice_out=nt_isoice)
call icepack_query_parameters( &
rad_to_deg_out=rad_to_deg, puny_out=puny, rhoi_out=rhoi, lfresh_out=lfresh, &
Expand Down Expand Up @@ -1621,7 +1621,6 @@ subroutine print_state(plabel,i,j,iblk)

enddo ! n


eidebug = c0
do n = 1,ncat
do k = 1,nilyr
Expand Down Expand Up @@ -1654,6 +1653,14 @@ subroutine print_state(plabel,i,j,iblk)
write(nu_diag,*) 'qsnow(i,j)',esdebug
write(nu_diag,*) ' '

do n = 1,ncat
do k = 1,nilyr
si = trcrn(i,j,nt_sice+k-1,n,iblk)
write(nu_diag,*) 'sice, cat ',n,' layer ',k, si
enddo
enddo
write(nu_diag,*) ' '

write(nu_diag,*) 'uvel(i,j)',uvel(i,j,iblk)
write(nu_diag,*) 'vvel(i,j)',vvel(i,j,iblk)

Expand Down
4 changes: 2 additions & 2 deletions cicecore/cicedynB/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -925,12 +925,12 @@ subroutine init_hist (dt)
ns1, f_strinty)

call define_hist_field(n_taubx,"taubx","N/m^2",ustr2D, ucstr, &
"basal (seabed) stress (x)", &
"seabed (basal) stress (x)", &
"positive is x direction on U grid", c1, c0, &
ns1, f_taubx)

call define_hist_field(n_tauby,"tauby","N/m^2",ustr2D, ucstr, &
"basal (seabed) stress (y)", &
"seabed (basal) stress (y)", &
"positive is y direction on U grid", c1, c0, &
ns1, f_tauby)

Expand Down
Loading

0 comments on commit 66546ae

Please sign in to comment.