Skip to content

update CICE#43

Merged
DeniseWorthen merged 54 commits into
NOAA-EMC:emc/developfrom
DeniseWorthen:feature/updcice
Dec 15, 2021
Merged

update CICE#43
DeniseWorthen merged 54 commits into
NOAA-EMC:emc/developfrom
DeniseWorthen:feature/updcice

Conversation

@DeniseWorthen
Copy link
Copy Markdown
Collaborator

@DeniseWorthen DeniseWorthen commented Nov 29, 2021

Fixes #44

  • Updates CICE for the latest CICE-Consortium/main
  • Includes fix to icepack_flux.F90 which allows compilation using -init=snan,arrays in debug mode

JFLemieux73 and others added 30 commits July 14, 2021 16:15
…ium#617)

- Update unit test output and scripts to differentiate completed runs and successful testing better
- sumchk is not passing on Onyx due to issues in the global reduction at real*16 and real*4.  This seems to be a software bug in mpich and a report has been issued to Onyx admins.
- Fix 1x1 and 2x2 non-bit-for-bit results.  It turns out the 1x1 and 2x2 blocks were
  bit-for-bit physicallly.  The problem was that a set of blocks were "land block eliminated"
  near the equator incorrectly.  These blocks never have sea ice form, so it's not a problem
  scientifically, but it changes the masking and restart files.  The fix is a one line change
  in ice_domain.F90 which that sets the minimum "flat" value to 1.  This error could only
  happen in cases where the blocks were within 0.5 degrees of the equator, and a set of
  conditions were required where an active gridcell was set to inactive which then resulted
  in the entire block being eliminated.
- Update the initialization of ARRAY_G in the gather_global_ext interfaces.  Get rid of
  older, more complex approach which left some blocks uninitialized.
- Set psalt(n) to zero by default.  Was uninitialized in cases where vice=0.
- Add a test to check bit-for-bit in log files for 1x1 blocks with bfbflag set to reprosum.
* Initialization of global HTE and HTN arrays with ghost cells on master task to avoid gathering constant arrays when running EVP 1D implementation. This solves issue with departure errors resulting from erroneous initialization of full land blocks in EVP 1D gathering. Correct initialization of remaining variables for full land blocks in EVP 1D gathering.

* Reverted configuration/scripts/cice.batch.csh to resolve bad auto merge of file. Machine 'freya' was double in file.

* Spell error corrected (CICE-Consortium#568 (comment)).

* Redundant initializations to default values removed (CICE-Consortium#568 (comment)). @mhrib questions to default value settings removed.

* Subroutine primary_grid_lengths_global_ext moved from ice_grid module to MPI and serial implementations of ice_boundary modules (CICE-Consortium#568 (comment)). Please note duplication of subroutine.

* Added 1d solver to be fully integrated. Removed kevp=102 bypass.
Clean up. Changed namelist parameter kevp to evp_algorithm

* General cleanup of ice_dyn_evp_1d module (CICE-Consortium#568 (comment) and CICE-Consortium#568 (comment))

* Modified documentation in order to comply with modifications of evp 1d

* Uncommenting of numainit parallelization removed and domp_init moved before numainit to ensure correct initialization. Additional cleanup of code.

* renamed set_nml.evp_algorithm to set_nml.evp1d
added test to base test

* rm set_nml.kevp102

* Naming of variable se is not logical. Changed to sse which is the same
as the global variable

* Alignment of NUMA-aware array splitting between threads

* Initialization of global HTE and HTN arrays with ghost cells on master task to avoid gathering constant arrays when running EVP 1D implementation. This solves issue with departure errors resulting from erroneous initialization of full land blocks in EVP 1D gathering. Correct initialization of remaining variables for full land blocks in EVP 1D gathering.

* Reverted configuration/scripts/cice.batch.csh to resolve bad auto merge of file. Machine 'freya' was double in file.

* Spell error corrected (CICE-Consortium#568 (comment)).

* Redundant initializations to default values removed (CICE-Consortium#568 (comment)). @mhrib questions to default value settings removed.

* Subroutine primary_grid_lengths_global_ext moved from ice_grid module to MPI and serial implementations of ice_boundary modules (CICE-Consortium#568 (comment)). Please note duplication of subroutine.

* Added 1d solver to be fully integrated. Removed kevp=102 bypass.
Clean up. Changed namelist parameter kevp to evp_algorithm

* General cleanup of ice_dyn_evp_1d module (CICE-Consortium#568 (comment) and CICE-Consortium#568 (comment))

* Modified documentation in order to comply with modifications of evp 1d

* Uncommenting of numainit parallelization removed and domp_init moved before numainit to ensure correct initialization. Additional cleanup of code.

* renamed set_nml.evp_algorithm to set_nml.evp1d
added test to base test

* rm set_nml.kevp102

* Naming of variable se is not logical. Changed to sse which is the same
as the global variable

* Alignment of NUMA-aware array splitting between threads

* Fix bad scaling of calculation of tinyarea. Different order of multiplication causes small differences in result

* Fix evp 1d masking issues

- There are relatively rare cases/gridcells where stress (tmask) and stepu (umask) are advanced
without the other.  The 1d evp implementation was not addressing this issue, so skiptcell was added
to the 1d evp (similar to skipucell) to mask out cells separately for stress and stepu.  This
fixed a few non bit-for-bit cases in testing.

- Cleaned up some indentation and other minor issues in 1d evp.

- Updated the evp_algorithm log output in ice_init.

* Some minor revisions in the documentation as suggested by @apcraig (CICE-Consortium#568 (review)) plus some additional minor spelling corrections.

Co-authored-by: Stefan Rethmeier <str@dmi.dk>
Co-authored-by: Till Rasmussen <tar@11glvp2.usr.local>
Co-authored-by: Stefan Rethmeier <stefan@rethmeier.dk>
Co-authored-by: apcraig <anthony.p.craig@gmail.com>
- Fix bug in history time axis when sec_init is not zero.
- Fix issue with time_beg and time_end uninitialized values.
- Add support for averaging with histfreq='1' by allowing histfreq_n to be any value
  in that case.  Extend and clean up construct_filename for history files.  More could
  be done, but wanted to preserve backwards compatibility.
- Add new calendar_sec2hms to converts daily seconds to hh:mm:ss.  Update the
  calchk calendar unit tester to check this method
- Remove abort test in bcstchk, this was just causing problems in regression testing
- Remove known problems documentation about problems writing when istep=1.  This issue
  does not exist anymore with the updated time manager.
- Add new tests with hist_avg = false.  Add set_nml.histinst.
* initial snow redist/metamorph tracer implementation (no physics)

* add rhosmin, snwlvlfac to namelist, change init_snow to init_snowtracers

* updating format labels due to changes in Consortium master

* add calls to new snow physics routines

* update_state after step_snow

* fix optional in update_state

* wrap step_snow and update_state with tr_snow conditional

* snow interactions with thermo (except dEdd)

* conflict warning

* adding snwgrain namelist flag

* use snwredist=bulk instead of 30percent, fix array errors, init snow tracer values, add namelist flags to ice_in

* aging lookup table for dry metamorphism (version for testing)

* add/clean up diagnostics, begin debugging restart implementation

* fixing restarts

* add snow tests to base_suite

* add history; minor cleanup

* fix step_therm1 interface

* io fixes for snow1

* bug fix for snow diagnostics

* fix line continuation

* refactor bgc diagnostics as in Icepack

* add snowtable implementation

* cleaning up snow test options

* send rsnw tracer to dEdd; initialize snow tracers; update -s options for snow

* broadcast new snow diagnostics

* new snow tests require 5 snow layers and therefore can not start from standard initial condition files with nslyr=1

* update icepack

* use local variable for rsnow to prevent array out-of-bound error; cleanup

* updating documentation and some code comments

* documentation:  index

* fix history output; include but comment out code for averaging based on snow presence; set rsnw_fall in ice_in for default dEdd and include relevant snow parameters in options files; update doc; clean up

* minor cleanup, especially documentation

* update icepack

Co-authored-by: Andrew Roberts <afroberts@lanl.gov>
Co-authored-by: Elizabeth Hunke <eclare@pn2003333.lanl.gov>
Co-authored-by: apcraig <anthony.p.craig@gmail.com>
- Add netcdf ststus checks and aborts in ice_read_write.F90
- Check for end of file when reading records in ice_read_write.F90 for
  ice_read_nc methods
- Update set_nml.qc to better specify the test, turn off leap years since we're cycling
  2005 data
- Add check in c ice.t-test.py to make sure there is at least 1825 files, 5 years of data
- Add QC run to base_suite.ts to verify qc runs to completion and possibility to use
  those results directly for QC validation
- Clean up error messages and some indentation in ice_read_write.F90
- Add prod suite including 10 year gx1prod and qc test
- Update unit test compare scripts
…ng for timestep output (CICE-Consortium#624)

* Fix history features

- Fix bug in history time axis when sec_init is not zero.
- Fix issue with time_beg and time_end uninitialized values.
- Add support for averaging with histfreq='1' by allowing histfreq_n to be any value
  in that case.  Extend and clean up construct_filename for history files.  More could
  be done, but wanted to preserve backwards compatibility.
- Add new calendar_sec2hms to converts daily seconds to hh:mm:ss.  Update the
  calchk calendar unit tester to check this method
- Remove abort test in bcstchk, this was just causing problems in regression testing
- Remove known problems documentation about problems writing when istep=1.  This issue
  does not exist anymore with the updated time manager.
- Add new tests with hist_avg = false.  Add set_nml.histinst.

* revert set_nml.histall

* fix implementation error

* update model log output in ice_init

* Fix QC issues

- Add netcdf ststus checks and aborts in ice_read_write.F90
- Check for end of file when reading records in ice_read_write.F90 for
  ice_read_nc methods
- Update set_nml.qc to better specify the test, turn off leap years since we're cycling
  2005 data
- Add check in c ice.t-test.py to make sure there is at least 1825 files, 5 years of data
- Add QC run to base_suite.ts to verify qc runs to completion and possibility to use
  those results directly for QC validation
- Clean up error messages and some indentation in ice_read_write.F90

* Update testing

- Add prod suite including 10 year gx1prod and qc test
- Update unit test compare scripts

* update documentation

* reset calchk to 100000 years

* update evp1d test
* Fix history single/double precision issues

- Fix io_netcdf.  Double precision output was passed thru a single precision variable
  before writing so the precision in the output was lost.  This is now fixed.  Single
  and double precision netcdf output now reflects the internal model data correctly.

- Fix io_pio2.  Single precision output with pio2 was producing garbage for both netcdf
  and pnetcdf cases.  This is not the case with pio1.  Several changes were needed.
  - The iodesc initialization has to differentiate single or double target variables
  - The write_darray has to explicitly send a single or double array

- Migrated to spval_dbl fills everywhere data is a double type, mostly in ice_history.F90.

- Created a ice_write_hist_fill method in both io_netcdf and io_pio2 to improve reuse.

Ran io_suite on cheyenne and checked that values are produced correctly for each case.

* update formatting
* update gx1prod, update version number to 6.3

* update Icepack

* update gx1prod15 to start at 1995
* provide default value for rhoa when imported temp_height_lowest
(Tair) is 0.0
* resolves seg fault when frac_grid=false and do_ca=true
TillRasmussen and others added 19 commits October 6, 2021 10:20
* initialized all eap history variables to zero on land

* Step_a calls calc_fracv 6 times. This can be reduced to 3 as they 2 and two calcilates the same with limited difference

* removed timers used for testing
Change master to main
…nd rEVP (CICE-Consortium#639)

* added subroutine to calc zeta and eta

* new subroutine now also calculates the replacement pressure

* stress calc in evp are now with zeta, eta and rep_prs

* corrected minor compiling issues

* improved comments and added references for papers

* Modif to doc for new code with viscous coefficients

* Minor modifs to doc

* minor correction to QC testing doc

* Small corrections following Philippes comments

* Changed eta,zeta to etax2,zetax2
* deprecate gx1 core forcing option
…ait on baseline results (CICE-Consortium#644)

* add create_fails.csh and update documentation

* update documentation

* update qcnonbfb settings

* add qc test capability and update bfbcomp logic to add check that the baseline results has completed

* add PEND for bfbcomp result

* update regression testing to use QC (instead of log compare) for qcchk test cases

* update create_fails.csh

* update create_fails log output
…ICE-Consortium#647)

* Added array for eta and changed name of zetaD...BFB

* Added array for replacement pressure...BFB

* Replacement pressure now used on calc...BFB

* eta is now used in the calc...BFB

* Ktens included in zeta,eta and rep_prs...roundoff errors...BFB only if Ktens=0

* Small modif to viscous coeff subroutine for passing logical capping

* Modifs to viscous_coeffs suroutine to be used for VP and EVP

* Further modifs to viscous_coeff subroutine

* cosmetic change: order of calc is ne-nw-sw-se

* vp solver also uses viscous_coeffs_and_rep_pressure subroutine

* Minor modifications following PR review
…um#657)

'forcing_diag' was renamed to 'debug_forcing' in d6eb125 (Add new unit
tests sumchk and bcstchk and update tests (CICE-Consortium#606), 2021-06-09), but this
instance was not renamed in the doc.
)

* Implementation of plastic potential

* Modified ice_in

* Corrected minor issue for variable declaration

* Modifs to the doc for plastic potential

* Minor modifs to the doc

* More details in doc about the plastic potential

* Added journal TC=the cryosphere in master_list.bib

* Modified the doc following comments from Elizabeth and Philippe
…m#665)

* Fix some raketests for izumi

* fix some rake tests
…ICE-Consortium#667)

When 'make' is invoked on the CICE Makefile, the first thing it does is
to try to make the included dependency files (*.d) (which are in fact
Makefiles themselves) [1], in alphabetical order.

The rule to make the dep files have the dependency generator, 'makdep',
as a prerequisite, so when processing the first dep file, make notices
'makdep' does not exist and proceeds to build it. If for whatever reason
this compilation fails, make will then proceed to the second dep file,
notice that it recently tried and failed to build its dependency
'makdep', give up on the second dep file, proceed to the third, and so
on.

In the end, no dep file is produced. Make then restarts itself and
proceeds to build the code, which of course fails catastrophically
because the Fortran source files are not compiled in the right order
because the dependency files are missing.

To avoid that, add a dependency on the dep file to the rules that make
the object file out of the Fortran source files. Since old-fashioned
suffix rules cannot have their own prerequisites [2], migrate the rules
for the Fortran source files to use pattern rules [3] instead. While at
it, also migrate the rule for the C source files.

With this new dependency, the builds abort early, before trying to
compile the Fortran sources, making it easier to understand what
has gone wrong.

Since we do not use suffix rules anymore, remove the '.SUFFIXES' line
that indicates which extension to use suffix rules for (but keep the
line that eliminates all default suffix rules).

[1] https://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html
[2] https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html
[3] https://www.gnu.org/software/make/manual/html_node/Pattern-Rules.html#Pattern-Rules
* update parsing scripts to improve robustness, fix multi-pe advection=none

* Update cice script to improve performance including
minor refactoring of parse_namelist and parse_settings
to reduce cost and ability to use already setup ice_in file
from a prior case in the suite.

Added commented out timing ability in cice.setup.

Change test default to PEND from FAIL.

* fix cice.setup for case

* add sedbak implementation to support Mac sed

* s/spend/spent
* add debug_model feature
* add required variables and calls for tr_snow
* remove two log print lines that were removed prior to
merge of driver updates to consortium
@DeniseWorthen DeniseWorthen marked this pull request as ready for review November 30, 2021 10:34
Comment thread .gitmodules
url = https://github.com/CICE-Consortium/Icepack
branch = master
path = icepack
url = https://github.com/cice-consortium/Icepack
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra space?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This format is what the Consortium uses and allows me to make a PR to CICE without a difference appearing in the .gitmodules.

@DeniseWorthen DeniseWorthen self-assigned this Nov 30, 2021
@DeniseWorthen DeniseWorthen merged commit 8ff0fb2 into NOAA-EMC:emc/develop Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update CICE to Consortium Main