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

Last change on this file since 5133 was 5128, checked in by abarral, 5 months ago

Correct bug in vlspltqs_loc.f90 from r2270 where we call SSUM with incorrect arguments.
Merge the three different versions of abort_gcm into one
Fix seq, para 3D compilation broken from r5107 onwards
(lint) usual + Remove uneeded fixed-form continuations

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