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

update test coverage and test options #129

Merged
merged 6 commits into from
May 11, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
21 changes: 19 additions & 2 deletions cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ cat << EOF1

Available --set options are in configuration/scripts/options and include:
EOF1
set soptions1 = `ls -1 configuration/scripts/options | grep set_ | sed 's/set_nml.//g' | sed 's/set_env.//g' `
set soptions = `echo $soptions1 | fmt -1 | sort `
set soptions1 = `ls -1 configuration/scripts/options | grep set_ | sed 's/set_nml.//g' | sed 's/set_env.//g' | sed 's/set_files.//g' `
set soptions = `echo $soptions1 | fmt -1 | sort -u `
foreach sopt ($soptions)
echo " $sopt"
end
Expand Down Expand Up @@ -660,6 +660,23 @@ EOF1

if (${sets} != "") then
set setsx = `echo ${sets} | sed 's/,/ /g'`
set setsxorig = "$setsx"
set setsx = ""
foreach name ($setsxorig)
if (-e ${ICE_SCRIPTS}/options/set_files.${name}) then
echo "adding options files from set_files.${name}"
echo "`date`${0} adding options files from set_files.${name}" >> ${casedir}/README.case
set setsnew = `cat ${ICE_SCRIPTS}/options/set_files.${name}`
foreach nset ($setsnew)
if ($nset !~ "#*") then
set setsx = "$setsx $nset"
endif
end
else
set setsx = "$setsx $name"
endif
end

else
set setsx = ""
endif
Expand Down
4 changes: 2 additions & 2 deletions cicecore/cicedynB/infrastructure/ice_domain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ module ice_domain

character (char_len) :: &
distribution_type, &! method to use for distributing blocks
! 'cartesian'
! 'rake'
! 'cartesian', 'roundrobin', 'sectrobin', 'sectcart'
! 'rake', 'spacecurve', etc
distribution_wght ! method for weighting work per block
! 'block' = POP default configuration
! 'latitude' = no. ocean points * |lat|
Expand Down
13 changes: 13 additions & 0 deletions configuration/scripts/cice_decomp.csh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ if (${grid} == 'col') then
set blckx = 1; set blcky = 1
endif

else if (${grid} == 'gbox128') then
set nxglob = 128
set nyglob = 128
if (${cicepes} <= 1) then
set blckx = 128; set blcky = 128
else if (${cicepes} <= 8) then
set blckx = 32; set blcky = 32
else if (${cicepes} <= 32) then
set blckx = 16; set blcky = 16
else
set blckx = 8; set blcky = 8
endif

else if (${grid} == 'gx3') then
set nxglob = 100
set nyglob = 116
Expand Down
1 change: 1 addition & 0 deletions configuration/scripts/options/set_env.NICELYR1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setenv NICELYR 1
1 change: 0 additions & 1 deletion configuration/scripts/options/set_env.alt01

This file was deleted.

17 changes: 17 additions & 0 deletions configuration/scripts/options/set_files.alt01
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
NICELYR1
icdefault
kcat1
kitd0
ktherm0
condbubbly
swccsm3const
tfrzm1p8
formdragT
trlvlT
pondoff
droundrobin
dwblock
dynoff
highfreq
fbotxfercdn
atmtypedef
8 changes: 8 additions & 0 deletions configuration/scripts/options/set_files.alt02
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
icdefault
kcatm1
dsectrobin
pondcesm
dynrevp
kstrength0
swccsm3

10 changes: 10 additions & 0 deletions configuration/scripts/options/set_files.alt03
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
icdefault
kcat2
dsectcart
pondtopo
triageF
trFYF
trlvlF
dyneap
basal

13 changes: 13 additions & 0 deletions configuration/scripts/options/set_files.alt04
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
icdefault
bfbflagT
drakeX2
dwblock
pondlvl
kitd0
ktherm1
condMU71
dynevp
kstrength0
frzpndccsm
natmiter20

13 changes: 13 additions & 0 deletions configuration/scripts/options/set_files.boxadv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
NICELYR1
icdefault
kcat2
boundarycyclic
trFYF
triageT
trlvlT
pondoff
kitd1
ktherm0
dyneap
advremap
kstrength0
16 changes: 16 additions & 0 deletions configuration/scripts/options/set_files.boxdyn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NICELYR1
icdefault
dpy360
run3day
restbin
kcat0
boundaryopen
pondoff
triageF
trFYF
trlvlF
kitd0
ktherm0
dynevp
kstrength011

