source: LMDZ6/trunk/libf/phylmd/inifis_mod.F90 @ 3981

Last change on this file since 3981 was 3435, checked in by Laurent Fairhead, 5 years ago

"Historic" :-) commit merging the physics branch used for DYNAMICO with the LMDZ trunk.
The same physics branch can now be used seamlessly with the traditional lon-lat LMDZ
dynamical core and DYNAMICO.
Testing consisted in running a lon-lat LMDZ bucket simulation with the NPv6.1 physics package
with the original trunk sources and the merged sources. Tests were succesful in the sense that
numeric continuity was preserved in the restart files from both simulation. Further tests
included running both versions of the physics codes for one year in a LMDZOR setting in which
the restart files also came out identical.

Caution:

  • as the physics package now manages unstructured grids, grid information needs to be transmitted

to the surface scheme ORCHIDEE. This means that the interface defined in surf_land_orchidee_mod.F90
is only compatible with ORCHIDEE version orchidee2.1 and later versions. If previous versions of
ORCHIDEE need to be used, the CPP key ORCHIDEE_NOUNSTRUCT needs to be set at compilation time.
This is done automatically if makelmdz/makelmdz_fcm are called with the veget orchidee2.0 switch

  • due to a limitation in XIOS, the time at which limit conditions will be read in by DYNAMICO will be

delayed by one physic timestep with respect to the time it is read in by the lon-lat model. This is caused
by the line

IF (MOD(itime-1, lmt_pas) == 0 .OR. (jour_lu /= jour .AND. grid_type /= unstructured)) THEN ! time to read

in limit_read_mod.F90

Work still needed on COSP integration and XML files for DYNAMICO

EM, YM, LF

  • 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 3435 2019-01-22 15:21:59Z fairhead $
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  IMPLICIT NONE
11
12  include "YOMCST.h"
13  REAL,INTENT(IN) :: prad, pg, pr, pcpp, punjours
14
15  CHARACTER (LEN=20) :: modname = 'inifis'
16  CHARACTER (LEN=80) :: abort_message
17
18  ! Initialize flags lunout, prt_level, debug
19  CALL init_print_control
20
21  ! suphel => initialize some physical constants (orbital parameters,
22  !           geoid, gravity, thermodynamical constants, etc.) in the
23  !           physics
24  CALL suphel
25
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
37  END IF
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
78
79  END SUBROUTINE inifis
80 
81END MODULE inifis_mod
Note: See TracBrowser for help on using the repository browser.