20 subroutine calc_pv(kx,ky,pv,x,x_north,x_south,f1,f2,deltax,deltay,bet,rs,lbc)
27 integer,
intent(in) :: kx
28 integer,
intent(in) :: ky
29 real(kind=kind_real),
intent(out) :: pv(kx,ky,2)
30 real(kind=kind_real),
intent(in) :: x(kx,ky,2)
31 real(kind=kind_real),
intent(in) :: x_north(2)
32 real(kind=kind_real),
intent(in) :: x_south(2)
33 real(kind=kind_real),
intent(in) :: f1
34 real(kind=kind_real),
intent(in) :: f2
35 real(kind=kind_real),
intent(in) :: deltax
36 real(kind=kind_real),
intent(in) :: deltay
37 real(kind=kind_real),
intent(in) :: bet
38 real(kind=kind_real),
intent(in) :: rs(kx,ky)
39 logical,
optional ,
intent(in) :: lbc
42 real(kind=kind_real) :: y
45 if (
present(lbc))
then 58 pv(:,1 ,1) = pv(:,1 ,1) + (1.0_kind_real/(deltay*deltay))*x_south(1)
59 pv(:,1 ,2) = pv(:,1 ,2) + (1.0_kind_real/(deltay*deltay))*x_south(2)
60 pv(:,ky,1) = pv(:,ky,1) + (1.0_kind_real/(deltay*deltay))*x_north(1)
61 pv(:,ky,2) = pv(:,ky,2) + (1.0_kind_real/(deltay*deltay))*x_north(2)
67 y =
real(jj-(ky+1)/2,kind_real)*deltay;
68 pv(:,jj,:) = pv(:,jj,:) + bet*y
73 pv(:,:,2) = pv(:,:,2) + rs(:,:)
subroutine pv_operator(x, pv, nx, ny, F1, F2, deltax, deltay)
Potential vorticity operator.
subroutine calc_pv(kx, ky, pv, x, x_north, x_south, f1, f2, deltax, deltay, bet, rs, lbc)
Calculate potential vorticity from streamfunction.