Skip to content

Commit

Permalink
Initialize variables to avoid the warning message when compiling (NOA…
Browse files Browse the repository at this point in the history
…A-EMC#753)

This PR is to initialize variables in observer_fv3reg.f90 to avoid the warning message when compiling.
The change will update regional EnKF excutable. However, the current regression test can't identify the changes in regional EnKF mode. The difference between before and after this update is that no warning message appears when compiling regional EnKF.

This PR is to address NOAA-EMC#751

**Type of change**
- [x] Bug fix (non-breaking change which fixes an issue)

**Checklist**
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
  • Loading branch information
ShunLiu-NOAA authored Oct 1, 2024
1 parent 2b1d706 commit 665f9b4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/enkf/observer_fv3reg.f90
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ subroutine setup_linhx(rlat, rlon, time, ix, delx, ixp, delxp, iy, dely, &
use params, only: nstatefields, nlons, nlats, nlevs, nhr_state, fhr_assim
use gridinfo, only: npts, latsgrd, lonsgrd
use statevec, only: nsdim
use constants, only: zero,one,pi
use constants, only: izero,zero,one,pi
use mpisetup
implicit none

Expand All @@ -54,6 +54,18 @@ subroutine setup_linhx(rlat, rlon, time, ix, delx, ixp, delxp, iy, dely, &
real(r_single) ,intent(in ) :: time ! observation time relative to middle of window
integer(i_kind), intent(out) :: ix, iy, it, ixp, iyp, itp
real(r_kind), intent(out) :: delx, dely, delxp, delyp, delt, deltp
ix=izero
iy=izero
it=izero
ixp=izero
iyp=izero
itp=izero
delx=zero
dely=zero
delxp=zero
delyp=zero
delt=zero
deltp=zero
write(6,*)'this is a dummy subroutine, running this means something wrong ,stop'
call stop2(555)

Expand Down Expand Up @@ -110,6 +122,7 @@ subroutine calc_linhx(hx, dens, dhx_dx, hxpert, hx_ens, &
type(raggedarr) ,intent(inout) :: hxpert ! interpolated background
real(r_single) ,intent( out) :: hx_ens ! H (x_ens)
integer(i_kind) i,j
hx_ens=zero
write(6,*)'this is a dummy subroutine, running this means something wrong ,stop'
call stop2(555)

Expand Down Expand Up @@ -145,6 +158,7 @@ subroutine calc_linhx_modens(hx, dhx_dx, hxpert, hx_ens, vscale)
!$$$
use kinds, only: r_kind,i_kind,r_single
use sparsearr, only: sparr, raggedarr
use constants, only: zero
use mpisetup
implicit none

Expand All @@ -155,6 +169,7 @@ subroutine calc_linhx_modens(hx, dhx_dx, hxpert, hx_ens, vscale)
real(r_single) ,intent( out) :: hx_ens(neigv)! H (x_ens)
real(r_double),dimension(neigv,nlevs+1) ,intent(in ) :: vscale ! vertical scaling (for modulated ens)
integer(i_kind) i
hx_ens=zero
write(6,*)'this is a dummy subroutine, running this means something wrong ,stop'
call stop2(555)

Expand Down

0 comments on commit 665f9b4

Please sign in to comment.