Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/cice-consortium/cice into E…
Browse files Browse the repository at this point in the history
…3SMIcepackDEV

Merge CICE-Consortium #8322416793ae2b76c2 Aug 18, 2023 and Update Icepack to E3SM Icepack #e7510221a315ab Aug 21, 2023
  • Loading branch information
apcraig committed Aug 21, 2023
2 parents a093b13 + 8322416 commit 95a797c
Show file tree
Hide file tree
Showing 66 changed files with 7,272 additions and 951 deletions.
43 changes: 35 additions & 8 deletions .github/workflows/test-cice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: GHActions
on:
push:
branches:
- master
- main
- 'CICE*'
- 'ghactions*'
pull_request:
Expand All @@ -27,8 +27,12 @@ jobs:
matrix:
# os: [macos-latest, ubuntu-latest]
os: [macos-latest]
# os: [macos-13]
# os: [ubuntu-latest]
include:
# - os: macos-13
# envdef: macos
# minicond: Miniconda3-latest-MacOSX-x86_64.sh
- os: macos-latest
envdef: macos
minicond: Miniconda3-latest-MacOSX-x86_64.sh
Expand Down Expand Up @@ -98,10 +102,26 @@ jobs:
conda env create -f configuration/scripts/machines/environment.yml
- name: check conda env
run: |
conda activate cice && which mpicc && which mpifort && which make
conda activate cice && which clang && which gfortran && which mpicc && which mpifort && which make
clang --version
gfortran --version
mpifort --version
mpicc --version
make --version
# echo "mpifort -v:"
# mpifort -v
# echo "mpifort --showme:compile:"
# mpifort --showme:compile
# echo "mpifort --showme:link:"
# mpifort --showme:link
# echo "mpifort --showme:command:"
# mpifort --showme:command
# echo "mpifort --showme:libdirs:"
# mpifort --showme:libdirs
# echo "mpifort --showme:libs:"
# mpifort --showme:libs
# echo "mpifort --showme:incdirs:"
# mpifort --showme:incdirs
- name: check setup case
run: |
cd $HOME/cice
Expand All @@ -110,12 +130,19 @@ jobs:
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: run hello world unit test
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} --test unittest --pes 2x1 -s helloworld --testid hw01
cd *helloworld*hw01
./cice.build
./cice.run
- name: check cice compile
run: |
cd $HOME/cice
./cice.setup -m conda -e ${{ matrix.envdef }} -c case1 --pes 2x2 -s diag1
cd case1
./cice.build
- name: download input data
run: |
cd $HOME/cice-dirs/input
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ sphinx:
configuration: doc/source/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf
formats:
- pdf

# Optionally declare the Python requirements required to build your docs
python:
Expand Down
156 changes: 0 additions & 156 deletions cicecore/cicedyn/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1943,162 +1943,6 @@ subroutine print_state(plabel,i,j,iblk)
end subroutine print_state

!=======================================================================
#ifdef UNDEPRECATE_print_points_state

! This routine is useful for debugging.

subroutine print_points_state(plabel,ilabel)

use ice_grid, only: grid_ice
use ice_blocks, only: block, get_block
use ice_domain, only: blocks_ice
use ice_domain_size, only: ncat, nilyr, nslyr
use ice_state, only: aice0, aicen, vicen, vsnon, uvel, vvel, &
uvelE, vvelE, uvelE, vvelE, trcrn
use ice_flux, only: uatm, vatm, potT, Tair, Qa, flw, frain, fsnow, &
fsens, flat, evap, flwout, swvdr, swvdf, swidr, swidf, rhoa, &
frzmlt, sst, sss, Tf, Tref, Qref, Uref, uocn, vocn, strtltxU, strtltyU

character (len=*), intent(in),optional :: plabel
integer , intent(in),optional :: ilabel

! local variables

real (kind=dbl_kind) :: &
eidebug, esdebug, &
qi, qs, &
puny

integer (kind=int_kind) :: m, n, k, i, j, iblk, nt_Tsfc, nt_qice, nt_qsno
character(len=256) :: llabel

type (block) :: &
this_block ! block information for current block

character(len=*), parameter :: subname = '(print_points_state)'
! ----------------------

call icepack_query_tracer_indices(nt_Tsfc_out=nt_Tsfc, nt_qice_out=nt_qice, &
nt_qsno_out=nt_qsno)
call icepack_query_parameters(puny_out=puny)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

