Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does this work #3

Merged
merged 15 commits into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ please refer to: <https://github.com/CICE-Consortium/About-Us/wiki/Resource-Inde
- Does this PR add any new test cases?
- [ ] Yes
- [ ] No
- Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/.)
- Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/. A test build of the technical docs will be performed as part of the PR testing.)
- [ ] Yes
- [ ] No, does the documentation need to be updated at a later time?
- [ ] Yes
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ doc/build

# Ignore macOS cache files
.DS_Store

# Ignore testsuite file/directories
testsuite*
caselist*
10 changes: 4 additions & 6 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"license": "other-open",
"description": "No description provided",
"language": "English",
"language": "eng",
"title": "CICE-Consortium/CICE: CICE Version m.n.p",
"keywords": [
"sea ice model, CICE, Icepack"
Expand Down Expand Up @@ -37,7 +37,7 @@
},
{
"affiliation": "National Oceanographic and Atmospheric Administration (CTR)",
"name": "Tony Craig"
"name": "Anthony Craig"
},
{
"affiliation": "Environment and Climate Change Canada",
Expand Down Expand Up @@ -80,7 +80,7 @@
"name": "Andrew Roberts"
},
{
"affiliation": "Naval Research Laboratory Stennis Space Center (CTR)",
"affiliation": "Los Alamos National Laboratory",
"name": "Matthew Turner"
},
{
Expand All @@ -91,14 +91,12 @@
"access_right": "open",
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/CICE-Consortium/CICE/tree/CICE6.0.1",
"relation": "isSupplementTo"
},
{
"scheme": "doi",
"identifier": "10.5281/zenodo.1205674",
"relation": "isVersionOf"
"relation": "isNewVersionOf"
}
]
}
101 changes: 78 additions & 23 deletions cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,10 @@ EOF
set blckx = `echo ${pesx} | cut -d x -f 3`
set blcky = `echo ${pesx} | cut -d x -f 4`
set mblck = `echo ${pesx} | cut -d x -f 5`
if ($?ICE_MACHINE_MAXPES) then
@ pesreq = ${task} * ${thrd}
if (${pesreq} > ${ICE_MACHINE_MAXPES}) then
@ task = ${ICE_MACHINE_MAXPES} / ${thrd}
@ mblck = ${mblck} * ((${pesreq} / ${ICE_MACHINE_MAXPES}) + 1)
endif
if (${task} == 0 || ${thrd} == 0 || ${blckx} == 0 || ${blcky} == 0 || ${mblck} == 0) then
echo "${0}: ERROR in -p argument, cannot have zeros"
exit -1
endif
set pesx = ${task}x${thrd}x${blckx}x${blcky}x${mblck}
else
set chck = `echo ${pesx} | sed 's/^[0-9][0-9]*x[0-9][0-9]*x[0-9][0-9]*x[0-9][0-9]*$/OK/'`
if (${chck} == OK) then
Expand All @@ -509,13 +505,10 @@ EOF
set blckx = `echo ${pesx} | cut -d x -f 3`
set blcky = `echo ${pesx} | cut -d x -f 4`
set mblck = 0
if ($?ICE_MACHINE_MAXPES) then
@ pesreq = ${task} * ${thrd}
if (${pesreq} > ${ICE_MACHINE_MAXPES}) then
@ task = ${ICE_MACHINE_MAXPES} / ${thrd}
endif
if (${task} == 0 || ${thrd} == 0 || ${blckx} == 0 || ${blcky} == 0) then
echo "${0}: ERROR in -p argument, cannot have zeros"
exit -1
endif
set pesx = ${task}x${thrd}x${blckx}x${blcky}
else
set chck = `echo ${pesx} | sed 's/^[0-9][0-9]*x[0-9][0-9]*$/OK/'`
if (${chck} == OK) then
Expand All @@ -524,20 +517,73 @@ EOF
set blckx = 0
set blcky = 0
set mblck = 0
if ($?ICE_MACHINE_MAXPES) then
@ pesreq = ${task} * ${thrd}
if (${pesreq} > ${ICE_MACHINE_MAXPES}) then
@ task = ${ICE_MACHINE_MAXPES} / ${thrd}
endif
if (${task} == 0 || ${thrd} == 0) then
echo "${0}: ERROR in -p argument, cannot have zeros"
exit -1
endif
set pesx = ${task}x${thrd}
else
echo "${0}: ERROR in -p argument, ${pesx}, must be [m]x[n], [m]x[n]x[bx]x[by], or [m]x[n]x[bx]x[by]x[mb] "
exit -1
set chck = `echo ${pesx} | sed 's/^[0-9][0-9]*$/OK/'`
if (${chck} == OK) then
set task = `echo ${pesx} | cut -d x -f 1`
set thrd = 1
set blckx = 0
set blcky = 0
set mblck = 0
if (${task} == 0) then
echo "${0}: ERROR in -p argument, cannot have zeros"
exit -1
endif
else
echo "${0}: ERROR in -p argument, ${pesx}, must be [m], [m]x[n], [m]x[n]x[bx]x[by], or [m]x[n]x[bx]x[by]x[mb] "
exit -1
endif
endif
endif
endif

