SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
oi_kalman_gain.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 SUBROUTINE oi_kalman_gain(PDWG_DWG,PDWG_DW2,PD2,PK1,PK2)
6 !
7 !****-------------------------------------------------------------------
8 !
9 USE modd_csts, ONLY : xrholw
10 USE modd_assim, ONLY : xrd1, xsigwgo, xsigwgb, xsigw2b
11 !
12 !
13 USE yomhook ,ONLY : lhook, dr_hook
14 USE parkind1 ,ONLY : jprb
15 !
16 IMPLICIT NONE
17 !
18 REAL ,INTENT(IN) :: pdwg_dwg, pdwg_dw2, pd2
19 REAL ,INTENT(OUT) :: pk1, pk2
20 !
21 REAL :: zsig_wg,zsig_w2,zsig_wo,za,zb,zh1,zh2,zdenom
22 REAL(KIND=JPRB) :: zhook_handle
23 !
24 ! Standard deviation of background and observation errors
25 !
26 IF (lhook) CALL dr_hook('OI_KALMAN_GAIN',0,zhook_handle)
27 zsig_wg = xsigwgb
28 zsig_w2 = xsigw2b
29 zsig_wo = xsigwgo
30 !
31 ! Jacobians elements
32 !
33 zh1 = pdwg_dwg
34 zh2 = pdwg_dw2
35 !
36 ! Elements of background covariance matrix
37 !
38 za = (zsig_wg*zh1)**2 + (zsig_w2*zh2)**2
39 zb = zsig_w2**2
40 !
41 zdenom = (za + zsig_wo*zsig_wo)
42 !
43 ! Kalman gain elements (m3/m3)
44 !
45 pk1 = za /zdenom !*RD1*XRHOLW
46 pk2 = zb*zh2/zdenom !*PD2*XRHOLW
47 IF (lhook) CALL dr_hook('OI_KALMAN_GAIN',1,zhook_handle)
48 !
49 !**---------------------------------------------------------------------
50 END SUBROUTINE oi_kalman_gain
51 
subroutine oi_kalman_gain(PDWG_DWG, PDWG_DW2, PD2, PK1, PK2)