| 1 | ! $Id: gcm.F90 3579 2019-10-09 13:11:07Z fairhead $ |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | PROGRAM replay3d |
|---|
| 6 | |
|---|
| 7 | USE comvert_mod, ONLY: preff, pa |
|---|
| 8 | USE inigeomphy_mod, ONLY: inigeomphy |
|---|
| 9 | |
|---|
| 10 | USE control_mod |
|---|
| 11 | USE temps_mod, ONLY: calend, start_time, annee_ref, day_ref, & |
|---|
| 12 | itau_dyn, itau_phy, day_ini, jD_ref, jH_ref, day_end |
|---|
| 13 | USE comconst_mod, ONLY: cpp, daysec, dtphys, dtvr, g, r, rad |
|---|
| 14 | USE logic_mod, ONLY: ecripar, iflag_phys, read_start |
|---|
| 15 | |
|---|
| 16 | USE serre_mod, ONLY: clon, clat, transx, transy, alphax, alphay, pxo, pyo, & |
|---|
| 17 | grossismx, grossismy, dzoomx, dzoomy, taux, tauy |
|---|
| 18 | USE mod_const_mpi, ONLY: comm_lmdz |
|---|
| 19 | USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & |
|---|
| 20 | tetagrot, tetatemp, coefdis, vert_prof_dissip |
|---|
| 21 | USE lmdz_comgeom2 |
|---|
| 22 | |
|---|
| 23 | USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm |
|---|
| 24 | USE lmdz_paramet |
|---|
| 25 | USE lmdz_conf_gcm, ONLY: conf_gcm |
|---|
| 26 | |
|---|
| 27 | IMPLICIT NONE |
|---|
| 28 | |
|---|
| 29 | ! ...... Version du 10/01/98 .......... |
|---|
| 30 | |
|---|
| 31 | ! avec coordonnees verticales hybrides |
|---|
| 32 | ! avec nouveaux operat. dissipation * ( gradiv2,divgrad2,nxgraro2 ) |
|---|
| 33 | |
|---|
| 34 | !======================================================================= |
|---|
| 35 | |
|---|
| 36 | ! Auteur: P. Le Van /L. Fairhead/F.Hourdin |
|---|
| 37 | ! ------- |
|---|
| 38 | |
|---|
| 39 | ! Objet: |
|---|
| 40 | ! ------ |
|---|
| 41 | |
|---|
| 42 | ! GCM LMD nouvelle grille |
|---|
| 43 | |
|---|
| 44 | !======================================================================= |
|---|
| 45 | |
|---|
| 46 | ! ... Dans inigeom , nouveaux calculs pour les elongations cu , cv |
|---|
| 47 | ! et possibilite d'appeler une fonction f(y) a derivee tangente |
|---|
| 48 | ! hyperbolique a la place de la fonction a derivee sinusoidale. |
|---|
| 49 | ! ... Possibilite de choisir le schema pour l'advection de |
|---|
| 50 | ! q , en modifiant iadv dans traceur.def (MAF,10/02) . |
|---|
| 51 | |
|---|
| 52 | ! Pour Van-Leer + Vapeur d'eau saturee, iadv(1)=4. (F.Codron,10/99) |
|---|
| 53 | ! Pour Van-Leer iadv=10 |
|---|
| 54 | |
|---|
| 55 | !----------------------------------------------------------------------- |
|---|
| 56 | ! Declarations: |
|---|
| 57 | ! ------------- |
|---|
| 58 | |
|---|
| 59 | REAL zdtvr |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | ! variables dynamiques intermediaire pour le transport |
|---|
| 63 | |
|---|
| 64 | ! variables pour le fichier histoire |
|---|
| 65 | REAL dtav ! intervalle de temps elementaire |
|---|
| 66 | |
|---|
| 67 | REAL time_0 |
|---|
| 68 | |
|---|
| 69 | LOGICAL lafin |
|---|
| 70 | |
|---|
| 71 | INTEGER :: ntime = 10000, it, klon, klev |
|---|
| 72 | |
|---|
| 73 | |
|---|
| 74 | ! locales pour gestion du temps |
|---|
| 75 | INTEGER :: an, mois, jour |
|---|
| 76 | REAL :: heure |
|---|
| 77 | |
|---|
| 78 | ! Initialisations: |
|---|
| 79 | ! ---------------- |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | !---------------------------------------------------------------------- |
|---|
| 83 | ! lecture des fichiers gcm.def ou run.def |
|---|
| 84 | ! --------------------------------------- |
|---|
| 85 | |
|---|
| 86 | preff = 101325. |
|---|
| 87 | pa = 50000. |
|---|
| 88 | clon = 0. |
|---|
| 89 | clat = 0. |
|---|
| 90 | taux = 3. |
|---|
| 91 | tauy = 3. |
|---|
| 92 | dzoomx = 0.1 |
|---|
| 93 | dzoomy = 0.1 |
|---|
| 94 | grossismx = 1. |
|---|
| 95 | grossismx = 1. |
|---|
| 96 | transx = 0. |
|---|
| 97 | transy = 0. |
|---|
| 98 | |
|---|
| 99 | CALL conf_gcm(99, .TRUE.) |
|---|
| 100 | |
|---|
| 101 | IF (mod(iphysiq, iperiod) /= 0) CALL abort_gcm("conf_gcm", & |
|---|
| 102 | "iphysiq must be a multiple of iperiod", 1) |
|---|
| 103 | |
|---|
| 104 | rad = 6400000 |
|---|
| 105 | g = 9.81 |
|---|
| 106 | |
|---|
| 107 | |
|---|
| 108 | |
|---|
| 109 | !----------------------------------------------------------------------- |
|---|
| 110 | ! Choix du calendrier |
|---|
| 111 | ! ------------------- |
|---|
| 112 | |
|---|
| 113 | ! calend = 'earth_365d' |
|---|
| 114 | |
|---|
| 115 | |
|---|
| 116 | !----------------------------------------------------------------------- |
|---|
| 117 | ! Lecture de l'etat initial : |
|---|
| 118 | ! --------------------------- |
|---|
| 119 | |
|---|
| 120 | !----------------------------------------------------------------------- |
|---|
| 121 | ! Lecture des parametres de controle pour la simulation : |
|---|
| 122 | ! ------------------------------------------------------- |
|---|
| 123 | ! on recalcule eventuellement le pas de temps |
|---|
| 124 | |
|---|
| 125 | zdtvr = daysec / REAL(day_step) |
|---|
| 126 | |
|---|
| 127 | ! on remet le calendrier \`a zero si demande |
|---|
| 128 | |
|---|
| 129 | annee_ref = anneeref |
|---|
| 130 | day_ref = dayref |
|---|
| 131 | day_ini = dayref |
|---|
| 132 | itau_dyn = 0 |
|---|
| 133 | itau_phy = 0 |
|---|
| 134 | time_0 = 0. |
|---|
| 135 | |
|---|
| 136 | mois = 1 |
|---|
| 137 | heure = 0. |
|---|
| 138 | ! CALL ymds2ju(annee_ref, mois, day_ref, heure, jD_ref) |
|---|
| 139 | jH_ref = jD_ref - int(jD_ref) |
|---|
| 140 | jD_ref = int(jD_ref) |
|---|
| 141 | |
|---|
| 142 | dtvr = zdtvr |
|---|
| 143 | CALL iniconst |
|---|
| 144 | PRINT*, 'APRES inisconst' |
|---|
| 145 | CALL inigeom |
|---|
| 146 | |
|---|
| 147 | CALL inigeomphy(iim, jjm, llm, & |
|---|
| 148 | 1, comm_lmdz, & |
|---|
| 149 | rlatu, rlatv, & |
|---|
| 150 | rlonu, rlonv, & |
|---|
| 151 | aire, cu, cv) |
|---|
| 152 | |
|---|
| 153 | CALL suphel |
|---|
| 154 | !open(82,file='dump_param.bin',form='unformatted',status='old') |
|---|
| 155 | |
|---|
| 156 | CALL iophys_ini(900.) |
|---|
| 157 | PRINT*, 'Rlatu=', rlatu |
|---|
| 158 | klon = 2 + iim * (jjm - 1) |
|---|
| 159 | klev = llm |
|---|
| 160 | |
|---|
| 161 | !--------------------------------------------------------------------- |
|---|
| 162 | ! Initialisation de la parametrisation |
|---|
| 163 | !--------------------------------------------------------------------- |
|---|
| 164 | CALL call_ini_replay |
|---|
| 165 | |
|---|
| 166 | !--------------------------------------------------------------------- |
|---|
| 167 | ! Boucle en temps sur l'appel à la parametrisation |
|---|
| 168 | !--------------------------------------------------------------------- |
|---|
| 169 | DO it = 1, ntime |
|---|
| 170 | PRINT*, 'Pas de temps ', it, klon, klev |
|---|
| 171 | CALL call_param_replay(klon, klev) |
|---|
| 172 | ENDDO |
|---|
| 173 | |
|---|
| 174 | END PROGRAM replay3d |
|---|