do m = 1, npnt
if (my_task == pmloc(m)) then
i = piloc(m)
j = pjloc(m)
iblk = pbloc(m)
this_block = get_block(blocks_ice(iblk),iblk)

if (present(ilabel)) then
write(llabel,'(i6,a1,i3,a1)') ilabel,':',m,':'
else
write(llabel,'(i3,a1)') m,':'
endif
if (present(plabel)) then
write(llabel,'(a)') 'pps:'//trim(plabel)//':'//trim(llabel)
else
write(llabel,'(a)') 'pps:'//trim(llabel)
endif

write(nu_diag,*) subname
write(nu_diag,*) trim(llabel),'istep1, my_task, i, j, iblk=', &
istep1, my_task, i, j, iblk
write(nu_diag,*) trim(llabel),'Global i and j=', &
this_block%i_glob(i), &
this_block%j_glob(j)
write(nu_diag,*) trim(llabel),'aice0=', aice0(i,j,iblk)

do n = 1, ncat
write(nu_diag,*) trim(llabel),'aicen=', n,aicen(i,j,n,iblk)
write(nu_diag,*) trim(llabel),'vicen=', n,vicen(i,j,n,iblk)
write(nu_diag,*) trim(llabel),'vsnon=', n,vsnon(i,j,n,iblk)
if (aicen(i,j,n,iblk) > puny) then
write(nu_diag,*) trim(llabel),'hin=', n,vicen(i,j,n,iblk)/aicen(i,j,n,iblk)
write(nu_diag,*) trim(llabel),'hsn=', n,vsnon(i,j,n,iblk)/aicen(i,j,n,iblk)
endif
write(nu_diag,*) trim(llabel),'Tsfcn=',n,trcrn(i,j,nt_Tsfc,n,iblk)
enddo

eidebug = c0
do n = 1,ncat
do k = 1,nilyr
qi = trcrn(i,j,nt_qice+k-1,n,iblk)
write(nu_diag,*) trim(llabel),'qice= ',n,k, qi
eidebug = eidebug + qi
enddo
enddo
write(nu_diag,*) trim(llabel),'qice=',eidebug

esdebug = c0
do n = 1,ncat
if (vsnon(i,j,n,iblk) > puny) then
do k = 1,nslyr
qs = trcrn(i,j,nt_qsno+k-1,n,iblk)
write(nu_diag,*) trim(llabel),'qsnow=',n,k, qs
esdebug = esdebug + qs
enddo
endif
enddo
write(nu_diag,*) trim(llabel),'qsnow=',esdebug

write(nu_diag,*) trim(llabel),'uvel=',uvel(i,j,iblk)
write(nu_diag,*) trim(llabel),'vvel=',vvel(i,j,iblk)
if (grid_ice == 'C') then
write(nu_diag,*) trim(llabel),'uvelE=',uvelE(i,j,iblk)
write(nu_diag,*) trim(llabel),'vvelN=',vvelN(i,j,iblk)
elseif (grid_ice == 'CD') then
write(nu_diag,*) trim(llabel),'uvelE=',uvelE(i,j,iblk)
write(nu_diag,*) trim(llabel),'vvelE=',vvelE(i,j,iblk)
write(nu_diag,*) trim(llabel),'uvelN=',uvelN(i,j,iblk)
write(nu_diag,*) trim(llabel),'vvelN=',vvelN(i,j,iblk)
endif

