[907] | 1 | itau_w = itau_phy + itap |
---|
| 2 | |
---|
| 3 | DO iff=1,nfiles |
---|
| 4 | |
---|
| 5 | IF (clef_files(iff)) THEN |
---|
| 6 | ndex2d = 0 |
---|
| 7 | ndex3d = 0 |
---|
| 8 | |
---|
| 9 | !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[1146] | 10 | IF (o_phis%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 11 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 12 | $ o_phis%name,itau_w,pphis) |
---|
[907] | 13 | ENDIF |
---|
| 14 | |
---|
[1146] | 15 | IF (o_aire%flag(iff)<=lev_files(iff)) THEN |
---|
| 16 | CALL histwrite_phy(nid_files(iff),o_aire%name,itau_w,airephy) |
---|
[907] | 17 | ENDIF |
---|
| 18 | |
---|
[1146] | 19 | IF (o_contfracATM%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 20 | DO i=1, klon |
---|
| 21 | zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic) |
---|
| 22 | ENDDO |
---|
| 23 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 24 | $ o_contfracATM%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 25 | ENDIF |
---|
| 26 | |
---|
[1146] | 27 | IF (o_contfracOR%flag(iff)<=lev_files(iff)) THEN |
---|
| 28 | CALL histwrite_phy(nid_files(iff),o_contfracOR%name,itau_w, |
---|
[996] | 29 | $ pctsrf(:,is_ter)) |
---|
[907] | 30 | ENDIF |
---|
| 31 | |
---|
[1146] | 32 | IF (o_aireTER%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 33 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 34 | $ o_aireTER%name,itau_w,paire_ter) |
---|
[907] | 35 | ENDIF |
---|
| 36 | |
---|
| 37 | !!! Champs 2D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 38 | |
---|
[1146] | 39 | IF (o_flat%flag(iff)<=lev_files(iff)) THEN |
---|
| 40 | CALL histwrite_phy(nid_files(iff),o_flat%name,itau_w,zxfluxlat) |
---|
[907] | 41 | ENDIF |
---|
| 42 | |
---|
[1146] | 43 | IF (o_slp%flag(iff)<=lev_files(iff)) THEN |
---|
| 44 | CALL histwrite_phy(nid_files(iff),o_slp%name,itau_w,slp) |
---|
[907] | 45 | ENDIF |
---|
| 46 | |
---|
[1146] | 47 | IF (o_tsol%flag(iff)<=lev_files(iff)) THEN |
---|
| 48 | CALL histwrite_phy(nid_files(iff),o_tsol%name,itau_w,zxtsol) |
---|
[907] | 49 | ENDIF |
---|
| 50 | |
---|
[1146] | 51 | IF (o_t2m%flag(iff)<=lev_files(iff)) THEN |
---|
| 52 | CALL histwrite_phy(nid_files(iff),o_t2m%name,itau_w,zt2m) |
---|
[907] | 53 | ENDIF |
---|
| 54 | |
---|
[1146] | 55 | IF (o_t2m_min%flag(iff)<=lev_files(iff)) THEN |
---|
| 56 | CALL histwrite_phy(nid_files(iff),o_t2m_min%name,itau_w,zt2m) |
---|
[907] | 57 | ENDIF |
---|
| 58 | |
---|
[1146] | 59 | IF (o_t2m_max%flag(iff)<=lev_files(iff)) THEN |
---|
| 60 | CALL histwrite_phy(nid_files(iff),o_t2m_max%name,itau_w,zt2m) |
---|
[907] | 61 | ENDIF |
---|
| 62 | |
---|
[1146] | 63 | IF (o_wind10m%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 64 | DO i=1, klon |
---|
| 65 | zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) |
---|
| 66 | ENDDO |
---|
[1146] | 67 | CALL histwrite_phy(nid_files(iff), |
---|
| 68 | s o_wind10m%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 69 | ENDIF |
---|
| 70 | |
---|
[1146] | 71 | IF (o_wind10max%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 72 | DO i=1, klon |
---|
| 73 | zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) |
---|
| 74 | ENDDO |
---|
[1146] | 75 | CALL histwrite_phy(nid_files(iff),o_wind10max%name, |
---|
[907] | 76 | $ itau_w,zx_tmp_fi2d) |
---|
| 77 | ENDIF |
---|
| 78 | |
---|
[1146] | 79 | IF (o_sicf%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 80 | DO i = 1, klon |
---|
| 81 | zx_tmp_fi2d(i) = pctsrf(i,is_sic) |
---|
| 82 | ENDDO |
---|
[1146] | 83 | CALL histwrite_phy(nid_files(iff), |
---|
| 84 | $ o_sicf%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 85 | ENDIF |
---|
| 86 | |
---|
[1146] | 87 | IF (o_q2m%flag(iff)<=lev_files(iff)) THEN |
---|
| 88 | CALL histwrite_phy(nid_files(iff),o_q2m%name,itau_w,zq2m) |
---|
[907] | 89 | ENDIF |
---|
| 90 | |
---|
[1146] | 91 | IF (o_u10m%flag(iff)<=lev_files(iff)) THEN |
---|
| 92 | CALL histwrite_phy(nid_files(iff),o_u10m%name,itau_w,zu10m) |
---|
[907] | 93 | ENDIF |
---|
| 94 | |
---|
[1146] | 95 | IF (o_v10m%flag(iff)<=lev_files(iff)) THEN |
---|
| 96 | CALL histwrite_phy(nid_files(iff),o_v10m%name,itau_w,zv10m) |
---|
[907] | 97 | ENDIF |
---|
| 98 | |
---|
[1146] | 99 | IF (o_psol%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 100 | DO i = 1, klon |
---|
| 101 | zx_tmp_fi2d(i) = paprs(i,1) |
---|
| 102 | ENDDO |
---|
[1146] | 103 | CALL histwrite_phy(nid_files(iff), |
---|
| 104 | s o_psol%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 105 | ENDIF |
---|
| 106 | |
---|
[1146] | 107 | IF (o_qsurf%flag(iff)<=lev_files(iff)) THEN |
---|
| 108 | CALL histwrite_phy(nid_files(iff),o_qsurf%name,itau_w,zxqsurf) |
---|
[907] | 109 | ENDIF |
---|
| 110 | |
---|
| 111 | if (.not. ok_veget) then |
---|
[1146] | 112 | IF (o_qsol%flag(iff)<=lev_files(iff)) THEN |
---|
| 113 | CALL histwrite_phy(nid_files(iff),o_qsol%name,itau_w,qsol) |
---|
[907] | 114 | ENDIF |
---|
| 115 | endif |
---|
| 116 | |
---|
[1146] | 117 | IF (o_precip%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 118 | DO i = 1, klon |
---|
| 119 | zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i) |
---|
| 120 | ENDDO |
---|
[1146] | 121 | CALL histwrite_phy(nid_files(iff),o_precip%name, |
---|
| 122 | s itau_w,zx_tmp_fi2d) |
---|
[907] | 123 | ENDIF |
---|
| 124 | |
---|
[1146] | 125 | IF (o_ndayrain%flag(iff)<=lev_files(iff)) THEN |
---|
| 126 | CALL histwrite_phy(nid_files(iff),o_ndayrain%name, |
---|
| 127 | s itau_w,nday_rain) |
---|
[907] | 128 | ENDIF |
---|
| 129 | |
---|
[1146] | 130 | IF (o_plul%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 131 | DO i = 1, klon |
---|
| 132 | zx_tmp_fi2d(i) = rain_lsc(i) + snow_lsc(i) |
---|
| 133 | ENDDO |
---|
[1146] | 134 | CALL histwrite_phy(nid_files(iff),o_plul%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 135 | ENDIF |
---|
| 136 | |
---|
[1146] | 137 | IF (o_pluc%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 138 | DO i = 1, klon |
---|
| 139 | zx_tmp_fi2d(i) = rain_con(i) + snow_con(i) |
---|
| 140 | ENDDO |
---|
[1146] | 141 | CALL histwrite_phy(nid_files(iff),o_pluc%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 142 | ENDIF |
---|
| 143 | |
---|
[1146] | 144 | IF (o_snow%flag(iff)<=lev_files(iff)) THEN |
---|
| 145 | CALL histwrite_phy(nid_files(iff),o_snow%name,itau_w,snow_fall) |
---|
[907] | 146 | ENDIF |
---|
| 147 | |
---|
[1347] | 148 | IF (o_msnow%flag(iff)<=lev_files(iff)) THEN |
---|
| 149 | CALL histwrite_phy(nid_files(iff),o_msnow%name,itau_w,snow_o) |
---|
| 150 | ENDIF |
---|
| 151 | |
---|
| 152 | IF (o_fsnow%flag(iff)<=lev_files(iff)) THEN |
---|
| 153 | CALL histwrite_phy(nid_files(iff),o_fsnow%name,itau_w,zfra_o) |
---|
| 154 | ENDIF |
---|
| 155 | |
---|
[1146] | 156 | IF (o_evap%flag(iff)<=lev_files(iff)) THEN |
---|
| 157 | CALL histwrite_phy(nid_files(iff),o_evap%name,itau_w,evap) |
---|
[907] | 158 | ENDIF |
---|
| 159 | |
---|
[1146] | 160 | IF (o_tops%flag(iff)<=lev_files(iff)) THEN |
---|
| 161 | CALL histwrite_phy(nid_files(iff),o_tops%name,itau_w,topsw) |
---|
[907] | 162 | ENDIF |
---|
| 163 | |
---|
[1146] | 164 | IF (o_tops0%flag(iff)<=lev_files(iff)) THEN |
---|
| 165 | CALL histwrite_phy(nid_files(iff),o_tops0%name,itau_w,topsw0) |
---|
[907] | 166 | ENDIF |
---|
| 167 | |
---|
[1146] | 168 | IF (o_topl%flag(iff)<=lev_files(iff)) THEN |
---|
| 169 | CALL histwrite_phy(nid_files(iff),o_topl%name,itau_w,toplw) |
---|
[907] | 170 | ENDIF |
---|
| 171 | |
---|
[1146] | 172 | IF (o_topl0%flag(iff)<=lev_files(iff)) THEN |
---|
| 173 | CALL histwrite_phy(nid_files(iff),o_topl0%name,itau_w,toplw0) |
---|
[907] | 174 | ENDIF |
---|
| 175 | |
---|
[1146] | 176 | IF (o_SWupTOA%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 177 | zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, klevp1 ) |
---|
[1146] | 178 | CALL histwrite_phy(nid_files(iff),o_SWupTOA%name, |
---|
| 179 | s itau_w,zx_tmp_fi2d) |
---|
[907] | 180 | ENDIF |
---|
| 181 | |
---|
[1146] | 182 | IF (o_SWupTOAclr%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 183 | zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, klevp1 ) |
---|
| 184 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 185 | $ o_SWupTOAclr%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 186 | ENDIF |
---|
| 187 | |
---|
[1146] | 188 | IF (o_SWdnTOA%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 189 | zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, klevp1 ) |
---|
[1146] | 190 | CALL histwrite_phy(nid_files(iff), |
---|
| 191 | s o_SWdnTOA%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 192 | ENDIF |
---|
| 193 | |
---|
[1146] | 194 | IF (o_SWdnTOAclr%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 195 | zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, klevp1 ) |
---|
| 196 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 197 | $ o_SWdnTOAclr%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 198 | ENDIF |
---|
| 199 | |
---|
[1347] | 200 | IF (o_nettop%flag(iff)<=lev_files(iff)) THEN |
---|
| 201 | zx_tmp_fi2d(:) = topsw(:)-toplw(:) |
---|
| 202 | CALL histwrite_phy(nid_files(iff), |
---|
| 203 | $ o_nettop%name,itau_w,zx_tmp_fi2d) |
---|
| 204 | ENDIF |
---|
| 205 | |
---|
[1146] | 206 | IF (o_SWup200%flag(iff)<=lev_files(iff)) THEN |
---|
| 207 | CALL histwrite_phy(nid_files(iff),o_SWup200%name,itau_w,SWup200) |
---|
[907] | 208 | ENDIF |
---|
| 209 | |
---|
[1146] | 210 | IF (o_SWup200clr%flag(iff)<=lev_files(iff)) THEN |
---|
| 211 | CALL histwrite_phy(nid_files(iff), |
---|
| 212 | s o_SWup200clr%name,itau_w,SWup200clr) |
---|
[907] | 213 | ENDIF |
---|
| 214 | |
---|
[1146] | 215 | IF (o_SWdn200%flag(iff)<=lev_files(iff)) THEN |
---|
| 216 | CALL histwrite_phy(nid_files(iff),o_SWdn200%name,itau_w,SWdn200) |
---|
[907] | 217 | ENDIF |
---|
| 218 | |
---|
[1146] | 219 | IF (o_SWdn200clr%flag(iff)<=lev_files(iff)) THEN |
---|
| 220 | CALL histwrite_phy(nid_files(iff), |
---|
| 221 | s o_SWdn200clr%name,itau_w,SWdn200clr) |
---|
[907] | 222 | ENDIF |
---|
| 223 | |
---|
[1146] | 224 | IF (o_LWup200%flag(iff)<=lev_files(iff)) THEN |
---|
| 225 | CALL histwrite_phy(nid_files(iff),o_LWup200%name,itau_w,LWup200) |
---|
[907] | 226 | ENDIF |
---|
| 227 | |
---|
[1146] | 228 | IF (o_LWup200clr%flag(iff)<=lev_files(iff)) THEN |
---|
| 229 | CALL histwrite_phy(nid_files(iff), |
---|
| 230 | s o_LWup200clr%name,itau_w,LWup200clr) |
---|
[907] | 231 | ENDIF |
---|
| 232 | |
---|
[1146] | 233 | IF (o_LWdn200%flag(iff)<=lev_files(iff)) THEN |
---|
| 234 | CALL histwrite_phy(nid_files(iff), |
---|
[1279] | 235 | s o_LWdn200%name,itau_w,LWdn200) |
---|
[907] | 236 | ENDIF |
---|
| 237 | |
---|
[1146] | 238 | IF (o_LWdn200clr%flag(iff)<=lev_files(iff)) THEN |
---|
| 239 | CALL histwrite_phy(nid_files(iff), |
---|
[1279] | 240 | s o_LWdn200clr%name,itau_w,LWdn200clr) |
---|
[907] | 241 | ENDIF |
---|
| 242 | |
---|
[1146] | 243 | IF (o_sols%flag(iff)<=lev_files(iff)) THEN |
---|
| 244 | CALL histwrite_phy(nid_files(iff),o_sols%name,itau_w,solsw) |
---|
[907] | 245 | ENDIF |
---|
| 246 | |
---|
[1146] | 247 | IF (o_sols0%flag(iff)<=lev_files(iff)) THEN |
---|
| 248 | CALL histwrite_phy(nid_files(iff),o_sols0%name,itau_w,solsw0) |
---|
[907] | 249 | ENDIF |
---|
| 250 | |
---|
[1146] | 251 | IF (o_soll%flag(iff)<=lev_files(iff)) THEN |
---|
| 252 | CALL histwrite_phy(nid_files(iff),o_soll%name,itau_w,sollw) |
---|
[907] | 253 | ENDIF |
---|
| 254 | |
---|
[1146] | 255 | IF (o_radsol%flag(iff)<=lev_files(iff)) THEN |
---|
| 256 | CALL histwrite_phy(nid_files(iff),o_radsol%name,itau_w,radsol) |
---|
[907] | 257 | ENDIF |
---|
| 258 | |
---|
[1146] | 259 | IF (o_soll0%flag(iff)<=lev_files(iff)) THEN |
---|
| 260 | CALL histwrite_phy(nid_files(iff),o_soll0%name,itau_w,sollw0) |
---|
[907] | 261 | ENDIF |
---|
| 262 | |
---|
[1146] | 263 | IF (o_SWupSFC%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 264 | zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, 1 ) |
---|
[1146] | 265 | CALL histwrite_phy(nid_files(iff), |
---|
| 266 | s o_SWupSFC%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 267 | ENDIF |
---|
| 268 | |
---|
[1146] | 269 | IF (o_SWupSFCclr%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 270 | zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, 1 ) |
---|
| 271 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 272 | $ o_SWupSFCclr%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 273 | ENDIF |
---|
| 274 | |
---|
[1146] | 275 | IF (o_SWdnSFC%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 276 | zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, 1 ) |
---|
| 277 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 278 | $ o_SWdnSFC%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 279 | ENDIF |
---|
| 280 | |
---|
[1146] | 281 | IF (o_SWdnSFCclr%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 282 | zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, 1 ) |
---|
| 283 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 284 | $ o_SWdnSFCclr%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 285 | ENDIF |
---|
| 286 | |
---|
[1146] | 287 | IF (o_LWupSFC%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 288 | zx_tmp_fi2d(1:klon)=sollwdown(1:klon)-sollw(1:klon) |
---|
| 289 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 290 | $ o_LWupSFC%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 291 | ENDIF |
---|
| 292 | |
---|
[1146] | 293 | IF (o_LWdnSFC%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 294 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 295 | $ o_LWdnSFC%name,itau_w,sollwdown) |
---|
[907] | 296 | ENDIF |
---|
| 297 | |
---|
[958] | 298 | sollwdownclr(1:klon) = -1.*lwdn0(1:klon,1) |
---|
[1146] | 299 | IF (o_LWupSFCclr%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 300 | zx_tmp_fi2d(1:klon)=sollwdownclr(1:klon)-sollw0(1:klon) |
---|
| 301 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 302 | $ o_LWupSFCclr%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 303 | ENDIF |
---|
| 304 | |
---|
[1146] | 305 | IF (o_LWdnSFCclr%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 306 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 307 | $ o_LWdnSFCclr%name,itau_w,sollwdownclr) |
---|
[907] | 308 | ENDIF |
---|
| 309 | |
---|
[1146] | 310 | IF (o_bils%flag(iff)<=lev_files(iff)) THEN |
---|
| 311 | CALL histwrite_phy(nid_files(iff),o_bils%name,itau_w,bils) |
---|
[907] | 312 | ENDIF |
---|
| 313 | |
---|
[1146] | 314 | IF (o_sens%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 315 | zx_tmp_fi2d(1:klon)=-1*sens(1:klon) |
---|
[1146] | 316 | CALL histwrite_phy(nid_files(iff),o_sens%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 317 | ENDIF |
---|
| 318 | |
---|
[1146] | 319 | IF (o_fder%flag(iff)<=lev_files(iff)) THEN |
---|
| 320 | CALL histwrite_phy(nid_files(iff),o_fder%name,itau_w,fder) |
---|
[907] | 321 | ENDIF |
---|
| 322 | |
---|
[1146] | 323 | IF (o_ffonte%flag(iff)<=lev_files(iff)) THEN |
---|
| 324 | CALL histwrite_phy(nid_files(iff),o_ffonte%name,itau_w,zxffonte) |
---|
[907] | 325 | ENDIF |
---|
| 326 | |
---|
[1146] | 327 | IF (o_fqcalving%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 328 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 329 | $ o_fqcalving%name,itau_w,zxfqcalving) |
---|
[907] | 330 | ENDIF |
---|
| 331 | |
---|
[1146] | 332 | IF (o_fqfonte%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 333 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 334 | $ o_fqfonte%name,itau_w,zxfqfonte) |
---|
[907] | 335 | ENDIF |
---|
| 336 | |
---|
[1347] | 337 | IF (o_taux%flag(iff)<=lev_files(iff)) THEN |
---|
| 338 | zx_tmp_fi2d=0. |
---|
| 339 | do nsrf=1,nbsrf |
---|
| 340 | zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+pctsrf(:,nsrf)*fluxu(:,1,nsrf) |
---|
| 341 | enddo |
---|
| 342 | CALL histwrite_phy(nid_files(iff), |
---|
| 343 | $ o_taux%name,itau_w,zx_tmp_fi2d) |
---|
| 344 | ENDIF |
---|
| 345 | |
---|
| 346 | IF (o_tauy%flag(iff)<=lev_files(iff)) THEN |
---|
| 347 | zx_tmp_fi2d=0. |
---|
| 348 | do nsrf=1,nbsrf |
---|
| 349 | zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+pctsrf(:,nsrf)*fluxv(:,1,nsrf) |
---|
| 350 | enddo |
---|
| 351 | CALL histwrite_phy(nid_files(iff), |
---|
| 352 | $ o_tauy%name,itau_w,zx_tmp_fi2d) |
---|
| 353 | ENDIF |
---|
| 354 | |
---|
[907] | 355 | DO nsrf = 1, nbsrf |
---|
[1146] | 356 | ! IF(nsrf.GE.2) THEN |
---|
| 357 | IF (o_pourc_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 358 | zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)*100. |
---|
| 359 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 360 | $ o_pourc_srf(nsrf)%name,itau_w, |
---|
[907] | 361 | $ zx_tmp_fi2d) |
---|
| 362 | ENDIF |
---|
| 363 | |
---|
[1146] | 364 | IF (o_fract_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 365 | zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf) |
---|
| 366 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 367 | $ o_fract_srf(nsrf)%name,itau_w, |
---|
| 368 | $ zx_tmp_fi2d) |
---|
[907] | 369 | ENDIF |
---|
[1146] | 370 | ! ENDIF !nsrf.GT.2 |
---|
[907] | 371 | |
---|
[1146] | 372 | IF (o_taux_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 373 | zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf) |
---|
| 374 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 375 | $ o_taux_srf(nsrf)%name,itau_w, |
---|
| 376 | $ zx_tmp_fi2d) |
---|
[907] | 377 | ENDIF |
---|
| 378 | |
---|
[1146] | 379 | IF (o_tauy_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 380 | zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf) |
---|
| 381 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 382 | $ o_tauy_srf(nsrf)%name,itau_w, |
---|
| 383 | $ zx_tmp_fi2d) |
---|
[907] | 384 | ENDIF |
---|
| 385 | |
---|
[1146] | 386 | IF (o_tsol_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 387 | zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf) |
---|
| 388 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 389 | $ o_tsol_srf(nsrf)%name,itau_w, |
---|
[907] | 390 | $ zx_tmp_fi2d) |
---|
| 391 | ENDIF |
---|
| 392 | |
---|
[1146] | 393 | IF (o_u10m_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 394 | zx_tmp_fi2d(1 : klon) = u10m(1 : klon, nsrf) |
---|
[1146] | 395 | CALL histwrite_phy(nid_files(iff),o_u10m_srf(nsrf)%name, |
---|
[907] | 396 | $ itau_w,zx_tmp_fi2d) |
---|
| 397 | ENDIF |
---|
| 398 | |
---|
[1146] | 399 | IF (o_v10m_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 400 | zx_tmp_fi2d(1 : klon) = v10m(1 : klon, nsrf) |
---|
[1146] | 401 | CALL histwrite_phy(nid_files(iff),o_v10m_srf(nsrf)%name, |
---|
[907] | 402 | $ itau_w,zx_tmp_fi2d) |
---|
| 403 | ENDIF |
---|
| 404 | |
---|
[1146] | 405 | IF (o_t2m_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 406 | zx_tmp_fi2d(1 : klon) = t2m(1 : klon, nsrf) |
---|
[1146] | 407 | CALL histwrite_phy(nid_files(iff),o_t2m_srf(nsrf)%name, |
---|
[907] | 408 | $ itau_w,zx_tmp_fi2d) |
---|
| 409 | ENDIF |
---|
| 410 | |
---|
[1347] | 411 | IF (o_evap_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
| 412 | zx_tmp_fi2d(1 : klon) = fevap(1 : klon, nsrf) |
---|
| 413 | CALL histwrite_phy(nid_files(iff),o_evap_srf(nsrf)%name, |
---|
| 414 | $ itau_w,zx_tmp_fi2d) |
---|
| 415 | ENDIF |
---|
| 416 | |
---|
[1146] | 417 | IF (o_sens_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 418 | zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf) |
---|
| 419 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 420 | $ o_sens_srf(nsrf)%name,itau_w, |
---|
[907] | 421 | $ zx_tmp_fi2d) |
---|
| 422 | ENDIF |
---|
| 423 | |
---|
[1146] | 424 | IF (o_lat_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 425 | zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf) |
---|
| 426 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 427 | $ o_lat_srf(nsrf)%name,itau_w, |
---|
[907] | 428 | $ zx_tmp_fi2d) |
---|
| 429 | ENDIF |
---|
| 430 | |
---|
[1146] | 431 | IF (o_flw_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 432 | zx_tmp_fi2d(1 : klon) = fsollw( 1 : klon, nsrf) |
---|
| 433 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 434 | $ o_flw_srf(nsrf)%name,itau_w, |
---|
[907] | 435 | $ zx_tmp_fi2d) |
---|
| 436 | ENDIF |
---|
| 437 | |
---|
[1146] | 438 | IF (o_fsw_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 439 | zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, nsrf) |
---|
| 440 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 441 | $ o_fsw_srf(nsrf)%name,itau_w, |
---|
[907] | 442 | $ zx_tmp_fi2d) |
---|
| 443 | ENDIF |
---|
| 444 | |
---|
[1146] | 445 | IF (o_wbils_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 446 | zx_tmp_fi2d(1 : klon) = wfbils( 1 : klon, nsrf) |
---|
| 447 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 448 | $ o_wbils_srf(nsrf)%name,itau_w, |
---|
[907] | 449 | $ zx_tmp_fi2d) |
---|
| 450 | ENDIF |
---|
| 451 | |
---|
[1146] | 452 | IF (o_wbilo_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 453 | zx_tmp_fi2d(1 : klon) = wfbilo( 1 : klon, nsrf) |
---|
| 454 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 455 | $ o_wbilo_srf(nsrf)%name,itau_w, |
---|
[907] | 456 | $ zx_tmp_fi2d) |
---|
| 457 | ENDIF |
---|
| 458 | |
---|
| 459 | if (iflag_pbl>1 .and. lev_histday.gt.10 ) then |
---|
[1146] | 460 | IF (o_tke_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 461 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 462 | $ o_tke_srf(nsrf)%name,itau_w, |
---|
| 463 | $ pbl_tke(:,1:klev,nsrf)) |
---|
[907] | 464 | ENDIF |
---|
| 465 | |
---|
[1146] | 466 | IF (o_tke_max_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 467 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 468 | $ o_tke_max_srf(nsrf)%name,itau_w, |
---|
[907] | 469 | $ pbl_tke(:,1:klev,nsrf)) |
---|
| 470 | ENDIF |
---|
| 471 | endif |
---|
| 472 | ENDDO |
---|
| 473 | |
---|
[1146] | 474 | IF (o_cdrm%flag(iff)<=lev_files(iff)) THEN |
---|
| 475 | CALL histwrite_phy(nid_files(iff),o_cdrm%name,itau_w,cdragm) |
---|
[907] | 476 | ENDIF |
---|
| 477 | |
---|
[1146] | 478 | IF (o_cdrh%flag(iff)<=lev_files(iff)) THEN |
---|
| 479 | CALL histwrite_phy(nid_files(iff),o_cdrh%name,itau_w,cdragh) |
---|
[907] | 480 | ENDIF |
---|
| 481 | |
---|
[1146] | 482 | IF (o_cldl%flag(iff)<=lev_files(iff)) THEN |
---|
| 483 | CALL histwrite_phy(nid_files(iff),o_cldl%name,itau_w,cldl) |
---|
[907] | 484 | ENDIF |
---|
| 485 | |
---|
[1146] | 486 | IF (o_cldm%flag(iff)<=lev_files(iff)) THEN |
---|
| 487 | CALL histwrite_phy(nid_files(iff),o_cldm%name,itau_w,cldm) |
---|
[907] | 488 | ENDIF |
---|
| 489 | |
---|
[1146] | 490 | IF (o_cldh%flag(iff)<=lev_files(iff)) THEN |
---|
| 491 | CALL histwrite_phy(nid_files(iff),o_cldh%name,itau_w,cldh) |
---|
[907] | 492 | ENDIF |
---|
| 493 | |
---|
[1146] | 494 | IF (o_cldt%flag(iff)<=lev_files(iff)) THEN |
---|
| 495 | CALL histwrite_phy(nid_files(iff),o_cldt%name, |
---|
[1285] | 496 | & itau_w,cldt) |
---|
[907] | 497 | ENDIF |
---|
| 498 | |
---|
[1146] | 499 | IF (o_cldq%flag(iff)<=lev_files(iff)) THEN |
---|
| 500 | CALL histwrite_phy(nid_files(iff),o_cldq%name,itau_w,cldq) |
---|
[907] | 501 | ENDIF |
---|
| 502 | |
---|
[1146] | 503 | IF (o_lwp%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 504 | zx_tmp_fi2d(1:klon) = flwp(1:klon) |
---|
[1146] | 505 | CALL histwrite_phy(nid_files(iff), |
---|
| 506 | s o_lwp%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 507 | ENDIF |
---|
| 508 | |
---|
[1146] | 509 | IF (o_iwp%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 510 | zx_tmp_fi2d(1:klon) = fiwp(1:klon) |
---|
[1146] | 511 | CALL histwrite_phy(nid_files(iff), |
---|
| 512 | s o_iwp%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 513 | ENDIF |
---|
| 514 | |
---|
[1146] | 515 | IF (o_ue%flag(iff)<=lev_files(iff)) THEN |
---|
| 516 | CALL histwrite_phy(nid_files(iff),o_ue%name,itau_w,ue) |
---|
[907] | 517 | ENDIF |
---|
| 518 | |
---|
[1146] | 519 | IF (o_ve%flag(iff)<=lev_files(iff)) THEN |
---|
| 520 | CALL histwrite_phy(nid_files(iff),o_ve%name,itau_w,ve) |
---|
[907] | 521 | ENDIF |
---|
| 522 | |
---|
[1146] | 523 | IF (o_uq%flag(iff)<=lev_files(iff)) THEN |
---|
| 524 | CALL histwrite_phy(nid_files(iff),o_uq%name,itau_w,uq) |
---|
[907] | 525 | ENDIF |
---|
| 526 | |
---|
[1146] | 527 | IF (o_vq%flag(iff)<=lev_files(iff)) THEN |
---|
| 528 | CALL histwrite_phy(nid_files(iff),o_vq%name,itau_w,vq) |
---|
[907] | 529 | ENDIF |
---|
| 530 | |
---|
| 531 | IF(iflag_con.GE.3) THEN ! sb |
---|
[1146] | 532 | IF (o_cape%flag(iff)<=lev_files(iff)) THEN |
---|
| 533 | CALL histwrite_phy(nid_files(iff),o_cape%name,itau_w,cape) |
---|
[907] | 534 | ENDIF |
---|
| 535 | |
---|
[1146] | 536 | IF (o_pbase%flag(iff)<=lev_files(iff)) THEN |
---|
| 537 | CALL histwrite_phy(nid_files(iff),o_pbase%name,itau_w,pbase) |
---|
[907] | 538 | ENDIF |
---|
| 539 | |
---|
[1146] | 540 | IF (o_ptop%flag(iff)<=lev_files(iff)) THEN |
---|
| 541 | CALL histwrite_phy(nid_files(iff),o_ptop%name,itau_w,ema_pct) |
---|
[907] | 542 | ENDIF |
---|
| 543 | |
---|
[1146] | 544 | IF (o_fbase%flag(iff)<=lev_files(iff)) THEN |
---|
| 545 | CALL histwrite_phy(nid_files(iff),o_fbase%name,itau_w,ema_cbmf) |
---|
[907] | 546 | ENDIF |
---|
| 547 | |
---|
[1146] | 548 | IF (o_prw%flag(iff)<=lev_files(iff)) THEN |
---|
| 549 | CALL histwrite_phy(nid_files(iff),o_prw%name,itau_w,prw) |
---|
[907] | 550 | ENDIF |
---|
[1100] | 551 | |
---|
[1146] | 552 | IF (o_cape_max%flag(iff)<=lev_files(iff)) THEN |
---|
| 553 | CALL histwrite_phy(nid_files(iff),o_cape_max%name,itau_w,cape) |
---|
[1100] | 554 | ENDIF |
---|
| 555 | |
---|
[1146] | 556 | IF (o_upwd%flag(iff)<=lev_files(iff)) THEN |
---|
| 557 | CALL histwrite_phy(nid_files(iff),o_upwd%name,itau_w,upwd) |
---|
| 558 | ENDIF |
---|
| 559 | |
---|
| 560 | IF (o_Ma%flag(iff)<=lev_files(iff)) THEN |
---|
| 561 | CALL histwrite_phy(nid_files(iff),o_Ma%name,itau_w,Ma) |
---|
| 562 | ENDIF |
---|
| 563 | |
---|
| 564 | IF (o_dnwd%flag(iff)<=lev_files(iff)) THEN |
---|
| 565 | CALL histwrite_phy(nid_files(iff),o_dnwd%name,itau_w,dnwd) |
---|
| 566 | ENDIF |
---|
| 567 | |
---|
| 568 | IF (o_dnwd0%flag(iff)<=lev_files(iff)) THEN |
---|
| 569 | CALL histwrite_phy(nid_files(iff),o_dnwd0%name,itau_w,dnwd0) |
---|
| 570 | ENDIF |
---|
| 571 | |
---|
[1347] | 572 | IF (o_ftime_con%flag(iff)<=lev_files(iff)) THEN |
---|
| 573 | zx_tmp_fi2d=float(itau_con)/float(itap) |
---|
| 574 | CALL histwrite_phy(nid_files(iff),o_ftime_con%name, |
---|
| 575 | s itau_w,zx_tmp_fi2d) |
---|
| 576 | ENDIF |
---|
| 577 | |
---|
| 578 | IF (o_mc%flag(iff)<=lev_files(iff)) THEN |
---|
| 579 | if(iflag_thermals.gt.1)then |
---|
| 580 | zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm |
---|
| 581 | else |
---|
| 582 | zx_tmp_fi3d=dnwd+dnwd0+upwd |
---|
| 583 | endif |
---|
| 584 | CALL histwrite_phy(nid_files(iff),o_mc%name,itau_w,zx_tmp_fi3d) |
---|
| 585 | ENDIF |
---|
| 586 | |
---|
[907] | 587 | ENDIF !iflag_con .GE. 3 |
---|
| 588 | |
---|
[1146] | 589 | IF (o_s_pblh%flag(iff)<=lev_files(iff)) THEN |
---|
| 590 | CALL histwrite_phy(nid_files(iff),o_s_pblh%name,itau_w,s_pblh) |
---|
[907] | 591 | ENDIF |
---|
| 592 | |
---|
[1146] | 593 | IF (o_s_pblt%flag(iff)<=lev_files(iff)) THEN |
---|
| 594 | CALL histwrite_phy(nid_files(iff),o_s_pblt%name,itau_w,s_pblt) |
---|
[907] | 595 | ENDIF |
---|
| 596 | |
---|
[1146] | 597 | IF (o_s_lcl%flag(iff)<=lev_files(iff)) THEN |
---|
| 598 | CALL histwrite_phy(nid_files(iff),o_s_lcl%name,itau_w,s_lcl) |
---|
[907] | 599 | ENDIF |
---|
| 600 | |
---|
[1146] | 601 | IF (o_s_capCL%flag(iff)<=lev_files(iff)) THEN |
---|
| 602 | CALL histwrite_phy(nid_files(iff),o_s_capCL%name,itau_w,s_capCL) |
---|
[907] | 603 | ENDIF |
---|
| 604 | |
---|
[1146] | 605 | IF (o_s_oliqCL%flag(iff)<=lev_files(iff)) THEN |
---|
| 606 | CALL histwrite_phy(nid_files(iff),o_s_oliqCL%name,itau_w,s_oliqCL) |
---|
[907] | 607 | ENDIF |
---|
| 608 | |
---|
[1146] | 609 | IF (o_s_cteiCL%flag(iff)<=lev_files(iff)) THEN |
---|
| 610 | CALL histwrite_phy(nid_files(iff),o_s_cteiCL%name,itau_w,s_cteiCL) |
---|
[907] | 611 | ENDIF |
---|
| 612 | |
---|
[1146] | 613 | IF (o_s_therm%flag(iff)<=lev_files(iff)) THEN |
---|
| 614 | CALL histwrite_phy(nid_files(iff),o_s_therm%name,itau_w,s_therm) |
---|
[907] | 615 | ENDIF |
---|
| 616 | |
---|
[1146] | 617 | IF (o_s_trmb1%flag(iff)<=lev_files(iff)) THEN |
---|
| 618 | CALL histwrite_phy(nid_files(iff),o_s_trmb1%name,itau_w,s_trmb1) |
---|
[907] | 619 | ENDIF |
---|
| 620 | |
---|
[1146] | 621 | IF (o_s_trmb2%flag(iff)<=lev_files(iff)) THEN |
---|
| 622 | CALL histwrite_phy(nid_files(iff),o_s_trmb2%name,itau_w,s_trmb2) |
---|
[907] | 623 | ENDIF |
---|
| 624 | |
---|
[1146] | 625 | IF (o_s_trmb3%flag(iff)<=lev_files(iff)) THEN |
---|
| 626 | CALL histwrite_phy(nid_files(iff),o_s_trmb3%name,itau_w,s_trmb3) |
---|
[907] | 627 | ENDIF |
---|
| 628 | |
---|
| 629 | ! Champs interpolles sur des niveaux de pression |
---|
| 630 | |
---|
[1146] | 631 | ll=0 |
---|
[907] | 632 | DO k=1, nlevSTD |
---|
[1279] | 633 | ! IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k) |
---|
| 634 | ! IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k) |
---|
| 635 | bb2=clevSTD(k) |
---|
[907] | 636 | IF(bb2.EQ."850".OR.bb2.EQ."700".OR. |
---|
[1279] | 637 | $ bb2.EQ."500".OR.bb2.EQ."200".OR. |
---|
| 638 | $ bb2.EQ."50".OR.bb2.EQ."10") THEN |
---|
[907] | 639 | |
---|
| 640 | ! a refaire correctement !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[1146] | 641 | ll=ll+1 |
---|
| 642 | IF (o_uSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN |
---|
| 643 | CALL histwrite_phy(nid_files(iff),o_uSTDlevs(ll)%name, |
---|
| 644 | & itau_w,uwriteSTD(:,k,iff)) |
---|
[907] | 645 | ENDIF |
---|
| 646 | |
---|
[1146] | 647 | IF (o_vSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN |
---|
| 648 | CALL histwrite_phy(nid_files(iff),o_vSTDlevs(ll)%name, |
---|
| 649 | & itau_w,vwriteSTD(:,k,iff)) |
---|
[907] | 650 | ENDIF |
---|
| 651 | |
---|
[1146] | 652 | IF (o_wSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN |
---|
| 653 | CALL histwrite_phy(nid_files(iff),o_wSTDlevs(ll)%name, |
---|
| 654 | & itau_w,wwriteSTD(:,k,iff)) |
---|
[907] | 655 | ENDIF |
---|
| 656 | |
---|
[1146] | 657 | IF (o_phiSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN |
---|
| 658 | CALL histwrite_phy(nid_files(iff),o_phiSTDlevs(ll)%name, |
---|
[1055] | 659 | & itau_w,phiwriteSTD(:,k,iff)) |
---|
[907] | 660 | ENDIF |
---|
| 661 | |
---|
[1146] | 662 | IF (o_qSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN |
---|
| 663 | CALL histwrite_phy(nid_files(iff),o_qSTDlevs(ll)%name, |
---|
| 664 | & itau_w, qwriteSTD(:,k,iff)) |
---|
[907] | 665 | ENDIF |
---|
| 666 | |
---|
[1146] | 667 | IF (o_tSTDlevs(ll)%flag(iff)<=lev_files(iff)) THEN |
---|
| 668 | CALL histwrite_phy(nid_files(iff),o_tSTDlevs(ll)%name, |
---|
| 669 | & itau_w, twriteSTD(:,k,iff)) |
---|
[907] | 670 | ENDIF |
---|
| 671 | |
---|
| 672 | ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. |
---|
| 673 | ENDDO |
---|
| 674 | |
---|
[1146] | 675 | IF (o_t_oce_sic%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 676 | DO i=1, klon |
---|
| 677 | IF (pctsrf(i,is_oce).GT.epsfra.OR. |
---|
| 678 | $ pctsrf(i,is_sic).GT.epsfra) THEN |
---|
| 679 | zx_tmp_fi2d(i) = (ftsol(i, is_oce) * pctsrf(i,is_oce)+ |
---|
| 680 | $ ftsol(i, is_sic) * pctsrf(i,is_sic))/ |
---|
| 681 | $ (pctsrf(i,is_oce)+pctsrf(i,is_sic)) |
---|
| 682 | ELSE |
---|
| 683 | zx_tmp_fi2d(i) = 273.15 |
---|
| 684 | ENDIF |
---|
| 685 | ENDDO |
---|
[1146] | 686 | CALL histwrite_phy(nid_files(iff), |
---|
| 687 | s o_t_oce_sic%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 688 | ENDIF |
---|
| 689 | |
---|
[1146] | 690 | ! Couplage convection-couche limite |
---|
| 691 | IF (iflag_con.GE.3) THEN |
---|
[951] | 692 | IF (iflag_coupl.EQ.1) THEN |
---|
[1146] | 693 | IF (o_ale_bl%flag(iff)<=lev_files(iff)) THEN |
---|
| 694 | CALL histwrite_phy(nid_files(iff),o_ale_bl%name,itau_w,ale_bl) |
---|
[951] | 695 | ENDIF |
---|
[1146] | 696 | IF (o_alp_bl%flag(iff)<=lev_files(iff)) THEN |
---|
| 697 | CALL histwrite_phy(nid_files(iff),o_alp_bl%name,itau_w,alp_bl) |
---|
[951] | 698 | ENDIF |
---|
| 699 | ENDIF !iflag_coupl.EQ.1 |
---|
[1146] | 700 | ENDIF !(iflag_con.GE.3) |
---|
[951] | 701 | |
---|
[1146] | 702 | ! Wakes |
---|
| 703 | IF (iflag_con.EQ.3) THEN |
---|
[951] | 704 | IF (iflag_wake.EQ.1) THEN |
---|
[1146] | 705 | IF (o_ale_wk%flag(iff)<=lev_files(iff)) THEN |
---|
| 706 | CALL histwrite_phy(nid_files(iff),o_ale_wk%name,itau_w,ale_wake) |
---|
[951] | 707 | ENDIF |
---|
[1146] | 708 | IF (o_alp_wk%flag(iff)<=lev_files(iff)) THEN |
---|
| 709 | CALL histwrite_phy(nid_files(iff),o_alp_wk%name,itau_w,alp_wake) |
---|
[951] | 710 | ENDIF |
---|
[973] | 711 | |
---|
[1146] | 712 | IF (o_ale%flag(iff)<=lev_files(iff)) THEN |
---|
| 713 | CALL histwrite_phy(nid_files(iff),o_ale%name,itau_w,ale) |
---|
[973] | 714 | ENDIF |
---|
[1146] | 715 | IF (o_alp%flag(iff)<=lev_files(iff)) THEN |
---|
| 716 | CALL histwrite_phy(nid_files(iff),o_alp%name,itau_w,alp) |
---|
[1063] | 717 | ENDIF |
---|
[1146] | 718 | IF (o_cin%flag(iff)<=lev_files(iff)) THEN |
---|
| 719 | CALL histwrite_phy(nid_files(iff),o_cin%name,itau_w,cin) |
---|
| 720 | ENDIF |
---|
| 721 | IF (o_wape%flag(iff)<=lev_files(iff)) THEN |
---|
| 722 | CALL histwrite_phy(nid_files(iff),o_WAPE%name,itau_w,wake_pe) |
---|
| 723 | ENDIF |
---|
| 724 | IF (o_wake_h%flag(iff)<=lev_files(iff)) THEN |
---|
| 725 | CALL histwrite_phy(nid_files(iff),o_wake_h%name,itau_w,wake_h) |
---|
| 726 | ENDIF |
---|
[1063] | 727 | |
---|
[1146] | 728 | IF (o_wake_s%flag(iff)<=lev_files(iff)) THEN |
---|
| 729 | CALL histwrite_phy(nid_files(iff),o_wake_s%name,itau_w,wake_s) |
---|
[1063] | 730 | ENDIF |
---|
| 731 | |
---|
[1146] | 732 | IF (o_wake_deltat%flag(iff)<=lev_files(iff)) THEN |
---|
| 733 | CALL histwrite_phy(nid_files(iff),o_wake_deltat%name, |
---|
[1063] | 734 | $ itau_w,wake_deltat) |
---|
| 735 | ENDIF |
---|
| 736 | |
---|
[1146] | 737 | IF (o_wake_deltaq%flag(iff)<=lev_files(iff)) THEN |
---|
| 738 | CALL histwrite_phy(nid_files(iff),o_wake_deltaq%name, |
---|
[1063] | 739 | $ itau_w,wake_deltaq) |
---|
| 740 | ENDIF |
---|
| 741 | |
---|
[1146] | 742 | IF (o_wake_omg%flag(iff)<=lev_files(iff)) THEN |
---|
| 743 | CALL histwrite_phy(nid_files(iff), |
---|
| 744 | s o_wake_omg%name,itau_w,wake_omg) |
---|
[1063] | 745 | ENDIF |
---|
[1146] | 746 | |
---|
| 747 | IF (o_dtwak%flag(iff)<=lev_files(iff)) THEN |
---|
| 748 | zx_tmp_fi3d(1:klon,1:klev)=d_t_wake(1:klon,1:klev) |
---|
[1100] | 749 | & /pdtphys |
---|
[1146] | 750 | CALL histwrite_phy(nid_files(iff), |
---|
| 751 | & o_dtwak%name,itau_w,zx_tmp_fi3d) |
---|
| 752 | ENDIF |
---|
| 753 | |
---|
| 754 | IF (o_dqwak%flag(iff)<=lev_files(iff)) THEN |
---|
| 755 | zx_tmp_fi3d(1:klon,1:klev)=d_q_wake(1:klon,1:klev)/pdtphys |
---|
| 756 | CALL histwrite_phy(nid_files(iff), |
---|
| 757 | & o_dqwak%name,itau_w,zx_tmp_fi3d) |
---|
[1100] | 758 | ENDIF |
---|
[1146] | 759 | ENDIF ! iflag_wake.EQ.1 |
---|
[1063] | 760 | |
---|
[1146] | 761 | IF (o_Vprecip%flag(iff)<=lev_files(iff)) THEN |
---|
| 762 | CALL histwrite_phy(nid_files(iff),o_Vprecip%name,itau_w,Vprecip) |
---|
[1063] | 763 | ENDIF |
---|
| 764 | |
---|
[1146] | 765 | IF (o_ftd%flag(iff)<=lev_files(iff)) THEN |
---|
| 766 | CALL histwrite_phy(nid_files(iff),o_ftd%name,itau_w,ftd) |
---|
[1063] | 767 | ENDIF |
---|
| 768 | |
---|
[1146] | 769 | IF (o_fqd%flag(iff)<=lev_files(iff)) THEN |
---|
| 770 | CALL histwrite_phy(nid_files(iff),o_fqd%name,itau_w,fqd) |
---|
[1063] | 771 | ENDIF |
---|
[1100] | 772 | ENDIF !(iflag_con.EQ.3) |
---|
[996] | 773 | |
---|
[1146] | 774 | IF (type_ocean=='slab ') THEN |
---|
| 775 | IF ( o_slab_bils%flag(iff)<=lev_files(iff)) |
---|
[996] | 776 | $ CALL histwrite_phy( |
---|
[1146] | 777 | $ nid_files(iff),o_slab_bils%name,itau_w,slab_wfbils) |
---|
[907] | 778 | |
---|
[996] | 779 | ENDIF !type_ocean == force/slab |
---|
[907] | 780 | |
---|
[1146] | 781 | IF (o_weakinv%flag(iff)<=lev_files(iff)) THEN |
---|
| 782 | CALL histwrite_phy(nid_files(iff), |
---|
| 783 | s o_weakinv%name,itau_w,weak_inversion) |
---|
[907] | 784 | ENDIF |
---|
| 785 | |
---|
[1146] | 786 | IF (o_dthmin%flag(iff)<=lev_files(iff)) THEN |
---|
| 787 | CALL histwrite_phy(nid_files(iff),o_dthmin%name,itau_w,dthmin) |
---|
[907] | 788 | ENDIF |
---|
| 789 | |
---|
[1146] | 790 | IF (o_cldtau%flag(iff)<=lev_files(iff)) THEN |
---|
| 791 | CALL histwrite_phy(nid_files(iff),o_cldtau%name,itau_w,cldtau) |
---|
[907] | 792 | ENDIF |
---|
| 793 | |
---|
[1146] | 794 | IF (o_cldemi%flag(iff)<=lev_files(iff)) THEN |
---|
| 795 | CALL histwrite_phy(nid_files(iff),o_cldemi%name,itau_w,cldemi) |
---|
[907] | 796 | ENDIF |
---|
| 797 | |
---|
[1279] | 798 | IF (o_pr_con_l%flag(iff)<=lev_files(iff)) THEN |
---|
| 799 | CALL histwrite_phy(nid_files(iff), |
---|
| 800 | s o_pr_con_l%name,itau_w,pmflxr(:,1:klev)) |
---|
| 801 | ENDIF |
---|
[929] | 802 | |
---|
[1279] | 803 | IF (o_pr_con_i%flag(iff)<=lev_files(iff)) THEN |
---|
| 804 | CALL histwrite_phy(nid_files(iff), |
---|
| 805 | s o_pr_con_i%name,itau_w,pmflxs(:,1:klev)) |
---|
| 806 | ENDIF |
---|
[929] | 807 | |
---|
[1279] | 808 | IF (o_pr_lsc_l%flag(iff)<=lev_files(iff)) THEN |
---|
| 809 | CALL histwrite_phy(nid_files(iff), |
---|
| 810 | s o_pr_lsc_l%name,itau_w,prfl(:,1:klev)) |
---|
| 811 | ENDIF |
---|
[929] | 812 | |
---|
[1279] | 813 | IF (o_pr_lsc_i%flag(iff)<=lev_files(iff)) THEN |
---|
| 814 | CALL histwrite_phy(nid_files(iff), |
---|
| 815 | s o_pr_lsc_i%name,itau_w,psfl(:,1:klev)) |
---|
| 816 | ENDIF |
---|
[929] | 817 | |
---|
[1284] | 818 | IF (o_re%flag(iff)<=lev_files(iff)) THEN |
---|
| 819 | CALL histwrite_phy(nid_files(iff),o_re%name,itau_w,re) |
---|
| 820 | ENDIF |
---|
[1279] | 821 | |
---|
[1284] | 822 | IF (o_fl%flag(iff)<=lev_files(iff)) THEN |
---|
| 823 | CALL histwrite_phy(nid_files(iff),o_fl%name,itau_w,fl) |
---|
| 824 | ENDIF |
---|
| 825 | |
---|
| 826 | |
---|
| 827 | |
---|
[1146] | 828 | IF (o_rh2m%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 829 | DO i=1, klon |
---|
| 830 | zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) |
---|
| 831 | ENDDO |
---|
[1146] | 832 | CALL histwrite_phy(nid_files(iff),o_rh2m%name,itau_w,zx_tmp_fi2d) |
---|
[907] | 833 | ENDIF |
---|
| 834 | |
---|
[1347] | 835 | IF (o_rh2m_min%flag(iff)<=lev_files(iff)) THEN |
---|
| 836 | DO i=1, klon |
---|
| 837 | zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) |
---|
| 838 | ENDDO |
---|
| 839 | CALL histwrite_phy(nid_files(iff),o_rh2m_min%name, |
---|
| 840 | s itau_w,zx_tmp_fi2d) |
---|
| 841 | ENDIF |
---|
| 842 | |
---|
| 843 | IF (o_rh2m_max%flag(iff)<=lev_files(iff)) THEN |
---|
| 844 | DO i=1, klon |
---|
| 845 | zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) |
---|
| 846 | ENDDO |
---|
| 847 | CALL histwrite_phy(nid_files(iff),o_rh2m_max%name, |
---|
| 848 | s itau_w,zx_tmp_fi2d) |
---|
| 849 | ENDIF |
---|
| 850 | |
---|
| 851 | |
---|
[1146] | 852 | IF (o_qsat2m%flag(iff)<=lev_files(iff)) THEN |
---|
| 853 | CALL histwrite_phy(nid_files(iff),o_qsat2m%name,itau_w,qsat2m) |
---|
[907] | 854 | ENDIF |
---|
| 855 | |
---|
[1146] | 856 | IF (o_tpot%flag(iff)<=lev_files(iff)) THEN |
---|
| 857 | CALL histwrite_phy(nid_files(iff),o_tpot%name,itau_w,tpot) |
---|
[907] | 858 | ENDIF |
---|
| 859 | |
---|
[1146] | 860 | IF (o_tpote%flag(iff)<=lev_files(iff)) THEN |
---|
| 861 | CALL histwrite_phy(nid_files(iff),o_tpote%name,itau_w,tpote) |
---|
[907] | 862 | ENDIF |
---|
| 863 | |
---|
[1146] | 864 | IF (o_SWnetOR%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 865 | zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter) |
---|
[1146] | 866 | CALL histwrite_phy(nid_files(iff), |
---|
| 867 | s o_SWnetOR%name,itau_w, zx_tmp_fi2d) |
---|
[907] | 868 | ENDIF |
---|
| 869 | |
---|
[1146] | 870 | IF (o_SWdownOR%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 871 | zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol1(1:klon)) |
---|
[1146] | 872 | CALL histwrite_phy(nid_files(iff), |
---|
| 873 | s o_SWdownOR%name,itau_w, zx_tmp_fi2d) |
---|
[907] | 874 | ENDIF |
---|
| 875 | |
---|
[1146] | 876 | IF (o_LWdownOR%flag(iff)<=lev_files(iff)) THEN |
---|
| 877 | CALL histwrite_phy(nid_files(iff), |
---|
| 878 | s o_LWdownOR%name,itau_w,sollwdown) |
---|
[907] | 879 | ENDIF |
---|
| 880 | |
---|
[1146] | 881 | IF (o_snowl%flag(iff)<=lev_files(iff)) THEN |
---|
| 882 | CALL histwrite_phy(nid_files(iff),o_snowl%name,itau_w,snow_lsc) |
---|
[907] | 883 | ENDIF |
---|
| 884 | |
---|
[1146] | 885 | IF (o_solldown%flag(iff)<=lev_files(iff)) THEN |
---|
| 886 | CALL histwrite_phy(nid_files(iff), |
---|
| 887 | s o_solldown%name,itau_w,sollwdown) |
---|
[907] | 888 | ENDIF |
---|
| 889 | |
---|
[1146] | 890 | IF (o_dtsvdfo%flag(iff)<=lev_files(iff)) THEN |
---|
| 891 | CALL histwrite_phy(nid_files(iff), |
---|
| 892 | s o_dtsvdfo%name,itau_w,d_ts(:,is_oce)) |
---|
[907] | 893 | ENDIF |
---|
| 894 | |
---|
[1146] | 895 | IF (o_dtsvdft%flag(iff)<=lev_files(iff)) THEN |
---|
| 896 | CALL histwrite_phy(nid_files(iff), |
---|
| 897 | s o_dtsvdft%name,itau_w,d_ts(:,is_ter)) |
---|
[907] | 898 | ENDIF |
---|
| 899 | |
---|
[1146] | 900 | IF (o_dtsvdfg%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 901 | CALL histwrite_phy(nid_files(iff), |
---|
[1146] | 902 | $ o_dtsvdfg%name,itau_w, d_ts(:,is_lic)) |
---|
[907] | 903 | ENDIF |
---|
| 904 | |
---|
[1146] | 905 | IF (o_dtsvdfi%flag(iff)<=lev_files(iff)) THEN |
---|
| 906 | CALL histwrite_phy(nid_files(iff), |
---|
| 907 | s o_dtsvdfi%name,itau_w,d_ts(:,is_sic)) |
---|
[907] | 908 | ENDIF |
---|
| 909 | |
---|
[1146] | 910 | IF (o_rugs%flag(iff)<=lev_files(iff)) THEN |
---|
| 911 | CALL histwrite_phy(nid_files(iff),o_rugs%name,itau_w,zxrugs) |
---|
[907] | 912 | ENDIF |
---|
| 913 | |
---|
[1279] | 914 | ! OD550 per species |
---|
| 915 | IF (new_aod .and. (.not. aerosol_couple)) THEN |
---|
[1346] | 916 | IF (ok_ade.OR.ok_aie) THEN |
---|
| 917 | |
---|
| 918 | IF (o_od550aer%flag(iff)<=lev_files(iff)) THEN |
---|
| 919 | CALL histwrite_phy(nid_files(iff),o_od550aer%name,itau_w, |
---|
| 920 | $ od550aer) |
---|
[1279] | 921 | ENDIF |
---|
[1346] | 922 | IF (o_od865aer%flag(iff)<=lev_files(iff)) THEN |
---|
| 923 | CALL histwrite_phy(nid_files(iff),o_od865aer%name,itau_w, |
---|
| 924 | $ od865aer) |
---|
| 925 | ENDIF |
---|
| 926 | IF (o_absvisaer%flag(iff)<=lev_files(iff)) THEN |
---|
| 927 | CALL histwrite_phy(nid_files(iff),o_absvisaer%name,itau_w, |
---|
| 928 | $ absvisaer) |
---|
| 929 | ENDIF |
---|
| 930 | IF (o_od550lt1aer%flag(iff)<=lev_files(iff)) THEN |
---|
| 931 | CALL histwrite_phy(nid_files(iff),o_od550lt1aer%name,itau_w, |
---|
| 932 | $ od550lt1aer) |
---|
| 933 | ENDIF |
---|
| 934 | |
---|
| 935 | IF (o_sconcso4%flag(iff)<=lev_files(iff)) THEN |
---|
| 936 | CALL histwrite_phy(nid_files(iff),o_sconcso4%name,itau_w, |
---|
| 937 | $ sconcso4) |
---|
| 938 | ENDIF |
---|
| 939 | IF (o_sconcoa%flag(iff)<=lev_files(iff)) THEN |
---|
| 940 | CALL histwrite_phy(nid_files(iff),o_sconcoa%name,itau_w, |
---|
| 941 | $ sconcoa) |
---|
| 942 | ENDIF |
---|
| 943 | IF (o_sconcbc%flag(iff)<=lev_files(iff)) THEN |
---|
| 944 | CALL histwrite_phy(nid_files(iff),o_sconcbc%name,itau_w, |
---|
| 945 | $ sconcbc) |
---|
| 946 | ENDIF |
---|
| 947 | IF (o_sconcss%flag(iff)<=lev_files(iff)) THEN |
---|
| 948 | CALL histwrite_phy(nid_files(iff),o_sconcss%name,itau_w, |
---|
| 949 | $ sconcss) |
---|
| 950 | ENDIF |
---|
| 951 | IF (o_sconcdust%flag(iff)<=lev_files(iff)) THEN |
---|
| 952 | CALL histwrite_phy(nid_files(iff),o_sconcdust%name,itau_w, |
---|
| 953 | $ sconcdust) |
---|
| 954 | ENDIF |
---|
| 955 | |
---|
| 956 | IF (o_concso4%flag(iff)<=lev_files(iff)) THEN |
---|
| 957 | CALL histwrite_phy(nid_files(iff),o_concso4%name,itau_w, |
---|
| 958 | $ concso4) |
---|
| 959 | ENDIF |
---|
| 960 | IF (o_concoa%flag(iff)<=lev_files(iff)) THEN |
---|
| 961 | CALL histwrite_phy(nid_files(iff),o_concoa%name,itau_w, |
---|
| 962 | $ concoa) |
---|
| 963 | ENDIF |
---|
| 964 | IF (o_concbc%flag(iff)<=lev_files(iff)) THEN |
---|
| 965 | CALL histwrite_phy(nid_files(iff),o_concbc%name,itau_w, |
---|
| 966 | $ concbc) |
---|
| 967 | ENDIF |
---|
| 968 | IF (o_concss%flag(iff)<=lev_files(iff)) THEN |
---|
| 969 | CALL histwrite_phy(nid_files(iff),o_concss%name,itau_w, |
---|
| 970 | $ concss) |
---|
| 971 | ENDIF |
---|
| 972 | IF (o_concdust%flag(iff)<=lev_files(iff)) THEN |
---|
| 973 | CALL histwrite_phy(nid_files(iff),o_concdust%name,itau_w, |
---|
| 974 | $ concdust) |
---|
| 975 | ENDIF |
---|
| 976 | |
---|
| 977 | IF (o_loadso4%flag(iff)<=lev_files(iff)) THEN |
---|
| 978 | CALL histwrite_phy(nid_files(iff),o_loadso4%name,itau_w, |
---|
| 979 | $ loadso4) |
---|
| 980 | ENDIF |
---|
| 981 | IF (o_loadoa%flag(iff)<=lev_files(iff)) THEN |
---|
| 982 | CALL histwrite_phy(nid_files(iff),o_loadoa%name,itau_w, |
---|
| 983 | $ loadoa) |
---|
| 984 | ENDIF |
---|
| 985 | IF (o_loadbc%flag(iff)<=lev_files(iff)) THEN |
---|
| 986 | CALL histwrite_phy(nid_files(iff),o_loadbc%name,itau_w, |
---|
| 987 | $ loadbc) |
---|
| 988 | ENDIF |
---|
| 989 | IF (o_loadss%flag(iff)<=lev_files(iff)) THEN |
---|
| 990 | CALL histwrite_phy(nid_files(iff),o_loadss%name,itau_w, |
---|
| 991 | $ loadss) |
---|
| 992 | ENDIF |
---|
| 993 | IF (o_loaddust%flag(iff)<=lev_files(iff)) THEN |
---|
| 994 | CALL histwrite_phy(nid_files(iff),o_loaddust%name,itau_w, |
---|
| 995 | $ loaddust) |
---|
| 996 | ENDIF |
---|
| 997 | |
---|
| 998 | DO naero = 1, naero_spc |
---|
| 999 | IF (o_tausumaero(naero)%flag(iff)<=lev_files(iff)) THEN |
---|
| 1000 | CALL histwrite_phy(nid_files(iff), |
---|
| 1001 | $ o_tausumaero(naero)%name,itau_w, |
---|
| 1002 | $ tausum_aero(:,2,naero) ) |
---|
| 1003 | ENDIF |
---|
| 1004 | END DO |
---|
| 1005 | endif |
---|
[1279] | 1006 | ENDIF |
---|
[1346] | 1007 | |
---|
[1146] | 1008 | IF (ok_ade) THEN |
---|
[1279] | 1009 | IF (o_topswad%flag(iff)<=lev_files(iff)) THEN |
---|
| 1010 | CALL histwrite_phy(nid_files(iff),o_topswad%name,itau_w, |
---|
| 1011 | $ topswad_aero) |
---|
| 1012 | ENDIF |
---|
| 1013 | IF (o_solswad%flag(iff)<=lev_files(iff)) THEN |
---|
| 1014 | CALL histwrite_phy(nid_files(iff),o_solswad%name,itau_w, |
---|
| 1015 | $ solswad_aero) |
---|
| 1016 | ENDIF |
---|
| 1017 | |
---|
| 1018 | !====MS forcing diagnostics |
---|
| 1019 | if (new_aod) then |
---|
| 1020 | IF (o_swtoaas_nat%flag(iff)<=lev_files(iff)) THEN |
---|
| 1021 | CALL histwrite_phy(nid_files(iff),o_swtoaas_nat%name,itau_w, |
---|
| 1022 | $ topsw_aero(:,1)) |
---|
[1146] | 1023 | ENDIF |
---|
[1279] | 1024 | |
---|
| 1025 | IF (o_swsrfas_nat%flag(iff)<=lev_files(iff)) THEN |
---|
| 1026 | CALL histwrite_phy(nid_files(iff),o_swsrfas_nat%name,itau_w, |
---|
| 1027 | $ solsw_aero(:,1)) |
---|
[1146] | 1028 | ENDIF |
---|
| 1029 | |
---|
[1279] | 1030 | IF (o_swtoacs_nat%flag(iff)<=lev_files(iff)) THEN |
---|
| 1031 | CALL histwrite_phy(nid_files(iff),o_swtoacs_nat%name,itau_w, |
---|
| 1032 | $ topsw0_aero(:,1)) |
---|
[1146] | 1033 | ENDIF |
---|
[1279] | 1034 | |
---|
| 1035 | IF (o_swsrfcs_nat%flag(iff)<=lev_files(iff)) THEN |
---|
| 1036 | CALL histwrite_phy(nid_files(iff),o_swsrfcs_nat%name,itau_w, |
---|
| 1037 | $ solsw0_aero(:,1)) |
---|
[1146] | 1038 | ENDIF |
---|
[1279] | 1039 | |
---|
| 1040 | !ant |
---|
| 1041 | IF (o_swtoaas_ant%flag(iff)<=lev_files(iff)) THEN |
---|
| 1042 | CALL histwrite_phy(nid_files(iff),o_swtoaas_ant%name,itau_w, |
---|
| 1043 | $ topsw_aero(:,2)) |
---|
| 1044 | ENDIF |
---|
| 1045 | |
---|
| 1046 | IF (o_swsrfas_ant%flag(iff)<=lev_files(iff)) THEN |
---|
| 1047 | CALL histwrite_phy(nid_files(iff),o_swsrfas_ant%name,itau_w, |
---|
| 1048 | $ solsw_aero(:,2)) |
---|
| 1049 | ENDIF |
---|
| 1050 | |
---|
| 1051 | IF (o_swtoacs_ant%flag(iff)<=lev_files(iff)) THEN |
---|
| 1052 | CALL histwrite_phy(nid_files(iff),o_swtoacs_ant%name,itau_w, |
---|
| 1053 | $ topsw0_aero(:,2)) |
---|
| 1054 | ENDIF |
---|
| 1055 | |
---|
| 1056 | IF (o_swsrfcs_ant%flag(iff)<=lev_files(iff)) THEN |
---|
| 1057 | CALL histwrite_phy(nid_files(iff),o_swsrfcs_ant%name,itau_w, |
---|
| 1058 | $ solsw0_aero(:,2)) |
---|
| 1059 | ENDIF |
---|
| 1060 | |
---|
| 1061 | !cf |
---|
| 1062 | |
---|
| 1063 | if (.not. aerosol_couple) then |
---|
| 1064 | IF (o_swtoacf_nat%flag(iff)<=lev_files(iff)) THEN |
---|
| 1065 | CALL histwrite_phy(nid_files(iff),o_swtoacf_nat%name,itau_w, |
---|
| 1066 | $ topswcf_aero(:,1)) |
---|
| 1067 | ENDIF |
---|
| 1068 | |
---|
| 1069 | IF (o_swsrfcf_nat%flag(iff)<=lev_files(iff)) THEN |
---|
| 1070 | CALL histwrite_phy(nid_files(iff),o_swsrfcf_nat%name,itau_w, |
---|
| 1071 | $ solswcf_aero(:,1)) |
---|
| 1072 | ENDIF |
---|
| 1073 | |
---|
| 1074 | IF (o_swtoacf_ant%flag(iff)<=lev_files(iff)) THEN |
---|
| 1075 | CALL histwrite_phy(nid_files(iff),o_swtoacf_ant%name,itau_w, |
---|
| 1076 | $ topswcf_aero(:,2)) |
---|
| 1077 | ENDIF |
---|
| 1078 | |
---|
| 1079 | IF (o_swsrfcf_ant%flag(iff)<=lev_files(iff)) THEN |
---|
| 1080 | CALL histwrite_phy(nid_files(iff),o_swsrfcf_ant%name,itau_w, |
---|
| 1081 | $ solswcf_aero(:,2)) |
---|
| 1082 | ENDIF |
---|
| 1083 | |
---|
| 1084 | IF (o_swtoacf_zero%flag(iff)<=lev_files(iff)) THEN |
---|
| 1085 | CALL histwrite_phy(nid_files(iff),o_swtoacf_zero%name,itau_w, |
---|
| 1086 | $ topswcf_aero(:,3)) |
---|
| 1087 | ENDIF |
---|
| 1088 | |
---|
| 1089 | IF (o_swsrfcf_zero%flag(iff)<=lev_files(iff)) THEN |
---|
| 1090 | CALL histwrite_phy(nid_files(iff),o_swsrfcf_zero%name,itau_w, |
---|
| 1091 | $ solswcf_aero(:,3)) |
---|
| 1092 | ENDIF |
---|
| 1093 | endif |
---|
| 1094 | |
---|
| 1095 | endif ! new_aod |
---|
| 1096 | !====MS forcing diagnostics |
---|
| 1097 | |
---|
[1146] | 1098 | ENDIF |
---|
| 1099 | |
---|
[1279] | 1100 | IF (ok_aie) THEN |
---|
| 1101 | IF (o_topswai%flag(iff)<=lev_files(iff)) THEN |
---|
| 1102 | CALL histwrite_phy(nid_files(iff),o_topswai%name,itau_w, |
---|
| 1103 | $ topswai_aero) |
---|
| 1104 | ENDIF |
---|
| 1105 | IF (o_solswai%flag(iff)<=lev_files(iff)) THEN |
---|
| 1106 | CALL histwrite_phy(nid_files(iff),o_solswai%name,itau_w, |
---|
| 1107 | $ solswai_aero) |
---|
| 1108 | ENDIF |
---|
[1346] | 1109 | IF (o_scdnc%flag(iff)<=lev_files(iff)) THEN |
---|
| 1110 | CALL histwrite_phy(nid_files(iff),o_scdnc%name,itau_w, |
---|
| 1111 | $ scdnc) |
---|
| 1112 | ENDIF |
---|
| 1113 | IF (o_cldncl%flag(iff)<=lev_files(iff)) THEN |
---|
| 1114 | CALL histwrite_phy(nid_files(iff),o_cldncl%name,itau_w, |
---|
| 1115 | $ cldncl) |
---|
| 1116 | ENDIF |
---|
| 1117 | IF (o_reffclws%flag(iff)<=lev_files(iff)) THEN |
---|
| 1118 | CALL histwrite_phy(nid_files(iff),o_reffclws%name,itau_w, |
---|
| 1119 | $ reffclws) |
---|
| 1120 | ENDIF |
---|
| 1121 | IF (o_reffclwc%flag(iff)<=lev_files(iff)) THEN |
---|
| 1122 | CALL histwrite_phy(nid_files(iff),o_reffclwc%name,itau_w, |
---|
| 1123 | $ reffclwc) |
---|
| 1124 | ENDIF |
---|
| 1125 | IF (o_cldnvi%flag(iff)<=lev_files(iff)) THEN |
---|
| 1126 | CALL histwrite_phy(nid_files(iff),o_cldnvi%name,itau_w, |
---|
| 1127 | $ cldnvi) |
---|
| 1128 | ENDIF |
---|
| 1129 | IF (o_lcc%flag(iff)<=lev_files(iff)) THEN |
---|
| 1130 | CALL histwrite_phy(nid_files(iff),o_lcc%name,itau_w, |
---|
| 1131 | $ lcc) |
---|
| 1132 | ENDIF |
---|
| 1133 | IF (o_lcc3d%flag(iff)<=lev_files(iff)) THEN |
---|
| 1134 | CALL histwrite_phy(nid_files(iff),o_lcc3d%name,itau_w, |
---|
| 1135 | $ lcc3d) |
---|
| 1136 | ENDIF |
---|
| 1137 | IF (o_lcc3dcon%flag(iff)<=lev_files(iff)) THEN |
---|
| 1138 | CALL histwrite_phy(nid_files(iff),o_lcc3dcon%name,itau_w, |
---|
| 1139 | $ lcc3dcon) |
---|
| 1140 | ENDIF |
---|
| 1141 | IF (o_lcc3dstra%flag(iff)<=lev_files(iff)) THEN |
---|
| 1142 | CALL histwrite_phy(nid_files(iff),o_lcc3dstra%name,itau_w, |
---|
| 1143 | $ lcc3dstra) |
---|
| 1144 | ENDIF |
---|
| 1145 | IF (o_reffclwtop%flag(iff)<=lev_files(iff)) THEN |
---|
| 1146 | CALL histwrite_phy(nid_files(iff),o_reffclwtop%name,itau_w, |
---|
| 1147 | $ reffclwtop) |
---|
| 1148 | ENDIF |
---|
[1279] | 1149 | ENDIF |
---|
| 1150 | |
---|
[907] | 1151 | ! Champs 3D: |
---|
[1365] | 1152 | IF (ok_ade .OR. ok_aie) then |
---|
| 1153 | IF (o_ec550aer%flag(iff)<=lev_files(iff)) THEN |
---|
[1366] | 1154 | CALL histwrite_phy(nid_files(iff),o_ec550aer%name,itau_w, |
---|
| 1155 | & ec550aer) |
---|
[1365] | 1156 | ENDIF |
---|
[1346] | 1157 | ENDIF |
---|
| 1158 | |
---|
[1146] | 1159 | IF (o_lwcon%flag(iff)<=lev_files(iff)) THEN |
---|
| 1160 | CALL histwrite_phy(nid_files(iff),o_lwcon%name,itau_w,flwc) |
---|
[907] | 1161 | ENDIF |
---|
| 1162 | |
---|
[1146] | 1163 | IF (o_iwcon%flag(iff)<=lev_files(iff)) THEN |
---|
| 1164 | CALL histwrite_phy(nid_files(iff),o_iwcon%name,itau_w,fiwc) |
---|
[907] | 1165 | ENDIF |
---|
| 1166 | |
---|
[1146] | 1167 | IF (o_temp%flag(iff)<=lev_files(iff)) THEN |
---|
| 1168 | CALL histwrite_phy(nid_files(iff),o_temp%name,itau_w,t_seri) |
---|
[907] | 1169 | ENDIF |
---|
| 1170 | |
---|
[1146] | 1171 | IF (o_theta%flag(iff)<=lev_files(iff)) THEN |
---|
| 1172 | CALL histwrite_phy(nid_files(iff),o_theta%name,itau_w,theta) |
---|
[945] | 1173 | ENDIF |
---|
| 1174 | |
---|
[1146] | 1175 | IF (o_ovap%flag(iff)<=lev_files(iff)) THEN |
---|
| 1176 | CALL histwrite_phy(nid_files(iff),o_ovap%name,itau_w,qx(:,:,ivap)) |
---|
[907] | 1177 | ENDIF |
---|
| 1178 | |
---|
[1146] | 1179 | IF (o_ovapinit%flag(iff)<=lev_files(iff)) THEN |
---|
| 1180 | CALL histwrite_phy(nid_files(iff), |
---|
| 1181 | $ o_ovapinit%name,itau_w,q_seri) |
---|
[907] | 1182 | ENDIF |
---|
| 1183 | |
---|
[1146] | 1184 | IF (o_geop%flag(iff)<=lev_files(iff)) THEN |
---|
| 1185 | CALL histwrite_phy(nid_files(iff),o_geop%name,itau_w,zphi) |
---|
[907] | 1186 | ENDIF |
---|
| 1187 | |
---|
[1146] | 1188 | IF (o_vitu%flag(iff)<=lev_files(iff)) THEN |
---|
| 1189 | CALL histwrite_phy(nid_files(iff),o_vitu%name,itau_w,u_seri) |
---|
[907] | 1190 | ENDIF |
---|
| 1191 | |
---|
[1146] | 1192 | IF (o_vitv%flag(iff)<=lev_files(iff)) THEN |
---|
| 1193 | CALL histwrite_phy(nid_files(iff),o_vitv%name,itau_w,v_seri) |
---|
[907] | 1194 | ENDIF |
---|
| 1195 | |
---|
[1146] | 1196 | IF (o_vitw%flag(iff)<=lev_files(iff)) THEN |
---|
| 1197 | CALL histwrite_phy(nid_files(iff),o_vitw%name,itau_w,omega) |
---|
| 1198 | ENDIF |
---|
| 1199 | |
---|
| 1200 | IF (o_pres%flag(iff)<=lev_files(iff)) THEN |
---|
| 1201 | CALL histwrite_phy(nid_files(iff),o_pres%name,itau_w,pplay) |
---|
[907] | 1202 | ENDIF |
---|
| 1203 | |
---|
[1347] | 1204 | IF (o_paprs%flag(iff)<=lev_files(iff)) THEN |
---|
| 1205 | CALL histwrite_phy(nid_files(iff),o_paprs%name, |
---|
| 1206 | s itau_w,paprs(:,1:klev)) |
---|
| 1207 | ENDIF |
---|
| 1208 | |
---|
[1146] | 1209 | IF (o_rneb%flag(iff)<=lev_files(iff)) THEN |
---|
| 1210 | CALL histwrite_phy(nid_files(iff),o_rneb%name,itau_w,cldfra) |
---|
[907] | 1211 | ENDIF |
---|
| 1212 | |
---|
[1146] | 1213 | IF (o_rnebcon%flag(iff)<=lev_files(iff)) THEN |
---|
| 1214 | CALL histwrite_phy(nid_files(iff),o_rnebcon%name,itau_w,rnebcon) |
---|
[907] | 1215 | ENDIF |
---|
| 1216 | |
---|
[1146] | 1217 | IF (o_rhum%flag(iff)<=lev_files(iff)) THEN |
---|
| 1218 | CALL histwrite_phy(nid_files(iff),o_rhum%name,itau_w,zx_rh) |
---|
[907] | 1219 | ENDIF |
---|
| 1220 | |
---|
[1146] | 1221 | IF (o_ozone%flag(iff)<=lev_files(iff)) THEN |
---|
[1279] | 1222 | CALL histwrite_phy(nid_files(iff), o_ozone%name, itau_w, |
---|
| 1223 | $ wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd) |
---|
[907] | 1224 | ENDIF |
---|
| 1225 | |
---|
[1279] | 1226 | IF (o_ozone_light%flag(iff)<=lev_files(iff) .and. |
---|
| 1227 | $ read_climoz == 2) THEN |
---|
| 1228 | CALL histwrite_phy(nid_files(iff), o_ozone_light%name, itau_w, |
---|
| 1229 | $ wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd) |
---|
| 1230 | ENDIF |
---|
| 1231 | |
---|
[1146] | 1232 | IF (o_dtphy%flag(iff)<=lev_files(iff)) THEN |
---|
| 1233 | CALL histwrite_phy(nid_files(iff),o_dtphy%name,itau_w,d_t) |
---|
[907] | 1234 | ENDIF |
---|
| 1235 | |
---|
[1146] | 1236 | IF (o_dqphy%flag(iff)<=lev_files(iff)) THEN |
---|
| 1237 | CALL histwrite_phy(nid_files(iff), |
---|
| 1238 | s o_dqphy%name,itau_w, d_qx(:,:,ivap)) |
---|
[907] | 1239 | ENDIF |
---|
| 1240 | |
---|
| 1241 | DO nsrf=1, nbsrf |
---|
[1146] | 1242 | IF (o_albe_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1243 | zx_tmp_fi2d(1 : klon) = falb1( 1 : klon, nsrf) |
---|
[1146] | 1244 | CALL histwrite_phy(nid_files(iff), |
---|
| 1245 | s o_albe_srf(nsrf)%name,itau_w, |
---|
| 1246 | $ zx_tmp_fi2d) |
---|
[907] | 1247 | ENDIF |
---|
| 1248 | |
---|
[1146] | 1249 | IF (o_rugs_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1250 | zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf) |
---|
[1146] | 1251 | CALL histwrite_phy(nid_files(iff), |
---|
| 1252 | s o_rugs_srf(nsrf)%name,itau_w, |
---|
[907] | 1253 | $ zx_tmp_fi2d) |
---|
| 1254 | ENDIF |
---|
| 1255 | |
---|
[1146] | 1256 | IF (o_ages_srf(nsrf)%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1257 | zx_tmp_fi2d(1 : klon) = agesno( 1 : klon, nsrf) |
---|
[1146] | 1258 | CALL histwrite_phy(nid_files(iff), |
---|
| 1259 | s o_ages_srf(nsrf)%name,itau_w |
---|
[907] | 1260 | $ ,zx_tmp_fi2d) |
---|
| 1261 | ENDIF |
---|
| 1262 | ENDDO !nsrf=1, nbsrf |
---|
| 1263 | |
---|
[1146] | 1264 | IF (o_albs%flag(iff)<=lev_files(iff)) THEN |
---|
| 1265 | CALL histwrite_phy(nid_files(iff),o_albs%name,itau_w,albsol1) |
---|
[907] | 1266 | ENDIF |
---|
| 1267 | |
---|
[1146] | 1268 | IF (o_albslw%flag(iff)<=lev_files(iff)) THEN |
---|
| 1269 | CALL histwrite_phy(nid_files(iff),o_albslw%name,itau_w,albsol2) |
---|
[907] | 1270 | ENDIF |
---|
| 1271 | |
---|
| 1272 | !FH Sorties pour la couche limite |
---|
| 1273 | if (iflag_pbl>1) then |
---|
| 1274 | zx_tmp_fi3d=0. |
---|
| 1275 | do nsrf=1,nbsrf |
---|
| 1276 | do k=1,klev |
---|
| 1277 | zx_tmp_fi3d(:,k)=zx_tmp_fi3d(:,k) |
---|
| 1278 | $ +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf) |
---|
| 1279 | enddo |
---|
| 1280 | enddo |
---|
[1146] | 1281 | IF (o_tke%flag(iff)<=lev_files(iff)) THEN |
---|
| 1282 | CALL histwrite_phy(nid_files(iff),o_tke%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1283 | ENDIF |
---|
| 1284 | |
---|
[1146] | 1285 | IF (o_tke_max%flag(iff)<=lev_files(iff)) THEN |
---|
| 1286 | CALL histwrite_phy(nid_files(iff), |
---|
| 1287 | s o_tke_max%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1288 | ENDIF |
---|
| 1289 | endif |
---|
| 1290 | |
---|
[1146] | 1291 | IF (o_kz%flag(iff)<=lev_files(iff)) THEN |
---|
| 1292 | CALL histwrite_phy(nid_files(iff),o_kz%name,itau_w,coefh) |
---|
[907] | 1293 | ENDIF |
---|
| 1294 | |
---|
[1146] | 1295 | IF (o_kz_max%flag(iff)<=lev_files(iff)) THEN |
---|
| 1296 | CALL histwrite_phy(nid_files(iff),o_kz_max%name,itau_w,coefh) |
---|
[907] | 1297 | ENDIF |
---|
| 1298 | |
---|
[1146] | 1299 | IF (o_clwcon%flag(iff)<=lev_files(iff)) THEN |
---|
| 1300 | CALL histwrite_phy(nid_files(iff),o_clwcon%name,itau_w,clwcon0) |
---|
[907] | 1301 | ENDIF |
---|
| 1302 | |
---|
[1146] | 1303 | IF (o_dtdyn%flag(iff)<=lev_files(iff)) THEN |
---|
| 1304 | CALL histwrite_phy(nid_files(iff),o_dtdyn%name,itau_w,d_t_dyn) |
---|
[907] | 1305 | ENDIF |
---|
| 1306 | |
---|
[1146] | 1307 | IF (o_dqdyn%flag(iff)<=lev_files(iff)) THEN |
---|
| 1308 | CALL histwrite_phy(nid_files(iff),o_dqdyn%name,itau_w,d_q_dyn) |
---|
[907] | 1309 | ENDIF |
---|
| 1310 | |
---|
[1146] | 1311 | IF (o_dudyn%flag(iff)<=lev_files(iff)) THEN |
---|
| 1312 | CALL histwrite_phy(nid_files(iff),o_dudyn%name,itau_w,d_u_dyn) |
---|
[1054] | 1313 | ENDIF |
---|
| 1314 | |
---|
[1146] | 1315 | IF (o_dvdyn%flag(iff)<=lev_files(iff)) THEN |
---|
| 1316 | CALL histwrite_phy(nid_files(iff),o_dvdyn%name,itau_w,d_v_dyn) |
---|
[1054] | 1317 | ENDIF |
---|
| 1318 | |
---|
[1146] | 1319 | IF (o_dtcon%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1320 | zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys |
---|
[1146] | 1321 | CALL histwrite_phy(nid_files(iff),o_dtcon%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1322 | ENDIF |
---|
| 1323 | |
---|
[1146] | 1324 | IF (o_ducon%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1325 | zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys |
---|
[1146] | 1326 | CALL histwrite_phy(nid_files(iff),o_ducon%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1327 | ENDIF |
---|
| 1328 | |
---|
[1146] | 1329 | IF (o_dqcon%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1330 | zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys |
---|
[1146] | 1331 | CALL histwrite_phy(nid_files(iff),o_dqcon%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1332 | ENDIF |
---|
| 1333 | |
---|
[1146] | 1334 | IF (o_dtlsc%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1335 | zx_tmp_fi3d(1:klon,1:klev)=d_t_lsc(1:klon,1:klev)/pdtphys |
---|
[1146] | 1336 | CALL histwrite_phy(nid_files(iff),o_dtlsc%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1337 | ENDIF |
---|
| 1338 | |
---|
[1146] | 1339 | IF (o_dtlschr%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1340 | zx_tmp_fi3d(1:klon, 1:klev)=(d_t_lsc(1:klon,1:klev)+ |
---|
| 1341 | $ d_t_eva(1:klon,1:klev))/pdtphys |
---|
[1146] | 1342 | CALL histwrite_phy(nid_files(iff), |
---|
| 1343 | s o_dtlschr%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1344 | ENDIF |
---|
| 1345 | |
---|
[1146] | 1346 | IF (o_dqlsc%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1347 | zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys |
---|
[1146] | 1348 | CALL histwrite_phy(nid_files(iff),o_dqlsc%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1349 | ENDIF |
---|
| 1350 | |
---|
[1146] | 1351 | IF (o_dtvdf%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1352 | zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys |
---|
[1146] | 1353 | CALL histwrite_phy(nid_files(iff),o_dtvdf%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1354 | ENDIF |
---|
| 1355 | |
---|
[1146] | 1356 | IF (o_dqvdf%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1357 | zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys |
---|
[1146] | 1358 | CALL histwrite_phy(nid_files(iff),o_dqvdf%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1359 | ENDIF |
---|
| 1360 | |
---|
[1146] | 1361 | IF (o_dteva%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1362 | zx_tmp_fi3d(1:klon,1:klev)=d_t_eva(1:klon,1:klev)/pdtphys |
---|
[1146] | 1363 | CALL histwrite_phy(nid_files(iff),o_dteva%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1364 | ENDIF |
---|
| 1365 | |
---|
[1146] | 1366 | IF (o_dqeva%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1367 | zx_tmp_fi3d(1:klon,1:klev)=d_q_eva(1:klon,1:klev)/pdtphys |
---|
[1146] | 1368 | CALL histwrite_phy(nid_files(iff),o_dqeva%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1369 | ENDIF |
---|
| 1370 | |
---|
[1146] | 1371 | IF (o_ptconv%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1372 | zpt_conv = 0. |
---|
| 1373 | where (ptconv) zpt_conv = 1. |
---|
[1146] | 1374 | CALL histwrite_phy(nid_files(iff),o_ptconv%name,itau_w,zpt_conv) |
---|
[907] | 1375 | ENDIF |
---|
| 1376 | |
---|
[1146] | 1377 | IF (o_ratqs%flag(iff)<=lev_files(iff)) THEN |
---|
| 1378 | CALL histwrite_phy(nid_files(iff),o_ratqs%name,itau_w,ratqs) |
---|
[907] | 1379 | ENDIF |
---|
| 1380 | |
---|
[1146] | 1381 | IF (o_dtthe%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1382 | zx_tmp_fi3d(1:klon,1:klev)=d_t_ajs(1:klon,1:klev)/pdtphys |
---|
[1146] | 1383 | CALL histwrite_phy(nid_files(iff),o_dtthe%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1384 | ENDIF |
---|
| 1385 | |
---|
[1036] | 1386 | IF (iflag_thermals.gt.1) THEN |
---|
[1347] | 1387 | IF (o_ftime_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1388 | ! Pour l instant 0 a y reflichir pour les thermiques |
---|
| 1389 | zx_tmp_fi2d=0. |
---|
| 1390 | CALL histwrite_phy(nid_files(iff),o_ftime_th%name, |
---|
| 1391 | s itau_w,zx_tmp_fi2d) |
---|
| 1392 | ENDIF |
---|
| 1393 | |
---|
[1146] | 1394 | IF (o_f_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1395 | CALL histwrite_phy(nid_files(iff),o_f_th%name,itau_w,fm_therm) |
---|
[951] | 1396 | ENDIF |
---|
[945] | 1397 | |
---|
[1146] | 1398 | IF (o_e_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1399 | CALL histwrite_phy(nid_files(iff),o_e_th%name,itau_w,entr_therm) |
---|
[951] | 1400 | ENDIF |
---|
[945] | 1401 | |
---|
[1146] | 1402 | IF (o_w_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1403 | CALL histwrite_phy(nid_files(iff),o_w_th%name,itau_w,zw2) |
---|
[1028] | 1404 | ENDIF |
---|
| 1405 | |
---|
[1146] | 1406 | IF (o_q_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1407 | CALL histwrite_phy(nid_files(iff),o_q_th%name,itau_w,zqasc) |
---|
[1028] | 1408 | ENDIF |
---|
| 1409 | |
---|
[1146] | 1410 | IF (o_lambda_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1411 | CALL histwrite_phy(nid_files(iff), |
---|
| 1412 | s o_lambda_th%name,itau_w,lambda_th) |
---|
[1028] | 1413 | ENDIF |
---|
| 1414 | |
---|
[1146] | 1415 | IF (o_a_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1416 | CALL histwrite_phy(nid_files(iff),o_a_th%name,itau_w,fraca) |
---|
[1028] | 1417 | ENDIF |
---|
| 1418 | |
---|
[1146] | 1419 | IF (o_d_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1420 | CALL histwrite_phy(nid_files(iff),o_d_th%name,itau_w,detr_therm) |
---|
[1028] | 1421 | ENDIF |
---|
| 1422 | |
---|
[1347] | 1423 | ENDIF !iflag_thermals |
---|
[945] | 1424 | |
---|
[1146] | 1425 | IF (o_f0_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1426 | CALL histwrite_phy(nid_files(iff),o_f0_th%name,itau_w,f0) |
---|
[945] | 1427 | ENDIF |
---|
| 1428 | |
---|
[1146] | 1429 | IF (o_f0_th%flag(iff)<=lev_files(iff)) THEN |
---|
| 1430 | CALL histwrite_phy(nid_files(iff),o_zmax_th%name,itau_w,zmax0) |
---|
[945] | 1431 | ENDIF |
---|
| 1432 | |
---|
[1146] | 1433 | IF (o_dqthe%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1434 | zx_tmp_fi3d(1:klon,1:klev)=d_q_ajs(1:klon,1:klev)/pdtphys |
---|
[1146] | 1435 | CALL histwrite_phy(nid_files(iff),o_dqthe%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1436 | ENDIF |
---|
| 1437 | |
---|
[1146] | 1438 | IF (o_dtajs%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1439 | zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys |
---|
[1146] | 1440 | CALL histwrite_phy(nid_files(iff),o_dtajs%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1441 | ENDIF |
---|
| 1442 | |
---|
[1146] | 1443 | IF (o_dqajs%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1444 | zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys |
---|
[1146] | 1445 | CALL histwrite_phy(nid_files(iff),o_dqajs%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1446 | ENDIF |
---|
| 1447 | |
---|
[1146] | 1448 | IF (o_dtswr%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1449 | zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY |
---|
[1146] | 1450 | CALL histwrite_phy(nid_files(iff),o_dtswr%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1451 | ENDIF |
---|
| 1452 | |
---|
[1146] | 1453 | IF (o_dtsw0%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1454 | zx_tmp_fi3d(1:klon,1:klev)=heat0(1:klon,1:klev)/RDAY |
---|
[1146] | 1455 | CALL histwrite_phy(nid_files(iff),o_dtsw0%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1456 | ENDIF |
---|
| 1457 | |
---|
[1146] | 1458 | IF (o_dtlwr%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1459 | zx_tmp_fi3d(1:klon,1:klev)=-1.*cool(1:klon,1:klev)/RDAY |
---|
[1146] | 1460 | CALL histwrite_phy(nid_files(iff),o_dtlwr%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1461 | ENDIF |
---|
| 1462 | |
---|
[1146] | 1463 | IF (o_dtlw0%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1464 | zx_tmp_fi3d(1:klon,1:klev)=-1.*cool0(1:klon,1:klev)/RDAY |
---|
[1146] | 1465 | CALL histwrite_phy(nid_files(iff),o_dtlw0%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1466 | ENDIF |
---|
| 1467 | |
---|
[1146] | 1468 | IF (o_dtec%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1469 | zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev) |
---|
[1146] | 1470 | CALL histwrite_phy(nid_files(iff),o_dtec%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1471 | ENDIF |
---|
| 1472 | |
---|
[1146] | 1473 | IF (o_duvdf%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1474 | zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys |
---|
[1146] | 1475 | CALL histwrite_phy(nid_files(iff),o_duvdf%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1476 | ENDIF |
---|
| 1477 | |
---|
[1146] | 1478 | IF (o_dvvdf%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1479 | zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys |
---|
[1146] | 1480 | CALL histwrite_phy(nid_files(iff),o_dvvdf%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1481 | ENDIF |
---|
| 1482 | |
---|
| 1483 | IF (ok_orodr) THEN |
---|
[1146] | 1484 | IF (o_duoro%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1485 | zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys |
---|
[1146] | 1486 | CALL histwrite_phy(nid_files(iff),o_duoro%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1487 | ENDIF |
---|
| 1488 | |
---|
[1146] | 1489 | IF (o_dvoro%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1490 | zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys |
---|
[1146] | 1491 | CALL histwrite_phy(nid_files(iff),o_dvoro%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1492 | ENDIF |
---|
| 1493 | ENDIF |
---|
| 1494 | |
---|
| 1495 | IF (ok_orolf) THEN |
---|
[1146] | 1496 | IF (o_dulif%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1497 | zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys |
---|
[1146] | 1498 | CALL histwrite_phy(nid_files(iff),o_dulif%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1499 | ENDIF |
---|
| 1500 | |
---|
[1146] | 1501 | IF (o_dvlif%flag(iff)<=lev_files(iff)) THEN |
---|
[907] | 1502 | zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys |
---|
[1146] | 1503 | CALL histwrite_phy(nid_files(iff),o_dvlif%name,itau_w,zx_tmp_fi3d) |
---|
[907] | 1504 | ENDIF |
---|
| 1505 | ENDIF |
---|
| 1506 | |
---|
[1376] | 1507 | if (nqtot.GE.3) THEN |
---|
| 1508 | DO iq=3,nqtot |
---|
[1146] | 1509 | IF (o_trac(iq-2)%flag(iff)<=lev_files(iff)) THEN |
---|
| 1510 | CALL histwrite_phy(nid_files(iff), |
---|
| 1511 | s o_trac(iq-2)%name,itau_w,qx(:,:,iq)) |
---|
| 1512 | ENDIF |
---|
[1376] | 1513 | ENDDO |
---|
| 1514 | endif |
---|
[907] | 1515 | |
---|
| 1516 | if (ok_sync) then |
---|
| 1517 | c$OMP MASTER |
---|
| 1518 | call histsync(nid_files(iff)) |
---|
| 1519 | c$OMP END MASTER |
---|
| 1520 | endif |
---|
| 1521 | |
---|
| 1522 | ENDIF ! clef_files |
---|
| 1523 | |
---|
| 1524 | ENDDO ! iff=1,nfiles |
---|