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

Spurious 'max ice volume' for South hemisphere causes output conversion error in ice_diagnostics on gbox128 #669

Closed
phil-blain opened this issue Dec 1, 2021 · 2 comments

Comments

@phil-blain
Copy link
Member

phil-blain commented Dec 1, 2021

I got another output conversion error, this time in CICE. In contrast to CICE-Consortium/Icepack#378, I'm not sure what's the best way to fix this one. It happens for these tests in the base_suite:

  • *_*_restart_gbox128_4x2_boxnodyn_debug_short
  • *_*_smoke_gbox128_4x4_boxrestore_debug_short

Here is the backtrace from GDB (same for both):

(gdb) bt
#0  0x0000152d8b3e637f in raise () from /lib64/libc.so.6
#1  0x0000152d8b3d0e7e in abort () from /lib64/libc.so.6
#2  0x0000000001bf05d0 in for.issue_diagnostic ()
#3  0x0000000001bf61db in for.signal_handler ()
#4  <signal handler called>
#5  0x0000152d8b3e637f in raise () from /lib64/libc.so.6
#6  0x0000152d8b3d0db5 in abort () from /lib64/libc.so.6
#7  0x0000000001bf05d0 in for.issue_diagnostic ()
#8  0x0000000001bef838 in for.io_return ()
#9  0x0000000001c475bf in for_write_seq_fmt_xmit ()
#10 0x0000000000624259 in ice_diagnostics::runtime_diags (dt=3600) at /.../cice3/cicecore/cicedynB/analysis/ice_diagnostics.F90:943
#11 0x000000000041bf0d in cice_runmod::ice_step () at /.../cice3/cicecore/drivers/standalone/cice/CICE_RunMod.F90:378
#12 0x0000000000419d11 in cice_runmod::cice_run () at /.../cice3/cicecore/drivers/standalone/cice/CICE_RunMod.F90:83
#13 0x000000000040de40 in icemodel () at /.../cice3/cicecore/drivers/standalone/cice/CICE.F90:49
(gdb) f 10
#10 0x0000000000624259 in ice_diagnostics::runtime_diags (dt=3600) at /.../cice3/cicecore/cicedynB/analysis/ice_diagnostics.F90:943
943             write(nu_diag,900) 'max ice volume     (m) = ',hmaxn,  hmaxs
(gdb) p hmaxn
$1 = 1.9962409428228371
(gdb) p hmaxs 
$2 = -1.7976931348623157e+308

hmaxs comes from this global max earlier in runtime_diags:

! maximum ice volume (= mean thickness including open water)
hmaxn = global_maxval(vice, distrb_info, lmask_n)
hmaxs = global_maxval(vice, distrb_info, lmask_s)

So I'm not sure how we get this spurious -1.7976931348623157e+308 for the South hemisphere... maybe lmask_s is not correct for box128 ? because vice itself seems to be correctly zero-initialized on the whole grid:

!$OMP PARALLEL DO PRIVATE(iblk,it,i,j)
do iblk = 1, nblocks
do j = 1, ny_block
do i = 1, nx_block
aice(i,j,iblk) = c0
vice(i,j,iblk) = c0
vsno(i,j,iblk) = c0

I did not have time to dig further...

@eclare108213
Copy link
Contributor

I've seen these formatting issues but not worried about them since they weren't causing the code to crash. The box tests don't produce data for both hemispheres, in general, and so the standard diagnostics might not be defined. There should be a way to initialize things so that the output can be formatted, even if it's not meaningful, or limit the output to only the region being computed.

@eclare108213
Copy link
Contributor

This issue was addressed in apcraig#57

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

No branches or pull requests

2 participants