Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
METRo projects
metro
Commits
cd003b69
Commit
cd003b69
authored
Apr 12, 2017
by
Miguel Tremblay
Browse files
Removal of CHKDIV function. Division by zero are now explicitly checked into the code.
parent
0ffc2cb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/model/balanc.f
View file @
cd003b69
...
...
@@ -158,8 +158,6 @@
*
Internes
*
--------
***
INTEGER
ier
,
CHKDIV
EXTERNAL
CHKDIV
INTEGER
next
,
now
REAL
T
(
n
,
2
),
G
(
0
:
n
)
DOUBLE PRECISION
FGD
,
AL
,
RA
,
M
,
DIV
...
...
@@ -274,8 +272,7 @@
call
SRFHUM
(
QG
,
CL
,
ER1
,
ER2
,
TSK
,
P0
(
i
),
QA
(
i
),
FP
)
*
Air
density
at
the
surface
DIV
=
RGASD
*
FOTVT
(
TSK
,
QG
)
ier
=
CHKDIV
(
DIV
,
"balanc.f"
,
196
)
if
(
ier
.eq.
1
)
then
if
(
abs
(
DIV
)
<
1.0D-5
)
then
WRITE
(
*
,
*
)
"Echec dans balanc.f"
ECHEC
=
.true.
return
...
...
src/model/coupla.f
View file @
cd003b69
...
...
@@ -144,8 +144,6 @@
*
Internes
*
--------
***
INTEGER
ier
,
CHKDIV
EXTERNAL
CHKDIV
CHARACTER
*
250
outfmt
INTEGER
next
,
now
,
iter
LOGICAL
DOWN
...
...
@@ -281,8 +279,7 @@
call
SRFHUM
(
QG
,
CL
,
ER1
,
ER2
,
TSK
,
P0
(
i
),
QA
(
i
),
FP
)
*
Air
density
at
ground
DIV
=
RGASD
*
FOTVT
(
TSK
,
QG
)
ier
=
CHKDIV
(
DIV
,
"coupla.f"
,
209
)
if
(
ier
.eq.
1
)
then
if
(
abs
(
DIV
)
<
1.0D-5
)
then
ECHEC
=
.true.
WRITE
(
*
,
*
)
"Echec in coupla.f"
return
...
...
src/model/lib_gen.f
View file @
cd003b69
...
...
@@ -167,28 +167,3 @@
return
end
************************************************************************
************************************************************************
************************************************************************
***
* Sous-routine CHKDIV: Verifier qu'
un
denominateur
est
different
*
de
zero
.
*
*
Auteur
/
Author
:
Louis
-
Philippe
Crevier
*
Date
:
Octobre
2000
***
FUNCTION
CHKDIV
(
DIV
,
FICH
,
LIGNE
)
IMPLICIT
NONE
INTEGER
CHKDIV
INTEGER
a
CHARACTER
*
(
*
)
FICH
,
LIGNE
DOUBLE PRECISION
DIV
if
(
abs
(
DIV
)
<
1.0D-5
)
then
a
=
index
(
FICH
,
' '
)
-1
FICH
=
FICH
(
1
:
a
)//
', '
//
LIGNE
CHKDIV
=
1
else
CHKDIV
=
0
end
if
return
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment