[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 abort_gcm(modname, message, ierr) |
---|
| 97 | USE IOIPSL |
---|
| 98 | ! Stops the simulation cleanly, closing files and printing various |
---|
| 99 | ! comments |
---|
| 100 | !======================================================================= |
---|
| 101 | ! |
---|
| 102 | ! Input: modname = name of calling program |
---|
| 103 | ! message = stuff to print |
---|
| 104 | ! ierr = severity of situation ( = 0 normal ) |
---|
| 105 | |
---|
| 106 | character(len=*) modname |
---|
| 107 | integer ierr |
---|
| 108 | character(len=*) message |
---|
| 109 | |
---|
| 110 | write(*,*) 'in abort_gcm' |
---|
| 111 | call histclo |
---|
| 112 | write(*,*) 'out of histclo' |
---|
| 113 | write(*,*) 'Stopping in ', modname |
---|
| 114 | write(*,*) 'Reason = ',message |
---|
| 115 | call getin_dump |
---|
| 116 | ! |
---|
| 117 | if (ierr .eq. 0) then |
---|
| 118 | write(*,*) 'Everything is cool' |
---|
| 119 | else |
---|
| 120 | write(*,*) 'Houston, we have a problem ', ierr |
---|
| 121 | endif |
---|
| 122 | STOP |
---|
| 123 | END |
---|
| 124 | |
---|
| 125 | !======================================================================= |
---|
| 126 | SUBROUTINE gr_dyn_fi(nfield,im,jm,ngrid,pdyn,pfi) |
---|
| 127 | IMPLICIT NONE |
---|
| 128 | ! passage d'un champ de la grille scalaire a la grille physique |
---|
| 129 | !======================================================================= |
---|
| 130 | |
---|
| 131 | !----------------------------------------------------------------------- |
---|
| 132 | ! declarations: |
---|
| 133 | ! ------------- |
---|
| 134 | |
---|
| 135 | INTEGER im,jm,ngrid,nfield |
---|
| 136 | REAL pdyn(im,jm,nfield) |
---|
| 137 | REAL pfi(ngrid,nfield) |
---|
| 138 | |
---|
| 139 | INTEGER j,ifield,ig |
---|
| 140 | |
---|
| 141 | !----------------------------------------------------------------------- |
---|
| 142 | ! calcul: |
---|
| 143 | ! ------- |
---|
| 144 | |
---|
| 145 | IF(ngrid.NE.2+(jm-2)*(im-1).AND.ngrid.NE.1) & |
---|
| 146 | & STOP 'probleme de dim' |
---|
| 147 | ! traitement des poles |
---|
| 148 | CALL SCOPY(nfield,pdyn,im*jm,pfi,ngrid) |
---|
| 149 | CALL SCOPY(nfield,pdyn(1,jm,1),im*jm,pfi(ngrid,1),ngrid) |
---|
| 150 | |
---|
| 151 | ! traitement des point normaux |
---|
| 152 | DO ifield=1,nfield |
---|
| 153 | DO j=2,jm-1 |
---|
| 154 | ig=2+(j-2)*(im-1) |
---|
| 155 | CALL SCOPY(im-1,pdyn(1,j,ifield),1,pfi(ig,ifield),1) |
---|
| 156 | ENDDO |
---|
| 157 | ENDDO |
---|
| 158 | |
---|
| 159 | RETURN |
---|
| 160 | END |
---|