New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#2445 (Minimum roughness when equal to significant wave height) – NEMO

Opened 4 years ago

Closed 3 years ago

#2445 closed Defect (fixed)

Minimum roughness when equal to significant wave height

Reported by: jcastill Owned by: ayoung
Priority: normal Milestone: 2020 WP
Component: ZDF Version: trunk
Severity: minor Keywords: wave coupling roughness gls
Cc: mathiot, davestorkey, smasson

Description (last modified by jcastill)

Context

When running in wave coupled mode and using roughness equal to wave height (nn_z0_met=3), some times there is a segmentation fault, or a crash when the velocity or SSH are too large.

Analysis

In the vertical physics equations for the GLS scheme, the minimum roughness appears as a dividing factor. When it is too small or zero, non-physical results or divide by zero errors will be generated.

Recommendation

In the different formulations for surface roughness length in the GLS scheme, a minimum value is imposed (rn_hsro). It would be enough to simply impose a minimum value also when the nn_z0_met=3 scheme is used. This means that, in the zdfgls.F90 file, the line:

         zhsro(:,:) = rn_frac_hs * hsw(:,:)   ! (rn_frac_hs=1.6 see Eq. (5) of Rascle et al. 2008 )

could be substituted by:

         zhsro(:,:) = MAX(rn_frac_hs * hsw(:,:), rn_hsro)   ! (rn_frac_hs=1.6 see Eq. (5) of Rascle et al. 2008 )

I have already tested this modification and it solves the instability and segmentation fault problems, at the same time providing sensible results.

Commit History (4)

ChangesetAuthorTimeChangeLog
13282ayoung2020-07-09T16:02:24+02:00

Added minimum roughness when using nn_z0_met = 3 to avoid dividing by zero/very small numbers. Ticket #2445. Fully sette tested (trunk).

13259ayoung2020-07-07T14:22:34+02:00

Merging change from ticket #2445 (introduction of minimum value for surface roughness when nn_z0_met = 3).

13194ayoung2020-07-01T15:46:33+02:00

Added minimum roughness when using nn_z0_met = 3 to avoid dividing by zero/very small numbers. Ticket #2445

13187ayoung2020-07-01T11:01:26+02:00

Creating branch for ticket #2445

Change History (12)

comment:1 Changed 4 years ago by jcastill

  • Description modified (diff)

comment:2 Changed 4 years ago by smasson

  • Cc smasson added

It looks the fix is simple, has been tested and is working. What are we waiting for do do the commit and close this ticket?
I guess it concerns both r4.0-HEAD and the trunk?

comment:3 Changed 4 years ago by jchanut

I agree. I experienced the same issue and this is the way to go. Please, go ahead with the change.

comment:4 Changed 4 years ago by ayoung

In 13187:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:5 Changed 4 years ago by ayoung

In 13194:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:6 Changed 4 years ago by ayoung

Fully sette tested.


./sette_rpt.sh (script will wait all nemo_sette run are done)



Current code is : NEMO/branches/2020/ticket2445 @ r13253 ( last change @ r13194 )

SETTE validation report generated for :

NEMO/branches/2020/ticket2445 @ r13194 (last changed revision)

on XC40_METO_IFORT arch file

!!---------------1st pass------------------!!

!----restart----!

WGYRE_PISCES_ST run.stat restartability passed : 13194
WGYRE_PISCES_ST tracer.stat restartability passed : 13194
WORCA2_ICE_PISCES_ST run.stat restartability passed : 13194
WORCA2_ICE_PISCES_ST tracer.stat restartability passed : 13194
WORCA2_OFF_PISCES_ST tracer.stat restartability passed : 13194
WAMM12_ST run.stat restartability passed : 13194
WORCA2_SAS_ICE_ST run.stat restartability passed : 13194
WAGRIF_DEMO_ST run.stat restartability passed : 13194
WSPITZ12_ST run.stat restartability passed : 13194
WISOMIP_ST run.stat restartability passed : 13194
WOVERFLOW_ST run.stat restartability passed : 13194
WLOCK_EXCHANGE_ST run.stat restartability passed : 13194
WVORTEX_ST run.stat restartability passed : 13194
WICE_AGRIF_ST run.stat restartability passed : 13194

!----repro----!

WGYRE_PISCES_ST run.stat reproducibility passed : 13194
WGYRE_PISCES_ST tracer.stat reproducibility passed : 13194
WORCA2_ICE_PISCES_ST run.stat reproducibility passed : 13194
WORCA2_ICE_PISCES_ST tracer.stat reproducibility passed : 13194
WORCA2_OFF_PISCES_ST tracer.stat reproducibility passed : 13194
WAMM12_ST run.stat reproducibility passed : 13194
WORCA2_SAS_ICE_ST run.stat reproducibility passed : 13194
WORCA2_ICE_OBS_ST run.stat reproducibility passed : 13194
WAGRIF_DEMO_ST run.stat reproducibility passed : 13194
WSPITZ12_ST run.stat reproducibility passed : 13194
WISOMIP_ST run.stat reproducibility passed : 13194
WVORTEX_ST run.stat reproducibility passed : 13194
WICE_AGRIF_ST run.stat reproducibility passed : 13194

!----agrif check----!

ORCA2 AGRIF vs ORCA2 NOAGRIF run.stat unchanged - passed : 13194 13194

!----result comparison check----!

check result differences between :
VALID directory : /projects/jmmp/ayoung/tickets/ticket2445/NEMO_VALIDATION at rev 13194
and
REFERENCE directory : /projects/jmmp/ayoung/tickets/HEAD_ref/NEMO_VALIDATION at rev 13137

WGYRE_PISCES_ST run.stat files are identical
WGYRE_PISCES_ST tracer.stat files are identical
WORCA2_ICE_PISCES_ST run.stat files are identical
WORCA2_ICE_PISCES_ST tracer.stat files are identical
WORCA2_OFF_PISCES_ST tracer.stat files are identical
WAMM12_ST run.stat files are identical
WISOMIP_ST run.stat files are identical
WORCA2_SAS_ICE_ST run.stat files are identical
WAGRIF_DEMO_ST run.stat files are identical
WSPITZ12_ST run.stat files are identical
WISOMIP_ST run.stat files are identical
WVORTEX_ST run.stat files are identical
WICE_AGRIF_ST run.stat files are identical

!!---------------2nd pass------------------!!

!----restart----!

!----repro----!

!----agrif check----!

!----result comparison check----!

check result differences between :
VALID directory : /projects/jmmp/ayoung/tickets/ticket2445/NEMO_VALIDATION at rev 13194
and
REFERENCE directory : /projects/jmmp/ayoung/tickets/HEAD_ref/NEMO_VALIDATION at rev 13137

Last edited 4 years ago by ayoung (previous) (diff)

comment:7 Changed 4 years ago by ayoung

Last edited 4 years ago by ayoung (previous) (diff)

comment:8 Changed 4 years ago by ayoung

In 13259:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:9 Changed 4 years ago by ayoung

  • Version changed from v4.0.* to trunk

comment:10 Changed 4 years ago by ayoung

In 13282:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:11 Changed 4 years ago by ayoung

Trunk merge sette tests. 13267+ is commit 13281.

Current code is : NEMO/trunk @ r13281 ( last change @ r13281 )

SETTE validation report generated for :

NEMO/trunk @ r13281+ (last changed revision)

on XC40_METO_IFORT arch file

!!---------------1st pass------------------!!

!----restart----!

WGYRE_PISCES_ST run.stat restartability passed : 13281+
WGYRE_PISCES_ST tracer.stat restartability passed : 13281+
WORCA2_ICE_PISCES_ST run.stat restartability passed : 13281+
WORCA2_ICE_PISCES_ST tracer.stat restartability passed : 13281+
WORCA2_OFF_PISCES_ST tracer.stat restartability passed : 13281+
WAMM12_ST run.stat restartability passed : 13281+
WORCA2_SAS_ICE_ST run.stat restartability passed : 13281+
WAGRIF_DEMO_ST run.stat restartability passed : 13281+
WSPITZ12_ST run.stat restartability passed : 13281+
WISOMIP_ST run.stat restartability passed : 13281+
WOVERFLOW_ST run.stat restartability passed : 13281+
WLOCK_EXCHANGE_ST run.stat restartability passed : 13281+
WVORTEX_ST run.stat restartability passed : 13281+
WICE_AGRIF_ST run.stat restartability passed : 13281+

!----repro----!

WGYRE_PISCES_ST run.stat reproducibility passed : 13281+
WGYRE_PISCES_ST tracer.stat reproducibility passed : 13281+
WORCA2_ICE_PISCES_ST run.stat reproducibility passed : 13281+
WORCA2_ICE_PISCES_ST tracer.stat reproducibility passed : 13281+
WORCA2_OFF_PISCES_ST tracer.stat reproducibility passed : 13281+
WAMM12_ST run.stat reproducibility passed : 13281+
WORCA2_SAS_ICE_ST run.stat reproducibility passed : 13281+
WORCA2_ICE_OBS_ST run.stat reproducibility passed : 13281+
WAGRIF_DEMO_ST run.stat reproducibility passed : 13281+
WSPITZ12_ST run.stat reproducibility passed : 13281+
WISOMIP_ST run.stat reproducibility passed : 13281+
WVORTEX_ST run.stat reproducibility passed : 13281+
WICE_AGRIF_ST run.stat reproducibility passed : 13281+

!----agrif check----!

ORCA2 AGRIF vs ORCA2 NOAGRIF run.stat unchanged - passed : 13281+ 13281+

!----result comparison check----!

check result differences between :
VALID directory : /projects/jmmp/ayoung/tickets/trunk_ref/NEMO_VALIDATION at rev 13281+
and
REFERENCE directory : /projects/jmmp/ayoung/tickets/trunk_ref/NEMO_VALIDATION at rev 13267+

WGYRE_PISCES_ST run.stat files are identical
WGYRE_PISCES_ST tracer.stat files are identical
WORCA2_ICE_PISCES_ST run.stat files are identical
WORCA2_ICE_PISCES_ST tracer.stat files are identical
WORCA2_OFF_PISCES_ST tracer.stat files are identical
WAMM12_ST run.stat files are identical
WISOMIP_ST run.stat files are identical
WORCA2_SAS_ICE_ST run.stat files are identical
WAGRIF_DEMO_ST run.stat files are identical
WSPITZ12_ST run.stat files are identical
WISOMIP_ST run.stat files are identical
WVORTEX_ST run.stat files are identical
WICE_AGRIF_ST run.stat files are identical

comment:12 Changed 3 years ago by ayoung

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.