Changeset 1966
- Timestamp:
- Jul 6, 2018, 12:12:47 PM (6 years ago)
- Location:
- trunk/LMDZ.TITAN
- Files:
-
- 1 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/README
r1965 r1966 1488 1488 Replace Numerical Recipes "solve.c" in C chemistry by "solve_lapack.c" call to Lapack dgesv 1489 1489 -> ~60 times quicker ( quasi-instantaneous now ) 1490 1491 == 06/07/18 == JVO 1492 Improve computation of saturation profiles that was done in planetary average 1493 -> Now done for every grid point ( enables sensitivity to winter low temps ) 1494 -> firstcall "inicondens.F90" replaced by every-step-call-to "calc_ysat.F90" -
trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90
r1960 r1966 35 35 use time_phylmdz_mod, only: daysec 36 36 use logic_mod, only: moyzon_ch 37 use moyzon_mod, only: tmoy, playmoy, zphibar, zphisbar, zplevbar, &38 zplaybar,zzlevbar, zzlaybar, ztfibar, zqfibar37 use moyzon_mod, only: zphibar, zphisbar, zplevbar, zplaybar, & 38 zzlevbar, zzlaybar, ztfibar, zqfibar 39 39 use callkeys_mod 40 40 use vertical_layers_mod, only: presnivs, pseudoalt … … 383 383 384 384 ! Saturation profiles 385 real, dimension(:,:), allocatable, save :: qysat ! (mol/mol) 386 !$OMP THREADPRIVATE(qysat) 387 real temp_eq(nlayer), press_eq(nlayer) ! Planetary averages for the init. of saturation profiles (K,mbar) 385 real, dimension(ngrid,nlayer,nkim) :: ysat ! (mol/mol) 388 386 389 387 ! Surface methane 390 real, dimension(:), allocatable, save :: tankCH4 ! Depth of surface methane tank (m)388 real, dimension(:), allocatable, save :: tankCH4 ! Depth of surface methane tank (m) 391 389 !$OMP THREADPRIVATE(tankCH4) 392 390 … … 510 508 endif 511 509 512 ! Initialize names , timestep and saturation profilesfor chemistry513 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~510 ! Initialize names and timestep for chemistry 511 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 514 512 515 513 if ( callchim ) then … … 522 520 523 521 allocate(dycchi(ngrid,nlayer,nkim)) ! only for chemical tracers 524 allocate(qysat(nlayer,nkim))525 522 526 523 ! Chemistry timestep 527 524 ctimestep = ptimestep*REAL(ichim) 528 525 529 ! qysat is taken at the equator ( small variations of t,p )530 if (ngrid.ne.1) then ! TODO : a patcher (lecture d'un profil?) si jamais on a plus acces a moyzon_mod !531 temp_eq(:) = tmoy(:)532 press_eq(:) = playmoy(:)/100. ! in mbar533 else534 temp_eq(:) = pt(1,:)535 press_eq(:) = pplay(1,:)/100.536 endif537 538 call inicondens(press_eq,temp_eq,qysat)539 540 526 zdqchi(:,:,:) = 0.0 541 527 … … 1146 1132 ! i. Condensation of the 3D tracers after the transport 1147 1133 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 1135 call calc_ysat(ngrid,nlayer,pplay,pt,ysat) ! Compute saturation profiles for every grid point 1136 1137 dyccond(:,:,:) = 0.0 ! Default value -> no condensation 1138 1148 1139 do iq=1,nkim 1149 do l=1,nlayer 1150 do ig=1,ngrid 1151 if ( ychim(ig,l,iq).gt.qysat(l,iq) ) then 1152 dyccond(ig,l,iq+nmicro) = ( -ychim(ig,l,iq)+qysat(l,iq) ) / ptimestep 1153 else 1154 dyccond(ig,l,iq+nmicro) = 0.0 1155 endif 1156 enddo 1157 enddo 1140 where ( ychim(:,:,iq).gt.ysat(:,:,iq) ) & 1141 dyccond(:,:,iq+nmicro) = ( -ychim(:,:,iq)+ysat(:,:,iq) ) / ptimestep 1158 1142 enddo 1159 1143 … … 1171 1155 if ( moyzon_ch .and. mod(icount-1,ichim).eq. 0 ) then 1172 1156 1157 call calc_ysat(ngrid,nlayer,zzlaybar,ztfibar,ysat) ! Compute saturation profiles for every grid point for the zon-ave fields 1158 1159 dyccondbar(:,:,:) = 0.0 ! Default value -> no condensation 1160 1173 1161 do iq = 1,nkim 1174 do l=1,nlayer 1175 do ig=1,ngrid 1176 if ( ychimbar(ig,l,iq).gt.qysat(l,iq) ) then 1177 dyccondbar(ig,l,iq+nmicro) = ( -ychimbar(ig,l,iq)+qysat(l,iq) ) / ptimestep 1178 else 1179 dyccondbar(ig,l,iq+nmicro) = 0.0 1180 endif 1181 enddo 1182 enddo 1162 where ( ychimbar(:,:,iq).gt.ysat(:,:,iq) ) & 1163 dyccondbar(:,:,iq+nmicro) = ( -ychimbar(:,:,iq)+ysat(:,:,iq) ) / ptimestep 1183 1164 enddo 1184 1165
Note: See TracChangeset
for help on using the changeset viewer.