Changeset 4056 for LMDZ6/trunk/libf/phylmd
- Timestamp:
- Jan 12, 2022, 10:54:09 PM (3 years ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/Dust/phys_output_write_spl_mod.F90
r3805 r4056 381 381 USE pbl_surface_mod, ONLY: snow 382 382 USE indice_sol_mod, ONLY: nbsrf 383 USE infotrac, ONLY: nqtot, n qo, nbtr, type_trac383 USE infotrac, ONLY: nqtot, nbtr, type_trac 384 384 USE geometry_mod, ONLY: cell_area 385 385 USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, landice_opt … … 430 430 INTEGER, PARAMETER :: jjmp1=jjm+1-1/jjm 431 431 INTEGER :: itau_w 432 INTEGER :: i, iinit, iinitend=1, iff, iq, nsrf, k, ll, naero432 INTEGER :: i, iinit, iinitend=1, iff, iq, itr, nsrf, k, ll, naero 433 433 REAL, DIMENSION (klon) :: zx_tmp_fi2d 434 434 REAL, DIMENSION (klon,klev) :: zx_tmp_fi3d, zpt_conv … … 1610 1610 #endif 1611 1611 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1612 IF (nqtot.GE.nqo+1) THEN 1613 !AS: type_trac = 'lmdz' par defaut dans libf/dyn3d/conf_gcm.F90 1614 !Changé par inca, repr(obus), coag(ulation), co2i(nteractif), PAS par SPLA 1615 !Cet "if" est donc inutile : IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 1616 DO iq=nqo+1,nqtot 1617 CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo)) 1618 CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo)) 1619 CALL histwrite_phy(o_dtr_the(iq-nqo),d_tr_th(:,:,iq-nqo)) 1620 CALL histwrite_phy(o_dtr_con(iq-nqo),d_tr_cv(:,:,iq-nqo)) 1621 CALL histwrite_phy(o_dtr_lessi_impa(iq-nqo),d_tr_lessi_impa(:,:,iq-nqo)) 1622 CALL histwrite_phy(o_dtr_lessi_nucl(iq-nqo),d_tr_lessi_nucl(:,:,iq-nqo)) 1623 CALL histwrite_phy(o_dtr_insc(iq-nqo),d_tr_insc(:,:,iq-nqo)) 1624 CALL histwrite_phy(o_dtr_bcscav(iq-nqo),d_tr_bcscav(:,:,iq-nqo)) 1625 CALL histwrite_phy(o_dtr_evapls(iq-nqo),d_tr_evapls(:,:,iq-nqo)) 1626 CALL histwrite_phy(o_dtr_ls(iq-nqo),d_tr_ls(:,:,iq-nqo)) 1627 ! CALL histwrite_phy(o_dtr_dyn(iq-nqo),d_tr_dyn(:,:,iq-nqo)) 1628 ! CALL histwrite_phy(o_dtr_cl(iq-nqo),d_tr_cl(:,:,iq-nqo)) 1629 CALL histwrite_phy(o_dtr_trsp(iq-nqo),d_tr_trsp(:,:,iq-nqo)) 1630 CALL histwrite_phy(o_dtr_sscav(iq-nqo),d_tr_sscav(:,:,iq-nqo)) 1631 CALL histwrite_phy(o_dtr_sat(iq-nqo),d_tr_sat(:,:,iq-nqo)) 1632 CALL histwrite_phy(o_dtr_uscav(iq-nqo),d_tr_uscav(:,:,iq-nqo)) 1612 itr = 0 1613 DO iq = 1, nqtot 1614 IF(tracers(iq)%isH2Ofamily) CYCLE 1615 itr = itr+1 1616 CALL histwrite_phy(o_trac(itr), tr_seri(:,:,itr)) 1617 CALL histwrite_phy(o_dtr_vdf(itr),d_tr_cl(:,:,itr)) 1618 CALL histwrite_phy(o_dtr_the(itr),d_tr_th(:,:,itr)) 1619 CALL histwrite_phy(o_dtr_con(itr),d_tr_cv(:,:,itr)) 1620 CALL histwrite_phy(o_dtr_lessi_impa(itr),d_tr_lessi_impa(:,:,itr)) 1621 CALL histwrite_phy(o_dtr_lessi_nucl(itr),d_tr_lessi_nucl(:,:,itr)) 1622 CALL histwrite_phy(o_dtr_insc(itr),d_tr_insc(:,:,itr)) 1623 CALL histwrite_phy(o_dtr_bcscav(itr),d_tr_bcscav(:,:,itr)) 1624 CALL histwrite_phy(o_dtr_evapls(itr),d_tr_evapls(:,:,itr)) 1625 CALL histwrite_phy(o_dtr_ls(itr),d_tr_ls(:,:,itr)) 1626 ! CALL histwrite_phy(o_dtr_dyn(itr),d_tr_dyn(:,:,itr)) 1627 ! CALL histwrite_phy(o_dtr_cl(itr),d_tr_cl(:,:,itr)) 1628 CALL histwrite_phy(o_dtr_trsp(itr),d_tr_trsp(:,:,itr)) 1629 CALL histwrite_phy(o_dtr_sscav(itr),d_tr_sscav(:,:,itr)) 1630 CALL histwrite_phy(o_dtr_sat(itr),d_tr_sat(:,:,itr)) 1631 CALL histwrite_phy(o_dtr_uscav(itr),d_tr_uscav(:,:,itr)) 1633 1632 zx_tmp_fi2d=0. 1634 1633 IF (vars_defined) THEN 1635 1634 DO k=1,klev 1636 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,i q-nqo)1635 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,itr) 1637 1636 ENDDO 1638 1637 ENDIF 1639 CALL histwrite_phy(o_trac_cum(i q-nqo), zx_tmp_fi2d)1638 CALL histwrite_phy(o_trac_cum(itr), zx_tmp_fi2d) 1640 1639 ENDDO 1641 !ENDIF1642 ENDIF1643 1640 1644 1641 IF (.NOT.vars_defined) THEN -
LMDZ6/trunk/libf/phylmd/Dust/phytracr_spl_mod.F90
r4046 r4056 1104 1104 REAL, intent(in) :: rlon(klon) ! longitudes pour chaque point 1105 1105 ! 1106 INTEGER i, k, i t, j, ig1106 INTEGER i, k, iq, itr, j, ig 1107 1107 ! 1108 1108 ! DEFINITION OF DIAGNOSTIC VARIABLES … … 1260 1260 1261 1261 #ifdef IOPHYS_DUST 1262 do it=1,nbtr 1263 write(str2,'(i2.2)') it 1264 call iophys_ecrit('TRA'//str2,klev,'SOURCE','',tr_seri(:,:,it)) 1262 itr = 0 1263 DO iq = 1, nqtot 1264 IF(tracers(iq)%isH2Ofamily) CYCLE 1265 itr = itr+1 1266 write(str2,'(i2.2)') itr 1267 call iophys_ecrit('TRA'//str2,klev,'SOURCE','',tr_seri(:,:,itr)) 1265 1268 enddo 1266 1269 #endif … … 1414 1417 id_codu=-1 1415 1418 id_scdu=-1 1416 !print *,nbtr 1417 do it=1,nbtr 1418 print *, it, tracers(it+nqo)%name 1419 SELECT CASE(tracers(it+nqo)%name) 1420 CASE('PREC'); id_prec=it 1421 CASE('FINE'); id_fine=it 1422 CASE('COSS'); id_coss=it 1423 CASE('CODU'); id_codu=it 1424 CASE('SCDU'); id_scdu=it 1425 END SELECT 1426 enddo 1427 ! check consistency with dust emission scheme: 1428 if (ok_chimeredust) then 1419 itr = 0 1420 do iq=1,nqtot 1421 IF(tracers(iq)%isH2Ofamily) CYCLE 1422 itr = itr+1 1423 print *, itr, TRIM(tracers(iq)%name) 1424 SELECT CASE(tracers(iq)%name) 1425 CASE('PREC'); id_prec=itr 1426 CASE('FINE'); id_fine=itr 1427 CASE('COSS'); id_coss=itr 1428 CASE('CODU'); id_codu=itr 1429 CASE('SCDU'); id_scdu=itr 1430 END SELECT 1431 enddo 1432 ! check consistency with dust emission scheme: 1433 if (ok_chimeredust) then 1429 1434 if (.not.( id_scdu>0 .and. id_codu>0 .and. id_fine>0)) then 1430 1435 call abort_gcm('phytracr_mod', 'pb in ok_chimdust 0',1) 1431 1436 endif 1432 else1437 else 1433 1438 if (id_scdu>0) then 1434 1439 call abort_gcm('phytracr_mod', 'pb in ok_chimdust 1 SCDU',1) … … 1560 1565 ! JE before put in zero 1561 1566 IF (lminmax) THEN 1562 DO it =1,nbtr1563 CALL checknanqfi(tr_seri(:,:,it ),qmin,qmax,'nan init phytracr')1564 ENDDO 1565 DO it =1,nbtr1566 CALL minmaxqfi2(tr_seri(:,:,it ),qmin,qmax,'minmax init phytracr')1567 DO itr=1,nbtr 1568 CALL checknanqfi(tr_seri(:,:,itr),qmin,qmax,'nan init phytracr') 1569 ENDDO 1570 DO itr=1,nbtr 1571 CALL minmaxqfi2(tr_seri(:,:,itr),qmin,qmax,'minmax init phytracr') 1567 1572 ENDDO 1568 1573 CALL minmaxsource(source_tr,qmin,qmax,'maxsource init phytracr') -
LMDZ6/trunk/libf/phylmd/Dust/splaeropt_5wv_rrtm.F90
r4046 r4056 9 9 USE DIMPHY 10 10 USE aero_mod 11 USE infotrac_phy 11 USE infotrac_phy, ONLY: nqtot, nbtr, tracers 12 12 USE phys_local_var_mod, ONLY: od550aer,od865aer,ec550aer,od550lt1aer 13 13 ! … … 34 34 LOGICAL :: soluble 35 35 36 INTEGER :: i, k, m, i tr, irh, aerindex36 INTEGER :: i, k, m, iq, itr, irh, aerindex 37 37 INTEGER :: spsol, spinsol, la 38 38 INTEGER :: RH_num(klon,klev) … … 112 112 ENDDO 113 113 114 DO itr=1,nbtr !--loop over tracers 115 SELECT CASE(tracers(itr+nqo)%name) 114 itr = 0 115 DO iq = 1, nqtot 116 IF(tracers(iq)%isH2Ofamily) CYCLE 117 itr = itr+1 118 SELECT CASE(tracers(iq)%name) 116 119 CASE('PREC'); CYCLE !--precursor 117 120 CASE('FINE'); soluble=.TRUE.; spsol=1; aerindex=1 !--fine mode accumulation mode … … 119 122 CASE('CODU'); soluble=.FALSE.; spsol=1; aerindex=3 !--coarse mode dust 120 123 CASE('SCDU'); soluble=.FALSE.; spsol=2; aerindex=4 !--super coarse mode dust 121 CASE DEFAULT; CALL abort_physic(modname,'I cannot do aerosol optics for '//tracers(i tr+nqo)%name,1)124 CASE DEFAULT; CALL abort_physic(modname,'I cannot do aerosol optics for '//tracers(iq)%name,1) 122 125 END SELECT 123 126 -
LMDZ6/trunk/libf/phylmd/Dust/splaeropt_6bands_rrtm.F90
r4046 r4056 8 8 USE dimphy 9 9 USE aero_mod 10 USE infotrac_phy 10 USE infotrac_phy, ONLY: nqtot, nbtr, tracers 11 11 USE phys_local_var_mod, ONLY: abs550aer 12 12 … … 35 35 ! 36 36 LOGICAL :: soluble 37 INTEGER :: i, k, irh, i tr, inu37 INTEGER :: i, k, irh, iq, itr, inu 38 38 INTEGER :: aerindex, spsol, spinsol 39 39 INTEGER :: RH_num(klon,klev) … … 165 165 cg_ae(:,:,:,:)=0. 166 166 167 DO itr=1,nbtr !--loop over tracers 168 SELECT CASE(tracers(itr+nqo)%name) 167 itr = 0 168 DO iq = 1, nqtot 169 IF(tracers(iq)%isH2Ofamily) CYCLE 170 itr = itr+1 171 SELECT CASE(tracers(iq)%name) 169 172 CASE('PREC'); CYCLE !--precursor 170 173 CASE('FINE'); soluble=.TRUE.; spsol=1; aerindex=1 !--fine mode accumulation mode … … 172 175 CASE('CODU'); soluble=.FALSE.; spsol=1; aerindex=3 !--coarse mode dust 173 176 CASE('SCDU'); soluble=.FALSE.; spsol=2; aerindex=4 !--super coarse mode dust 174 CASE DEFAULT; CALL abort_physic(modname,'I cannot do aerosol optics for '//tracers(i tr+nqo)%name,1)177 CASE DEFAULT; CALL abort_physic(modname,'I cannot do aerosol optics for '//tracers(iq)%name,1) 175 178 END SELECT 176 179 -
LMDZ6/trunk/libf/phylmd/Dust/splaeropt_lw_rrtm.F90
r4046 r4056 10 10 USE dimphy 11 11 USE aero_mod 12 USE infotrac_phy 12 USE infotrac_phy, ONLY: nqtot, nbtr, tracers 13 13 USE phys_state_var_mod, ONLY : tau_aero_lw_rrtm 14 14 USE YOERAD, ONLY : NLW … … 30 30 INTEGER, PARAMETER :: naero=naero_soluble+naero_insoluble 31 31 ! 32 INTEGER inu, itr, spinsol32 INTEGER inu, itr, iq, spinsol 33 33 CHARACTER*20 modname 34 34 ! … … 54 54 tau_aero_lw_rrtm = 0.0 55 55 ! 56 DO itr=1,nbtr 57 SELECT CASE(tracers(itr+nqo)%name) 58 CASE('PREC','FINE''COSS'); CYCLE !--precursor or fine/coarde accumulation mode 56 57 itr = 0 58 DO iq = 1, nqtot 59 IF(tracers(iq)%isH2Ofamily) CYCLE 60 itr = itr+1 61 SELECT CASE(tracers(iq)%name) 62 CASE('PREC','FINE','COSS'); CYCLE !--precursor or fine/coarde accumulation mode 59 63 CASE('CODU'); spinsol=1 !--coarse mode dust 60 64 CASE('SCDU'); spinsol=2 !--super coarse mode dust 61 CASE DEFAULT; CALL abort_physic(modname,'I cannot do aerosol optics for '//tracers(i tr+nqo)%name,1)65 CASE DEFAULT; CALL abort_physic(modname,'I cannot do aerosol optics for '//tracers(iq)%name,1) 62 66 END SELECT 63 67 ! -
LMDZ6/trunk/libf/phylmd/Dust/splaerosol_optic_rrtm.F90
r4046 r4056 13 13 USE dimphy 14 14 USE aero_mod 15 USE infotrac_phy 15 USE infotrac_phy, ONLY: nbtr, nqtot, tracers 16 16 USE YOMCST, ONLY: RD, RG 17 17 … … 40 40 REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT) :: tau3d_aero 41 41 42 INTEGER i, k, i tr42 INTEGER i, k, iq, itr 43 43 REAL, DIMENSION(klon,klev) :: zdm, zdh 44 44 REAL zrho, pdel … … 50 50 mass_solu_aero_pi(:,:) = 0.0 51 51 ! 52 DO itr=1,nbtr 53 IF (tracers(itr+nqo)%name=='FINE') THEN 52 itr = 0 53 DO iq = 1, nqtot 54 IF(tracers(iq)%isH2Ofamily) CYCLE 55 itr = itr+1 56 IF(tracers(iq)%name/='FINE') THEN 54 57 mass_solu_aero(:,:) = tr_seri(:,:,itr) 55 58 mass_solu_aero_pi(:,:) = tr_seri(:,:,itr) -
LMDZ6/trunk/libf/phylmd/infotrac_phy.F90
r4052 r4056 26 26 !$OMP THREADPRIVATE(nqtottr) 27 27 28 ! ThL : number of CO2 tracers 28 ! ThL : number of CO2 tracers ModThL 29 29 INTEGER, SAVE :: nqCO2 30 30 !$OMP THREADPRIVATE(nqCO2) 31 31 32 32 #ifdef CPP_StratAer 33 ! nbtr_bin: number of aerosol bins for StratAer model 34 ! nbtr_sulgas: number of sulfur gases for StratAer model 35 INTEGER, SAVE :: nbtr_bin, nbtr_sulgas 36 !$OMP THREADPRIVATE(nbtr_bin,nbtr_sulgas) 37 INTEGER, SAVE :: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat 38 !$OMP THREADPRIVATE(id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat) 33 !=== SPECIFIC TO STRATOSPHERIC AEROSOLS (CK/OB) 34 INTEGER, SAVE :: nbtr_bin, nbtr_sulgas !--- number of aerosols bins and sulfur gases for StratAer model 35 !$OMP THREADPRIVATE(nbtr_bin, nbtr_sulgas) 36 INTEGER, SAVE :: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat 37 !$OMP THREADPRIVATE(id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat) 39 38 #endif 40 41 ! CRisi: nb traceurs pères= directement advectés par l'air42 INTEGER, SAVE :: nqperes43 !$OMP THREADPRIVATE(nqperes)44 39 45 40 ! Tracers parameters 46 41 TYPE(trac_type), TARGET, ALLOCATABLE, SAVE :: tracers(:) 47 42 !$OMP THREADPRIVATE(tracers) 48 49 ! niadv : vector keeping the coorspondance between all tracers(nqtot) treated in the50 ! dynamic part of the code and the tracers (nbtr+2) used in the physics part of the code.51 INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: niadv ! equivalent dyn / physique52 !$OMP THREADPRIVATE(niadv)53 43 54 44 ! conv_flg(it)=0 : convection desactivated for tracer number it … … 85 75 !$OMP THREADPRIVATE(niso,ntraceurs_zone,ntraciso) 86 76 87 INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: itr_indice ! numéro iq entre 1 et nqtot qui correspond au traceur itr entre 1 et nqtottr88 !$OMP THREADPRIVATE(itr_indice)89 90 77 CONTAINS 91 78 92 79 SUBROUTINE init_infotrac_phy(nqtot_,nqo_,nbtr_,nqtottr_,nqCO2_,tracers_,type_trac_,& 93 niadv_,conv_flg_,pbl_flg_,solsym_,&80 conv_flg_,pbl_flg_,solsym_,& 94 81 ok_isotopes_,ok_iso_verif_,ok_isotrac_,& 95 82 ok_init_iso_,niso_possibles_,tnat_,& 96 83 alpha_ideal_,use_iso_,iqiso_,iso_indnum_,& 97 84 indnum_fn_num_,index_trac_,& 98 niso_,ntraceurs_zone_,ntraciso_,itr_indice_& 99 #ifdef CPP_StratAer 100 ,nbtr_bin_,nbtr_sulgas_& 101 ,id_OCS_strat_,id_SO2_strat_,id_H2SO4_strat_,id_BIN01_strat_& 102 #endif 103 ) 85 niso_,ntraceurs_zone_,ntraciso_) 104 86 105 87 ! transfer information on tracers from dynamics to physics … … 112 94 INTEGER,INTENT(IN) :: nqtottr_ 113 95 INTEGER,INTENT(IN) :: nqCO2_ 114 #ifdef CPP_StratAer115 INTEGER,INTENT(IN) :: nbtr_bin_116 INTEGER,INTENT(IN) :: nbtr_sulgas_117 INTEGER,INTENT(IN) :: id_OCS_strat_118 INTEGER,INTENT(IN) :: id_SO2_strat_119 INTEGER,INTENT(IN) :: id_H2SO4_strat_120 INTEGER,INTENT(IN) :: id_BIN01_strat_121 #endif122 96 TYPE(trac_type), INTENT(IN) :: tracers_(nqtot_) ! tracers descriptors 123 97 CHARACTER(len=*),INTENT(IN) :: type_trac_ 124 INTEGER,INTENT(IN) :: niadv_ (nqtot_) ! equivalent dyn / physique125 98 INTEGER,INTENT(IN) :: conv_flg_(nbtr_) 126 99 INTEGER,INTENT(IN) :: pbl_flg_(nbtr_) … … 142 115 INTEGER,INTENT(IN) :: ntraceurs_zone_ 143 116 INTEGER,INTENT(IN) :: ntraciso_ 144 INTEGER,INTENT(IN) :: itr_indice_(nqtottr_) 145 146 CHARACTER(LEN=30) :: modname="init_infotrac_phy" 117 118 INTEGER :: iq, itr 119 CHARACTER(LEN=maxlen), ALLOCATABLE :: tnames(:) 120 CHARACTER(LEN=maxlen) :: modname="init_infotrac_phy" 147 121 148 122 nqtot=nqtot_ … … 153 127 ALLOCATE(tracers(nqtot)); tracers(:) = tracers_(:) 154 128 #ifdef CPP_StratAer 155 nbtr_bin=nbtr_bin_ 156 nbtr_sulgas=nbtr_sulgas_ 157 id_OCS_strat=id_OCS_strat_ 158 id_SO2_strat=id_SO2_strat_ 159 id_H2SO4_strat=id_H2SO4_strat_ 160 id_BIN01_strat=id_BIN01_strat_ 129 IF (type_trac == 'coag') THEN 130 nbtr_bin = COUNT([(tracers(iq)%name(1:3)=='BIN', iq=1, nqtot)]) 131 nbtr_sulgas = COUNT([(tracers(iq)%name(1:3)=='GAS', iq=1, nqtot)]) 132 tnames = PACK(tracers(:)%name, MASK=.NOT.tracers(:)%isH2Ofamily) 133 id_BIN01_strat = strIdx(tnames, 'BIN01' ) 134 id_OCS_strat = strIdx(tnames, 'GASOSC' ) 135 id_SO2_strat = strIdx(tnames, 'GASSO2' ) 136 id_H2SO4_strat = strIdx(tnames, 'GASH2SO4') 137 id_TEST_strat = strIdx(tnames, 'GASTEST' ) 138 WRITE(lunout,*)'nbtr_bin =', nbtr_bin 139 WRITE(lunout,*)'nbtr_sulgas =', nbtr_sulgas 140 WRITE(lunout,*)'id_BIN01_strat =', id_BIN01_strat 141 WRITE(lunout,*)'id_OCS_strat =', id_OCS_strat 142 WRITE(lunout,*)'id_SO2_strat =', id_SO2_strat 143 WRITE(lunout,*)'id_H2SO4_strat =', id_H2SO4_strat 144 WRITE(lunout,*)'id_TEST_strat =', id_TEST_strat 145 END IF 161 146 #endif 162 147 type_trac = type_trac_ 163 ALLOCATE(niadv(nqtot))164 niadv(:)=niadv_(:)165 148 ALLOCATE(conv_flg(nbtr)) 166 149 conv_flg(:)=conv_flg_(:) … … 207 190 ENDIF ! of IF(ok_isotopes) 208 191 209 ALLOCATE(itr_indice(nqtottr)) 210 itr_indice(:)=itr_indice_(:) 211 192 WRITE(*,*) 'infotrac_phy 207: nqtottr=',nqtottr 193 WRITE(*,*) 'ntraciso,niso=',ntraciso,niso 194 #ifdef ISOVERIF 195 ! DC: the "1" will be replaced by iH2O (H2O isotopes group index) 196 WRITE(*,*) 'iso_iName=',PACK(tracers(:)%iso_iName, MASK=tracers(:)%iso_iGroup==1) 197 #endif 198 212 199 END SUBROUTINE init_infotrac_phy 213 200 -
LMDZ6/trunk/libf/phylmd/init_be.F90
r2351 r4056 5 5 6 6 USE dimphy 7 USE infotrac_phy, ONLY : nbtr8 7 USE indice_sol_mod 9 8 USE geometry_mod, ONLY : longitude, latitude -
LMDZ6/trunk/libf/phylmd/phyetat0.F90
r4046 r4056 21 21 ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal, ratqs_inter 22 22 !FC 23 USE geometry_mod, ONLY: longitude_deg, latitude_deg24 USE iostart, ONLY: close_startphy, get_field, get_var, open_startphy25 USE infotrac_phy, only: nbtr, nqo, type_trac, tracers, niadv26 USE traclmdz_mod, ONLY: traclmdz_from_restart27 USE carbon_cycle_mod, ONLY 28 USE indice_sol_mod, only: nbsrf, is_ter, epsfra, is_lic, is_oce, is_sic29 USE ocean_slab_mod, ONLY: nslay, tslab, seaice, tice, ocean_slab_init23 USE geometry_mod, ONLY: longitude_deg, latitude_deg 24 USE iostart, ONLY: close_startphy, get_field, get_var, open_startphy 25 USE infotrac_phy, ONLY: nqtot, nbtr, type_trac, tracers 26 USE traclmdz_mod, ONLY: traclmdz_from_restart 27 USE carbon_cycle_mod, ONLY: carbon_cycle_tr, carbon_cycle_cpl, co2_send 28 USE indice_sol_mod, ONLY: nbsrf, is_ter, epsfra, is_lic, is_oce, is_sic 29 USE ocean_slab_mod, ONLY: nslay, tslab, seaice, tice, ocean_slab_init 30 30 USE time_phylmdz_mod, ONLY: init_iteration, pdtphys, itau_phy 31 31 #ifdef CPP_XIOS … … 75 75 INTEGER length 76 76 PARAMETER (length=100) 77 INTEGER it, i iq, isw77 INTEGER it, iq, isw 78 78 REAL tab_cntrl(length), tabcntr0(length) 79 79 CHARACTER*7 str7 … … 448 448 449 449 IF (type_trac == 'lmdz') THEN 450 DO it=1, nbtr 451 !! iiq=niadv(it+2) ! jyg 452 iiq=niadv(it+nqo) ! jyg 453 found=phyetat0_get(1,trs(:,it),"trs_"//TRIM(tracers(iiq)%name), & 454 "Surf trac"//TRIM(tracers(iiq)%name),0.) 455 ENDDO 450 it = 0 451 DO iq = 1, nqtot 452 IF(.NOT.tracers(iq)%isAdvected .OR. tracers(iq)%isH2Ofamily) CYCLE 453 it = it+1 454 found=phyetat0_get(1,trs(:,it),"trs_"//TRIM(tracers(iq)%name), & 455 "Surf trac"//TRIM(tracers(iq)%name),0.) 456 END DO 456 457 CALL traclmdz_from_restart(trs) 457 458 ENDIF 458 459 460 !--OB now this is for co2i - ThL: and therefore also for inco 459 461 IF (type_trac == 'co2i' .OR. type_trac == 'inco') THEN 460 462 IF (carbon_cycle_cpl) THEN … … 598 600 CALL get_field(name, field, found) 599 601 IF (.NOT. found) THEN 600 WRITE(lunout,*) "phyetat0: Le champ <", name,"> est absent"602 WRITE(lunout,*) "phyetat0: Le champ <",TRIM(name),"> est absent" 601 603 WRITE(lunout,*) "Depart legerement fausse. Mais je continue" 602 604 field(:,:)=default -
LMDZ6/trunk/libf/phylmd/phyredem.F90
r4046 r4056 35 35 USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var 36 36 USE traclmdz_mod, ONLY : traclmdz_to_restart 37 USE infotrac_phy, ONLY: type_trac, n iadv, tracers, nbtr, nqo37 USE infotrac_phy, ONLY: type_trac, nqtot, tracers, nbtr 38 38 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send 39 39 USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic, epsfra … … 70 70 CHARACTER (len=2) :: str2 71 71 CHARACTER (len=256) :: nam, lnam 72 INTEGER :: it, i iq, pass72 INTEGER :: it, iq, pass 73 73 74 74 !====================================================================== … … 326 326 IF (type_trac == 'lmdz') THEN 327 327 CALL traclmdz_to_restart(trs) 328 DO it=1, nbtr 329 !! iiq=niadv(it+2) ! jyg 330 iiq=niadv(it+nqo) ! jyg 331 CALL put_field(pass,"trs_"//tracers(iiq)%name, "", trs(:, it)) 328 it = 0 329 DO iq = 1, nqtot 330 IF(.NOT.tracers(iq)%isAdvected .OR. tracers(iq)%isH2Ofamily) CYCLE 331 it = it+1 332 CALL put_field(pass,"trs_"//tracers(iq)%name, "", trs(:, it)) 332 333 END DO 333 334 END IF … … 391 392 392 393 IMPLICIT NONE 393 INTEGER, INTENT(IN) 394 INTEGER, INTENT(IN) :: pass 394 395 CHARACTER(LEN=*), INTENT(IN) :: nam, lnam 395 396 REAL, INTENT(IN) :: field(:,:) -
LMDZ6/trunk/libf/phylmd/phys_output_mod.F90
r4046 r4056 35 35 USE iophy 36 36 USE dimphy 37 USE infotrac_phy, ONLY: nqtot, nqo, niadv, tracers, type_trac 38 USE strings_mod, ONLY: maxlen 37 USE infotrac_phy, ONLY: nqtot, tracers, type_trac, niso, ntraciso, maxlen 39 38 USE ioipsl 40 39 USE phys_cal_mod, only : hour, calend … … 96 95 CHARACTER(LEN=4), DIMENSION(nlevSTD) :: clevSTD 97 96 REAL, DIMENSION(nlevSTD) :: rlevSTD 98 INTEGER :: nsrf, k, iq, i iq, iff, i, j, ilev, jq97 INTEGER :: nsrf, k, iq, iff, i, j, ilev, itr, ixt, iiso, izone 99 98 INTEGER :: naero 100 99 LOGICAL :: ok_veget … … 115 114 LOGICAL, DIMENSION(nfiles) :: phys_out_filestations 116 115 117 CHARACTER(LEN=50) :: outiso118 CHARACTER(LEN=20) :: unit119 116 CHARACTER(LEN=maxlen) :: tnam, lnam, dn 120 117 INTEGER :: flag(nfiles) … … 122 119 !!!!!!!!!! stockage dans une region limitee pour chaque fichier !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 123 120 ! entre [phys_out_lonmin,phys_out_lonmax] et [phys_out_latmin,phys_out_latmax] 124 125 LOGICAL, DIMENSION(nfiles), SAVE :: phys_out_regfkey = (/ .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., & 126 .FALSE., .FALSE., .FALSE., .FALSE., .FALSE. /) 127 REAL, DIMENSION(nfiles), SAVE :: phys_out_lonmin = (/ -180., -180., -180., -180., -180., & 128 -180., -180., -180., -180., -180. /) 129 REAL, DIMENSION(nfiles), SAVE :: phys_out_lonmax = (/ 180., 180., 180., 180., 180., & 130 180., 180., 180., 180., 180. /) 131 REAL, DIMENSION(nfiles), SAVE :: phys_out_latmin = (/ -90., -90., -90., -90., -90., & 132 -90., -90., -90., -90., -90. /) 133 REAL, DIMENSION(nfiles), SAVE :: phys_out_latmax = (/ 90., 90., 90., 90., 90., & 134 90., 90., 90., 90., 90. /) 121 LOGICAL, DIMENSION(nfiles), SAVE :: & 122 phys_out_regfkey = [.FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE., .FALSE.] 123 REAL, DIMENSION(nfiles), SAVE :: & 124 phys_out_lonmin = [ -180., -180., -180., -180., -180., -180., -180., -180., -180., -180.], & 125 phys_out_lonmax = [ 180., 180., 180., 180., 180., 180., 180., 180., 180., 180.], & 126 phys_out_latmin = [ -90., -90., -90., -90., -90., -90., -90., -90., -90., -90.], & 127 phys_out_latmax = [ 90., 90., 90., 90., 90., 90., 90., 90., 90., 90.] 135 128 REAL, DIMENSION(klev,2) :: Ahyb_bounds, Bhyb_bounds 136 129 REAL, DIMENSION(klev+1) :: lev_index … … 169 162 ALLOCATE(o_dtr_dry(nqtot),o_dtr_vdf(nqtot)) 170 163 171 levmax = (/ klev, klev, klev, klev, klev, klev, nlevSTD, nlevSTD, nlevSTD, klev /)164 levmax = [klev, klev, klev, klev, klev, klev, nlevSTD, nlevSTD, nlevSTD, klev] 172 165 173 166 phys_out_filenames(1) = 'histmth' … … 366 359 CALL wxios_add_vaxis("bnds", 2, (/1.,2./)) 367 360 368 361 CALL wxios_add_vaxis("Alt", & 369 362 levmax(iff) - levmin(iff) + 1, pseudoalt) 370 363 371 IF (NSW.EQ.6) THEN 372 ! 373 !wl1_sun: minimum bound of wavelength (in um) 374 ! 375 wl1_sun(1)=0.180 376 wl1_sun(2)=0.250 377 wl1_sun(3)=0.440 378 wl1_sun(4)=0.690 379 wl1_sun(5)=1.190 380 wl1_sun(6)=2.380 381 ! 382 !wl2_sun: maximum bound of wavelength (in um) 383 ! 384 wl2_sun(1)=0.250 385 wl2_sun(2)=0.440 386 wl2_sun(3)=0.690 387 wl2_sun(4)=1.190 388 wl2_sun(5)=2.380 389 wl2_sun(6)=4.000 390 ! 391 ELSE IF(NSW.EQ.2) THEN 392 ! 393 !wl1_sun: minimum bound of wavelength (in um) 394 ! 395 wl1_sun(1)=0.250 396 wl1_sun(2)=0.690 397 ! 398 !wl2_sun: maximum bound of wavelength (in um) 399 ! 400 wl2_sun(1)=0.690 401 wl2_sun(2)=4.000 402 ENDIF 364 ! wl1_sun/wl2_sun: minimum/maximum bound of wavelength (in um) 365 SELECT CASE(NSW) 366 CASE(6) 367 wl1_sun(1:6) = [0.180, 0.250, 0.440, 0.690, 1.190, 2.380] 368 wl2_sun(1:6) = [0.250, 0.440, 0.690, 1.190, 2.380, 4.000] 369 CASE(2) 370 wl1_sun(1:2) = [0.250, 0.690] 371 wl2_sun(1:2) = [0.690, 4.000] 372 END SELECT 403 373 404 374 DO ISW=1, NSW … … 498 468 ENDIF ! clef_files 499 469 500 IF (nqtot>=nqo+1) THEN501 ! 502 DO iq=nqo+1,nqtot503 i iq=niadv(iq); jq = iq-nqo504 dn = 'd'//TRIM(tracers(i iq)%name)//'_'470 itr = 0 471 DO iq = 1, nqtot 472 IF(.NOT.tracers(iq)%isAdvected .OR. tracers(iq)%isH2Ofamily) CYCLE 473 itr = itr + 1 474 dn = 'd'//TRIM(tracers(iq)%name)//'_' 505 475 506 476 flag = [1, 5, 5, 5, 10, 10, 11, 11, 11, 11] 507 lnam = 'Tracer '//TRIM(tracers(iiq)%longName) 508 tnam = TRIM(tracers(iiq)%name); o_trac (jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 477 lnam = 'Tracer '//TRIM(tracers(iq)%longName) 478 tnam = TRIM(tracers(iq)%name); o_trac (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 479 509 480 flag = [4, 7, 7, 7, 10, 10, 11, 11, 11, 11] 510 lnam = 'Tendance tracer '//TRIM(tracers(i iq)%longName)511 tnam = TRIM(dn)//'vdf'; o_dtr_vdf ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])481 lnam = 'Tendance tracer '//TRIM(tracers(iq)%longName) 482 tnam = TRIM(dn)//'vdf'; o_dtr_vdf (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 512 483 513 484 flag = [5, 7, 7, 7, 10, 10, 11, 11, 11, 11] 514 tnam = TRIM(dn)//'the'; o_dtr_the ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])515 tnam = TRIM(dn)//'con'; o_dtr_con ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])485 tnam = TRIM(dn)//'the'; o_dtr_the (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 486 tnam = TRIM(dn)//'con'; o_dtr_con (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 516 487 517 488 flag = [7, 7, 7, 7, 10, 10, 11, 11, 11, 11] 518 tnam = TRIM(dn)//'lessi_impa'; o_dtr_lessi_impa( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])519 tnam = TRIM(dn)//'lessi_nucl'; o_dtr_lessi_nucl( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])520 tnam = TRIM(dn)//'insc'; o_dtr_insc ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])521 tnam = TRIM(dn)//'bcscav'; o_dtr_bcscav ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])522 tnam = TRIM(dn)//'evapls'; o_dtr_evapls ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])523 tnam = TRIM(dn)//'ls'; o_dtr_ls ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])524 tnam = TRIM(dn)//'trsp'; o_dtr_trsp ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])525 tnam = TRIM(dn)//'sscav'; o_dtr_sscav ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])526 tnam = TRIM(dn)//'sat'; o_dtr_sat ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])527 tnam = TRIM(dn)//'uscav'; o_dtr_uscav ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])528 529 lnam = 'tracer tendency dry deposition'//TRIM(tracers(i iq)%longName)530 tnam = 'cum'//TRIM(dn)//'dry'; o_dtr_dry ( jq) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])489 tnam = TRIM(dn)//'lessi_impa'; o_dtr_lessi_impa(itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 490 tnam = TRIM(dn)//'lessi_nucl'; o_dtr_lessi_nucl(itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 491 tnam = TRIM(dn)//'insc'; o_dtr_insc (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 492 tnam = TRIM(dn)//'bcscav'; o_dtr_bcscav (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 493 tnam = TRIM(dn)//'evapls'; o_dtr_evapls (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 494 tnam = TRIM(dn)//'ls'; o_dtr_ls (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 495 tnam = TRIM(dn)//'trsp'; o_dtr_trsp (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 496 tnam = TRIM(dn)//'sscav'; o_dtr_sscav (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 497 tnam = TRIM(dn)//'sat'; o_dtr_sat (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 498 tnam = TRIM(dn)//'uscav'; o_dtr_uscav (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 499 500 lnam = 'tracer tendency dry deposition'//TRIM(tracers(iq)%longName) 501 tnam = 'cum'//TRIM(dn)//'dry'; o_dtr_dry (itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 531 502 532 503 flag = [1, 4, 10, 10, 10, 10, 11, 11, 11, 11] 533 lnam = 'Cumulated tracer '//TRIM(tracers(i iq)%longName)534 tnam = 'cum'//TRIM(tracers(i iq)%name); o_trac_cum(jq)= ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)])504 lnam = 'Cumulated tracer '//TRIM(tracers(iq)%longName) 505 tnam = 'cum'//TRIM(tracers(iq)%name); o_trac_cum(itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 535 506 ENDDO 536 ENDIF537 507 538 508 ENDDO ! iff … … 555 525 ENDIF 556 526 557 ! DO iq=nqo+1,nqtot 558 ! iiq=niadv(iq) 559 ! dn = 'd'//TRIM(tracers(iiq)%name)//'_' 560 ! WRITE(*,'(a,i1,a,10i3)')'trac(',iiq,')%flag = ',o_trac(iiq)%flag 561 ! WRITE(*,'(a,i1,a)')'trac(',iiq,')%tnam = '//TRIM(o_trac(iiq)%name) 562 ! WRITE(*,'(a,i1,a)')'trac(',iiq,')%lnam = '//TRIM(o_trac(iiq)%description) 527 ! DO iq=1,nqtot 528 ! IF(.NOT.tracers(iq)%isAdvected .OR. tracers(iq)%isH2Ofamily) CYCLE 529 ! WRITE(*,'(a,i1,a,10i3)')'trac(',iq,')%flag = ',o_trac(iq)%flag 530 ! WRITE(*,'(a,i1,a)')'trac(',iq,')%name = '//TRIM(o_trac(iq)%name) 531 ! WRITE(*,'(a,i1,a)')'trac(',iq,')%description = '//TRIM(o_trac(iq)%description) 563 532 ! END DO 564 533 -
LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
r4046 r4056 25 25 26 26 USE dimphy, ONLY: klon, klev, klevp1 27 USE infotrac_phy, ONLY: nbtr, nqtot, nqo, type_trac, tracers, ni adv27 USE infotrac_phy, ONLY: nbtr, nqtot, nqo, type_trac, tracers, niso, ntraciso, maxlen 28 28 USE strings_mod, ONLY: maxlen 29 29 USE mod_phys_lmdz_para, ONLY: is_north_pole_phy,is_south_pole_phy … … 198 198 o_map_emis_Anv, o_map_pcld_Anv, o_map_tcld_Anv, & 199 199 o_map_ntot, o_map_hc,o_map_hist,o_map_Cb,o_map_ThCi,o_map_Anv, & 200 #ifdef ISO 201 ! Isotopes 202 o_xtprecip,o_xtplul,o_xtpluc,o_xtovap,o_xtoliq,o_xtcond, & 203 o_xtevap,o_dxtdyn,o_dxtldyn,o_dxtcon,o_dxtlsc,o_dxteva, & 204 o_dxtajs,o_dxtvdf,o_dxtthe, o_dxtch4, & 205 o_dxtprod_nucl,o_dxtcosmo,o_dxtdecroiss, & 206 #endif 207 ! Tropopause 200 208 o_alt_tropo, & 201 ! Tropopause202 209 o_p_tropopause, o_z_tropopause, o_t_tropopause, & 203 210 o_col_O3_strato, o_col_O3_tropo, & … … 254 261 rhlevSTD, O3STD, O3daySTD, uvSTD, vqSTD, vTSTD, wqSTD, vphiSTD, & 255 262 wTSTD, u2STD, v2STD, T2STD, missing_val_nf90, delta_sal, ds_ns, & 263 #ifdef ISO 264 xtrain_con, xtsnow_con, xtrain_fall, xtsnow_fall, & 265 #endif 256 266 dt_ns, delta_sst 257 267 … … 320 330 east_gwstress, west_gwstress, & 321 331 d_q_ch4, pmfd, pmfu, ref_liq, ref_ice, rhwriteSTD, & 332 #ifdef ISO 333 xtrain_lsc, xtsnow_lsc, xt_seri, xtl_seri,xts_seri,xtevap, & 334 d_xt_dyn,d_xtl_dyn,d_xt_con,d_xt_vdf,d_xt_ajsb, & 335 d_xt_lsc,d_xt_eva,d_xt_ch4, & 336 d_xt_ajs, d_xt_ajsb, & 337 d_xt_prod_nucl,d_xt_cosmo,d_xt_decroiss, & 338 #endif 322 339 ep, epmax_diag, & ! epmax_cape 323 340 p_tropopause, t_tropopause, z_tropopause … … 367 384 USE pbl_surface_mod, ONLY: snow 368 385 USE indice_sol_mod, ONLY: nbsrf 386 #ifdef ISO 387 USE isotopes_mod, ONLY: iso_HTO 388 #endif 369 389 USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg 370 390 USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, landice_opt … … 419 439 ! Local 420 440 INTEGER :: itau_w 421 INTEGER :: i, iinit, iinitend=1, iff, iq, iiq,nsrf, k, ll, naero441 INTEGER :: i, iinit, iinitend=1, iff, iq, nsrf, k, ll, naero 422 442 REAL, DIMENSION (klon) :: zx_tmp_fi2d, zpt_conv2d, wind100m 423 443 REAL, DIMENSION (klon,klev) :: zx_tmp_fi3d, zpt_conv … … 439 459 #endif 440 460 REAL, PARAMETER :: un_jour=86400. 441 INTEGER ISW461 INTEGER :: ISW, itr, ixt, it 442 462 CHARACTER*1 ch1 443 463 CHARACTER(LEN=maxlen) :: varname, dn … … 452 472 REAL,DIMENSION(klon,klev) :: z, dz 453 473 REAL,DIMENSION(klon) :: zrho, zt 454 455 INTEGER :: nqup456 457 474 458 475 ! On calcul le nouveau tau: … … 511 528 CALL xios_get_handle("fields_strataer_trac_3D", group_handle) 512 529 ! On boucle sur les traceurs pour les ajouter au groupe puis fixer les attributs 513 DO iq =nqo+1, nqtot514 iiq=niadv(iq)515 dn = 'd'//TRIM(tracers(i iq)%name)//'_'516 WRITE (lunout,*) 'XIOS var=', nqo, iq, nqtot, tracers(i iq)%name530 DO iq = 1, nqtot 531 IF(.NOT.tracers(iq)%isAdvected .OR. tracers(iq)%isH2Ofamily) CYCLE 532 dn = 'd'//TRIM(tracers(iq)%name)//'_' 533 WRITE (lunout,*) 'XIOS var=', nqo, iq, nqtot, tracers(iq)%name 517 534 518 535 unt = "kg kg-1" 519 varname=trim(tracers(i iq)%name)536 varname=trim(tracers(iq)%name) 520 537 CALL xios_add_child(group_handle, child, varname) 521 538 CALL xios_set_attr(child, name=varname, unit=unt) … … 561 578 CALL xios_add_child(group_handle, child, varname) 562 579 CALL xios_set_attr(child, name=varname, unit=unt) 563 END DO580 END DO 564 581 !On ajoute les variables 2D traceurs par l interface fortran 565 582 CALL xios_get_handle("fields_strataer_trac_2D", group_handle) 566 583 ! On boucle sur les traceurs pour les ajouter au groupe puis fixer les attributs 567 DO iq =nqo+1, nqtot568 iiq=niadv(iq)584 DO iq = 1, nqtot 585 IF(.NOT.tracers(iq)%isAdvected .OR. tracers(iq)%isH2Ofamily) CYCLE 569 586 570 587 unt = "kg m-2" 571 varname='cum'//trim(tracers(i iq)%name)588 varname='cum'//trim(tracers(iq)%name) 572 589 WRITE (lunout,*) 'XIOS var=', iq, nqtot, varname 573 590 CALL xios_add_child(group_handle, child, varname) … … 575 592 576 593 unt = "kg m-2 s-1" 577 varname='cumd'//trim(tracers(i iq)%name)//'_dry'594 varname='cumd'//trim(tracers(iq)%name)//'_dry' 578 595 CALL xios_add_child(group_handle, child, varname) 579 596 CALL xios_set_attr(child, name=varname, unit=unt) … … 611 628 ENDIf 612 629 CALL histwrite_phy(o_aire, zx_tmp_fi2d) 630 613 631 IF (vars_defined) THEN 614 632 DO i=1, klon … … 2408 2426 IF (iflag_phytrac == 1 ) then 2409 2427 IF (type_trac == 'lmdz' .OR. type_trac == 'coag') THEN 2410 DO iq=nqo+1, nqtot 2428 itr = 0 2429 DO iq = 1, nqtot 2430 IF(tracers(iq)%isH2Ofamily) CYCLE 2431 itr = itr + 1 2432 ! write(*,*) 'phys_output_write_mod 2337: itr=',itr 2411 2433 !--3D fields 2412 CALL histwrite_phy(o_trac(i q-nqo), tr_seri(:,:,iq-nqo))2413 CALL histwrite_phy(o_dtr_vdf(i q-nqo),d_tr_cl(:,:,iq-nqo))2414 CALL histwrite_phy(o_dtr_the(i q-nqo),d_tr_th(:,:,iq-nqo))2415 CALL histwrite_phy(o_dtr_con(i q-nqo),d_tr_cv(:,:,iq-nqo))2416 CALL histwrite_phy(o_dtr_lessi_impa(i q-nqo),d_tr_lessi_impa(:,:,iq-nqo))2417 CALL histwrite_phy(o_dtr_lessi_nucl(i q-nqo),d_tr_lessi_nucl(:,:,iq-nqo))2418 CALL histwrite_phy(o_dtr_insc(i q-nqo),d_tr_insc(:,:,iq-nqo))2419 CALL histwrite_phy(o_dtr_bcscav(i q-nqo),d_tr_bcscav(:,:,iq-nqo))2420 CALL histwrite_phy(o_dtr_evapls(i q-nqo),d_tr_evapls(:,:,iq-nqo))2421 CALL histwrite_phy(o_dtr_ls(i q-nqo),d_tr_ls(:,:,iq-nqo))2422 CALL histwrite_phy(o_dtr_trsp(i q-nqo),d_tr_trsp(:,:,iq-nqo))2423 CALL histwrite_phy(o_dtr_sscav(i q-nqo),d_tr_sscav(:,:,iq-nqo))2424 CALL histwrite_phy(o_dtr_sat(i q-nqo),d_tr_sat(:,:,iq-nqo))2425 CALL histwrite_phy(o_dtr_uscav(i q-nqo),d_tr_uscav(:,:,iq-nqo))2434 CALL histwrite_phy(o_trac(itr), tr_seri(:,:,itr)) 2435 CALL histwrite_phy(o_dtr_vdf(itr),d_tr_cl(:,:,itr)) 2436 CALL histwrite_phy(o_dtr_the(itr),d_tr_th(:,:,itr)) 2437 CALL histwrite_phy(o_dtr_con(itr),d_tr_cv(:,:,itr)) 2438 CALL histwrite_phy(o_dtr_lessi_impa(itr),d_tr_lessi_impa(:,:,itr)) 2439 CALL histwrite_phy(o_dtr_lessi_nucl(itr),d_tr_lessi_nucl(:,:,itr)) 2440 CALL histwrite_phy(o_dtr_insc(itr),d_tr_insc(:,:,itr)) 2441 CALL histwrite_phy(o_dtr_bcscav(itr),d_tr_bcscav(:,:,itr)) 2442 CALL histwrite_phy(o_dtr_evapls(itr),d_tr_evapls(:,:,itr)) 2443 CALL histwrite_phy(o_dtr_ls(itr),d_tr_ls(:,:,itr)) 2444 CALL histwrite_phy(o_dtr_trsp(itr),d_tr_trsp(:,:,itr)) 2445 CALL histwrite_phy(o_dtr_sscav(itr),d_tr_sscav(:,:,itr)) 2446 CALL histwrite_phy(o_dtr_sat(itr),d_tr_sat(:,:,itr)) 2447 CALL histwrite_phy(o_dtr_uscav(itr),d_tr_uscav(:,:,itr)) 2426 2448 !--2D fields 2427 CALL histwrite_phy(o_dtr_dry(i q-nqo), flux_tr_dry(:,iq-nqo))2449 CALL histwrite_phy(o_dtr_dry(itr), flux_tr_dry(:,itr)) 2428 2450 zx_tmp_fi2d=0. 2429 2451 IF (vars_defined) THEN 2430 2452 DO k=1,klev 2431 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,i q-nqo)2453 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,itr) 2432 2454 ENDDO 2433 2455 ENDIF 2434 CALL histwrite_phy(o_trac_cum(i q-nqo), zx_tmp_fi2d)2456 CALL histwrite_phy(o_trac_cum(itr), zx_tmp_fi2d) 2435 2457 ENDDO !--iq 2436 2458 ENDIF !--type_trac 2437 2459 ! 2438 2460 IF (type_trac == 'co2i') THEN 2439 DO iq=nqo+1, nqtot 2461 itr = 0 2462 DO iq = 1, nqtot 2463 IF(tracers(iq)%isH2Ofamily) CYCLE 2464 itr = itr + 1 2465 ! write(*,*) 'phys_output_write_mod 2370: itr=',itr 2440 2466 !--3D fields 2441 CALL histwrite_phy(o_trac(i q-nqo), tr_seri(:,:,iq-nqo))2442 CALL histwrite_phy(o_dtr_vdf(i q-nqo),d_tr_cl(:,:,iq-nqo))2443 CALL histwrite_phy(o_dtr_the(i q-nqo),d_tr_th(:,:,iq-nqo))2444 CALL histwrite_phy(o_dtr_con(i q-nqo),d_tr_cv(:,:,iq-nqo))2467 CALL histwrite_phy(o_trac(itr), tr_seri(:,:,itr)) 2468 CALL histwrite_phy(o_dtr_vdf(itr),d_tr_cl(:,:,itr)) 2469 CALL histwrite_phy(o_dtr_the(itr),d_tr_th(:,:,itr)) 2470 CALL histwrite_phy(o_dtr_con(itr),d_tr_cv(:,:,itr)) 2445 2471 !--2D fields 2446 2472 !--CO2 burden … … 2448 2474 IF (vars_defined) THEN 2449 2475 DO k=1,klev 2450 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,i q-nqo)2476 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,itr) 2451 2477 ENDDO 2452 2478 ENDIF 2453 CALL histwrite_phy(o_trac_cum(i q-nqo), zx_tmp_fi2d)2479 CALL histwrite_phy(o_trac_cum(itr), zx_tmp_fi2d) 2454 2480 ENDDO !--iq 2455 2481 !--CO2 net fluxes … … 2463 2489 2464 2490 IF (type_trac == 'inco') THEN 2465 nqup = nqo+1 2466 DO iq=nqo+1, nqup 2491 DO iq = 1, nqtot 2492 IF(tracers(iq)%isH2Ofamily .OR. .NOT.tracers(iq)%isAdvected) CYCLE 2493 itr = itr+1 2494 IF(tracers(iq)%component /= 'co2i') CYCLE 2467 2495 !--3D fields 2468 CALL histwrite_phy(o_trac (iq-nqo), tr_seri(:,:,iq-nqo))2469 CALL histwrite_phy(o_dtr_vdf(i q-nqo),d_tr_cl(:,:,iq-nqo))2470 CALL histwrite_phy(o_dtr_the(i q-nqo),d_tr_th(:,:,iq-nqo))2471 CALL histwrite_phy(o_dtr_con(i q-nqo),d_tr_cv(:,:,iq-nqo))2496 CALL histwrite_phy(o_trac (itr),tr_seri(:,:,itr)) 2497 CALL histwrite_phy(o_dtr_vdf(itr),d_tr_cl(:,:,itr)) 2498 CALL histwrite_phy(o_dtr_the(itr),d_tr_th(:,:,itr)) 2499 CALL histwrite_phy(o_dtr_con(itr),d_tr_cv(:,:,itr)) 2472 2500 !--2D fields 2473 2501 !--CO2 burden … … 2475 2503 IF (vars_defined) THEN 2476 2504 DO k=1,klev 2477 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,i q-nqo)2505 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,itr) 2478 2506 ENDDO 2479 2507 ENDIF 2480 CALL histwrite_phy(o_trac_cum(i q-nqo), zx_tmp_fi2d)2508 CALL histwrite_phy(o_trac_cum(itr), zx_tmp_fi2d) 2481 2509 ENDDO !--iq 2482 2510 !--CO2 net fluxes … … 2504 2532 end if 2505 2533 2534 #ifdef ISO 2535 do ixt=1,ntraciso 2536 ! write(*,*) 'ixt' 2537 IF (vars_defined) zx_tmp_fi2d(:) = xtrain_fall(ixt,:) + xtsnow_fall(ixt,:) 2538 CALL histwrite_phy(o_xtprecip(ixt), zx_tmp_fi2d) 2539 2540 IF (vars_defined) zx_tmp_fi2d(:) = xtrain_lsc(ixt,:) + xtsnow_lsc(ixt,:) 2541 CALL histwrite_phy(o_xtplul(ixt), zx_tmp_fi2d) 2542 2543 IF (vars_defined) zx_tmp_fi2d(:) = xtrain_con(ixt,:) + xtsnow_con(ixt,:) 2544 CALL histwrite_phy(o_xtpluc(ixt), zx_tmp_fi2d) 2545 CALL histwrite_phy(o_xtevap(ixt), xtevap(ixt,:)) 2546 CALL histwrite_phy(o_xtovap(ixt), xt_seri(ixt,:,:)) 2547 CALL histwrite_phy(o_xtoliq(ixt), xtl_seri(ixt,:,:)) 2548 2549 IF (vars_defined) zx_tmp_fi3d(:,:)=xtl_seri(ixt,:,:)+xts_seri(ixt,:,:) 2550 CALL histwrite_phy(o_xtcond(ixt), zx_tmp_fi3d) 2551 CALL histwrite_phy(o_dxtdyn(ixt), d_xt_dyn(ixt,:,:)) 2552 CALL histwrite_phy(o_dxtldyn(ixt), d_xtl_dyn(ixt,:,:)) 2553 2554 IF (vars_defined) zx_tmp_fi3d(:,:)=d_xt_con(ixt,:,:)/pdtphys 2555 CALL histwrite_phy(o_dxtcon(ixt), zx_tmp_fi3d) 2556 2557 IF (vars_defined) zx_tmp_fi3d(:,:)=d_xt_lsc(ixt,:,:)/pdtphys 2558 CALL histwrite_phy(o_dxtlsc(ixt), zx_tmp_fi3d) 2559 2560 IF (vars_defined) zx_tmp_fi3d(:,:)=d_xt_eva(ixt,:,:)/pdtphys 2561 CALL histwrite_phy(o_dxteva(ixt), zx_tmp_fi3d) 2562 2563 IF (vars_defined) zx_tmp_fi3d(:,:)=d_xt_vdf(ixt,:,:)/pdtphys 2564 CALL histwrite_phy(o_dxtvdf(ixt), zx_tmp_fi3d) 2565 2566 IF (vars_defined) zx_tmp_fi3d(:,:)=d_xt_ajsb(ixt,:,:)/pdtphys 2567 CALL histwrite_phy(o_dxtajs(ixt), zx_tmp_fi3d) 2568 2569 IF (vars_defined) zx_tmp_fi3d(:,:)=(d_xt_ajs(ixt,:,:)-d_xt_ajsb(ixt,:,:))/pdtphys 2570 CALL histwrite_phy(o_dxtthe(ixt), zx_tmp_fi3d) 2571 2572 IF (ok_qch4) THEN 2573 IF (vars_defined) zx_tmp_fi3d(:,:)=d_xt_ch4(ixt,:,:)/pdtphys 2574 CALL histwrite_phy(o_dxtch4(ixt), zx_tmp_fi3d) 2575 END IF 2576 2577 IF (ixt == iso_HTO) THEN 2578 IF (vars_defined) zx_tmp_fi3d(:,:)=d_xt_prod_nucl(ixt,:,:)/pdtphys 2579 CALL histwrite_phy(o_dxtprod_nucl(ixt), zx_tmp_fi3d) 2580 2581 IF (vars_defined) zx_tmp_fi3d(:,:)=d_xt_cosmo(ixt,:,:)/pdtphys 2582 CALL histwrite_phy(o_dxtcosmo(ixt), zx_tmp_fi3d) 2583 2584 IF (vars_defined) zx_tmp_fi3d(:,:)=d_xt_decroiss(ixt,:,:)/pdtphys 2585 CALL histwrite_phy(o_dxtdecroiss(ixt), zx_tmp_fi3d) 2586 END IF 2587 2588 !write(*,*) 'phys_output_write_mod 2531' 2589 enddo !do ixt=1,ntraciso 2590 #endif 2591 2506 2592 IF (.NOT.vars_defined) THEN 2507 2593 !$OMP MASTER -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4009 r4056 39 39 USE ioipsl_getin_p_mod, ONLY : getin_p 40 40 USE indice_sol_mod 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, type_trac, nqCO2 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac, nqCO2 42 USE readTracFiles_mod, ONLY: phases_sep 43 USE strings_mod, ONLY: strIdx 42 44 USE iophy 43 45 USE limit_read_mod, ONLY : init_limit_read … … 146 148 ! 147 149 d_t_vdf,d_q_vdf,d_u_vdf,d_v_vdf,d_t_diss, & 150 d_t_vdf_x, d_t_vdf_w, & 151 d_q_vdf_x, d_q_vdf_w, & 148 152 d_ts, & 149 153 ! … … 218 222 zxfluxlat_x, zxfluxlat_w, & 219 223 ! 220 d_t_vdf_x, d_t_vdf_w, &221 d_q_vdf_x, d_q_vdf_w, &222 224 pbl_tke_input, tke_dissip, l_mix, wprime,& 223 225 t_therm, q_therm, u_therm, v_therm, & … … 356 358 LOGICAL, SAVE :: ok_volcan ! pour activer les diagnostics volcaniques 357 359 !$OMP THREADPRIVATE(ok_volcan) 358 INTEGER, SAVE :: flag_volc_surfstrat ! pour imposer le cool/heat rate à la surf ou dans la strato360 INTEGER, SAVE :: flag_volc_surfstrat ! pour imposer le cool/heat rate à la surf/strato 359 361 !$OMP THREADPRIVATE(flag_volc_surfstrat) 360 362 LOGICAL ok_cvl ! pour activer le nouveau driver pour convection KE … … 854 856 real zqsat(klon,klev) 855 857 ! 856 INTEGER i, k, iq, j, nsrf, ll, l 858 INTEGER i, k, iq, j, nsrf, ll, l, itr 857 859 ! 858 860 REAL t_coup … … 1035 1037 1036 1038 CHARACTER (LEN=20) :: modname='physiq_mod' 1037 CHARACTER*80 message,abort_message1039 CHARACTER*80 abort_message 1038 1040 LOGICAL, SAVE :: ok_sync, ok_sync_omp 1039 1041 !$OMP THREADPRIVATE(ok_sync) … … 1363 1365 iflag_phytrac = 1 1364 1366 ENDIF 1365 #endif 1367 #endif 1366 1368 nvm_lmdz = 13 1367 1369 CALL getin_p('NVM',nvm_lmdz) … … 2230 2232 2231 2233 tke0(:,:)=pbl_tke(:,:,is_ave) 2232 !CR:Nombre de traceurs de l'eau: nqo 2233 ! IF (nqtot.GE.3) THEN 2234 IF (nqtot.GE.(nqo+1)) THEN 2235 ! DO iq = 3, nqtot 2236 DO iq = nqo+1, nqtot 2234 IF (nqtot > nqo) THEN 2235 ! water isotopes are not included in tr_seri 2236 itr = 0 2237 DO iq = 1, nqtot 2238 IF(tracers(iq)%isH2Ofamily) CYCLE 2239 itr = itr+1 2237 2240 DO k = 1, klev 2238 2241 DO i = 1, klon 2239 ! tr_seri(i,k,iq-2) = qx(i,k,iq) 2240 tr_seri(i,k,iq-nqo) = qx(i,k,iq) 2242 tr_seri(i,k,itr) = qx(i,k,iq) 2241 2243 ENDDO 2242 2244 ENDDO 2243 2245 ENDDO 2244 2246 ELSE 2245 DO k = 1, klev 2246 DO i = 1, klon 2247 tr_seri(i,k,1) = 0.0 2248 ENDDO 2249 ENDDO 2247 ! DC: make sure the final "1" index was meant for 1st H2O phase (vapor) !!! 2248 ! tr_seri(:,:,strIdx(tracers(:)%name,'H2O'//phases_sep//'g')) = 0.0 2249 tr_seri(:,:,strIdx(tracers(:)%name,'H2Ov')) = 0.0 2250 2250 ENDIF 2251 2251 ! … … 2254 2254 IF (debut) THEN 2255 2255 WRITE(lunout,*)' WARNING: tr_ancien initialised to tr_seri' 2256 DO iq = nqo+1, nqtot 2257 tr_ancien(:,:,iq-nqo)=tr_seri(:,:,iq-nqo) 2258 ENDDO 2256 itr = 0 2257 do iq = 1, nqtot 2258 IF(tracers(iq)%isH2Ofamily) CYCLE 2259 itr = itr+1 2260 tr_ancien(:,:,itr)=tr_seri(:,:,itr) 2261 enddo 2259 2262 ENDIF 2260 2263 ! … … 2287 2290 d_qs_dyn2d(:)=(zx_tmp_fi2d(:)-prsw_ancien(:))/phys_tstep 2288 2291 ! !! RomP >>> td dyn traceur 2289 IF (nqtot.GT.nqo) THEN ! jyg 2290 DO iq = nqo+1, nqtot ! jyg 2291 d_tr_dyn(:,:,iq-nqo)=(tr_seri(:,:,iq-nqo)-tr_ancien(:,:,iq-nqo))/phys_tstep ! jyg 2292 ENDDO 2293 ENDIF 2292 IF (nqtot > nqo) d_tr_dyn(:,:,:)=(tr_seri(:,:,:)-tr_ancien(:,:,:))/phys_tstep 2294 2293 ! !! RomP <<< 2295 2294 ELSE … … 2304 2303 d_qs_dyn2d(:) = 0.0 2305 2304 ! !! RomP >>> td dyn traceur 2306 IF (nqtot.GT.nqo) THEN ! jyg 2307 DO iq = nqo+1, nqtot ! jyg 2308 d_tr_dyn(:,:,iq-nqo)= 0.0 ! jyg 2309 ENDDO 2310 ENDIF 2305 IF (nqtot > nqo) d_tr_dyn(:,:,:)= 0.0 2311 2306 ! !! RomP <<< 2312 2307 ancien_ok = .TRUE. … … 2589 2584 debut, lafin, & 2590 2585 longitude_deg, latitude_deg, rugoro, zrmu0, & 2591 2586 sollwdown, cldt, & 2592 2587 rain_fall, snow_fall, solsw, solswfdiff, sollw, & 2593 2588 gustiness, & … … 2857 2852 ENDDO 2858 2853 ELSE 2859 t_w(:,:) = t_seri(:,:)2854 t_w(:,:) = t_seri(:,:) 2860 2855 q_w(:,:) = q_seri(:,:) 2861 2856 t_x(:,:) = t_seri(:,:) … … 3073 3068 3074 3069 DO i = 1, klon 3075 ema_pcb(i) = paprs(i,ibas_con(i)) 3070 ! C Risi modif: pour éviter pb de dépassement d'indice dans les cas 3071 ! où i n'est pas un point convectif et donc ibas_con(i)=0 3072 ! c'est un pb indépendant des isotopes 3073 if (ibas_con(i) > 0) then 3074 ema_pcb(i) = paprs(i,ibas_con(i)) 3075 else 3076 ema_pcb(i) = 0.0 3077 endif 3076 3078 ENDDO 3077 3079 DO i = 1, klon … … 3504 3506 wprime_ave(:,:)=0. 3505 3507 3506 3507 3508 DO nsrf = 1, nbsrf 3508 3509 DO i = 1, klon … … 3512 3513 ENDDO 3513 3514 ENDDO 3514 3515 3515 3516 3516 CALL calcratqs(klon,klev,prt_level,lunout, & … … 3530 3530 print *,'itap, ->fisrtilp ',itap 3531 3531 ENDIF 3532 ! 3532 3533 3533 3534 picefra(:,:)=0. … … 3556 3557 iflag_ice_thermo) 3557 3558 ENDIF 3559 ! 3558 3560 WHERE (rain_lsc < 0) rain_lsc = 0. 3559 3561 WHERE (snow_lsc < 0) snow_lsc = 0. … … 4267 4269 4268 4270 #ifndef CPP_XIOS 4269 4271 !--OB 30/05/2016 modified 21/10/2016 4272 !--here we return swaero_diag and dryaod_diag to FALSE 4273 !--and histdef will switch it back to TRUE if necessary 4274 !--this is necessary to get the right swaero at first step 4275 !--but only in the case of no XIOS as XIOS is covered elsewhere 4276 IF (debut) swaerofree_diag = .FALSE. 4277 IF (debut) swaero_diag = .FALSE. 4278 IF (debut) dryaod_diag = .FALSE. 4279 !--IM 15/09/2017 here we return ok_4xCO2atm to FALSE 4280 !--as for swaero_diag, see above 4281 IF (debut) ok_4xCO2atm = .FALSE. 4282 4283 ! 4270 4284 !IM 2eme calcul radiatif pour le cas perturbe ou au moins un 4271 4285 !IM des taux doit etre different du taux actuel … … 5052 5066 ENDDO 5053 5067 ! 5054 !CR: nb de traceurs eau: nqo5055 ! IF (nqtot.GE.3) THEN5056 IF (nqtot.GE.(nqo+1)) THEN5057 ! DO iq = 3, nqtot5058 DO iq = nqo+1, nqtot5068 IF (nqtot > nqo+1) THEN 5069 itr = 0 5070 DO iq = 1, nqtot 5071 IF(tracers(iq)%isH2Ofamily) CYCLE 5072 itr = itr+1 5059 5073 DO k = 1, klev 5060 5074 DO i = 1, klon 5061 ! d_qx(i,k,iq) = ( tr_seri(i,k,iq-2) - qx(i,k,iq) ) / phys_tstep 5062 d_qx(i,k,iq) = ( tr_seri(i,k,iq-nqo) - qx(i,k,iq) ) / phys_tstep 5075 d_qx(i,k,iq) = ( tr_seri(i,k,itr) - qx(i,k,iq) ) / phys_tstep 5063 5076 ENDDO 5064 5077 ENDDO … … 5101 5114 CALL water_int(klon,klev,qs_ancien,zmasse,prsw_ancien) 5102 5115 ! !! RomP >>> 5103 !CR: nb de traceurs eau: nqo 5104 IF (nqtot.GT.nqo) THEN 5105 DO iq = nqo+1, nqtot 5106 tr_ancien(:,:,iq-nqo) = tr_seri(:,:,iq-nqo) 5107 ENDDO 5108 ENDIF 5116 IF (nqtot > nqo) tr_ancien(:,:,:) = tr_seri(:,:,:) 5109 5117 ! !! RomP <<< 5110 5118 !========================================================================== -
LMDZ6/trunk/libf/phylmd/phytrac_mod.F90
r4012 r4056 56 56 SUBROUTINE phytrac_init() 57 57 USE dimphy 58 USE infotrac_phy, ONLY: nbtr, nqCO2,type_trac58 USE infotrac_phy, ONLY: nbtr, type_trac 59 59 USE tracco2i_mod, ONLY: tracco2i_init 60 60 IMPLICIT NONE … … 145 145 USE phys_local_var_mod, ONLY: budg_dep_dry_h2so4, budg_dep_wet_h2so4 146 146 USE phys_local_var_mod, ONLY: budg_dep_dry_part, budg_dep_wet_part 147 USE infotrac , ONLY: nbtr_sulgas, id_OCS_strat, id_SO2_strat, id_H2SO4_strat147 USE infotrac_phy, ONLY: nbtr_sulgas, id_OCS_strat, id_SO2_strat, id_H2SO4_strat 148 148 USE aerophys 149 149 #endif … … 508 508 iflag_con_trac= 1 509 509 CASE('inco') 510 source(:,1:nqCO2) = 0. ! from CO2i 511 source(:,nqCO2+1:nbtr)=init_source(:,:) ! from INCA 512 aerosol(1:nqCO2) = .FALSE. ! from CO2i 513 CALL tracinca_init(aerosol(nqCO2+1:nbtr),lessivage) ! from INCA 514 pbl_flg(1:nqCO2) = 1 ! From CO2iModThL515 iflag_the_trac = 1! From CO2i516 iflag_vdf_trac = 1! From CO2i517 iflag_con_trac = 1! From CO2i510 source(:,1:nqCO2) = 0. ! from CO2i ModThL 511 source(:,nqCO2+1:nbtr)=init_source(:,:) ! from INCA ModThL 512 aerosol(1:nqCO2) = .FALSE. ! from CO2i ModThL 513 CALL tracinca_init(aerosol(nqCO2+1:nbtr),lessivage) ! from INCA ModThL 514 pbl_flg(1:nqCO2) = 1 ! From CO2i ModThL 515 iflag_the_trac = 1 ! From CO2i 516 iflag_vdf_trac = 1 ! From CO2i 517 iflag_con_trac = 1 ! From CO2i 518 518 #ifdef CPP_StratAer 519 519 CASE('coag') -
LMDZ6/trunk/libf/phylmd/traclmdz_mod.F90
r4050 r4056 67 67 68 68 USE dimphy 69 USE infotrac_phy, ONLY: nbtr , tracers, niadv, solsym69 USE infotrac_phy, ONLY: nbtr 70 70 71 71 ! Input argument … … 89 89 ! Initialization of the tracers should be done here only for those not found in the restart file. 90 90 USE dimphy 91 USE infotrac_phy, ONLY: nbtr, nq o, tracers, pbl_flg, conv_flg, niadv91 USE infotrac_phy, ONLY: nbtr, nqtot, tracers, pbl_flg, conv_flg 92 92 USE regr_pr_comb_coefoz_m, ONLY: alloc_coefoz 93 93 USE press_coefoz_m, ONLY: press_coefoz … … 114 114 115 115 ! Local variables 116 INTEGER :: ierr, it, i iq, i, k116 INTEGER :: ierr, it, iq, i, k 117 117 REAL, DIMENSION(klon_glo,klev) :: varglo ! variable temporaire sur la grille global 118 118 REAL, DIMENSION(klev) :: mintmp, maxtmp … … 173 173 id_rn=0; id_pb=0; id_aga=0; id_be=0; id_o3=0 174 174 id_pcsat=0; id_pcocsat=0; id_pcq=0; id_pcs0=0; id_pcos0=0; id_pcq0=0 175 DO it=1,nbtr 176 !! iiq=niadv(it+2) ! jyg 177 iiq=niadv(it+nqo) ! jyg 178 SELECT CASE(strLower(tracers(iiq)%name)) 175 it = 0 176 DO iq = 1, nqtot 177 IF(.NOT.tracers(iq)%isAdvected .OR. tracers(iq)%isH2Ofamily) CYCLE 178 it = it+1 179 SELECT CASE(strLower(tracers(iq)%name)) 179 180 CASE("rn"); id_rn = it ! radon 180 181 CASE("pb"); id_pb = it ! plomb … … 189 190 CASE("pcq0"); id_pcq0 = it 190 191 CASE DEFAULT 191 WRITE(lunout,*) 'This is an unknown tracer in LMDZ : ', trim(tracers(i iq)%name)192 WRITE(lunout,*) 'This is an unknown tracer in LMDZ : ', trim(tracers(iq)%name) 192 193 END SELECT 193 194 194 SELECT CASE(strLower(tracers(i iq)%name))195 SELECT CASE(strLower(tracers(iq)%name)) 195 196 CASE("pb") !--- RomP >>> profil initial de PB210 196 197 OPEN(ilesfil2,file='prof.pb210',status='old',iostat=irr2) … … 259 260 ! Check if all tracers have restart values 260 261 ! ---------------------------------------------- 261 DO it=1,nbtr 262 !! iiq=niadv(it+2) ! jyg 263 iiq=niadv(it+nqo) ! jyg 262 it = 0 263 DO iq = 1, nqtot 264 IF(.NOT.tracers(iq)%isAdvected .OR. tracers(iq)%isH2Ofamily) CYCLE 265 it = it+1 264 266 ! Test if tracer is zero everywhere. 265 267 ! Done by master process MPI and master thread OpenMP … … 282 284 IF (zero) THEN 283 285 ! The tracer was not found in restart file or it was equal zero everywhere. 284 WRITE(lunout,*) "The tracer ",trim(tracers(i iq)%name)," will be initialized"286 WRITE(lunout,*) "The tracer ",trim(tracers(iq)%name)," will be initialized" 285 287 IF (it==id_pcsat .OR. it==id_pcq .OR. & 286 288 it==id_pcs0 .OR. it==id_pcq0) THEN
Note: See TracChangeset
for help on using the changeset viewer.