16 changes: 16 additions & 0 deletions configuration/scripts/options/set_files.boxrestore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
NICELYR1
icdefault
ndtd2
kcat1
dslenderX1
triageT
trFYT
trlvlT
pondoff
kitd1
ktherm0
dynrevp
kstrength0
basal
restoreice

14 changes: 0 additions & 14 deletions configuration/scripts/options/set_nml.alt01

This file was deleted.

1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.atmtypeclim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
atm_data_type = 'clim'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.atmtypedef
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
atm_data_type = 'default'
2 changes: 2 additions & 0 deletions configuration/scripts/options/set_nml.boundarycyclic
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ew_boundary_type = 'cyclic'
ns_boundary_type = 'cyclic'
2 changes: 2 additions & 0 deletions configuration/scripts/options/set_nml.boundaryopen
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ew_boundary_type = 'open'
ns_boundary_type = 'open'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.condMU71
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
conduct = 'MU71'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.condbubbly
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
conduct = 'bubbly'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.dwblock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distribution_wght = 'block'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.dwlat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distribution_wght = 'latitude'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.fbotxfercdn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fbot_xfer_type = 'Cdn_ocn'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.formdragF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
formdrag = .false.
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.formdragT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
formdrag = .true.
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.frzpndccsm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
frzpnd = 'ccsm'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.frzpndhlid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
frzpnd = 'hlid'
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.gbox128
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ice_ic = 'default'
grid_type = 'rectangular'
atm_data_type = 'box'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.highfreq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
highfreq = .true.
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.icdefault
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ice_ic = 'default'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.icnone
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ice_ic = 'none'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.kcat0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kcatbound = 0
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.kcat1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kcatbound = 1
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.kcat2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kcatbound = 2
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.kcat3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kcatbound = 3
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.kcatm1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kcatbound = -1
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.kitd0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kitd = 0
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.kitd1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kitd = 1
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.kstrength0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kstrength = 0
krdg_partic = 0
krdg_redist = 0
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.kstrength011
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kstrength = 0
krdg_partic = 1
krdg_redist = 1
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.kstrength1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kstrength = 1
krdg_partic = 1
krdg_redist = 1
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.ktherm0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ktherm = 0
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.ktherm1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ktherm = 1
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.ktherm2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ktherm = 2
3 changes: 3 additions & 0 deletions configuration/scripts/options/set_nml.maskhalo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
maskhalo_dyn = .true.
maskhalo_remap = .true.
maskhalo_bound = .true.
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.natmiter20
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
natmiter = 20
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.ndtd2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ndtd = 2
2 changes: 1 addition & 1 deletion configuration/scripts/options/set_nml.pondcesm
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ tr_lvl = .false.
tr_pond_cesm = .true.
tr_pond_topo = .false.
tr_pond_lvl = .false.
tr_aero = .true.
tr_aero = .false.

8 changes: 8 additions & 0 deletions configuration/scripts/options/set_nml.pondoff
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tr_iage = .false.
tr_FY = .false.
tr_lvl = .false.
tr_pond_cesm = .false.
tr_pond_topo = .false.
tr_pond_lvl = .false.
tr_aero = .false.

1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.restbin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
restart_format = 'bin'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.restnc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
restart_format = 'nc'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.restoreice
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
restore_ice = .true.
7 changes: 7 additions & 0 deletions configuration/scripts/options/set_nml.run3day
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
npt = 72
dumpfreq = 'd'
dumpfreq_n = 2
diag_type = 'stdout'
print_global = .true.
histfreq = 'd','x','x','x','x'
histfreq_n = 2,1,1,1,1
4 changes: 0 additions & 4 deletions configuration/scripts/options/set_nml.swccsm3
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
shortwave = 'ccsm3'
albedo_type = 'ccsm3'
calc_tsfc = .true.
tr_pond_cesm = .false.
tr_pond_topo = .false.
tr_pond_lvl = .false.
2 changes: 2 additions & 0 deletions configuration/scripts/options/set_nml.swccsm3const
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shortwave = 'ccsm3'
albedo_type = 'constant'
2 changes: 2 additions & 0 deletions configuration/scripts/options/set_nml.swdedd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shortwave = 'dEdd'
albedo_type = 'default'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.tfrzlinears
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tfrz_option = 'linears'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.tfrzm1p8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tfrz_option = 'minus1p8'
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.tfrzmushy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tfrz_option = 'mushy'
6 changes: 0 additions & 6 deletions configuration/scripts/options/set_nml.thermo1

