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