source: LMDZ6/branches/Amaury_dev/libf/phylmd/inifis_mod.F90 @ 5116

Last change on this file since 5116 was 5112, checked in by abarral, 2 months ago

Rename modules in phy_common from *_mod > lmdz_*

  • 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.9 KB
RevLine 
[1403]1! $Id: inifis_mod.F90 5112 2024-07-24 10:45:32Z abarral $
[2311]2MODULE inifis_mod
[524]3
[2311]4CONTAINS
5
6  SUBROUTINE inifis(punjours, prad, pg, pr, pcpp)
7  ! Initialize some physical constants and settings
[5112]8  USE lmdz_init_print_control, ONLY: init_print_control
9  USE lmdz_print_control, ONLY: lunout
[5111]10  USE lmdz_abort_physic, ONLY: abort_physic
[1992]11  IMPLICIT NONE
[1403]12
[2311]13  include "YOMCST.h"
14  REAL,INTENT(IN) :: prad, pg, pr, pcpp, punjours
[524]15
[1992]16  CHARACTER (LEN=20) :: modname = 'inifis'
17  CHARACTER (LEN=80) :: abort_message
18
[2311]19  ! Initialize flags lunout, prt_level, debug
20  CALL init_print_control
[1992]21
[2311]22  ! suphel => initialize some physical constants (orbital parameters,
23  !           geoid, gravity, thermodynamical constants, etc.) in the
24  !           physics
25  CALL suphel
[1992]26
[2311]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
[1992]38  END IF
[2311]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
[1992]79
[2311]80  END SUBROUTINE inifis
81 
82END MODULE inifis_mod
Note: See TracBrowser for help on using the repository browser.