@ blkreq = ${task} * ${mblck}
# check max threads, reduce threads, increase tasks
if ($?ICE_MACHINE_MAXTHREADS) then
if (${thrd} > ${ICE_MACHINE_MAXTHREADS}) then
@ pesreq = ${task} * ${thrd}
@ task = ${pesreq} / ${ICE_MACHINE_MAXTHREADS}
@ thrd = ${ICE_MACHINE_MAXTHREADS}
@ peschk = ${task} * ${thrd}
if (${pesreq} > ${peschk}) then
@ task = ${task} + 1
endif
# echo "tcx1 reset to $task $thrd $mblck"
endif
endif

# check max pes, reduce tasks
if ($?ICE_MACHINE_MAXPES) then
@ pesreq = ${task} * ${thrd}
if (${pesreq} > ${ICE_MACHINE_MAXPES}) then
@ task = ${ICE_MACHINE_MAXPES} / ${thrd}
# echo "tcx2 reset to $task $thrd $mblck"
endif
endif

# check max blocks and adjust as needed
if ($mblck > 0) then
@ mblck = ${blkreq} / ${task}
@ blkchk = ${task} * ${mblck}
if (${blkreq} > ${blkchk}) then
@ mblck = $mblck + 1
endif
# echo "tcx3 reset to $task $thrd $mblck"
endif

# update pesx based on use defined settings and machine limits to reflect actual value
set pesx = ${task}x${thrd}x${blckx}x${blcky}x${mblck}
if (${mblck} == 0) then
set pesx = ${task}x${thrd}x${blckx}x${blcky}
endif
if (${blckx} == 0 || ${blcky} == 0) then
set pesx = ${task}x${thrd}
endif

set testname_noid = ${spval}
# create case for test cases
if (${docase} == 0) then
Expand Down Expand Up @@ -803,7 +849,7 @@ EOF2

cat ${ICE_SCRIPTS}/options/set_env.${name} >> ${fsmods}

cat >> ${fimods} << EOF2
cat >> ${fsmods} << EOF2

EOF2

Expand Down Expand Up @@ -872,7 +918,7 @@ echo "${testname_base}"
cd ${testname_base}
source ./cice.settings
set ciceexe = "../ciceexe.\${ICE_COMPILER}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}"
./cice.build \${ciceexe}
./cice.build --exe \${ciceexe}
if !(-e \${ciceexe}) cp -p \${ICE_RUNDIR}/cice \${ciceexe}
EOF
end
Expand Down Expand Up @@ -907,6 +953,15 @@ end

if ( ${dosuite} == 1 ) then

# Delete reused ciceexe files at the end to save space
foreach file (${tsdir}/suite.run ${tsdir}/suite.submit)
cat >> $file << EOF0

set nonomatch && rm -f ciceexe.* && unset nonomatch

EOF0
end

# Add code to results.csh to count the number of failures
cat >> ${tsdir}/results.csh << EOF
cat ./results.log
Expand Down
2 changes: 2 additions & 0 deletions cicecore/cicedynB/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ subroutine runtime_diags (dt)
use ice_global_reductions, only: global_sum, global_sum_prod, global_maxval
use ice_grid, only: lmask_n, lmask_s, tarean, tareas
use ice_state ! everything
! tcraig, this is likely to cause circular dependency because ice_prescribed_mod is high level routine
#ifdef CESMCOUPLED
use ice_prescribed_mod, only: prescribed_ice
#endif
Expand Down Expand Up @@ -839,6 +840,7 @@ subroutine runtime_diags (dt)

