diff --git a/blending.fd/remap_dwinds/remap_dwinds.f90 b/blending.fd/remap_dwinds/remap_dwinds.f90 index c0a06ec..8012d18 100644 --- a/blending.fd/remap_dwinds/remap_dwinds.f90 +++ b/blending.fd/remap_dwinds/remap_dwinds.f90 @@ -4,24 +4,27 @@ subroutine main(km, npz, ak0, bk0, Atm_ak, Atm_bk, psc, ud, vd, is, ie, js, je, !use, intrinsic :: ieee_arithmetic implicit none integer, parameter :: r8_kind = selected_real_kind(15) ! 15 decimal digits - integer, intent(IN) :: is, ie, js, je - integer, intent(IN) :: km ! 128 - integer, intent(IN) :: npz ! 127 - real(kind=8), dimension(:), intent(IN) :: ak0 ! (129,) - real(kind=8), dimension(:), intent(IN) :: bk0 ! (129,) - real(kind=8), dimension(:,:), intent(IN) :: psc ! (768, 768) - real(kind=8), dimension(:,:), intent(IN) :: Atm_ps ! - real(kind=8), dimension(:,:,:), intent(IN) :: ud - real(kind=8), dimension(:,:,:), intent(IN) :: vd - real(kind=8), dimension(:), intent(IN) :: Atm_ak ! (128,) - real(kind=8), dimension(:), intent(IN) :: Atm_bk ! (128,) - real(kind=8), dimension(:,:,:), intent(INOUT) :: Atm_u ! - real(kind=8), dimension(:,:,:), intent(INOUT) :: Atm_v ! - real(kind=8) :: Atm_ptop - real(kind=8), dimension(is:ie,js:je) :: psd - real(kind=8), dimension(is:ie+1,1:npz) :: qn1 - real(kind=8), dimension(is:ie+1,1:km+1) :: pe0 - real(kind=8), dimension(is:ie+1,1:npz+1) :: pe1 + integer, intent(IN) :: is ! 1 + integer, intent(IN) :: ie ! 3950 + integer, intent(IN) :: js ! 1 + integer, intent(IN) :: je ! 2700 + integer, intent(IN) :: km ! 66 + integer, intent(IN) :: npz ! 65 + real(kind=8), dimension(:), intent(IN) :: ak0 !(67) + real(kind=8), dimension(:), intent(IN) :: bk0 !(67) + real(kind=8), dimension(:,:), intent(IN) :: psc !(3950, 2700) + real(kind=8), dimension(:,:), intent(IN) :: Atm_ps !(3950, 2700) + real(kind=8), dimension(:,:,:), intent(IN) :: ud !(3950, 2701, 66) + real(kind=8), dimension(:,:,:), intent(IN) :: vd !(3951, 2700, 66) + real(kind=8), dimension(:), intent(IN) :: Atm_ak !(66) + real(kind=8), dimension(:), intent(IN) :: Atm_bk !(66) + real(kind=8), dimension(:,:,:), intent(INOUT) :: Atm_u !(3950, 2701, 65) + real(kind=8), dimension(:,:,:), intent(INOUT) :: Atm_v !(3951, 2700, 65) + real(kind=8) :: Atm_ptop ! + real(kind=8), dimension(is:ie,js:je) :: psd !(3950, 2700) + real(kind=8), dimension(is:ie+1,1:npz) :: qn1 !(3951, 65) + real(kind=8), dimension(is:ie+1,1:km+1) :: pe0 !(3951, 67) + real(kind=8), dimension(is:ie+1,1:npz+1) :: pe1 !(3951, 66) integer :: i,j,k,itoa logical :: no_boundary @@ -44,10 +47,12 @@ subroutine main(km, npz, ak0, bk0, Atm_ak, Atm_bk, psc, ud, vd, is, ie, js, je, !pressure at layer edges (from model top to bottom surface) in the original vertical coordinate do k=1,km+1 do i=is,ie - if(j==1) then - pe0(i,k) = ak0(k) + bk0(k)*0.5*(psd(i,j)+psd(i,j)) + if(j==js) then + pe0(i,k) = ak0(k) + bk0(k)*0.5*(psd(i,j )+psd(i,j )) + elseif(j