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

CESM ocean forcing - hmix division by zero #585

Closed
TillRasmussen opened this issue Mar 26, 2021 · 1 comment · Fixed by #586
Closed

CESM ocean forcing - hmix division by zero #585

TillRasmussen opened this issue Mar 26, 2021 · 1 comment · Fixed by #586
Assignees

Comments

@TillRasmussen
Copy link
Contributor

In icepack_ocean.F90 line 103.
sst = sst + dt * ( &
(fsens_ocn + flat_ocn + flwout_ocn + flw + swabs) * (c1-aice) &
+ fhocn + fswthru) & ! these are aice
/ (cprho
hmix)
hmix is zero when using standard ocean forcing (CESM) in standalone simulation.
This is initialized beginning line 4394 in ice_forcing.F90
Below is a hard coded fix (hmix=c20) instead of the value from the forcing file.
do j = 1, ny_block
do i = 1, nx_block
if (n == 2) sss (i,j,:) = c0
if (n == 3) hmix (i,j,:) = c0
if (n == 4) uocn (i,j,:) = c0
if (n == 5) vocn (i,j,:) = c0
if (n == 6) ss_tltx(i,j,:) = c0
if (n == 7) ss_tlty(i,j,:) = c0
if (n == 8) qdp (i,j,:) = c0
do iblk = 1, nblocks
if (hm(i,j,iblk) == c1) then
if (n == 2) sss (i,j,iblk) = work1(i,j,iblk)
if (n == 3) hmix (i,j,iblk) = c20 !!work1(i,j,iblk)
if (n == 4) uocn (i,j,iblk) = work1(i,j,iblk)
if (n == 5) vocn (i,j,iblk) = work1(i,j,iblk)
if (n == 6) ss_tltx(i,j,iblk) = work1(i,j,iblk)
if (n == 7) ss_tlty(i,j,iblk) = work1(i,j,iblk)
if (n == 8) qdp (i,j,iblk) = work1(i,j,iblk)
endif
enddo
enddo
enddo
enddo

@dabail10
Copy link
Contributor

Good catch. I will work on a fix. It should be a max(c20,work1(i,j,iblk)).

apcraig added a commit to apcraig/CICE that referenced this issue Mar 27, 2021
- update set_nml.gx1prod to match current production system
- add apr 1 test case for gx1
- update landice tests, use gx1
- fix hmix default CICE-Consortium#585
- delete old code in ice_forcing.F90 (should have been done in earlier PR)
@apcraig apcraig self-assigned this Apr 1, 2021
apcraig added a commit that referenced this issue Apr 6, 2021
…efault value (#586)

* Update gx1 ic

- update set_nml.gx1prod to match current production system
- add apr 1 test case for gx1
- update landice tests, use gx1
- fix hmix default #585
- delete old code in ice_forcing.F90 (should have been done in earlier PR)

* update gx1coreii initial condition

* update icepack

* add gx1 debug test, expected to fail

* Update version number to 6.2.0

* Update gx3 and gx1 input filenames
Update CI wget implementation #588
Create variable in ice_forcing.F90 called mixed_layer_depth_default and use it instead of c20
Fix bug in hourly output, created in time manager update #589
Set start year for all runs to 2005 and turn leap years on by default
Update documentation in history output section to add information about hist_avg namelist, noted in #566

* update ic filenames, tests, and documentation

* update color links in test results wiki

* update hmix initialization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants