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