This file was deleted.

1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.trFYF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tr_FY = .false.
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.trFYT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tr_FY = .true.
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.triageF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tr_iage = .false.
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.triageT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tr_iage = .true.
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.trlvlF
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tr_lvl = .false.
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.trlvlT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tr_lvl = .true.
9 changes: 9 additions & 0 deletions configuration/scripts/tests/base_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ smoke gx1 16x2 diag1,run5day smoke_gx1_32x1_diag1_ru
smoke gx1 8x4 debug,run2day
restart gx1 32x1 none
restart gx1 13x2 none
restart gx3 4x4 none
restart gx3 6x2 alt01
restart gx3 8x2 alt02
restart gx3 4x2 alt03
restart gx3 4x4 alt04
smoke gbox128 4x2 run5day
smoke gbox128 4x2 boxdyn,run5day
smoke gbox128 2x2 boxadv,run5day
smoke gbox128 4x4 boxrestore,run5day
5 changes: 4 additions & 1 deletion configuration/scripts/tests/decomp_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ restart gx3 6x2x50x58x1 droundrobin restart_gx3_4x2x25x29x4_
restart gx3 4x2x19x19x10 droundrobin restart_gx3_4x2x25x29x4_dslenderX2
restart gx3 1x20x5x29x80 dsectrobin restart_gx3_4x2x25x29x4_dslenderX2
restart gx3 16x2x5x10x15 drakeX2 restart_gx3_4x2x25x29x4_dslenderX2
restart gx3 1x1x100x116x1 droundrobin
restart gx3 8x2x8x10x20 droundrobin,maskhalo restart_gx3_4x2x25x29x4_dslenderX2
restart gx3 1x4x25x29x16 droundrobin restart_gx3_4x2x25x29x4_dslenderX2
restart gx3 1x1x50x58x4 droundrobin,thread restart_gx3_4x2x25x29x4_dslenderX2
restart gx3 1x1x100x116x1 droundrobin restart_gx3_4x2x25x29x4_dslenderX2

26 changes: 24 additions & 2 deletions doc/source/developer_guide/dg_scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,37 @@ One other files will need to be
changed to support a port, that is **configuration/scripts/cice.batch.csh**.
To port to a new machine, see :ref:`porting`.

.. _dev_options:

Test Options
---------------

Values that are associated with the `--sets` cice.setup are defined in
**configuration/scripts/options**. Those files are text files and cice.setup
uses the values in those files to modify the `cice.settings` and `ice_in` files
in the case as the case is created. Files name `set_env.$option` are associated
with values in the `cice.settings` file. Files named `set_nml.$option` are associated
with values in `ice.in`. These files contain simple keyword pair values one line
at a time. A line starting with # is a comment. Files names that start with `test_`
are used specifically for tests.

That directory also contains files named `set_files.$option`. This provides an
extra layer on top of the individual setting files that allows settings to be
defined based on groups of other settings. The `set_files.$option` files
contain a list of `--sets` options to be applied.

The $option part of the filename is the argument to `--sets` argument in `cice.setup`.
Multiple options can be specified by creating a comma delimited list. In the case
where settings contradict each other, the last defined is used.

.. _dev_testing:

Test scripts
-------------

Under **configuration/scripts/tests** are several files including the scripts to
setup the various tests, such as smoke and restart tests (**test_smoke.script**, **test_restart.script**)
and the files the describe with options files are needed for each test (ie. **test_smoke.files**, **test_restart.files**).
and the files that describe with options files are needed for each test (ie. **test_smoke.files**, **test_restart.files**).
A baseline test script (**baseline.script**) is also there to setup the general regression
and comparison testing. That directory also contains the preset test suites
(ie. **base_suite.ts**) and a file that supports post-processing on the model
Expand All @@ -121,4 +144,3 @@ To add a new test (for example newtest), several files may be needed,
Generating a new test, particularly the **test_newtest.script** usually takes some iteration before
it's working properly.