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

Tc4 ice shelf #1210

Closed
Closed

Conversation

MJHarrison-GFDL
Copy link
Contributor

@marshallward . tc4.rotate is failing due to intermediate timestats diverging although the final stats are identical.
image

MJHarrison-GFDL and others added 5 commits September 15, 2020 08:42
  - .testing/tc4 includes a static ice shelf which thermodynamic coupling
  - tc4.rotate fails due to divergence of very small energetic values
    at timesteps intermediate within the 2 day run.
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2020

Codecov Report

Merging #1210 into dev/gfdl will increase coverage by 1.80%.
The diff coverage is 41.22%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1210      +/-   ##
============================================
+ Coverage     46.08%   47.89%   +1.80%     
============================================
  Files           214      225      +11     
  Lines         69399    71065    +1666     
============================================
+ Hits          31984    34036    +2052     
+ Misses        37415    37029     -386     
Impacted Files Coverage Δ
...g_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90 0.00% <0.00%> (ø)
...fig_src/external/GFDL_ocean_BGC/generic_tracer.F90 0.00% <0.00%> (ø)
...c/external/GFDL_ocean_BGC/generic_tracer_utils.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/kdtree.f90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_core.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_types.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/write_ocean_obs.F90 0.00% <0.00%> (ø)
config_src/solo_driver/MESO_surface_forcing.F90 0.00% <0.00%> (ø)
config_src/solo_driver/user_surface_forcing.F90 0.00% <0.00%> (ø)
src/ALE/MOM_remapping.F90 70.38% <0.00%> (+0.11%) ⬆️
... and 245 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cb606e...3e7a73c. Read the comment docs.

@adcroft
Copy link
Collaborator

adcroft commented Sep 18, 2020

It's not just the rotation test that is falling. There's restart and dimensional tests too.

@adcroft
Copy link
Collaborator

adcroft commented Sep 18, 2020

The tc4 test seems broken in many ways. Even layout is failing trying to read the grid. Is everything committed?

FATAL from PE     0: fms_io(read_data_3d_new), field x in file ./ocean_hgrid.nc: field size mismatch 1

@adcroft
Copy link
Collaborator

adcroft commented Sep 18, 2020

That last was because the size has changed (which is good) - cleaning the work dir sorted that out. The actual fails I get interactively are

FAIL: Solutions tc4.restart have changed.
FAIL: Diagnostics tc4.dim.t.diag have changed.
FAIL: Diagnostics tc4.dim.l.diag have changed.
FAIL: Diagnostics tc4.dim.h.diag have changed.
FAIL: Solutions tc4.rotate have changed.

which I think is consistent with what Travis reported.

@adcroft
Copy link
Collaborator

adcroft commented Sep 18, 2020

After a restart fluxes%sens and other member fields are zero where there aren't before the restart?

@MJHarrison-GFDL
Copy link
Contributor Author

From a clean build I get the same. The restart and diagnosric issues I haven't looked at but the rotate fail is weird . The results only differ at timesteps 54 and 63 but are otherwise identical through 144.

@MJHarrison-GFDL
Copy link
Contributor Author

buoy_config="zero".

@MJHarrison-GFDL
Copy link
Contributor Author

Energetics differ temporarily at the last significant digit .Timestats too precise?

@marshallward
Copy link
Collaborator

I see on my desktop that SB_max is undefined, raising a FPE:

Thread 1 "MOM6" received signal SIGFPE, Arithmetic exception.
0x00005555559356b0 in mom_ice_shelf::shelf_calc_flux (sfc_state_in=..., fluxes_in=0x555558970190, time=..., time_step=1200, cs=0x555558e676d0)
    at ../../../ac/../src/ice_shelf/MOM_ice_shelf.F90:592
592	                if (Sb_max_set .and. (Sbdry(i,j) > Sb_max)) &
(gdb) p Sb_max
$2 = nan(0x4000000000000)

but it is worrying that Travis was unable to detect this.

@adcroft
Copy link
Collaborator

adcroft commented Sep 18, 2020

Should

if (Sb_max_set .and. (Sbdry(i,j) > Sb_max))

be

if (Sb_max_set) then
  if (Sbdry(i,j) > Sb_max)) &

?

@marshallward
Copy link
Collaborator

marshallward commented Sep 18, 2020

Yes, I agree, no short-circuit logic can be assumed in Fortran.

@MJHarrison-GFDL
Copy link
Contributor Author

Registering sfc_state%tau[xy]_shelf restarts fixes that issue.

@MJHarrison-GFDL
Copy link
Contributor Author

tc4 has thermal coupling turned on so buoyancy forcing is non-zero, but not required for restarts.

marshallward and others added 7 commits September 18, 2020 15:22
Two short-circuit logic operations were in the ice shelf code, which
were causing failures in newer GCC compilers.  This patch replaces them
with nested if-blocks.
A few ice shelf diagnostics were tagged with scalar_pair, clarifying
their rotational rules.  Diagnostics were also computed for the rotated
rigidity_ice_[uv], rather than the original field.

Some of the handling of frac_shelf_h in the MOM.F90 initialization was
restructured, although it should be functionally identical.

This reduces some of the diagnostic diffs in the rotated ice shelf tc4,
but other issues remain.
  - This is stored in the forcing type (unrotated)
    the MOM_CS (rotated).
  - Now this field is updated by a query to the ice shelf module
    prior to calling MOM_state_initialization .
BT_rem_[uv], which applys a fractional weight to the barotropic
velocity, was incorrectly computed as a vector pair, which computes the
incorrect checksum.

This patch flags this as a scalar pair, which removes any discrepancy in
standard and rotated debug output.
@marshallward marshallward self-assigned this Oct 20, 2020
@marshallward
Copy link
Collaborator

@marshallward
Copy link
Collaborator

There appears to be some kind of error in coupled_driver which is causing most of the builds to fail. This would not have been detected by Travis.

This is what popped up but it's buried amongst too many errors in a parallel build to make more sense:

build/gnu/debug/dynamic/mom6/libmom6.a: Error: Actual argument for 'forces_in' must be a pointer at (1)
build/gnu/debug/dynamic/mom6/libmom6.a: ../../../../../..//config_src/coupled_driver/ocean_model_MOM.F90:529:43:

@MJHarrison-GFDL can you have a look?

@MJHarrison-GFDL
Copy link
Contributor Author

PR on the way.

@MJHarrison-GFDL
Copy link
Contributor Author

The current regression failure in tc4 is due to a bugfix for the sponge code

@marshallward
Copy link
Collaborator

Do you mind cherry-picking that one and submitting separately? Might be better for the commit log as well.

@MJHarrison-GFDL MJHarrison-GFDL deleted the tc4_ice_shelf branch April 10, 2023 16:55
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.

6 participants