Changeset 2879


Ignore:
Timestamp:
Jan 25, 2023, 1:51:23 PM (22 months ago)
Author:
llange
Message:

MARS PCM
The condition to call param_slope has been completed to prevent a
division by zero (bug that appeared during a twisted case with the 1D
GCM)
LL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2840 r2879  
    888888c       Local Solar zenith angle
    889889c       ~~~~~~~~~~~~~~~~~~~~~~~~
     890        write(*,*) 'mu0=',mu0(:)
    890891        CALL orbite(zls,dist_sol,declin)
    891 
     892        write(*,*) 'mu0=',mu0(:)
    892893        IF (diurnal) THEN
    893894            ztim1=SIN(declin)
     
    901902            CALL mucorr(ngrid,declin,latitude,mu0,fract,10000.,rad)
    902903        ENDIF ! of IF (diurnal)
    903 
     904        write(*,*) 'mu0=',mu0(:),zls,declin
    904905         IF( MOD(icount-1,iradia).EQ.0) THEN
    905906
     
    10661067c          ---------------------------------------------------------
    10671068           IF(callslope) THEN
    1068 
     1069          write(*,*) 'Flux=',fluxsurf_dn_sw(:,1),fluxsurf_dn_sw(:,2)
     1070          write(*,*) 'mu0=',mu0(:),zls,declin
    10691071            print *, 'Slope scheme is on and computing...'
    10701072            DO ig=1,ngrid 
     
    10811083                 sl_fl0 = fluxsurf_dn_sw(ig,l)
    10821084                 sl_di0 = 0.
    1083                  if (mu0(ig) .gt. 0.) then
     1085                 if ((mu0(ig) .gt. 0.).and.(ztim1.gt.0.)) then
    10841086                  sl_di0 = mu0(ig)*(exp(-sl_tau/mu0(ig)))
    10851087                  sl_di0 = sl_di0*flux_1AU/dist_sol/dist_sol
Note: See TracChangeset for help on using the changeset viewer.