Changeset 5202 for LMDZ6/branches/cirrus/libf/dyn3d
- Timestamp:
- Sep 20, 2024, 12:32:04 PM (8 weeks ago)
- Location:
- LMDZ6/branches/cirrus
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/cirrus
- Property svn:mergeinfo changed
-
LMDZ6/branches/cirrus/libf/dyn3d/check_isotopes.F90
r4399 r5202 23 23 iso_O17, iso_HTO 24 24 LOGICAL, SAVE :: first=.TRUE. 25 LOGICAL, PARAMETER :: tnat1=.TRUE. 25 26 26 27 modname='check_isotopes' … … 34 35 iso_O17 = strIdx(isoName,'H217O') 35 36 iso_HTO = strIdx(isoName,'HTO') 36 IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1) 37 if (tnat1) then 38 tnat(:)=1.0 39 else 40 IF(getKey('tnat', tnat)) CALL abort_gcm(modname, 'missing isotopic parameter', 1) 41 endif 37 42 first = .FALSE. 38 43 END IF -
LMDZ6/branches/cirrus/libf/dyn3d/conf_gcm.F90
r4519 r5202 18 18 USE logic_mod, ONLY: fxyhypb, iflag_phys, ok_etat0, ok_gradsfile, & 19 19 ok_guide, ok_limit, ok_strato, purmats, read_start, & 20 ysinus, read_orop 20 ysinus, read_orop, adv_qsat_liq 21 21 USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, & 22 22 alphax,alphay,taux,tauy … … 606 606 type_trac = 'lmdz' 607 607 CALL getin('type_trac',type_trac) 608 609 610 !Config Key = adv_qsat_liq 611 !Config Desc = option for qsat calculation in the dynamics 612 !Config Def = n 613 !Config Help = controls which phase is considered for qsat calculation 614 !Config 615 adv_qsat_liq = .FALSE. 616 CALL getin('adv_qsat_liq',adv_qsat_liq) 608 617 609 618 !Config Key = ok_dynzon … … 672 681 write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins 673 682 write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave 683 write(lunout,*)' adv_qsat_liq = ', adv_qsat_liq 674 684 ELSE 675 685 !Config Key = clon -
LMDZ6/branches/cirrus/libf/dyn3d/dynetat0.F90
r4492 r5202 43 43 REAL :: time, tnat, alpha_ideal, tab_cntrl(length) !--- RUN PARAMS TABLE 44 44 LOGICAL :: lSkip, ll 45 LOGICAL,PARAMETER :: tnat1=.TRUE. 45 46 !------------------------------------------------------------------------------- 46 47 modname="dynetat0" … … 155 156 iqParent = tracers(iq)%iqParent 156 157 IF(tracers(iq)%iso_iZone == 0) THEN 157 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 158 if (tnat1) then 159 tnat=1.0 160 alpha_ideal=1.0 161 write(*,*) 'attention dans dynetat0: les alpha_ideal sont a 1' 162 else 163 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 158 164 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 165 endif 159 166 CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized with a simplified Rayleigh distillation law.', modname) 160 167 q(:,:,:,iq) = q(:,:,:,iqParent)*tnat*(q(:,:,:,iqParent)/30.e-3)**(alpha_ideal-1.) -
LMDZ6/branches/cirrus/libf/dyn3d/dynredem_mod.F90
r2299 r5202 4 4 PRIVATE 5 5 PUBLIC :: dynredem_write_u, dynredem_write_v, dynredem_read_u, err 6 PUBLIC :: cre_var, get_var1,put_var1, put_var2, fil, modname, msg6 PUBLIC :: cre_var, put_var1, put_var2, fil, modname, msg 7 7 include "dimensions.h" 8 8 include "paramet.h" -
LMDZ6/branches/cirrus/libf/dyn3d/iniacademic.F90
r4419 r5202 80 80 81 81 REAL zdtvr, tnat, alpha_ideal 82 LOGICAL,PARAMETER :: tnat1=.true. 82 83 83 84 character(len=*),parameter :: modname="iniacademic" … … 321 322 iqParent = tracers(iq)%iqParent 322 323 IF(tracers(iq)%iso_iZone == 0) THEN 323 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 324 if (tnat1) then 325 tnat=1.0 326 alpha_ideal=1.0 327 write(*,*) 'Attention dans iniacademic: alpha_ideal=1' 328 else 329 IF(getKey('tnat', tnat, isoName(iName)) .OR. getKey('alpha', alpha_ideal, isoName(iName))) & 324 330 CALL abort_gcm(TRIM(modname), 'missing isotopic parameters', 1) 331 endif 325 332 q(:,:,iq) = q(:,:,iqParent)*tnat*(q(:,:,iqParent)/30.e-3)**(alpha_ideal-1.) 326 ELSE 327 q(:,:,iq) = q(:,:,iqIsoPha(iName,iPhase)) 328 END IF 333 ELSE !IF(tracers(iq)%iso_iZone == 0) THEN 334 IF(tracers(iq)%iso_iZone == 1) THEN 335 ! correction le 14 mai 2024 pour que tous les traceurs soient de la couleur 1. 336 ! Sinon, on va avoir des porblèmes de conservation de masse de traceurs. 337 q(:,:,iq) = q(:,:,iqIsoPha(iName,iPhase)) 338 else !IF(tracers(iq)%iso_iZone == 1) THEN 339 q(:,:,iq) = 0. 340 endif !IF(tracers(iq)%iso_iZone == 1) THEN 341 END IF !IF(tracers(iq)%iso_iZone == 0) THEN 329 342 enddo 330 343 else -
LMDZ6/branches/cirrus/libf/dyn3d/logic_mod.F90
r2665 r5202 30 30 LOGICAL hybrid ! vertical coordinate is hybrid if true (sigma otherwise) 31 31 ! (only used if disvert_type==2) 32 LOGICAL adv_qsat_liq ! true if qsat is calculated alwats wrt liquid for 33 ! adapted Van Leer advection scheme 32 34 INTEGER iflag_phys ! type of physics to call: 0 none, 1: phy*** package, 33 35 ! 2: Held & Suarez, 101-200: aquaplanets & terraplanets -
LMDZ6/branches/cirrus/libf/dyn3d/qminimum.F
r4143 r5202 28 28 c ................................................................. 29 29 c 30 cDC iq_val and iq_liq are usable for q only, NOT for q_follow 31 c and zx_defau_diag (crash if iq_val/liq==3) => vapor/liquid 32 c water at hardcoded indices 1/2 in these variables 30 33 INTEGER i, k, iq 31 34 REAL zx_defau, zx_abc, zx_pump(ip1jmp1), pompe … … 58 61 59 62 zx_defau_diag(:,:,:)=0.0 60 q_follow(:,:,1:2)=q(:,:,1:2) 61 DO 1000 k = 1, llm 62 DO 1040 i = 1, ip1jmp1 63 q_follow(:,:,1)=q(:,:,iq_vap) 64 q_follow(:,:,2)=q(:,:,iq_liq) 65 DO k = 1, llm 66 DO i = 1, ip1jmp1 63 67 if (seuil_liq - q(i,k,iq_liq) .gt. 0.d0 ) then 64 68 65 if (niso > 0) zx_defau_diag(i,k,iq_liq)=AMAX169 if (niso > 0) zx_defau_diag(i,k,2)=AMAX1 66 70 : ( seuil_liq - q(i,k,iq_liq), 0.0 ) 67 71 68 69 70 71 1040 CONTINUE72 1000 CONTINUE72 q(i,k,iq_vap) = q(i,k,iq_vap) + q(i,k,iq_liq) - seuil_liq 73 q(i,k,iq_liq) = seuil_liq 74 endif 75 ENDDO 76 ENDDO 73 77 c 74 78 c Quand l'eau vapeur est trop faible (ou negative), on complete 75 79 c le defaut en prennant de l'eau vapeur de la couche au-dessous. 76 80 c 77 iq = iq_vap78 c79 81 DO k = llm, 2, -1 80 82 ccc zx_abc = dpres(k) / dpres(k-1) 81 83 DO i = 1, ip1jmp1 82 if ( seuil_vap - q(i,k,iq ) .gt. 0.d0 ) then84 if ( seuil_vap - q(i,k,iq_vap) .gt. 0.d0 ) then 83 85 84 if (niso > 0) 85 & zx_defau_diag(i,k,iq)=AMAX1( seuil_vap - q(i,k,iq), 0.0 )86 if (niso > 0) zx_defau_diag(i,k,1) 87 & = AMAX1( seuil_vap - q(i,k,iq_vap), 0.0 ) 86 88 87 q(i,k-1,iq) = q(i,k-1,iq) - ( seuil_vap - q(i,k,iq) ) * 88 & deltap(i,k) / deltap(i,k-1) 89 q(i,k,iq) = seuil_vap 89 q(i,k-1,iq_vap) = q(i,k-1,iq_vap) - (seuil_vap 90 & -q(i,k,iq_vap)) * deltap(i,k)/deltap(i,k-1) 91 q(i,k,iq_vap) = seuil_vap 92 90 93 endif 91 94 ENDDO 92 95 ENDDO 96 93 97 c 94 98 c Quand il s'agit de la premiere couche au-dessus du sol, on … … 96 100 c 97 101 DO i = 1, ip1jmp1 98 zx_pump(i) = AMAX1( 0.0, seuil_vap - q(i,1,iq ) )99 q(i,1,iq ) = AMAX1( q(i,1,iq), seuil_vap )102 zx_pump(i) = AMAX1( 0.0, seuil_vap - q(i,1,iq_vap) ) 103 q(i,1,iq_vap) = AMAX1( q(i,1,iq_vap), seuil_vap ) 100 104 ENDDO 101 105 pompe = SSUM(ip1jmp1,zx_pump,1) … … 121 125 DO i = 1,ip1jmp1 122 126 if (zx_pump(i).gt.0.0) then 123 q_follow(i,1, iq_vap)=q_follow(i,1,iq_vap)+zx_pump(i)127 q_follow(i,1,1)=q_follow(i,1,1)+zx_pump(i) 124 128 endif !if (zx_pump(i).gt.0.0) then 125 129 enddo !DO i = 1,ip1jmp1 … … 129 133 do k=2,llm 130 134 DO i = 1,ip1jmp1 131 if (zx_defau_diag(i,k, iq_vap).gt.0.0) then135 if (zx_defau_diag(i,k,1).gt.0.0) then 132 136 ! on ajoute la vapeur en k 133 137 do ixt=1,ntiso 134 138 q(i,k,iqIsoPha(ixt,iq_vap))=q(i,k,iqIsoPha(ixt,iq_vap)) 135 : +zx_defau_diag(i,k, iq_vap)136 : *q(i,k-1,iqIsoPha(ixt,iq_vap))/q_follow(i,k-1, iq_vap)139 : +zx_defau_diag(i,k,1) 140 : *q(i,k-1,iqIsoPha(ixt,iq_vap))/q_follow(i,k-1,1) 137 141 138 142 ! et on la retranche en k-1 139 143 q(i,k-1,iqIsoPha(ixt,iq_vap))= 140 144 : q(i,k-1,iqIsoPha(ixt,iq_vap)) 141 : -zx_defau_diag(i,k, iq_vap)145 : -zx_defau_diag(i,k,1) 142 146 : *deltap(i,k)/deltap(i,k-1) 143 147 : *q(i,k-1,iqIsoPha(ixt,iq_vap)) 144 : /q_follow(i,k-1, iq_vap)148 : /q_follow(i,k-1,1) 145 149 146 150 enddo !do ixt=1,niso 147 q_follow(i,k, iq_vap)= q_follow(i,k,iq_vap)148 : +zx_defau_diag(i,k, iq_vap)149 q_follow(i,k-1, iq_vap)= q_follow(i,k-1,iq_vap)150 : -zx_defau_diag(i,k, iq_vap)151 q_follow(i,k,1)= q_follow(i,k,1) 152 : +zx_defau_diag(i,k,1) 153 q_follow(i,k-1,1)= q_follow(i,k-1,1) 154 : -zx_defau_diag(i,k,1) 151 155 : *deltap(i,k)/deltap(i,k-1) 152 endif !if (zx_defau_diag(i,k, iq_vap).gt.0.0) then156 endif !if (zx_defau_diag(i,k,1).gt.0.0) then 153 157 enddo !DO i = 1, ip1jmp1 154 158 enddo !do k=2,llm … … 161 165 do k=1,llm 162 166 DO i = 1,ip1jmp1 163 if (zx_defau_diag(i,k, iq_liq).gt.0.0) then167 if (zx_defau_diag(i,k,2).gt.0.0) then 164 168 165 169 ! on ajoute eau liquide en k en k 166 170 do ixt=1,ntiso 167 171 q(i,k,iqIsoPha(ixt,iq_liq))=q(i,k,iqIsoPha(ixt,iq_liq)) 168 : +zx_defau_diag(i,k, iq_liq)169 : *q(i,k,iqIsoPha(ixt,iq_vap))/q_follow(i,k, iq_vap)172 : +zx_defau_diag(i,k,2) 173 : *q(i,k,iqIsoPha(ixt,iq_vap))/q_follow(i,k,1) 170 174 ! et on la retranche à la vapeur en k 171 175 q(i,k,iqIsoPha(ixt,iq_vap))=q(i,k,iqIsoPha(ixt,iq_vap)) 172 : -zx_defau_diag(i,k, iq_liq)173 : *q(i,k,iqIsoPha(ixt,iq_vap))/q_follow(i,k, iq_vap)176 : -zx_defau_diag(i,k,2) 177 : *q(i,k,iqIsoPha(ixt,iq_vap))/q_follow(i,k,1) 174 178 enddo !do ixt=1,niso 175 q_follow(i,k, iq_liq)= q_follow(i,k,iq_liq)176 : +zx_defau_diag(i,k, iq_liq)177 q_follow(i,k, iq_vap)= q_follow(i,k,iq_vap)178 : -zx_defau_diag(i,k, iq_liq)179 endif !if (zx_defau_diag(i,k, iq_vap).gt.0.0) then179 q_follow(i,k,2)= q_follow(i,k,2) 180 : +zx_defau_diag(i,k,2) 181 q_follow(i,k,1)= q_follow(i,k,1) 182 : -zx_defau_diag(i,k,2) 183 endif !if (zx_defau_diag(i,k,1).gt.0.0) then 180 184 enddo !DO i = 1, ip1jmp1 181 185 enddo !do k=2,llm -
LMDZ6/branches/cirrus/libf/dyn3d/vlspltqs.F
r4470 r5202 25 25 26 26 USE comconst_mod, ONLY: cpp 27 27 USE logic_mod, ONLY: adv_qsat_liq 28 28 IMPLICIT NONE 29 29 c … … 92 92 ENDDO 93 93 DO ij = 1, ip1jmp1 94 zdelta = MAX( 0., SIGN(1., rtt - tempe(ij)) ) 94 IF (adv_qsat_liq) THEN 95 zdelta = 0. 96 ELSE 97 zdelta = MAX( 0., SIGN(1., rtt - tempe(ij)) ) 98 ENDIF 95 99 play = 0.5*(p(ij,l)+p(ij,l+1)) 96 100 qsat(ij,l) = MIN(0.5, r2es* FOEEW(tempe(ij),zdelta) / play )
Note: See TracChangeset
for help on using the changeset viewer.