source: flexpart.git/src/windalign.f90 @ 3481cc1

10.4.1_peseiGFS_025bugfixes+enhancementsdevrelease-10release-10.4.1scaling-bug
Last change on this file since 3481cc1 was 3481cc1, checked in by Ignacio Pisso <ip@…>, 4 years ago

move license from headers to a different file

  • Property mode set to 100644
File size: 2.2 KB
Line 
1subroutine windalign(u,v,ffap,ffcp,ux,vy)
2  !                     i i  i    i   o  o
3  !*****************************************************************************
4  !                                                                            *
5  !  Transformation from along- and cross-wind components to u and v           *
6  !  components.                                                               *
7  !                                                                            *
8  !     Author: A. Stohl                                                       *
9  !                                                                            *
10  !     3 June 1996                                                            *
11  !                                                                            *
12  !*****************************************************************************
13  !                                                                            *
14  ! Variables:                                                                 *
15  ! ffap  turbulent wind in along wind direction                               *
16  ! ffcp  turbulent wind in cross wind direction                               *
17  ! u     main wind component in x direction                                   *
18  ! ux    turbulent wind in x direction                                        *
19  ! v     main wind component in y direction                                   *
20  ! vy    turbulent wind in y direction                                        *
21  !                                                                            *
22  !*****************************************************************************
23
24  implicit none
25
26  real :: u,v,ffap,ffcp,ux,vy,ffinv,ux1,ux2,vy1,vy2,sinphi,cosphi
27  real,parameter :: eps=1.e-30
28
29
30  ! Transform along wind components
31  !********************************
32
33  ffinv=1./max(sqrt(u*u+v*v),eps)
34  sinphi=v*ffinv
35  vy1=sinphi*ffap
36  cosphi=u*ffinv
37  ux1=cosphi*ffap
38
39
40  ! Transform cross wind components
41  !********************************
42
43  ux2=-sinphi*ffcp
44  vy2=cosphi*ffcp
45
46
47  ! Add contributions from along and cross wind components
48  !*******************************************************
49
50  ux=ux1+ux2
51  vy=vy1+vy2
52
53end subroutine windalign
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG