# Ocean Modeling Discussion

ROMS/TOMS

Search for:
 It is currently Mon Sep 23, 2019 9:39 am

 Page 1 of 1 [ 3 posts ]
 All times are UTC
Author Message
 Post subject: WTYPE=9 causes division by zero in lmd_swfrac.FPosted: Fri Dec 15, 2017 6:27 pm

Joined: Sun Jun 27, 2010 8:45 pm
Posts: 15
Location: Old Dominion University
I would like to report a division by zero that occurs when WTYPE=9 and SOLAR_SOURCE are selected.

WTYPE=9 is defined in mod_scalars.F as:
Code:
real(r8), dimension(9) :: lmd_mu1 =                               &
& (/ 0.35_r8, 0.6_r8,  1.0_r8,  1.5_r8, 1.4_r8,                    &
&    0.42_r8, 0.37_r8, 0.33_r8, 0.0_r8 /)

Note that lmd_mu1 is 0.0_r8 for WTYPE=9.
The division by zero occurs in lmd_swfrac.F:

Code:
fac1(i)=Zscale/lmd_mu1(Jindex)

For example, this is what gfortran (with -ffpe-trap=invalid,zero,overflow activated) reports on the first timestep:

Program received signal SIGFPE, Arithmetic exception.
0x0000000000a40422 in lmd_swfrac_tile (ng=1, tile=0, lbi=-3, ubi=8, lbj=-3, ubj=8, imins=-2, imaxs=7, jmins=-2,
jmaxs=7, zscale=-1, z=..., swdk=...) at lmd_swfrac.f90:123
123 fac1(i)=Zscale/lmd_mu1(Jindex)

ROMS runs perfectly fine when I select a different Jerlov water type.

Pierre

Top

 Post subject: Re: WTYPE=9 causes division by zero in lmd_swfrac.FPosted: Sat Dec 16, 2017 2:20 pm

Joined: Mon Apr 28, 2003 5:44 pm
Posts: 502
Location: Rutgers University
Here's the ticket for when that change was introduced:
https://www.myroms.org/projects/src/ticket/609
Maybe you can figure out what the parameters should be - probably a very small but finite value not zero.

_________________
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Top

 Post subject: Re: WTYPE=9 causes division by zero in lmd_swfrac.FPosted: Sat Dec 16, 2017 5:16 pm

Joined: Sun Jun 27, 2010 8:45 pm
Posts: 15
Location: Old Dominion University
Quote:
Maybe you can figure out what the parameters should be - probably a very small but finite value not zero

WTYPE=9 (dark coastal water) is absent from the original papers (e.g. Paulson & Simpson JPO 1977) but the following publication (attached) from:
https://publications.europa.eu/en/publi ... 45fd52242a

would suggest (see bottom of Table-2 in the document):

lmd_mu1( 9 ) = 0.00468592_r8

Pierre

 Attachments: File comment: EU reference with irradiance fits for various Jerlov types DOC_1.en.pdf [466.28 KiB] Downloaded 74 times
Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: No registered users and 1 guest

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ News, Events & Job Opportunities    Meetings/Workshops    Job Opportunities    Ocean News ROMS/TOMS    ROMS Adjoint    ROMS Benchmarks    ROMS Bugs    ROMS Discussion    ROMS Documentation    ROMS Ecosystem    ROMS FAQ    ROMS Ice    ROMS Information    ROMS Installation    ROMS Known Problems    ROMS Messages    ROMS Problems    ROMS Releases    ROMS Results    ROMS Sediment    ROMS Source    ROMS Tips    ROMS Tools and Techniques    ROMS Trivia    ROMS Usage    ROMS Webinar    ROMS Wish List ROMS/TOMS Applications    User Applications    Adriatic Sea Ocean Modeling    Ocean Modeling FAQ