📄 enkf_add_noise.f90
字号:
subroutine enkf_add_noise(istep)! ---------------------------------------------------------------------!| this subroutine is used for adding model noise into the model |!| state variables | !| |!| |!| |!| first version date: 7/23/2004, author: QinJun | !| modifying date : 8/19/2004, by QinJun |! --------------------------------------------------------------------- use clmtv_module use clmtc_module use clmpar_module use enkftv_module use enkfpar_module implicit none real::gasdev ! declaration for function gasdev() used to generate ! random number with distribution N(0,1) real,dimension(1:10)::RAND ! realization of independent 32-dimensional ! multivariate random vector real,dimension(1:10)::MN ! realization of model noise real,dimension(1:10,1:10)::SQRTW ! square root of model error integer:: i, j, k, m, n ! iteration cycle number real, dimension(1:10) :: SV ! denote state variables for temporary ! use integer :: istep do i = 1, kpt! ------------------------------------------- ! ** produce model noise with a new method **! ------------------------------------------- do m = 1, 10 SV(m) = tss(m,i) end do do m = 1, 10 do n = 1,10 W(m,n) = Rhoc(m,n)*ABS(Sigman(m)*Sigman(n)*SV(m)*SV(n))!print*, Rhoc end do end do !print*, 'sigman',Sigman(21) !print*, 'SV',SV!print*, 'Rhoc',Rhoc(21,21)!print*, 'W',W(21,21)!write(7777,*)((W(m,n),n=1,21),m=1,21)!print*,'MATMULT',MNprint*, 'new methods', istep! --------------------------------------------------------------- ! write(*,*) ((W(m,n),n=1,10),m=1,10) call PDSQRT(W,SQRTW,10) !print*,'PDSQRT'!print*,'MATMULT',MN do j = 1, Ne!print*,j do m =1, 10 RAND(m) = gasdev(idum)!*sqrt(dtime) end do !print*,' RAND'!print*,'PDSQRT' call MATMULT(SQRTW,RAND,MN,10,10,1)!print*,'MATMULT',MN do m = 1, 10 en_tss(m,i,j) = en_tss(m,i,j) + MN(m) end doprint*,'en_tss',en_tss(:,i,j)!print*,'en_tlsun' en_tg(i,j) = en_tss(1,i,j) ! in CLM, tg(?) = tss(1,?)!print*,'en_tg'!print*, j end do!print*,'end do' end do end subroutine enkf_add_noise
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -