Ignore:
Timestamp:
Oct 10, 2011, 12:03:17 PM (13 years ago)
Author:
acolaitis
Message:

* AC 10/10/2011 *

*
This commit aims at increasing the thermals speed. Using these corrections, gcm performances in 64x48x32 using 1 tracer goes from 27.9% elapsed time in thermals to 18.76%.

*
Additional work needs to be done in tracer advection to gain speed in high tracer number configuration. (tracer advection (but not momentum nor temperature) could be decoupled from sub-timestep, as they do not act on the thermals scheme (water vapor is neglected as we use theta and not theta_v, and radiative effect of dust is not computed in the thermals.))

*
=> TOP 5 of routine contributions to gcm runtime :

Each sample counts as 0.01 seconds.

% cumulative self self total

time seconds seconds calls s/call s/call name
18.76 6.33 6.33 960 0.01 0.01 thermcell_main_mars_
17.19 12.13 5.80 svml_powf4.A
13.72 16.76 4.63 10369 0.00 0.00 filtreg_

3.94 18.09 1.33 intel_new_memset
3.73 19.35 1.26 2880 0.00 0.00 thermcell_dqupdown_

note: thermcell_main_mars_ does call quite a lot power computations (see svml_powf4.A), but this number will not increase with tracer numbers.

*
=> LOG:

M 312 libf/phymars/thermcell_main_mars.F90
------------------- removed (commented) computations on buoyancy which is purely diagnostic

tuned internal convergence loop and added convergence criterion

M 312 libf/phymars/thermcell_dqupdown.F90
------------------- removed (commented) downdraft-related if-loops (as we do not advect tracers and momentum in downdrafts for now)

M 312 libf/phymars/calltherm_mars.F90
------------------- removed (commented) diagnostic-related computations

changed default thermals spliting and aspect ratio
corrected a bug where maximum height was not correctly computed and could result in convective adjustment used in place of thermals
when using certains sets of nsplit and r_aspect (was not happening with the baseline version, so that this correction is transparent to
users)


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/thermcell_main_mars.F90

    r300 r313  
    4141      REAL, INTENT(OUT) :: pdvadj(ngridmx,nlayermx)
    4242      REAL, INTENT(OUT) :: pdqadj(ngridmx,nlayermx,nqmx)
    43       REAL, INTENT(OUT) :: pdq2adj(ngridmx,nlayermx)
     43!      REAL, INTENT(OUT) :: pdq2adj(ngridmx,nlayermx)
     44      REAL :: pdq2adj(ngridmx,nlayermx)
    4445      REAL, INTENT(OUT) :: zw2(ngridmx,nlayermx+1)
    4546
    4647! Diagnostics
    4748      REAL, INTENT(OUT) :: heatFlux(ngridmx,nlayermx)   ! interface heatflux
    48       REAL, INTENT(OUT) :: heatFlux_down(ngridmx,nlayermx) ! interface heat flux from downdraft
    49       REAL, INTENT(OUT) :: buoyancyOut(ngridmx,nlayermx)  ! interlayer buoyancy term
    50       REAL, INTENT(OUT) :: buoyancyEst(ngridmx,nlayermx)  ! interlayer estimated buoyancy term
     49     REAL, INTENT(OUT) :: heatFlux_down(ngridmx,nlayermx) ! interface heat flux from downdraft
     50!      REAL, INTENT(OUT) :: buoyancyOut(ngridmx,nlayermx)  ! interlayer buoyancy term
     51!      REAL, INTENT(OUT) :: buoyancyEst(ngridmx,nlayermx)  ! interlayer estimated buoyancy term
    5152
    5253! dummy variables when output not needed :
     
    5455!      REAL :: heatFlux(ngridmx,nlayermx)   ! interface heatflux
    5556!      REAL :: heatFlux_down(ngridmx,nlayermx) ! interface heat flux from downdraft
    56 !      REAL :: buoyancyOut(ngridmx,nlayermx)  ! interlayer buoyancy term
    57 !      REAL :: buoyancyEst(ngridmx,nlayermx)  ! interlayer estimated buoyancy term
     57      REAL :: buoyancyOut(ngridmx,nlayermx)  ! interlayer buoyancy term
     58      REAL :: buoyancyEst(ngridmx,nlayermx)  ! interlayer estimated buoyancy term
    5859
    5960
     
    526527!---------------------------------------------------------------------------
    527528
    528       DO tic=0,3
    529 
     529      DO tic=0,6  ! internal convergence loop
    530530      activetmp(:)=active(:) .and. f_star(:,l+1)>1.e-10
    531531      do ig=1,ngridmx
     
    538538        endif
    539539      enddo
     540
     541      activetmp(:)=activetmp(:).and.(abs(ztla(:,l)-ztva(:,l)).gt.0.01)
    540542
    541543      do ig=1,ngridmx
     
    600602      enddo
    601603
    602       ENDDO
     604      ENDDO   ! of tic
     605
    603606!---------------------------------------------------------------------------
    604607!initialisations pour le calcul de la hauteur du thermique, de l'inversion et de la vitesse verticale max
     
    14021405!------------------------------------------------------------------
    14031406
    1404       modname='tke'
    1405       call thermcell_dqupdown(ngridmx,nlayermx,ptimestep,fm,entr,detr,  &
    1406       &      masse,pq2,pdq2adj,ztvd,fm_down,ztv,modname,lmax)
     1407!      modname='tke'
     1408!      call thermcell_dqupdown(ngridmx,nlayermx,ptimestep,fm,entr,detr,  &
     1409!      &      masse,pq2,pdq2adj,ztvd,fm_down,ztv,modname,lmax)
    14071410
    14081411! ===========================================================================
     
    14341437       do ig=1,ngridmx
    14351438        heatFlux(ig,l)=fm(ig,l)*(teta_th_int(ig,l)-teta_env_int(ig,l))/(rhobarz(ig,l))
    1436         buoyancyOut(ig,l)=g*(ztva(ig,l)-ztv(ig,l))/ztv(ig,l)
    1437         buoyancyEst(ig,l)=g*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l)
     1439!        buoyancyOut(ig,l)=g*(ztva(ig,l)-ztv(ig,l))/ztv(ig,l)
     1440!        buoyancyEst(ig,l)=g*(ztva_est(ig,l)-ztv(ig,l))/ztv(ig,l)
    14381441        heatFlux_down(ig,l)=fm_down(ig,l)*(teta_down_int(ig,l)-teta_env_int(ig,l))/rhobarz(ig,l)
    14391442       enddo
Note: See TracChangeset for help on using the changeset viewer.