[524] | 1 | ! |
---|
[1299] | 2 | ! $Id: ini_histISCCP.h 1299 2010-01-20 14:27:21Z idelkadi $ |
---|
[524] | 3 | ! |
---|
| 4 | IF (ok_isccp) THEN |
---|
| 5 | c |
---|
[766] | 6 | c$OMP MASTER |
---|
[684] | 7 | ndex2d = 0 |
---|
| 8 | ndex3d = 0 |
---|
| 9 | c |
---|
[524] | 10 | c pour les champs instantannes, il faut mettre la meme valeur pour |
---|
| 11 | c zout et zsto. |
---|
| 12 | c dtime est passe par ailleurs a histbeg |
---|
[644] | 13 | c zstophy = frequence de stockage des champs tous les pdt physiques |
---|
[524] | 14 | c zout = frequence d'ecriture des champs |
---|
[684] | 15 | cIM 300505 zstophy = dtime |
---|
| 16 | c appel du simulateur toutes les 3heures |
---|
[827] | 17 | !IM on lit la frequence d'appel dans physiq.def |
---|
| 18 | ! zcals(1) = dtime *6. !toutes les 3h (en s) |
---|
| 19 | zcals(1) = freq_ISCCP !toutes les freq_ISCCP secondes |
---|
[684] | 20 | DO n=1, napisccp |
---|
| 21 | zcalh(n) = zcals(n)/3600. !stoutes les Xh (en heures) |
---|
| 22 | ENDDO !n |
---|
[524] | 23 | c |
---|
| 24 | c ecriture 8 fois par jour |
---|
| 25 | c zout = dtime * REAL(NINT(86400./dtime*ecrit_isccp)) |
---|
| 26 | c ecriture toutes les 2h (12 fois par jour) |
---|
| 27 | c zout = dtime * 4. |
---|
[644] | 28 | c ecriture toutes les 1/2 h (48 fois par jour) |
---|
[524] | 29 | c zout = dtime |
---|
| 30 | c |
---|
[684] | 31 | c IF(freqout_isccp.EQ.1.) THEN |
---|
| 32 | c ecriture jounaliere |
---|
[827] | 33 | !IM on ecrit les resultats du simulateur ISCCP toutes les |
---|
| 34 | ! ecrit_ISCCP secondes zout_isccp(1) = ecrit_day !(en s) |
---|
| 35 | zout_isccp(1) = ecrit_ISCCP !(en s) |
---|
[524] | 36 | c ecriture mensuelle |
---|
[684] | 37 | c zout = dtime * ecrit_mth !(en s) |
---|
| 38 | DO n=1, napisccp |
---|
| 39 | zoutj(n)=zout_isccp(n)/86400. !(en jours) |
---|
[524] | 40 | c |
---|
[684] | 41 | c le nombre de sous-colonnes ncol : ncol=(100.*zcalh)/zoutd |
---|
| 42 | ncol(n)=NINT((100.*zcalh(n))/zoutj(n)) |
---|
[827] | 43 | IF(ncol(n).GT.ncolmx) THEN |
---|
| 44 | PRINT*,'Warning: Augmenter le nombre colonnes du simulateur' |
---|
| 45 | PRINT*,' ISCCP ncol=', ncol,' ncolmx=',ncolmx |
---|
| 46 | c PRINT*,'n ncol',n,ncol(n) |
---|
| 47 | CALL abort |
---|
| 48 | ENDIF |
---|
[684] | 49 | c |
---|
| 50 | DO l=1, ncol(n) |
---|
[1299] | 51 | vertlev(l,n)=REAL(l) |
---|
[684] | 52 | ENDDO !ncol |
---|
| 53 | c |
---|
| 54 | ENDDO !n |
---|
| 55 | |
---|
[524] | 56 | c PRINT*, 'La frequence de sortie ISCCP est de ', ecrit_isccp |
---|
| 57 | c |
---|
| 58 | idayref = day_ref |
---|
| 59 | CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) |
---|
[684] | 60 | c write(*,*)'ISCCP ', itau_phy, zjulian |
---|
[524] | 61 | c |
---|
| 62 | c |
---|
| 63 | c definition coordonnees lon,lat en globale |
---|
| 64 | c |
---|
[766] | 65 | cym CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon,zx_lon) |
---|
| 66 | cym DO i = 1, iim |
---|
| 67 | cym zx_lon(i,1) = rlon(i+1) |
---|
| 68 | cym zx_lon(i,jjmp1) = rlon(i+1) |
---|
| 69 | cym ENDDO |
---|
[524] | 70 | |
---|
[766] | 71 | cym CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat,zx_lat) |
---|
[524] | 72 | c |
---|
[684] | 73 | cIM BEG region |
---|
[766] | 74 | cym Desole dans un premier temps le mode region ne marchera pas |
---|
| 75 | cym Il faudra voir dans un second temps pour l'implementer |
---|
| 76 | cym Mais cela posera des problemes au niveau de la reconstruction |
---|
| 77 | |
---|
[684] | 78 | imin_ins=1 |
---|
| 79 | imax_ins=iim |
---|
| 80 | jmin_ins=1 |
---|
| 81 | jmax_ins=jjmp1 |
---|
[766] | 82 | cym do i=1,iim-1 |
---|
| 83 | cym if(zx_lon(i,1).lt.lonmin_ins) imin_ins=i |
---|
| 84 | cym if(zx_lon(i,1).le.lonmax_ins) imax_ins=i+1 |
---|
| 85 | cym enddo |
---|
| 86 | cym do j=1,jjmp1 |
---|
| 87 | cym if(zx_lat(1,j).ge.latmin_ins) jmax_ins=j |
---|
| 88 | cym if(zx_lat(1,j).gt.latmax_ins) jmin_ins=j |
---|
| 89 | cym enddo |
---|
[684] | 90 | c |
---|
[827] | 91 | print*,'On stoke le fichier histISCCP sur ', |
---|
[684] | 92 | s imin_ins,imax_ins,jmin_ins,jmax_ins |
---|
[766] | 93 | cym print*,'On stoke le fichier histISCCP instantanne sur ', |
---|
| 94 | cym s zx_lon(imin_ins,1),zx_lon(imax_ins,1), |
---|
| 95 | cym s zx_lat(1,jmin_ins),zx_lat(1,jmax_ins) |
---|
[684] | 96 | cIM END region |
---|
| 97 | c |
---|
| 98 | IF(1.EQ.0) THEN |
---|
[766] | 99 | cym CALL histbeg("histISCCP.nc", iim,zx_lon(:,1),jjmp1,zx_lat(1,:), |
---|
| 100 | cym . 1, iim, 1, jjmp1, |
---|
| 101 | cym . itau_phy, zjulian, dtime, |
---|
| 102 | cym . nhori, nid_isccp) |
---|
| 103 | CALL histbeg_phy("histISCCP.nc", itau_phy, zjulian, dtime, |
---|
[524] | 104 | . nhori, nid_isccp) |
---|
[684] | 105 | ENDIF !(1.EQ.0) THEN |
---|
[524] | 106 | c |
---|
[766] | 107 | cym CALL histbeg("histISCCP.nc", iim,zx_lon(:,1), |
---|
| 108 | cym . jjmp1,zx_lat(1,:), |
---|
| 109 | cym . imin_ins,imax_ins-imin_ins+1, |
---|
| 110 | cym . jmin_ins,jmax_ins-jmin_ins+1, |
---|
| 111 | cym . itau_phy, zjulian, dtime, |
---|
| 112 | cym . nhori, nid_isccp) |
---|
| 113 | |
---|
| 114 | CALL histbeg_phy("histISCCP.nc", itau_phy, zjulian, dtime, |
---|
[684] | 115 | . nhori, nid_isccp) |
---|
| 116 | c |
---|
| 117 | IF(type_run.EQ."ENSP".OR.type_run.EQ."CLIM") THEN |
---|
[524] | 118 | CALL histvert(nid_isccp, "cldtopres","Cloud Top Pressure","mb", |
---|
| 119 | . lmaxm1, cldtopres, nvert,'down') |
---|
[684] | 120 | ELSE IF(type_run.EQ."AMIP".OR.type_run.EQ."CFMI") THEN |
---|
| 121 | CALL histvert(nid_isccp,"cldtopres3","Cloud Top Pressure","mb", |
---|
| 122 | . lmax3, cldtopres3, nvert3,'down') |
---|
| 123 | ENDIF |
---|
| 124 | DO n=1, napisccp |
---|
| 125 | CALL histvert(nid_isccp, "Nbcol"//verticaxe(n), |
---|
| 126 | . "Nb of Column"//verticaxe(n),"1", |
---|
| 127 | . ncol(n), vertlev(:,n), nvlev(n),'up') |
---|
| 128 | ENDDO |
---|
[524] | 129 | c |
---|
[644] | 130 | IF(type_run.EQ."ENSP".OR.type_run.EQ."CLIM") THEN |
---|
| 131 | c |
---|
[524] | 132 | c variables a ecrire |
---|
[684] | 133 | c |
---|
| 134 | DO n=1, napisccp |
---|
[524] | 135 | c |
---|
| 136 | DO k=1, kmaxm1 |
---|
[827] | 137 | CALL histdef(nid_isccp, "cldISCCP_"//taulev(k)//verticaxe(n), |
---|
[524] | 138 | . "LMDZ ISCCP cld", "%", |
---|
[776] | 139 | . iim, jj_nb,nhori,lmaxm1,1,lmaxm1,nvert,32, |
---|
[684] | 140 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
[524] | 141 | ENDDO |
---|
| 142 | c |
---|
[827] | 143 | CALL histdef(nid_isccp, "nsunlit"//verticaxe(n), |
---|
[524] | 144 | . "Nb of calls with sunlit ", "%", |
---|
[776] | 145 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 146 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
[524] | 147 | c |
---|
[1045] | 148 | CALL histdef(nid_isccp, "meantaucld"//verticaxe(n), |
---|
| 149 | . "ISCCP mean cloud optical thickness", "1", |
---|
| 150 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
| 151 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 152 | c |
---|
[684] | 153 | ENDDO |
---|
| 154 | c |
---|
[644] | 155 | ELSE IF(type_run.EQ."AMIP".OR.type_run.EQ."CFMI") THEN |
---|
| 156 | c |
---|
[684] | 157 | DO n=1, napisccp |
---|
[644] | 158 | c |
---|
[684] | 159 | c print*,'n=',n,' avant histdef(..LMDZ ISCCP cld' |
---|
| 160 | c |
---|
| 161 | DO k=1, kmaxm1 |
---|
| 162 | DO l=1, lmaxm1 |
---|
| 163 | c |
---|
[827] | 164 | CALL histdef(nid_isccp, pclev(l)//taulev(k)//verticaxe(n), |
---|
[644] | 165 | . "LMDZ ISCCP cld "//cnameisccp(l,k), "%", |
---|
[776] | 166 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 167 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
[644] | 168 | c |
---|
[684] | 169 | ENDDO |
---|
[644] | 170 | ENDDO |
---|
| 171 | c |
---|
[684] | 172 | c print*,'n=',n,' avant histdef(..Nb of calls sunlit' |
---|
[827] | 173 | CALL histdef(nid_isccp, "nsunlit"//verticaxe(n), |
---|
[644] | 174 | . "Nb of calls with sunlit ", "%", |
---|
[776] | 175 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 176 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
[644] | 177 | c |
---|
[1045] | 178 | CALL histdef(nid_isccp, "meantaucld"//verticaxe(n), |
---|
| 179 | . "ISCCP mean cloud optical thickness", "1", |
---|
| 180 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
| 181 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 182 | c |
---|
[684] | 183 | c 9types de nuages ISCCP-D2 |
---|
| 184 | CALL histdef(nid_isccp, "cirr", |
---|
| 185 | . "Cirrus lk ISCCP-D2", "%", |
---|
[776] | 186 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 187 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 188 | c |
---|
| 189 | CALL histdef(nid_isccp, "cist", |
---|
| 190 | . "CiSt lk ISCCP-D2", "%", |
---|
[776] | 191 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 192 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 193 | c |
---|
| 194 | CALL histdef(nid_isccp, "deep", |
---|
| 195 | . "Deep lk ISCCP-D2", "%", |
---|
[776] | 196 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 197 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 198 | c |
---|
| 199 | CALL histdef(nid_isccp, "alcu", |
---|
| 200 | . "AlCu lk ISCCP-D2", "%", |
---|
[776] | 201 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 202 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 203 | c |
---|
| 204 | CALL histdef(nid_isccp, "alst", |
---|
| 205 | . "AlSt lk ISCCP-D2", "%", |
---|
[776] | 206 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 207 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 208 | c |
---|
| 209 | CALL histdef(nid_isccp, "nist", |
---|
| 210 | . "NiSt lk ISCCP-D2", "%", |
---|
[776] | 211 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 212 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 213 | c |
---|
| 214 | CALL histdef(nid_isccp, "cumu", |
---|
| 215 | . "Cumu lk ISCCP-D2", "%", |
---|
[776] | 216 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 217 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 218 | c |
---|
| 219 | CALL histdef(nid_isccp, "stcu", |
---|
| 220 | . "StCu lk ISCCP-D2", "%", |
---|
[776] | 221 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 222 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 223 | c |
---|
| 224 | CALL histdef(nid_isccp, "stra", |
---|
| 225 | . "Stra lk ISCCP-D2", "%", |
---|
[776] | 226 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 227 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 228 | c |
---|
| 229 | c 3_epaisseurs_optiques x3_pressions_au_sommet_des_nuages types de nuages |
---|
| 230 | CALL histdef(nid_isccp, "thin", |
---|
| 231 | . "Opt. thin ISCCP-D2 like clouds", "%", |
---|
[776] | 232 | . iim, jj_nb,nhori,lmax3,1,lmax3,nvert3,32, |
---|
[684] | 233 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 234 | c |
---|
| 235 | CALL histdef(nid_isccp, "mid", |
---|
| 236 | . "Opt. intermediate ISCCP-D2 like clouds", "%", |
---|
[776] | 237 | . iim, jj_nb,nhori,lmax3,1,lmax3,nvert3,32, |
---|
[684] | 238 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 239 | c |
---|
| 240 | CALL histdef(nid_isccp, "thick", |
---|
| 241 | . "Opt. thick ISCCP-D2 like clouds", "%", |
---|
[776] | 242 | . iim, jj_nb,nhori,lmax3,1,lmax3,nvert3,32, |
---|
[684] | 243 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 244 | c |
---|
| 245 | c IF(1.EQ.0) THEN |
---|
| 246 | c IF(n.EQ.3) THEN |
---|
| 247 | c IF(n.EQ.1) THEN |
---|
| 248 | c |
---|
| 249 | cIM 070905 BEG |
---|
| 250 | IF(1.EQ.0) THEN |
---|
| 251 | print*,'n=',n,' avant histdef(..boxptop axe' |
---|
| 252 | cIM verif boxptop |
---|
| 253 | CALL histdef(nid_isccp,"boxptop"//verticaxe(n), |
---|
| 254 | . "Boxptop axe"//verticaxe(n), "mb", |
---|
[776] | 255 | . iim, jj_nb,nhori, |
---|
[684] | 256 | . ncol(n),1,ncol(n),nvlev(n),32, |
---|
| 257 | cIM . ncolmx,1,ncolmx,nvlev,32, |
---|
| 258 | cIM . "inst(X)",dtime,dtime) |
---|
| 259 | . "ave(X)",zcals(n),zout_isccp(n)) |
---|
| 260 | ENDIF !(1.EQ.0) THEN |
---|
| 261 | cIM 070905 END |
---|
| 262 | c ENDIF !(n.EQ.3) THEN |
---|
| 263 | c ENDIF !(1.EQ.0) THEN |
---|
| 264 | c |
---|
| 265 | c print*,'n=',n,' avant histdef(..seed axe' |
---|
| 266 | CALL histdef(nid_isccp, "seed"//verticaxe(n), |
---|
| 267 | . "seed axe"//verticaxe(n), "-", |
---|
[776] | 268 | . iim, jj_nb,nhori,1,1,1,-99,32, |
---|
[684] | 269 | cIM . "inst(X)", dtime,dtime) |
---|
| 270 | . "ave(X)", zcals(n),zout_isccp(n)) |
---|
| 271 | c |
---|
| 272 | ENDDO !n |
---|
[644] | 273 | ENDIF |
---|
[524] | 274 | CALL histend(nid_isccp) |
---|
| 275 | c |
---|
[766] | 276 | c$OMP END MASTER |
---|
[524] | 277 | ENDIF ! ok_isccp |
---|