Changeset 726 for LMDZ4/branches/V3_test/libf/phylmd/write_histrac.h
- Timestamp:
- Nov 6, 2006, 4:51:16 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/V3_test/libf/phylmd/write_histrac.h
r704 r726 2 2 ! $Header$ 3 3 ! 4 #ifndef INCA 4 5 ndex = 0 5 6 ndex2d = 0 … … 13 14 cym CALL gr_fi_ecrit(1,klon,iim,jjm+1,airephy,zx_tmp_2d) 14 15 CALL histwrite_phy(nid_tra,"aire",itau_w,airephy) 15 #ifdef INCA16 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1, ps,zx_tmp_2d)17 CALL histwrite_phy(nid_tra,"ps",itau_w,ps)18 19 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1, ptrop,zx_tmp_2d)20 CALL histwrite_phy(nid_tra,"ptrop",itau_w,ptrop)21 22 C 3d FIELDS23 24 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,t_seri, zx_tmp_3d)25 CALL histwrite_phy(nid_tra,"temp",itau_w,t_seri)26 27 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,u, zx_tmp_3d)28 CALL histwrite_phy(nid_tra,"u",itau_w,u)29 30 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,v, zx_tmp_3d)31 CALL histwrite_phy(nid_tra,"v",itau_w,v)32 33 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,sh, zx_tmp_3d)34 CALL histwrite_phy(nid_tra,"h2o",itau_w,sh)35 36 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pdel, zx_tmp_3d)37 CALL histwrite_phy(nid_tra,"pdel",itau_w,pdel)38 39 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pplay, zx_tmp_3d)40 CALL histwrite_phy(nid_tra,"pmid",itau_w,pplay)41 42 ! Ajout Anne43 #ifdef INCA_AER44 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,airm, zx_tmp_3d)45 CALL histwrite_phy(nid_tra,"airm",itau_w,airm)46 #endif47 48 ! Fin ajout Anne49 50 #ifdef INCA51 #ifdef INCAINFO52 #ifdef INCA_NMHC53 DO it=1, phtcnt54 WRITE(str2,'(i2.2)') it55 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,it),56 cym . zx_tmp_3d)57 CALL histwrite_phy(nid_tra,"j"//str2,itau_w,jrates(:,:,it))58 ENDDO59 60 DO it=1, hetcnt61 WRITE(str2,'(i2.2)') it62 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hrates(1,1,it),63 cym . zx_tmp_3d)64 CALL histwrite_phy(nid_tra,"w"//str2,itau_w,hrates(:,:,it))65 ENDDO66 67 DO it=1, extcnt68 WRITE(str2,'(i2.2)') it69 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,extflx(1,1,it),70 . zx_tmp_3d)71 CALL histwrite_phy(nid_tra,"ext"//str2,itau_w,extflx(:,:,it))72 ENDDO73 #endif74 #ifdef INCA_CH475 DO it=1, phtcnt76 WRITE(str2,'(i2.2)') it77 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,it),78 cym . zx_tmp_3d)79 CALL histwrite_phy(nid_tra,"j"//str2,itau_w,jrates(:,:,it))80 ENDDO81 82 DO it=1, hetcnt83 WRITE(str2,'(i2.2)') it84 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hrates(1,1,it),85 cym . zx_tmp_3d)86 CALL histwrite_phy(nid_tra,"w"//str2,itau_w,hrates(:,:,it))87 ENDDO88 89 DO it=1, extcnt90 WRITE(str2,'(i2.2)') it91 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,extflx(1,1,it),92 cym . zx_tmp_3d)93 CALL histwrite_phy(nid_tra,"ext"//str2,itau_w,extflx(:,:,it))94 ENDDO95 #endif96 97 DO it=1, nfs98 WRITE(str2,'(i2.2)') it99 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,invariants(1,1,it),100 cym . zx_tmp_3d)101 CALL histwrite_phy(nid_tra,"INV"//str2,itau_w,invariants(:,:,it))102 ENDDO103 #else104 #ifdef INCA_NMHC105 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,2),106 cym . zx_tmp_3d)107 CALL histwrite_phy(nid_tra,"jO3",itau_w,jrates(:,:,2))108 109 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,4),110 cym . zx_tmp_3d)111 CALL histwrite_phy(nid_tra,"jNO2",itau_w,jrates(:,:,4))112 113 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,13),114 cym . zx_tmp_3d)115 CALL histwrite_phy(nid_tra,"jH2O2",itau_w,jrates(:,:,13))116 117 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hrates(1,1,1),118 cym . zx_tmp_3d)119 CALL histwrite_phy(nid_tra,"wHNO3",itau_w,hrates(:,:,1))120 121 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,krates(1,1,1),122 cym . zx_tmp_3d)123 CALL histwrite_phy(nid_tra,"kN2O5",itau_w,krates(:,:,1))124 125 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,extflx(1,1,1),126 cym . zx_tmp_3d)127 CALL histwrite_phy(nid_tra,"LghtNO",itau_w,extflx(:,:,1))128 #endif129 #ifdef INCA_CH4130 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,2),131 cym . zx_tmp_3d)132 CALL histwrite_phy(nid_tra,"jO3",itau_w,jrates(:,:,2))133 134 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,4),135 cym . zx_tmp_3d)136 CALL histwrite_phy(nid_tra,"jNO2",itau_w,jrates(:,:,4))137 138 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,13),139 cym . zx_tmp_3d)140 CALL histwrite_phy(nid_tra,"jH2O2",itau_w,jrates(:,:,13))141 142 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hrates(1,1,1),143 cym . zx_tmp_3d)144 CALL histwrite_phy(nid_tra,"wHNO3",itau_w,hrates(:,:,1))145 146 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,krates(1,1,1),147 cym . zx_tmp_3d)148 CALL histwrite_phy(nid_tra,"kN2O5",itau_w,krates(:,:,1))149 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,extflx(1,1,1),150 cym . zx_tmp_3d)151 CALL histwrite_phy(nid_tra,"LghtNO",itau_w,extflx(:,:,1))152 #endif153 #endif154 ! DO it=1, grpcnt155 !156 !cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,nas(1,1,it),zx_tmp_3d)157 ! zx_tmp_3d = zx_tmp_3d * dry_mass / nadv_mass(it)158 ! CALL histwrite_phy(nid_tra,grpsym(it),itau_w,zx_tmp_3d,159 ! . iim*(jjm+1)*klev,ndex3d)160 ! ENDDO161 #endif162 163 #ifdef INCA_AER164 165 it = id_CIDUSTM166 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,scavcoef_st(1,1,it),167 cym . zx_tmp_3d)168 CALL histwrite_phy(nid_tra2,"scavcoef_st",itau_w,169 . scavcoef_st(:,:,it))170 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,scavcoef_cv(1,1,it),171 cym . zx_tmp_3d)172 CALL histwrite_phy(nid_tra2,"scavcoef_cv",itau_w,173 . scavcoef_cv(:,:,it))174 175 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1,angst(1),zx_tmp_2d)176 CALL histwrite_phy(nid_tra2,"AngstroemComp",itau_w,angst))177 178 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,totaerh2o(1,1), zx_tmp_3d)179 CALL histwrite_phy(nid_tra2,"TOTAERH2O",itau_w,totaerh2o)180 181 #endif182 #endif183 16 184 17 DO it=1,nqmax 185 18 C champs 2D 186 #ifdef INCA187 IF ( prt_flag_ts(it) == 0 ) CYCLE188 19 189 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1, eflux(1,it),zx_tmp_2d)190 CALL histwrite_phy(nid_tra,"Emi_"//solsym(it),itau_w,eflux(:,it))191 192 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1, dvel(1,it),zx_tmp_2d)193 CALL histwrite_phy(nid_tra,"Dep_"//solsym(it),itau_w,dvel(:,it))194 #ifdef INCA_AER195 call diag(airephy,tr_seri,.false.)196 197 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1,dflux(1,it),zx_tmp_2d)198 CALL histwrite_phy(nid_tra2,"Dry_"//solsym(it),itau_w,199 . dflux(:,it))200 201 IF ((it .ge. trmx) .and. (it .le. trnx)) then202 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1,sflux(1,it),zx_tmp_2d)203 CALL histwrite_phy(nid_tra2,"Sed_"//solsym(it),itau_w,204 . sflux(:,it))205 206 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1,wflux(1,it),zx_tmp_2d)207 CALL histwrite_phy(nid_tra2,"Wet_"//solsym(it),itau_w,208 . wflux(:,it))209 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1,wsflux(1,it),zx_tmp_2d)210 CALL histwrite_phy(nid_tra2,"WetST_"//solsym(it),itau_w,211 . wsflux(:,it))212 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1,wcflux(1,it),zx_tmp_2d)213 CALL histwrite_phy(nid_tra2,"WetCV_"//solsym(it),itau_w,214 . wcflux(:,it))215 216 cym CALL gr_fi_ecrit(klev, klon,iim,jjm+1,eflux_alt(1,1,it),zx_tmp_3d)217 CALL histwrite_phy(nid_tra2,"Emi_alt_"//solsym(it),itau_w,218 . eflux_alt(:,:,it))219 220 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1,aload(1,it),zx_tmp_2d)221 CALL histwrite_phy(nid_tra2,"Load_"//solsym(it),itau_w,222 . aload(:,it))223 CALL histwrite_phy(nid_tra3,"Inst_Load_"//solsym(it),itau_w,224 . aload(:,it))225 226 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1,sconc(1,it),zx_tmp_2d)227 CALL histwrite_phy(nid_tra2,"SConc_"//solsym(it),itau_w,228 . sconc(:,it))229 230 do la=1,las231 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1,tausum(1,la,it),zx_tmp_2d)232 CALL histwrite_phy(nid_tra2,"OD"//cla(la)//"_"//solsym(it),233 . itau_w,tausum(:,la,it))234 cym CALL gr_fi_ecrit(klev, klon,iim,jjm+1,tau(1,1,la,it),zx_tmp_3d)235 CALL histwrite_phy(nid_tra2,"OD3D"//cla(la)//"_"//solsym(it),236 . itau_w,tau(:,:,la,it))237 enddo238 239 cym CALL gr_fi_ecrit(klev, klon,iim,jjm+1,md(1,1,it),zx_tmp_3d)240 CALL histwrite_phy(nid_tra2,"MD_"//solsym(it),itau_w,241 . md(:,:,it))242 243 cym CALL gr_fi_ecrit(klev, klon,iim,jjm+1,mdw(1,1,it),zx_tmp_3d)244 CALL histwrite_phy(nid_tra2,"MDW_"//solsym(it),itau_w,245 . mdw(:,:,it))246 247 cym CALL gr_fi_ecrit(klev, klon,iim,jjm+1,cload(1,1,it),zx_tmp_3d)248 CALL histwrite_phy(nid_tra2,"CLOAD_"//solsym(it),249 . itau_w,cload(:,:,it))250 251 252 endif253 254 255 #endif256 C champs 3D257 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,tr_seri(1,1,it),zx_tmp_3d)258 259 !Prefer vmr to mmr for transported species260 if( adv_mass(it) /= 0. ) then261 #ifdef INCA_AER262 if (it .lt. trmx) then263 #endif264 zx_tmp_fi3d = tr_seri(:,:,it) * dry_mass / adv_mass(it)265 #ifdef INCA_AER266 endif267 #endif268 else269 #ifdef INCA_CH4270 if ( solsym(it) == 'OX' ) then271 zx_tmp_fi3d = tr_seri(:,:,it) * dry_mass / nadv_mass(id_o3)272 end if273 #endif274 #ifdef INCA_NMHC275 if ( solsym(it) == 'OX' ) then276 zx_tmp_fi3d = tr_seri(:,:,it) * dry_mass / nadv_mass(id_o3)277 end if278 #endif279 end if280 281 CALL histwrite_phy(nid_tra,solsym(it),itau_w,zx_tmp_fi3d)282 #else283 20 284 21 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,tr_seri(1,1,it),zx_tmp_3d) … … 302 39 c---fin Olivia 303 40 304 #endif305 41 ENDDO 306 42 307 #ifdef INCA308 !#ifdef INCA_CH4309 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1, o3_col(1), zx_tmp_2d)310 CALL histwrite_phy(nid_tra,"O3_column",itau_w,o3_col)311 312 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1, co_col(1), zx_tmp_2d)313 CALL histwrite_phy(nid_tra,"CO_column",itau_w,co_col)314 315 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1, ch4_col(1), zx_tmp_2d)316 CALL histwrite_phy(nid_tra,"CH4_column",itau_w,ch4_col)317 318 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1, no2_col(1), zx_tmp_2d)319 CALL histwrite_phy(nid_tra,"NO2_column",itau_w,no2_col)320 321 cym CALL gr_fi_ecrit(1, klon,iim,jjm+1, o3_st_flx(1), zx_tmp_2d)322 CALL histwrite_phy(nid_tra,"O3_ste",itau_w,o3_st_flx)323 324 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,o3_prod(1,1),325 cym . zx_tmp_3d)326 CALL histwrite_phy(nid_tra,"O3_prod",itau_w,o3_prod)327 328 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,o3_loss(1,1),329 cym . zx_tmp_3d)330 CALL histwrite_phy(nid_tra,"O3_loss",itau_w,o3_loss)331 ! Ajout Anne332 #ifdef INCA_AER333 ! for sulfur cycle334 335 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_dmsoh(1,1),336 cym . zx_tmp_3d)337 CALL histwrite_phy(nid_tra,"SO2_p_dmsoh",itau_w,SO2_p_dmsoh)338 339 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_dmsno3(1,1),340 cym . zx_tmp_3d)341 CALL histwrite_phy(nid_tra,"SO2_p_dmsno3",itau_w,SO2_p_dmsno3)342 343 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_h2soh(1,1),344 cym . zx_tmp_3d)345 CALL histwrite_phy(nid_tra,"SO2_p_h2soh",itau_w,SO2_p_h2soh)346 347 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_dmsooh(1,1),348 cym . zx_tmp_3d)349 CALL histwrite_phy(nid_tra,"SO2_p_dmsooh",itau_w,SO2_p_dmsooh)350 351 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,DMSO_p_dmsoh(1,1),352 cym . zx_tmp_3d)353 CALL histwrite_phy(nid_tra,"DMSO_p_dmsoh",itau_w,DMSO_p_dmsoh)354 355 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASMSAM_p_dmsooh(1,1),356 cym . zx_tmp_3d)357 CALL histwrite_phy(nid_tra,"ASMSAM_p_dmsooh",itau_w,ASMSAM_p_dmsooh)358 359 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASSO4M_p_so2oh(1,1),360 cym . zx_tmp_3d)361 CALL histwrite_phy(nid_tra,"ASSO4M_p_so2oh",itau_w,ASSO4M_p_so2oh)362 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASSO4M_p_so2h2o2(1,1),363 cym . zx_tmp_3d)364 CALL histwrite_phy(nid_tra,"ASSO4M_p_so2h2o2",itau_w,ASSO4M_p_so2h2o2)365 366 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASSO4M_p_so2o3(1,1),367 cym . zx_tmp_3d)368 CALL histwrite_phy(nid_tra,"ASSO4M_p_so2o3",itau_w,ASSO4M_p_so2o3)369 370 c closing the sulfur budget371 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_so2(1,1), zx_tmp_3d)372 CALL histwrite_phy(nid_tra,"Wet3D_SO2",itau_w,wet3d_so2)373 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_dms(1,1), zx_tmp_3d)374 CALL histwrite_phy(nid_tra,"Wet3D_DMS",itau_w,wet3d_dms)375 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_hno3(1,1), zx_tmp_3d)376 CALL histwrite_phy(nid_tra,"Wet3D_HNO3",itau_w,wet3d_hno3)377 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_h2o2(1,1), zx_tmp_3d)378 CALL histwrite_phy(nid_tra,"Wet3D_H2O2",itau_w,wet3d_h2o2)379 380 381 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,PH_HIST(1,1),382 cym . zx_tmp_3d)383 CALL histwrite_phy(nid_tra,"PH_HIST",itau_w,PH_HIST)384 #endif385 386 #ifdef INCA_CH4387 DO it=1, grpcnt388 389 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,nas(1,1,it),zx_tmp_3d)390 zx_tmp_fi3d = nas(:,:,it) * dry_mass / nadv_mass(it)391 CALL histwrite_phy(nid_tra,grpsym(it),itau_w,zx_tmp_fi3d)392 ENDDO393 394 #endif395 396 397 #ifdef INCA_NMHC398 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,CO2_basprod(1,1),399 cym . zx_tmp_3d)400 CALL histwrite_phy(nid_tra,"CO2_basprod",itau_w,CO2_basprod)401 402 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,CO2_nmhcprod(1,1),403 cym . zx_tmp_3d)404 CALL histwrite_phy(nid_tra,"CO2_nmhcprod",itau_w,CO2_nmhcprod)405 406 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,CO2_radicalprod(1,1),407 cym . zx_tmp_3d)408 CALL histwrite_phy(nid_tra,"CO2_radicalprod",itau_w,409 . CO2_radicalprod)410 411 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hno3_prod(1,1),412 cym . zx_tmp_3d)413 CALL histwrite_phy(nid_tra,"HNO3_prod",itau_w,hno3_prod)414 415 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hno3_loss(1,1),416 cym . zx_tmp_3d)417 CALL histwrite_phy(nid_tra,"HNO3_loss",itau_w,hno3_loss)418 419 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,co_prod(1,1),420 cym . zx_tmp_3d)421 CALL histwrite_phy(nid_tra,"CO_prod",itau_w,co_prod)422 423 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,co_loss(1,1),424 cym . zx_tmp_3d)425 CALL histwrite_phy(nid_tra,"CO_loss",itau_w,co_loss)426 427 DO it=1, grpcnt428 429 cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,nas(1,1,it),zx_tmp_3d)430 zx_tmp_3d = nas(:,:,it) * dry_mass / nadv_mass(it)431 CALL histwrite_phy(nid_tra,grpsym(it),itau_w,zx_tmp_fi3d)432 ENDDO433 434 435 #endif436 437 ! Fin ajout Anne438 439 ! ... Special section for daytime averaging440 ! cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,day_cnt(1,1),441 ! . zx_tmp_3d)442 ! CALL histwrite_phy(nid_tra,"day_cnt",itau_w,zx_tmp_3d,443 ! . iim*(jjm+1)*klev,ndex3d)444 ! cym CALL gr_fi_ecrit(klev,klon,iim,jjm+1,no_daytime(1,1),445 ! . zx_tmp_3d)446 ! CALL histwrite_phy(nid_tra,"NO_day",itau_w,zx_tmp_3d,447 ! . iim*(jjm+1)*klev,ndex3d)448 449 !#endif450 #else451 43 452 44 C abder … … 502 94 503 95 c abder 504 #endif505 96 506 97 if (ok_sync) then 507 98 call histsync(nid_tra) 508 #ifdef INCA_AER509 call histsync(nid_tra2)510 call histsync(nid_tra3)511 #endif512 99 endif 513 100 101 #endif 514 102 103 104
Note: See TracChangeset
for help on using the changeset viewer.