OOPS
qg_wind_mod.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 module qg_wind_mod
10 
11 use kinds
12 use iso_c_binding
13 use qg_gom_mod
14 use qg_obsvec_mod
15 
16 implicit none
17 
18 private
20 ! ------------------------------------------------------------------------------
21 contains
22 ! ------------------------------------------------------------------------------
23 ! Public
24 ! ------------------------------------------------------------------------------
25 !> Get equivalent for wind (TL calls this subroutine too)
26 subroutine qg_wind_equiv(gom,hofx,bias)
27 
28 implicit none
29 
30 ! Passed variables
31 type(qg_gom),intent(in) :: gom !< GOM
32 type(qg_obsvec),intent(inout) :: hofx !< Observation vector
33 real(kind_real),intent(in) :: bias(2) !< Bias
34 
35 ! Local variables
36 integer :: iobs
37 
38 ! Loop over observations
39 do iobs=1,gom%nobs
40  hofx%values(1:2,iobs) = gom%values(1:2,iobs)+bias
41 enddo
42 
43 end subroutine qg_wind_equiv
44 ! ------------------------------------------------------------------------------
45 !> Get equivalent for wind - adjoint
46 subroutine qg_wind_equiv_ad(gom,hofx,bias)
47 
48 implicit none
49 
50 ! Passed variables
51 type(qg_gom),intent(inout) :: gom !< GOM
52 type(qg_obsvec),intent(in) :: hofx !< Observation vector
53 real(kind_real),intent(inout) :: bias(2) !< Bias
54 
55 ! Local variables
56 integer :: iobs
57 
58 ! Loop over observations
59 do iobs=1,gom%nobs
60  gom%values(1:2,iobs) = hofx%values(1:2,iobs)
61  bias(1) = bias(1)+hofx%values(1,iobs)
62  bias(2) = bias(2)+hofx%values(2,iobs)
63 enddo
64 
65 end subroutine qg_wind_equiv_ad
66 ! ------------------------------------------------------------------------------
67 end module qg_wind_mod
qg_wind_mod::qg_wind_equiv
subroutine, public qg_wind_equiv(gom, hofx, bias)
Get equivalent for wind (TL calls this subroutine too)
Definition: qg_wind_mod.F90:27
qg_wind_mod
Definition: qg_wind_mod.F90:9
qg_obsvec_mod
Definition: qg_obsvec_mod.F90:10
qg_gom_mod::qg_gom
Definition: qg_gom_mod.F90:33
qg_wind_mod::qg_wind_equiv_ad
subroutine, public qg_wind_equiv_ad(gom, hofx, bias)
Get equivalent for wind - adjoint.
Definition: qg_wind_mod.F90:47
qg_gom_mod
Definition: qg_gom_mod.F90:9
qg_obsvec_mod::qg_obsvec
Definition: qg_obsvec_mod.F90:35