| 1 | ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique | 
|---|
| 2 | ! Attention : il n'y a aucune raison pour ecrire ces constantes | 
|---|
| 3 | ! comme des champs 2D. A corriger un jour ... | 
|---|
| 4 |  | 
|---|
| 5 | c | 
|---|
| 6 |       ndex2d = 0 | 
|---|
| 7 |       itau_w=itau_dyn+itau | 
|---|
| 8 | c | 
|---|
| 9 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(prt_level)  | 
|---|
| 10 |       CALL histwrite(nid_ctesGCM, "prt_level", itau_w, | 
|---|
| 11 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 12 | c | 
|---|
| 13 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(dayref) | 
|---|
| 14 |       CALL histwrite(nid_ctesGCM, "dayref", itau_w, | 
|---|
| 15 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 16 | c | 
|---|
| 17 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(anneeref) | 
|---|
| 18 |       CALL histwrite(nid_ctesGCM, "anneeref", itau_w, | 
|---|
| 19 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 20 | c | 
|---|
| 21 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(raz_date) | 
|---|
| 22 |       CALL histwrite(nid_ctesGCM, "raz_date", itau_w, | 
|---|
| 23 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 24 | c | 
|---|
| 25 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(nday) | 
|---|
| 26 |       CALL histwrite(nid_ctesGCM, "nday", itau_w, | 
|---|
| 27 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 28 | c | 
|---|
| 29 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(day_step) | 
|---|
| 30 |       CALL histwrite(nid_ctesGCM, "day_step", itau_w, | 
|---|
| 31 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 32 | c | 
|---|
| 33 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iperiod) | 
|---|
| 34 |       CALL histwrite(nid_ctesGCM, "iperiod", itau_w, | 
|---|
| 35 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 36 | c | 
|---|
| 37 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iapp_tracvl) | 
|---|
| 38 |       CALL histwrite(nid_ctesGCM, "iapp_tracvl", itau_w, | 
|---|
| 39 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 40 | c | 
|---|
| 41 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iconser) | 
|---|
| 42 |       CALL histwrite(nid_ctesGCM, "iconser", itau_w, | 
|---|
| 43 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 44 | c | 
|---|
| 45 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iecri) | 
|---|
| 46 |       CALL histwrite(nid_ctesGCM, "iecri", itau_w, | 
|---|
| 47 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 48 | c | 
|---|
| 49 |       zx_tmp_2d(1:iip1,1:jjp1)=periodav | 
|---|
| 50 |       CALL histwrite(nid_ctesGCM, "periodav", itau_w, | 
|---|
| 51 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 52 | c | 
|---|
| 53 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(idissip) | 
|---|
| 54 |       CALL histwrite(nid_ctesGCM, "idissip", itau_w, | 
|---|
| 55 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 56 | c | 
|---|
| 57 |       IF(lstardis) THEN | 
|---|
| 58 |        zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 59 |       ELSE | 
|---|
| 60 |        zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 61 |       ENDIF | 
|---|
| 62 |       CALL histwrite(nid_ctesGCM, "lstardis", itau_w, | 
|---|
| 63 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 64 | c | 
|---|
| 65 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(nitergdiv) | 
|---|
| 66 |       CALL histwrite(nid_ctesGCM, "nitergdiv", itau_w, | 
|---|
| 67 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 68 | c | 
|---|
| 69 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(nitergrot) | 
|---|
| 70 |       CALL histwrite(nid_ctesGCM, "nitergrot", itau_w, | 
|---|
| 71 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 72 | c | 
|---|
| 73 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(niterh)  | 
|---|
| 74 |       CALL histwrite(nid_ctesGCM, "niterh", itau_w, | 
|---|
| 75 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 76 | c | 
|---|
| 77 |       zx_tmp_2d(1:iip1,1:jjp1)=tetagdiv | 
|---|
| 78 |       CALL histwrite(nid_ctesGCM, "tetagdiv", itau_w, | 
|---|
| 79 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 80 | c | 
|---|
| 81 |       zx_tmp_2d(1:iip1,1:jjp1)=tetagrot | 
|---|
| 82 |       CALL histwrite(nid_ctesGCM, "tetagrot", itau_w, | 
|---|
| 83 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 84 | c | 
|---|
| 85 |       zx_tmp_2d(1:iip1,1:jjp1)=tetatemp | 
|---|
| 86 |       CALL histwrite(nid_ctesGCM, "tetatemp", itau_w, | 
|---|
| 87 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 88 | c | 
|---|
| 89 |       zx_tmp_2d(1:iip1,1:jjp1)=coefdis | 
|---|
| 90 |       CALL histwrite(nid_ctesGCM, "coefdis", itau_w, | 
|---|
| 91 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 92 | c | 
|---|
| 93 |       IF(purmats) THEN | 
|---|
| 94 |        zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 95 |       ELSE | 
|---|
| 96 |        zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 97 |       ENDIF | 
|---|
| 98 |       CALL histwrite(nid_ctesGCM, "purmats", itau_w, | 
|---|
| 99 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 100 | c | 
|---|
| 101 |       IF(ok_guide) THEN | 
|---|
| 102 |        zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 103 |       ELSE | 
|---|
| 104 |        zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 105 |       ENDIF | 
|---|
| 106 |       CALL histwrite(nid_ctesGCM, "ok_guide", itau_w, | 
|---|
| 107 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 108 | c | 
|---|
| 109 |       IF(true_calendar) THEN | 
|---|
| 110 |        zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 111 |       ELSE | 
|---|
| 112 |        zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 113 |       ENDIF | 
|---|
| 114 |       CALL histwrite(nid_ctesGCM, "true_calendar", itau_w, | 
|---|
| 115 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 116 | c | 
|---|
| 117 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iflag_phys) | 
|---|
| 118 |       CALL histwrite(nid_ctesGCM, "iflag_phys", itau_w, | 
|---|
| 119 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 120 | c | 
|---|
| 121 |       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iphysiq) | 
|---|
| 122 |       CALL histwrite(nid_ctesGCM, "iphysiq", itau_w, | 
|---|
| 123 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 124 | c | 
|---|
| 125 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 
|---|
| 126 | ! FH 2008/05/02 | 
|---|
| 127 | ! La variable cycle_diurne n'est pas vue par la dynamique | 
|---|
| 128 | !     IF(cycle_diurne) THEN | 
|---|
| 129 | !      zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 130 | !     ELSE | 
|---|
| 131 | !      zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 132 | !     ENDIF | 
|---|
| 133 | !     CALL histwrite(nid_ctesGCM, "cycle_diurne", itau_w, | 
|---|
| 134 | !    .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 135 | ! | 
|---|
| 136 | !     IF(soil_model) THEN | 
|---|
| 137 | !      zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 138 | !     ELSE | 
|---|
| 139 | !      zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 140 | !     ENDIF | 
|---|
| 141 | !     CALL histwrite(nid_ctesGCM, "soil_model", itau_w, | 
|---|
| 142 | !    .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 143 | ! | 
|---|
| 144 | !     IF(new_oliq) THEN | 
|---|
| 145 | !      zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 146 | !     ELSE | 
|---|
| 147 | !      zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 148 | !     ENDIF | 
|---|
| 149 | !     CALL histwrite(nid_ctesGCM, "new_oliq", itau_w, | 
|---|
| 150 | !    .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 151 | ! | 
|---|
| 152 | !     IF(ok_orodr) THEN | 
|---|
| 153 | !      zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 154 | !     ELSE | 
|---|
| 155 | !      zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 156 | !     ENDIF | 
|---|
| 157 | !     CALL histwrite(nid_ctesGCM, "ok_orodr", itau_w, | 
|---|
| 158 | !    .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 159 | ! | 
|---|
| 160 | !     IF(ok_orolf) THEN | 
|---|
| 161 | !      zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 162 | !     ELSE | 
|---|
| 163 | !      zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 164 | !     ENDIF | 
|---|
| 165 | !     CALL histwrite(nid_ctesGCM, "ok_orolf", itau_w, | 
|---|
| 166 | !    .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 167 | ! | 
|---|
| 168 | !     IF(ok_limitvrai) THEN | 
|---|
| 169 | !      zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 170 | !     ELSE | 
|---|
| 171 | !      zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 172 | !     ENDIF | 
|---|
| 173 | !     CALL histwrite(nid_ctesGCM, "ok_limitvrai", itau_w, | 
|---|
| 174 | !    .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 175 | ! | 
|---|
| 176 | !     zx_tmp_2d(1:iip1,1:jjp1)=nbapp_rad | 
|---|
| 177 | !     CALL histwrite(nid_ctesGCM, "nbapp_rad", itau_w, | 
|---|
| 178 | !    .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 179 | ! | 
|---|
| 180 | !     zx_tmp_2d(1:iip1,1:jjp1)=iflag_con | 
|---|
| 181 | !     CALL histwrite(nid_ctesGCM, "iflag_con", itau_w, | 
|---|
| 182 | !    .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 183 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 
|---|
| 184 | c | 
|---|
| 185 |       zx_tmp_2d(1:iip1,1:jjp1)=clon | 
|---|
| 186 |       CALL histwrite(nid_ctesGCM, "clon", itau_w, | 
|---|
| 187 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 188 | c | 
|---|
| 189 |       zx_tmp_2d(1:iip1,1:jjp1)=clat | 
|---|
| 190 |       CALL histwrite(nid_ctesGCM, "clat", itau_w, | 
|---|
| 191 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 192 | c | 
|---|
| 193 |       zx_tmp_2d(1:iip1,1:jjp1)=grossismx | 
|---|
| 194 |       CALL histwrite(nid_ctesGCM, "grossismx", itau_w, | 
|---|
| 195 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 196 | c | 
|---|
| 197 |       zx_tmp_2d(1:iip1,1:jjp1)=grossismy | 
|---|
| 198 |       CALL histwrite(nid_ctesGCM, "grossismy", itau_w, | 
|---|
| 199 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 200 | c | 
|---|
| 201 |       IF(fxyhypb) THEN | 
|---|
| 202 |        zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 203 |       ELSE | 
|---|
| 204 |        zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 205 |       ENDIF | 
|---|
| 206 |       CALL histwrite(nid_ctesGCM, "fxyhypb", itau_w, | 
|---|
| 207 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 208 | c | 
|---|
| 209 |       zx_tmp_2d(1:iip1,1:jjp1)=dzoomx | 
|---|
| 210 |       CALL histwrite(nid_ctesGCM, "dzoomx", itau_w, | 
|---|
| 211 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 212 | c | 
|---|
| 213 |       zx_tmp_2d(1:iip1,1:jjp1)=dzoomy | 
|---|
| 214 |       CALL histwrite(nid_ctesGCM, "dzoomy", itau_w, | 
|---|
| 215 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 216 | c | 
|---|
| 217 |       zx_tmp_2d(1:iip1,1:jjp1)=taux | 
|---|
| 218 |       CALL histwrite(nid_ctesGCM, "taux", itau_w, | 
|---|
| 219 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 220 | c | 
|---|
| 221 |       zx_tmp_2d(1:iip1,1:jjp1)=tauy | 
|---|
| 222 |       CALL histwrite(nid_ctesGCM, "tauy", itau_w, | 
|---|
| 223 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 224 | c | 
|---|
| 225 |       IF(ysinus) THEN | 
|---|
| 226 |        zx_tmp_2d(1:iip1,1:jjp1)=1. | 
|---|
| 227 |       ELSE | 
|---|
| 228 |        zx_tmp_2d(1:iip1,1:jjp1)=0. | 
|---|
| 229 |       ENDIF | 
|---|
| 230 |       CALL histwrite(nid_ctesGCM, "ysinus", itau_w, | 
|---|
| 231 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 232 | c | 
|---|
| 233 |       zx_tmp_2d(1:iip1,1:jjp1)=ip_ebil_dyn | 
|---|
| 234 |       CALL histwrite(nid_ctesGCM, "ip_ebil_dyn", itau_w, | 
|---|
| 235 |      .               zx_tmp_2d,iip1*jjp1,ndex2d) | 
|---|
| 236 | c | 
|---|
| 237 | c================================================================= | 
|---|
| 238 | c | 
|---|
| 239 |       if (ok_sync) then | 
|---|
| 240 |         call histsync(nid_ctesGCM) | 
|---|
| 241 |       endif | 
|---|
| 242 | c | 
|---|
| 243 | c================================================================= | 
|---|