FV3 Bundle
calc_pv_ad.f90
Go to the documentation of this file.
1 ! (C) Copyright 2009-2016 ECMWF.
2 !
3 ! This software is licensed under the terms of the Apache Licence Version 2.0
4 ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5 ! In applying this licence, ECMWF does not waive the privileges and immunities
6 ! granted to it by virtue of its status as an intergovernmental organisation nor
7 ! does it submit to any jurisdiction.
8 
9 !> Calculate potential vorticity - Adjoint
10 
11 subroutine calc_pv_ad (pv,x,nx,ny,f1,f2,deltax,deltay)
12 
13 !--- calculate potential vorticity from streamfunction
14 
15 use kinds
16 
17 implicit none
18 integer, intent(in) :: nx !< Zonal grid dimension
19 integer, intent(in) :: ny !< Meridional grid dimension
20 real(kind=kind_real), intent(inout) :: pv(nx,ny,2) !< PV adjoint variable
21 real(kind=kind_real), intent(inout) :: x(nx,ny,2) !< Streamfunction adjoint variable
22 real(kind=kind_real), intent(in) :: f1 !< Coefficient in PV operator
23 real(kind=kind_real), intent(in) :: f2 !< Coefficient in PV operator
24 real(kind=kind_real), intent(in) :: deltax !< Zonal grid spacing (non-dimensional)
25 real(kind=kind_real), intent(in) :: deltay !< Meridional grid spacing (non-dim)
26 
27 !--- add the orography/heating term
28 
29  !<-- TL of this is identity. -->
30 
31 !--- add the beta term
32 
33  !<-- TL of this is identity. -->
34 
35 !--- add the contribution from the boundaries
36 
37  !<-- TL of this is identity. -->
38 
39 !--- apply the linear operator
40 
41 call pv_operator_ad(x,pv,nx,ny,f1,f2,deltax,deltay)
42 
43 end subroutine calc_pv_ad
subroutine calc_pv_ad(pv, x, nx, ny, f1, f2, deltax, deltay)
Calculate potential vorticity - Adjoint.
Definition: calc_pv_ad.f90:12
subroutine pv_operator_ad(x, pv, nx, ny, F1, F2, deltax, deltay)
Potential vorticity operator - Adjoint.