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