write(nu_diag,*) ' '
write(nu_diag,*) 'atm states and fluxes'
write(nu_diag,*) ' uatm = ',uatm (i,j,iblk)
write(nu_diag,*) ' vatm = ',vatm (i,j,iblk)
write(nu_diag,*) ' potT = ',potT (i,j,iblk)
write(nu_diag,*) ' Tair = ',Tair (i,j,iblk)
write(nu_diag,*) ' Qa = ',Qa (i,j,iblk)
write(nu_diag,*) ' rhoa = ',rhoa (i,j,iblk)
write(nu_diag,*) ' swvdr = ',swvdr(i,j,iblk)
write(nu_diag,*) ' swvdf = ',swvdf(i,j,iblk)
write(nu_diag,*) ' swidr = ',swidr(i,j,iblk)
write(nu_diag,*) ' swidf = ',swidf(i,j,iblk)
write(nu_diag,*) ' flw = ',flw (i,j,iblk)
write(nu_diag,*) ' frain = ',frain(i,j,iblk)
write(nu_diag,*) ' fsnow = ',fsnow(i,j,iblk)
write(nu_diag,*) ' '
write(nu_diag,*) 'ocn states and fluxes'
write(nu_diag,*) ' frzmlt = ',frzmlt (i,j,iblk)
write(nu_diag,*) ' sst = ',sst (i,j,iblk)
write(nu_diag,*) ' sss = ',sss (i,j,iblk)
write(nu_diag,*) ' Tf = ',Tf (i,j,iblk)
write(nu_diag,*) ' uocn = ',uocn (i,j,iblk)
write(nu_diag,*) ' vocn = ',vocn (i,j,iblk)
write(nu_diag,*) ' strtltxU= ',strtltxU(i,j,iblk)
write(nu_diag,*) ' strtltyU= ',strtltyU(i,j,iblk)
write(nu_diag,*) ' '
write(nu_diag,*) 'srf states and fluxes'
write(nu_diag,*) ' Tref = ',Tref (i,j,iblk)
write(nu_diag,*) ' Qref = ',Qref (i,j,iblk)
write(nu_diag,*) ' Uref = ',Uref (i,j,iblk)
write(nu_diag,*) ' fsens = ',fsens (i,j,iblk)
write(nu_diag,*) ' flat = ',flat (i,j,iblk)
write(nu_diag,*) ' evap = ',evap (i,j,iblk)
write(nu_diag,*) ' flwout = ',flwout(i,j,iblk)
write(nu_diag,*) ' '
call flush_fileunit(nu_diag)

endif ! my_task
enddo ! ncnt

end subroutine print_points_state
#endif
!=======================================================================

! prints error information prior to aborting

Expand Down
2 changes: 2 additions & 0 deletions cicecore/cicedyn/analysis/ice_history_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ module ice_history_shared
time_end(max_nstrm), &
time_bounds(2)

character (len=char_len), public :: hist_time_axis

real (kind=dbl_kind), allocatable, public :: &
a2D (:,:,:,:) , & ! field accumulations/averages, 2D
a3Dz(:,:,:,:,:) , & ! field accumulations/averages, 3D vertical
Expand Down
12 changes: 4 additions & 8 deletions cicecore/cicedyn/dynamics/ice_transport_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ module ice_transport_driver
! 'upwind' => 1st order donor cell scheme
! 'remap' => remapping scheme

logical, parameter :: &
l_fixed_area = .false. ! if true, prescribe area flux across each edge

! NOTE: For remapping, hice and hsno are considered tracers.
! ntrace is not equal to ntrcr!

Expand Down Expand Up @@ -81,6 +78,7 @@ subroutine init_transport
use ice_state, only: trcr_depend
use ice_timers, only: ice_timer_start, ice_timer_stop, timer_advect
use ice_transport_remap, only: init_remap
use ice_grid, only: grid_ice

integer (kind=int_kind) :: &
k, nt, nt1 ! tracer indices
Expand Down Expand Up @@ -236,7 +234,7 @@ subroutine init_transport
endif ! master_task
1000 format (1x,a,2x,i6,2x,i6,2x,i4,4x,l4)

if (trim(advection)=='remap') call init_remap ! grid quantities
if (trim(advection)=='remap') call init_remap ! grid quantities

call ice_timer_stop(timer_advect) ! advection

Expand Down Expand Up @@ -545,19 +543,17 @@ subroutine transport_remap (dt)
call horizontal_remap (dt, ntrace, &
uvel (:,:,:), vvel (:,:,:), &
aim (:,:,:,:), trm(:,:,:,:,:), &
l_fixed_area, &
tracer_type, depend, &
has_dependents, integral_order, &
l_dp_midpt, grid_ice, &
l_dp_midpt, &
uvelE (:,:,:), vvelN (:,:,:))
else
call horizontal_remap (dt, ntrace, &
uvel (:,:,:), vvel (:,:,:), &
aim (:,:,:,:), trm(:,:,:,:,:), &
l_fixed_area, &
tracer_type, depend, &
has_dependents, integral_order, &
l_dp_midpt, grid_ice)
l_dp_midpt)
endif

!-------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 95a797c

Please sign in to comment.