Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Icepack - 1) altering the namelist icepack_in and 2) cases/tests/runs

simondriscoll

Simon Driscoll
Member
I have a two main questions about basic runs in Icepack (version 1.3.0). Ultimately I wish to perform a few Icepack simulations altering the model a little.

A successful run
=============

If I follow the user guide: 3.3. Testing Icepack — Icepack documentation

And perform e.g. a single test (in pwd0=/Users/simondriscoll/Documents/Icepack/)

./icepack.setup --test smoke --mach conda --env macos --testid t00

Then with

cd conda_macos_smoke_col_1x1.t00
./icepack.build
./icepack.submit

I receive from these two (ultimately):

./icepack.build: COMPILE SUCCESSFUL
...
ICEPACK COMPLETED SUCCESSFULLY
done ./icepack.run


respectfully. I.e. Icepack seems to run successfully. This is done in the directory, pwd1 = /Users/simondriscoll/Documents/Icepack/conda_macos_smoke_col_1x1.t00

This also affects another directory, on a totally different path. In pwd_dirs = /Users/simondriscoll/icepack-dirs/

(I think Icepack made this directory pwd_dirs when I ported it, not myself, but I am not certain)

This directory contains 4 sub-directories: 1) baseline/ 2) input/ 3) runs/ 4) cases/

And upon: ./icepack.build in pwd1 it creates: pwd2 = /Users/simondriscoll/icepack-dirs/runs/conda_macos_smoke_col_1x1.t00/
This contains only ls = "compile/ icepack*"


Upon ./icepack.submit more is added.

This means I have two directories, seemingly of the same test/run etc.

For pwd1 'ls' gives:

Macros.conda_macos README.case env.conda_macos* icepack.run* icepack.submit* icepack_in logs/ setup_run_dirs.csh* Makefile casescripts/ icepack.build* icepack.settings* icepack.test* icepack_in.sedbak makdep.c* test_output

For pwd2 'ls' gives:

compile/ history/ ice_diag.icefree ice_diag.slab icepack.runlog.211124-173141 icepack_in env.conda_macos* ice_diag.full_ITD ice_diag.land icepack* icepack.settings* restart/

Changing namelist
==============

If I wanted to do an ensemble of simulations, changing something in Icepack, I am informed that the best way to change things in Icepack (e.g. the forcing data, schemes, parameters etc.) is through the namelist icepack_in this avoids having to recompile the model.

There are two directories created from my test, both with two icepack_in's. pwd1, pwd2.

Can I clarify the /icepack.build is the compilation step? And secondly should I modify the icepack_in file in pwd1? Thus a workflow could be some sort of loop in a script of the form:

- "modify icepack_in in pwd1"
- ./icepack.submit (this overrides anything in pwd2 if this directory exists)
- therefore save output from pwd2"

(and repeat)

It appears that pwd1 contains a sort of "master" version, and the model output is in pwd2. Is my interpretation/understanding correct so far?

My second major question is if I wanted to do e.g. run Icepack with N-ICE data 3.2. Running Icepack — Icepack documentation by setting atm_data_type = NICE in the icepack_in namelist, and say I changed something simple like the number of ice thickness categories in a loop (3,4,5,6,7, say).

How should I submit this? Is this a "case" or a "suite" (or test suite? or "ensemble of single tests"). And what is meant by a case? For example. There seem to be many options for how I would wish to run Icepack, e.g. "-- test smoke" and I am not sure what they mean and which to choose.

What is the best way to submit cleanly an ensemble of same-forcing different parameter value (such as ice thickness categories)? Many thanks!
 

tcraig

Member
When you installed icepack, you probably followed these directions, 3.2. Running Icepack — Icepack documentation. There, you will see that you created ~/icepack-dirs, created various directories, and downloaded input data to it. The conda setup uses these hardwired paths to specify the input, run, baseline, and cases directories.

After that, you cloned Icepack from the repository and setup a case (icepack.setup). That case is pwd1. When you build and run the case, it creates a separate directory, pwd2. That is the directory where the model runs. For many machines, it's important to separate the case directory (in home, backed up, lower file quotas) and the run directory (in a work directory, not backed up, higher file quotas, can write nearly unlimited data). That's why there are two main directories, the case and the run directory. Hopefully that explains pwd1 and pwd2. The case directory, pwd1 in your case, is where you control the icepack_in file and other model settings. The run directory, pwd2 in your case, is where the model runs. When you submit a case, the icepack_in is copied from your case directory to your run directory.

Your brief workflow above is correct. And you are correct that pwd1 is the case directory (the place where the case is defined) and pwd2 is the run directory, where the setup in the case directory is run. In your case, pwd1 was create by using --test. We recommend using --case in general. Tests and test suites are something different. They are specific cases that test specific things.

It sounds like what you want to do is setup a script that loops over your icepack_in files in the case directory and runs them. In general, that would be something like

Code:
set case = mycasesA
./icepack.setup --case $case --mach conda --env macos -p 1x1
cd $case
./icepack.build

cp $something/icepack_in.01 ./icepack_in
./icepack.submit
# copy .01 output from the run directory
cp $something/icepack_in.02 ./icepack_in
./icepack.submit
# copy .02 output from the run directory

you can see how you could write a script and have a loop. You do not want to use test or test suite for this. You could also potentially setup multiple cases for each icepack input file. By doing so, you don't have to save all the output everytime, but you will compile. However, compiling is quite quick. That workflow would look like

Code:
set case = mycasesA

./icepack.setup --case ${case}.01 --mach conda --env macos -p 1x1
cd ${case}.01
./icepack.build
cp $something/icepack_in.01 ./icepack_in
./icepack.submit
cd ../

./icepack.setup --case ${case}.02 --mach conda --env macos -p 1x1
cd ${case}.02
./icepack.build
cp $something/icepack_in.02 ./icepack_in
./icepack.submit
cd ../

By doing this, you have a unique case and run directory for each separate run. This can be handy if you need to rerun things quickly or do more debugging. Both approaches (and others) can work.

Again, use "--case" for setting up general science runs, especially if they will be production. Use tests if you want to carry out a particular kind of model specific test. Tests should generally not be used if you want to customize a case and/or run production. Test suites allow a user to run many tests quickly. Again, these would be mostly fixed test configurations defined in Icepack and not generally defined by the user.
 
Top