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

Fix for LOAR2 restart issue. #474

Closed
wants to merge 1 commit into from

Conversation

wfcooke
Copy link
Contributor

@wfcooke wfcooke commented Apr 21, 2017

Apparently the minimum value in the compute domain was 1mm. This must somehow bleed into the halos. At initialization and restart the h array was being initialized to GV%Angstrom_z. Upon changing this initial value to 0.001 (1mm) the job reproduced across restarts.

Apparently the minimum value in the compute domain was 1mm. This must somehow bleed into the halos. At restart the h array was being
initialized to GV%Angstrom_z. Upon changing this initial value to 0.001 (1mm) the job reproduced across restarts.
@Hallberg-NOAA
Copy link
Collaborator

This is a good catch, Will, but I don't think that we want to introduce a specific hard-coded dimensional vertical length into the code. We should reexamine this issue and determine a more robust solution.

Copy link
Contributor

@MJHarrison-GFDL MJHarrison-GFDL left a comment

Choose a reason for hiding this comment

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

In the original code , halo points outside of the domain (j=1:4) are given a value of GV%Angstrom_z (= 1.e-10) at line 208 with a cold initialization, but this is being overwritten with zeros in MOM_temp_salt_initialize_from_Z and subsequently set to MIN_THICKNESS ( = 0.001). For warm starts at L308, thicknesses are initialized to G%Angstrom_z (in the calling routine) .

Initializing h to MIN_THICKNESS immediately prior to the call to restore_stare should therefore reproduce across restarts (need to call get_param first)

@MJHarrison-GFDL
Copy link
Contributor

@adcroft notes that the answers should not depend on thicknesses outside of the domain, so although the solutions discussed will address the restart issue, the preferred solution is to avoid the outside dependence. We have isolated BETTER_BOUND_KH and MEKE. The former can be addressed by applying appropriate masking here:

https://github.com/NOAA-GFDL/MOM6/blob/dev/master/src/parameterizations/lateral/MOM_hor_visc.F90#L515

and here for MEKE,

https://github.com/NOAA-GFDL/MOM6/blob/dev/master/src/parameterizations/lateral/MOM_MEKE.F90#L239

@adcroft the MOM6-examples 1 degree test case does have ocean at the first row, so it's unclear why this is not showing up in testing.

@adcroft
Copy link
Collaborator

adcroft commented Apr 22, 2017

It would appear that in my 02=01+12 test, the 12 stage was actually doing 02, so I wasn't even testing the restart. My bad.

Unfortunately, using this branch (ignoring other objections), nor using the suggested masking, actually fixes the problem (for me). Using the suggested masking, even though the h's are different outside the model to the south, the interior remains the same until after the second set of stresses and fluxes, are received from the coupler because those stresses and fluxes are different. No idea how or why? I recall @wfcooke pointing out some of the fluxes are different (e.g. heat_content_lprec) right at the beginning but those don't seem to be in use because they don't lead to the immediate changes.

% more {02,01,12}/ocean.stats.gnu
::::::::::::::
02/ocean.stats.gnu
::::::::::::::
Step, Day, Truncs, Energy/Mass, Maximum CFL, Mean Sea Level, Total Mass, Mean Salin, Mean Temp, Frac Mass Err, Salin Err, Temp Err
[days] [m2 s-2] [Nondim] [m] [kg] [PSU] [degC] [Nondim] [PSU] [degC]
0, 727212.000, 0, En 0.000000000000E+00, CFL 0.00000, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6206, Me 0.00E+00, Se 0.00E+00, Te 0.00E+00
6, 727212.250, 0, En 4.443737414487E-04, CFL 0.03316, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6207, Me -1.94E-19, Se 1.52E-16, Te -1.78E-17
12, 727212.500, 0, En 4.726027421469E-04, CFL 0.05003, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6207, Me 1.50E-19, Se -4.42E-17, Te -8.02E-18
18, 727212.750, 0, En 4.854893536541E-04, CFL 0.04744, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6207, Me 1.24E-19, Se -2.18E-17, Te -1.60E-18
24, 727213.000, 0, En 6.304353985352E-04, CFL 0.04191, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6207, Me -2.68E-19, Se 5.51E-17, Te 5.17E-19
30, 727213.250, 0, En 5.989172261409E-04, CFL 0.04107, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6208, Me -7.76E-20, Se -3.54E-17, Te 6.05E-19
36, 727213.500, 0, En 6.231808565892E-04, CFL 0.05052, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6208, Me -3.42E-19, Se -7.48E-17, Te -2.47E-18
42, 727213.750, 0, En 6.257145485402E-04, CFL 0.06914, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6208, Me 2.62E-19, Se 4.55E-17, Te -2.19E-19
48, 727214.000, 0, En 6.384160246333E-04, CFL 0.04654, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6208, Me -1.23E-19, Se -1.62E-17, Te -2.49E-18
::::::::::::::
01/ocean.stats.gnu
::::::::::::::
Step, Day, Truncs, Energy/Mass, Maximum CFL, Mean Sea Level, Total Mass, Mean Salin, Mean Temp, Frac Mass Err, Salin Err, Temp Err
[days] [m2 s-2] [Nondim] [m] [kg] [PSU] [degC] [Nondim] [PSU] [degC]
0, 727212.000, 0, En 0.000000000000E+00, CFL 0.00000, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6206, Me 0.00E+00, Se 0.00E+00, Te 0.00E+00
6, 727212.250, 0, En 4.443737414487E-04, CFL 0.03316, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6207, Me -1.94E-19, Se 1.52E-16, Te -1.78E-17
12, 727212.500, 0, En 4.726027421469E-04, CFL 0.05003, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6207, Me 1.50E-19, Se -4.42E-17, Te -8.02E-18
18, 727212.750, 0, En 4.854893536541E-04, CFL 0.04744, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6207, Me 1.24E-19, Se -2.18E-17, Te -1.60E-18
24, 727213.000, 0, En 6.304353985352E-04, CFL 0.04191, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6207, Me -2.68E-19, Se 5.51E-17, Te 5.17E-19
::::::::::::::
12/ocean.stats.gnu
::::::::::::::
0, 727213.000, 0, En 6.304353985352E-04, CFL 0.04191, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6207, Me 0.00E+00, Se 0.00E+00, Te 0.00E+00
6, 727213.250, 0, En 5.989161429806E-04, CFL 0.04107, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6208, Me -1.92E-19, Se -5.47E-17, Te 1.38E-18
12, 727213.500, 0, En 6.231788941736E-04, CFL 0.05048, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6208, Me -2.23E-19, Se -5.37E-17, Te -9.98E-18
18, 727213.750, 0, En 6.257139881723E-04, CFL 0.06918, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6208, Me 2.20E-19, Se 1.02E-17, Te 3.15E-18
24, 727214.000, 0, En 6.384180177493E-04, CFL 0.04655, SL -0.0000E+00, M 1.38105E+21, S 34.7205, T 3.6208, Me 2.15E-19, Se 2.91E-18, Te 3.35E-18

@MJHarrison-GFDL
Copy link
Contributor

This case needs symmetric mode for MOM6/SIS2. This keeps the coupling stresses consistent across restarts.

@adcroft
Copy link
Collaborator

adcroft commented Apr 23, 2017 via email

MJHarrison-GFDL added a commit to MJHarrison-GFDL/MOM6 that referenced this pull request Apr 28, 2017
 - applies masking to C-grid thickness values in MOM_hor_visc
   which impacts answers where BETTER_BOUND_KH is enabled
 - applies needed masking to h points in MEKE.
@MJHarrison-GFDL
Copy link
Contributor

Closing . We need to address this in a different manner . Thickness values from outside of the domain are impacting the solution - notably in MEKE and "better_bound" viscosities.

alex-huth added a commit to alex-huth/MOM6 that referenced this pull request Oct 26, 2023
* allow for assigned ice shelf thickness where hmask==3, but still solve for ice sheet velocity
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.

4 participants