if (print_global) then ! global diags for conservations checks

! tcraig, this is likely to cause circular dependency because ice_prescribed_mod is high level routine
#ifdef CESMCOUPLED
if (prescribed_ice) then
write (nu_diag,*) '----------------------------'
Expand Down
12 changes: 6 additions & 6 deletions cicecore/cicedynB/analysis/ice_history_bgc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ module ice_history_bgc
f_peakval = 'x', f_bgc_Fed_ml = 'x', &
f_bgc_Fep_ml = 'x', f_bgc_hum_ml = 'x', &
f_bgc_N_cat1 = 'x', f_bgc_DOC_cat1 = 'x', &
f_bgc_DIC_cat1 = 'x', f_bgc_Nit_cat1 = 'x', &
f_bgc_DIC_cat1 = 'x', f_bgc_Nit_cat1 = 'x', &
f_bgc_Am_cat1 = 'x', f_bgc_Sil_cat1 = 'x', &
f_bgc_DMSPd_cat1= 'x', f_bgc_DMS_cat1 = 'x', &
f_bgc_DON_cat1 = 'x', f_bgc_Fed_cat1 = 'x', &
f_bgc_DON_cat1 = 'x', f_bgc_Fed_cat1 = 'x', &
f_bgc_hum_cat1 = 'x', f_bgc_Fep_cat1 = 'x', &
f_bgc_PON_cat1 = 'x'

Expand Down Expand Up @@ -226,20 +226,20 @@ module ice_history_bgc
n_upNO , n_upNH , &
n_bTin , n_bphi , &
n_iDi , n_iki , &
n_bgc_PON , n_bgc_PON_ml , &
n_bgc_PON , &
n_fbri , n_hbri , &
n_zfswin , n_Nitnet , &
n_Amnet , n_Silnet , &
n_humnet , &
n_humnet , &
n_DMSPpnet , n_DMSPdnet , &
n_DMSnet , n_PONnet , &
n_Nitsnow , n_Amsnow , &
n_Silsnow , n_humsnow , &
n_DMSPpsnow , n_DMSPdsnow , &
n_DMSsnow , n_PONsnow , &
n_Nitfrac , n_Amfrac , &
n_Silfrac , n_zbgc_frac , &
n_humfrac , &
n_Silfrac , &
n_humfrac , &
n_DMSPpfrac , n_DMSPdfrac , &
n_DMSfrac , n_PONfrac , &
n_grownet , n_PPnet , &
Expand Down
16 changes: 8 additions & 8 deletions cicecore/cicedynB/analysis/ice_history_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ module ice_history_shared
f_e22, &
f_s11, f_s12, &
f_s22, &
f_yieldstress11, &
f_yieldstress11, &
f_yieldstress12, &
f_yieldstress22

Expand Down Expand Up @@ -608,13 +608,13 @@ module ice_history_shared
n_keffn_top , &
n_Tinz , n_Sinz , &
n_Tsnz , &
n_a11 , n_a12 , &
n_e11 , n_e12 , &
n_e22 , &
n_s11 , n_s12 , &
n_s22 , &
n_yieldstress11, n_yieldstress12, &
n_yieldstress22
n_a11 , n_a12 , &
n_e11 , n_e12 , &
n_e22 , &
n_s11 , n_s12 , &
n_s22 , &
n_yieldstress11, n_yieldstress12, &
n_yieldstress22

interface accum_hist_field ! generic interface
module procedure accum_hist_field_2D, &
Expand Down
8 changes: 4 additions & 4 deletions cicecore/cicedynB/dynamics/ice_dyn_eap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ subroutine eap (dt)
use ice_constants, only: field_loc_center, field_loc_NEcorner, &
field_type_scalar, field_type_vector
use ice_domain, only: nblocks, blocks_ice, halo_info, maskhalo_dyn
use ice_dyn_shared, only: fcor_blk, ndte, dtei, a_min, m_min, &
cosw, sinw, denom1, uvel_init, vvel_init, arlx1i, &
use ice_dyn_shared, only: fcor_blk, ndte, dtei, &
denom1, uvel_init, vvel_init, arlx1i, &
dyn_prep1, dyn_prep2, stepu, dyn_finish, &
basal_stress_coeff, basalstress
use ice_flux, only: rdg_conv, strairxT, strairyT, &
Expand Down Expand Up @@ -1615,9 +1615,9 @@ subroutine update_stress_rdg (ksub, ndte, divu, tension, &
invstressconviso, &
Angle_denom_gamma, Angle_denom_alpha, &
Tany_1, Tany_2, &
gamma, alpha, x, y, dx, dy, da, &
x, y, dx, dy, da, &
invdx, invdy, invda, invsin, &
invleng, dtemp1, dtemp2, atempprime, &
dtemp1, dtemp2, atempprime, &
kxw, kyw, kaw, &
puny, pi, pi2, piq, pih

Expand Down
15 changes: 8 additions & 7 deletions cicecore/cicedynB/dynamics/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ module ice_dyn_evp
use ice_communicate, only: my_task
use ice_constants, only: field_loc_center, field_loc_NEcorner, &
field_type_scalar, field_type_vector
use ice_constants, only: c0, c4, p027, p055, p111, p166, &
p2, p222, p25, p333, p5, c1
use ice_constants, only: c0, p027, p055, p111, p166, &
p222, p25, p333, p5, c1
use ice_dyn_shared, only: stepu, dyn_prep1, dyn_prep2, dyn_finish, &
ndte, yield_curve, ecci, denom1, arlx1i, fcor_blk, uvel_init, &
vvel_init, basal_stress_coeff, basalstress, Ktens, revp
Expand Down Expand Up @@ -92,7 +92,8 @@ subroutine evp (dt)
aice_init, aice0, aicen, vicen, strength
use ice_timers, only: timer_dynamics, timer_bound, &
ice_timer_start, ice_timer_stop, timer_evp_1d, timer_evp_2d
use ice_dyn_evp_1d
use ice_dyn_evp_1d, only: ice_dyn_evp_1d_copyin, ice_dyn_evp_1d_kernel, &
ice_dyn_evp_1d_copyout
use ice_dyn_shared, only: kevp_kernel

real (kind=dbl_kind), intent(in) :: &
Expand Down Expand Up @@ -353,7 +354,7 @@ subroutine evp (dt)
call abort_ice(trim(subname)//' &
& Kernel not tested on tripole grid. Set kevp_kernel=0')
endif
call evp_copyin( &
call ice_dyn_evp_1d_copyin( &
nx_block,ny_block,nblocks,nx_global+2*nghost,ny_global+2*nghost, &
HTE,HTN, &
!v1 dxhy,dyhx,cyp,cxp,cym,cxm,tinyarea, &
Expand All @@ -367,15 +368,15 @@ subroutine evp (dt)
stress12_1,stress12_2,stress12_3,stress12_4 )
if (kevp_kernel == 2) then
call ice_timer_start(timer_evp_1d)
call evp_kernel_v2()
call ice_dyn_evp_1d_kernel()
call ice_timer_stop(timer_evp_1d)
!v1 else if (kevp_kernel == 1) then
!v1 call evp_kernel_v1()
else
if (my_task == 0) write(nu_diag,*) subname,' ERROR: kevp_kernel = ',kevp_kernel
call abort_ice(subname//' kevp_kernel not supported.')
endif
call evp_copyout( &
call ice_dyn_evp_1d_copyout( &
nx_block,ny_block,nblocks,nx_global+2*nghost,ny_global+2*nghost,&
!strocn uvel,vvel, strocnx,strocny, strintx,strinty, &
uvel,vvel, strintx,strinty, &
Expand Down Expand Up @@ -641,7 +642,7 @@ subroutine stress (nx_block, ny_block, &
tensionne, tensionnw, tensionse, tensionsw, & ! tension
shearne, shearnw, shearse, shearsw , & ! shearing
Deltane, Deltanw, Deltase, Deltasw , & ! Delt
puny , & ! puny
! puny , & ! puny
c0ne, c0nw, c0se, c0sw , & ! useful combinations
c1ne, c1nw, c1se, c1sw , &
ssigpn, ssigps, ssigpe, ssigpw , &
Expand Down
Loading