source: LMDZ6/trunk/libf/phylmd/inifis_mod.f90 @ 5327

Last change on this file since 5327 was 5285, checked in by abarral, 3 weeks ago

As discussed internally, remove generic ONLY: ... for new _mod_h modules

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1! $Id: inifis_mod.f90 5285 2024-10-28 13:33:29Z abarral $
2MODULE inifis_mod
3
4CONTAINS
5
6  SUBROUTINE inifis(punjours, prad, pg, pr, pcpp)
7  ! Initialize some physical constants and settings
8  USE init_print_control_mod, ONLY : init_print_control
9  USE print_control_mod, ONLY: lunout
10  USE yomcst_mod_h
11IMPLICIT NONE
12
13
14  REAL,INTENT(IN) :: prad, pg, pr, pcpp, punjours
15
16  CHARACTER (LEN=20) :: modname = 'inifis'
17  CHARACTER (LEN=80) :: abort_message
18
19  ! Initialize flags lunout, prt_level, debug
20  CALL init_print_control
21
22  ! suphel => initialize some physical constants (orbital parameters,
23  !           geoid, gravity, thermodynamical constants, etc.) in the
24  !           physics
25  CALL suphel
26
27  ! check that physical constants set in 'suphel' are coherent
28  ! with values set in the dynamics:
29  IF (rday/=punjours) THEN
30    WRITE (lunout, *) 'inifis: length of day discrepancy!!!'
31    WRITE (lunout, *) '  in the dynamics punjours=', punjours
32    WRITE (lunout, *) '   but in the physics RDAY=', rday
33    IF (abs(rday-punjours)>0.01*punjours) THEN
34        ! stop here if the relative difference is more than 1%
35      abort_message = 'length of day discrepancy'
36      CALL abort_physic(modname, abort_message, 1)
37    END IF
38  END IF
39  IF (rg/=pg) THEN
40    WRITE (lunout, *) 'inifis: gravity discrepancy !!!'
41    WRITE (lunout, *) '     in the dynamics pg=', pg
42    WRITE (lunout, *) '  but in the physics RG=', rg
43    IF (abs(rg-pg)>0.01*pg) THEN
44        ! stop here if the relative difference is more than 1%
45      abort_message = 'gravity discrepancy'
46      CALL abort_physic(modname, abort_message, 1)
47    END IF
48  END IF
49  IF (ra/=prad) THEN
50    WRITE (lunout, *) 'inifis: planet radius discrepancy !!!'
51    WRITE (lunout, *) '   in the dynamics prad=', prad
52    WRITE (lunout, *) '  but in the physics RA=', ra
53    IF (abs(ra-prad)>0.01*prad) THEN
54        ! stop here if the relative difference is more than 1%
55      abort_message = 'planet radius discrepancy'
56      CALL abort_physic(modname, abort_message, 1)
57    END IF
58  END IF
59  IF (rd/=pr) THEN
60    WRITE (lunout, *) 'inifis: reduced gas constant discrepancy !!!'
61    WRITE (lunout, *) '     in the dynamics pr=', pr
62    WRITE (lunout, *) '  but in the physics RD=', rd
63    IF (abs(rd-pr)>0.01*pr) THEN
64        ! stop here if the relative difference is more than 1%
65      abort_message = 'reduced gas constant discrepancy'
66      CALL abort_physic(modname, abort_message, 1)
67    END IF
68  END IF
69  IF (rcpd/=pcpp) THEN
70    WRITE (lunout, *) 'inifis: specific heat discrepancy !!!'
71    WRITE (lunout, *) '     in the dynamics pcpp=', pcpp
72    WRITE (lunout, *) '  but in the physics RCPD=', rcpd
73    IF (abs(rcpd-pcpp)>0.01*pcpp) THEN
74        ! stop here if the relative difference is more than 1%
75      abort_message = 'specific heat discrepancy'
76      CALL abort_physic(modname, abort_message, 1)
77    END IF
78  END IF
79
80  END SUBROUTINE inifis
81 
82END MODULE inifis_mod
Note: See TracBrowser for help on using the repository browser.