Commit 72d3a5a7 authored by Espen Sollum's avatar Espen Sollum
Browse files

Bugfix in verttransform (call to function ew)

parent 6d420c3a
......@@ -49,6 +49,8 @@ subroutine verttransform(n,uuh,vvh,wwh,pvh)
! Sabine Eckhardt, March 2007
! added the variable cloud for use with scavenging - descr. in com_mod
!*****************************************************************************
! Date: 2017-05-30 modification of a bug in ew. Don Morton (CTBTO project) *
!*****************************************************************************
! *
! Variables: *
! nx,ny,nz field dimensions in x,y and z direction *
......@@ -154,7 +156,7 @@ subroutine verttransform(n,uuh,vvh,wwh,pvh)
3 continue
tvold(ixm,jym)=tt2(ixm,jym,1,n)*(1.+0.378*ew*(td2(ixm,jym,1,n))/ &
tvold(ixm,jym)=tt2(ixm,jym,1,n)*(1.+0.378*ew(td2(ixm,jym,1,n))/ &
ps(ixm,jym,1,n))
pold(ixm,jym)=ps(ixm,jym,1,n)
height(1)=0.
......@@ -214,7 +216,7 @@ subroutine verttransform(n,uuh,vvh,wwh,pvh)
do jy=0,nymin1
do ix=0,nxmin1
tvold(ix,jy)=tt2(ix,jy,1,n)*(1.+0.378*ew*(td2(ix,jy,1,n))/ &
tvold(ix,jy)=tt2(ix,jy,1,n)*(1.+0.378*ew(td2(ix,jy,1,n))/ &
ps(ix,jy,1,n))
enddo
enddo
......
......@@ -55,6 +55,8 @@ subroutine verttransform_nests(n,uuhn,vvhn,wwhn,pvhn)
! -note that divide-by-zero occurs when nxmaxn,nymaxn etc. are larger than
! the actual field dimensions
!*****************************************************************************
! Date: 2017-05-30 modification of a bug in ew. Don Morton (CTBTO project) *
!*****************************************************************************
! *
! Variables: *
! nxn,nyn,nuvz,nwz field dimensions in x,y and z direction *
......@@ -106,7 +108,7 @@ subroutine verttransform_nests(n,uuhn,vvhn,wwhn,pvhn)
do jy=0,nyn(l)-1
do ix=0,nxn(l)-1
tvold(ix,jy)=tt2n(ix,jy,1,n,l)*(1.+0.378*ew*(td2n(ix,jy,1,n,l))/ &
tvold(ix,jy)=tt2n(ix,jy,1,n,l)*(1.+0.378*ew(td2n(ix,jy,1,n,l))/ &
psn(ix,jy,1,n,l))
end do
end do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment