SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
add_noise.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 add_noise(PADDTIMECORR,PASSIM_WINH,PWHITE_NOISE,PRED_NOISE)
6 !
7 USE yomhook, ONLY : lhook,dr_hook
8 USE parkind1, ONLY : jprb
9 !
10 IMPLICIT NONE
11 !
12 REAL, INTENT(IN) :: paddtimecorr
13 REAL, INTENT(IN) :: pwhite_noise
14 REAL, INTENT(IN) :: passim_winh
15 REAL, INTENT(INOUT) :: pred_noise
16 !
17 REAL :: zalpha, zmu
18 REAL(KIND=JPRB) :: zhook_handle
19 !
20 IF (lhook) CALL dr_hook('ADD_NOISE',0,zhook_handle)
21 !
22 ! Define parameters for model error
23 !
24 ! ZTAU = 3.*86400. ! temporal correlation (sec)
25 !ZSIGMA = 1.E-3/86400. ! standard deviation of error (m3/m3/s)
26 
27 zalpha = 1./(1. + ((passim_winh/24.0)/paddtimecorr))
28 !
29 zmu = sqrt(1. - zalpha**2)*pwhite_noise
30 !
31 pred_noise = zalpha*pred_noise + zmu
32 !
33  !WGN = WGN + ZBETA*WGN_n*DT
34 !
35 IF (lhook) CALL dr_hook('ADD_NOISE',1,zhook_handle)
36 !
37 END SUBROUTINE add_noise
subroutine add_noise(PADDTIMECORR, PASSIM_WINH, PWHITE_NOISE, PRED_NOISE)
Definition: add_noise.F90:5