Changeset 1346


Ignore:
Timestamp:
Sep 10, 2014, 2:28:04 PM (10 years ago)
Author:
emillour
Message:

Mars and Generic GCM:

  • Bug correction on the computation of vertical velocity.

EM

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/physiq.F90

    r1329 r1346  
    833833
    834834     ! Compute vertical velocity (m/s) from vertical mass flux
    835      ! w = F / (rho*area) and rho = r*T/P
     835     ! w = F / (rho*area) and rho = P/(r*T)
    836836     ! but first linearly interpolate mass flux to mid-layers
    837837     do l=1,nlayer-1
     
    840840     pw(1:ngrid,nlayer)=0.5*flxw(1:ngrid,nlayer) ! since flxw(nlayer+1)=0
    841841     do l=1,nlayer
    842        pw(1:ngrid,l)=(pw(1:ngrid,l)*pplay(1:ngrid,l)) /  &
    843                      (r*pt(1:ngrid,l)*area(1:ngrid))
     842       pw(1:ngrid,l)=(pw(1:ngrid,l)*r*pt(1:ngrid,l)) /  &
     843                     (pplay(1:ngrid,l)*area(1:ngrid))
    844844     enddo
    845845
  • trunk/LMDZ.MARS/libf/phymars/physiq.F

    r1313 r1346  
    580580
    581581      ! Compute vertical velocity (m/s) from vertical mass flux
    582       ! w = F / (rho*area) and rho = r*T/P
     582      ! w = F / (rho*area) and rho = P/(r*T)
    583583      ! but first linearly interpolate mass flux to mid-layers
    584584      do l=1,nlayer-1
     
    587587      pw(1:ngrid,nlayer)=0.5*flxw(1:ngrid,nlayer) ! since flxw(nlayer+1)=0
    588588      do l=1,nlayer
    589        pw(1:ngrid,l)=(pw(1:ngrid,l)*pplay(1:ngrid,l)) /
    590      &               (r*pt(1:ngrid,l)*area(1:ngrid))
    591        ! NB: here we use r and nor rnew since this diagnostic comes
     589       pw(1:ngrid,l)=(pw(1:ngrid,l)*r*pt(1:ngrid,l)) /
     590     &               (pplay(1:ngrid,l)*area(1:ngrid))
     591       ! NB: here we use r and not rnew since this diagnostic comes
    592592       ! from the dynamics
    593593      enddo
Note: See TracChangeset for help on using the changeset viewer.