Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cases/rico/moduser.f90 for changes to excjs. #83

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions cases/rico/moduser.f90
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@ subroutine surf_user
use modsurfdata,only : ustar,dudz,dvdz,dqtdz,dthldz,&
svs,z0,qts,thls,thvs,thlflux,qtflux,svflux
use modfields, only : u0,v0,thl0,qt0,sv0,u0av,v0av,qt0av,thl0av
use modmpi, only : excj
use modmpi, only : excjs
implicit none
integer i, j, n
real phihzf, phimzf
real upcu, vpcv
real horv2, horv, stab, obl
real dthz1, dqz1, dsvz1
real, parameter :: C_m = 0.001229, C_h = 0.001094, C_q = 0.001133
real, pointer :: ustar_3D(:,:,:)

!***********************************************************************
!*** Calculate ust, tst, qst and obukhov-length iteratively *********
Expand Down Expand Up @@ -105,8 +106,6 @@ subroutine surf_user
phihzf = (1.+8.*zf(1)/obl)
endif



dudz(i,j) = ustar(i,j)*(phimzf/(fkar*zf(1)))*(upcu/horv)
dvdz(i,j) = ustar(i,j)*(phimzf/(fkar*zf(1)))*(vpcv/horv)
dthldz(i,j) = - thlflux(i,j) / ustar(i,j) * phihzf / (fkar*zf(1))
Expand All @@ -119,7 +118,9 @@ subroutine surf_user
ustar(1,j)=ustar(i1,j)
end do

call excj( ustar , 1, i2, 1, j2, 1,1)
! excjs is a 3D function, reshape ustar
ustar_3D(1:i2, 1:j2, 1:1) => ustar
call excjs(ustar_3D, 1, i2, 1, j2, 1, 1, 1, 1)

do n=1,nsv
do j=2,j1
Expand Down
Loading