source: dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/inifis_mod.F90 @ 3983

Last change on this file since 3983 was 3835, checked in by ymipsl, 10 years ago

Some missing threadprivate...

YM

File size: 2.8 KB
RevLine 
[3816]1MODULE inifis_mod
[3809]2
3
[3835]4
[3816]5CONTAINS
[3809]6
[3831]7  SUBROUTINE inifis(punjours, prad,pg,pr,pcpp)
[3816]8  ! Initialize physics constant and flags from dynamics
[3831]9  USE init_print_control_mod, ONLY : init_print_control
10  USE print_control_mod, ONLY : lunout
11  USE phystokenc_mod, only: init_phystokenc
[3816]12  IMPLICIT NONE
[3809]13
[3816]14  include "YOMCST.h"
[3831]15  REAL,INTENT(IN) :: punjours, prad, pg, pr, pcpp
[3809]16  CHARACTER (LEN=20) :: modname = 'inifis'
17  CHARACTER (LEN=80) :: abort_message
18
[3831]19  CALL init_print_control
[3809]20
[3816]21  ! suphel => initialize some physical constants (orbital parameters,
22  !           geoid, gravity, thermodynamical constants, etc.) in the
23  !           physics
24  CALL suphel
[3809]25
[3816]26  ! check that physical constants set in 'suphel' are coherent
27  ! with values set in the dynamics:
28  IF (rday/=punjours) THEN
29    WRITE (lunout, *) 'inifis: length of day discrepancy!!!'
30    WRITE (lunout, *) '  in the dynamics punjours=', punjours
31    WRITE (lunout, *) '   but in the physics RDAY=', rday
32    IF (abs(rday-punjours)>0.01*punjours) THEN
33        ! stop here if the relative difference is more than 1%
34      abort_message = 'length of day discrepancy'
35      CALL abort_physic(modname, abort_message, 1)
36    END IF
[3809]37  END IF
[3816]38  IF (rg/=pg) THEN
39    WRITE (lunout, *) 'inifis: gravity discrepancy !!!'
40    WRITE (lunout, *) '     in the dynamics pg=', pg
41    WRITE (lunout, *) '  but in the physics RG=', rg
42    IF (abs(rg-pg)>0.01*pg) THEN
43        ! stop here if the relative difference is more than 1%
44      abort_message = 'gravity discrepancy'
45      CALL abort_physic(modname, abort_message, 1)
46    END IF
47  END IF
48  IF (ra/=prad) THEN
49    WRITE (lunout, *) 'inifis: planet radius discrepancy !!!'
50    WRITE (lunout, *) '   in the dynamics prad=', prad
51    WRITE (lunout, *) '  but in the physics RA=', ra
52    IF (abs(ra-prad)>0.01*prad) THEN
53        ! stop here if the relative difference is more than 1%
54      abort_message = 'planet radius discrepancy'
55      CALL abort_physic(modname, abort_message, 1)
56    END IF
57  END IF
58  IF (rd/=pr) THEN
59    WRITE (lunout, *) 'inifis: reduced gas constant discrepancy !!!'
60    WRITE (lunout, *) '     in the dynamics pr=', pr
61    WRITE (lunout, *) '  but in the physics RD=', rd
62    IF (abs(rd-pr)>0.01*pr) THEN
63        ! stop here if the relative difference is more than 1%
64      abort_message = 'reduced gas constant discrepancy'
65      CALL abort_physic(modname, abort_message, 1)
66    END IF
67  END IF
68  IF (rcpd/=pcpp) THEN
69    WRITE (lunout, *) 'inifis: specific heat discrepancy !!!'
70    WRITE (lunout, *) '     in the dynamics pcpp=', pcpp
71    WRITE (lunout, *) '  but in the physics RCPD=', rcpd
72    IF (abs(rcpd-pcpp)>0.01*pcpp) THEN
73        ! stop here if the relative difference is more than 1%
74      abort_message = 'specific heat discrepancy'
75      CALL abort_physic(modname, abort_message, 1)
76    END IF
77  END IF
[3831]78 
79  CALL init_phystokenc
[3809]80
[3816]81  END SUBROUTINE inifis
[3809]82
[3816]83END MODULE inifis_mod
Note: See TracBrowser for help on using the repository browser.