Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Thu Sep 19, 2019 2:28 am




Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Author Message
PostPosted: Fri Dec 15, 2017 6:27 pm 
Offline

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.

Thanks for your time,
Pierre


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 16, 2017 2:20 pm 
Offline
User avatar

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
 Profile  
Reply with quote  
PostPosted: Sat Dec 16, 2017 5:16 pm 
Offline

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
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group