FV3 Bundle
meridional_wind.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 meridional wind component from the streamfunction
10 
11 !> Nothing fancy.
12 !! It's just a standard centred finite difference.
13 
14 subroutine meridional_wind (v,x,nx,ny,deltax)
15 
16 !--- calculate meridional wind component
17 
18 use kinds
19 
20 implicit none
21 integer, intent(in) :: nx !< Zonal grid dimension
22 integer, intent(in) :: ny !< Meridional grid dimension
23 real(kind=kind_real), intent(out) :: v(nx,ny,2) !< Meridional wind
24 real(kind=kind_real), intent(in) :: x(nx,ny,2) !< Streamfunction
25 real(kind=kind_real), intent(in) :: deltax !< Zonal grid spacing (non-dimensional)
26 
27 v(1:nx-1,:,:) = (0.5_kind_real/deltax)*x(2:nx,:,:)
28 v(nx ,:,:) = (0.5_kind_real/deltax)*x(1 ,:,:)
29 v(2:nx ,:,:) = v(2:nx,:,:) - (0.5_kind_real/deltax)*x(1:nx-1,:,:)
30 v(1 ,:,:) = v(1 ,:,:) - (0.5_kind_real/deltax)*x(nx ,:,:)
31 
32 end subroutine meridional_wind
subroutine meridional_wind(v, x, nx, ny, deltax)
Calculate meridional wind component from the streamfunction.