source: LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/replay1d.F90 @ 5135

Last change on this file since 5135 was 5135, checked in by abarral, 8 weeks ago

Put iotd* into lmdz_iotd.f90

File size: 3.7 KB
Line 
1PROGRAM rejouer
2
3  USE mod_const_mpi, ONLY: comm_lmdz
4  USE inigeomphy_mod, ONLY: inigeomphy
5  USE comvert_mod, ONLY: presnivs
6  USE comvert_mod, ONLY: preff, pa
7  USE ioipsl, ONLY: getin
8  USE lmdz_iotd, ONLY: iotd_ini
9
10  IMPLICIT NONE
11  INCLUDE "dimensions.h"
12
13  REAL :: airefi
14  REAL :: zcufi = 1.
15  REAL :: zcvfi = 1.
16  REAL :: rlat_rad(1), rlon_rad(1)
17
18  INTEGER ntime
19  INTEGER jour0, mois0, an0, day_step, anneeref, dayref
20  INTEGER klev, klon
21  CHARACTER (len = 10) :: calend
22  CHARACTER(len = 20) :: calendrier
23
24
25  !---------------------------------------------------------------------
26  ! L'appel a inigeomphy n'est utile que pour avoir getin_p dans
27  ! les initialisations
28  !---------------------------------------------------------------------
29  zcufi = 1.
30  zcvfi = 1.
31  rlat_rad(1) = 0.
32  rlon_rad(1) = 0.
33
34  preff = 101325.
35  !preff=100000.
36  pa = 50000.
37  CALL disvert()
38  CALL inigeomphy(1, 1, llm, &
39          1, comm_lmdz, &
40          (/rlat_rad(1), 0./), (/0./), &
41          (/0., 0./), (/rlon_rad(1), 0./), &
42          (/ (/airefi, 0./), (/0., 0./) /), &
43          (/zcufi, 0., 0., 0./), &
44          (/zcvfi, 0./))
45
46  CALL suphel
47  !ntime=4320
48  ntime = 10000000
49  dayref = 1
50  anneeref = 2000
51  CALL getin('dayref', dayref)
52  CALL getin('anneeref', anneeref)
53  CALL getin('calend', calend)
54  CALL getin('day_step', day_step)
55  calendrier = calend
56  IF (calendrier == "earth_360d") calendrier = "360_day"
57
58  jour0 = dayref
59  mois0 = (jour0 - 1) / 30 + 1
60  jour0 = jour0 - 30 * ((jour0 - 1) / 30)
61  an0 = anneeref
62
63  !PRINT*,"REPLAY1D jour0,mois0,an0",jour0,mois0,an0
64
65  klon = 1
66  klev = llm
67  CALL iotd_ini('phys.nc', 1, 1, klev, 0., 0., presnivs, jour0, mois0, an0, 0., 86400. / day_step, calendrier)
68  ! Consistent with ... CALL iophys_ini(600.)
69
70  !---------------------------------------------------------------------
71  ! Initialisation de la parametrisation
72  !---------------------------------------------------------------------
73  CALL call_ini_replay
74
75  !---------------------------------------------------------------------
76  ! Boucle en temps sur l'appel à la parametrisation
77  !---------------------------------------------------------------------
78  CALL call_param_replay(klon, klev)
79
80end
81
82!---------------------------------------------------------------------
83!/////////////////////////////////////////////////////////////////////
84!/////////////////////////////////////////////////////////////////////
85!     routine additionnelles utiles, prises dans 1DUTILS.h
86!/////////////////////////////////////////////////////////////////////
87!/////////////////////////////////////////////////////////////////////
88!---------------------------------------------------------------------
89
90!=======================================================================
91SUBROUTINE gr_dyn_fi(nfield, im, jm, ngrid, pdyn, pfi)
92  USE lmdz_ssum_scopy, ONLY: scopy
93
94  IMPLICIT NONE
95  !   passage d'un champ de la grille scalaire a la grille physique
96  !=======================================================================
97
98  !-----------------------------------------------------------------------
99  !   declarations:
100  !   -------------
101
102  INTEGER im, jm, ngrid, nfield
103  REAL pdyn(im, jm, nfield)
104  REAL pfi(ngrid, nfield)
105
106  INTEGER j, ifield, ig
107
108  !-----------------------------------------------------------------------
109  !   calcul:
110  !   -------
111
112  IF(ngrid/=2 + (jm - 2) * (im - 1).AND.ngrid/=1)                          &
113          STOP 'probleme de dim'
114  !   traitement des poles
115  CALL SCOPY(nfield, pdyn, im * jm, pfi, ngrid)
116  CALL SCOPY(nfield, pdyn(1, jm, 1), im * jm, pfi(ngrid, 1), ngrid)
117
118  !   traitement des point normaux
119  DO ifield = 1, nfield
120    DO j = 2, jm - 1
121      ig = 2 + (j - 2) * (im - 1)
122      CALL SCOPY(im - 1, pdyn(1, j, ifield), 1, pfi(ig, ifield), 1)
123    ENDDO
124  ENDDO
125
126  RETURN
127END
Note: See TracBrowser for help on using the repository browser.