Skip to content

Commit

Permalink
Merge pull request #328 from TingLei-daprediction/feature/gsi_fv3lam_…
Browse files Browse the repository at this point in the history
…enkfiosplit

GitHub Issue #301. Adding the option l_fv3reg_filecombined for fv3-lam interface in the GSI EnKF
  • Loading branch information
MichaelLueken authored Apr 5, 2022
2 parents d9135bf + d00a300 commit 5936a23
Show file tree
Hide file tree
Showing 3 changed files with 492 additions and 353 deletions.
10 changes: 7 additions & 3 deletions src/enkf/gridinfo_fv3reg.f90
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module gridinfo

use mpisetup, only: nproc, mpi_integer, mpi_real4, mpi_comm_world
use params, only: datapath,nlevs,nlons,nlats,use_gfs_nemsio, fgfileprefixes, &
fv3fixpath, nx_res,ny_res, ntiles
fv3fixpath, nx_res,ny_res, ntiles,l_fv3reg_filecombined
use kinds, only: r_kind, i_kind, r_double, r_single
use constants, only: one,zero,pi,cp,rd,grav,rearth,max_varname_length
use constants, only: half
Expand Down Expand Up @@ -91,7 +91,7 @@ subroutine getgridinfo(fileprefix, reducedgrid)
real(r_kind), allocatable, dimension(:,:) :: pressimn,presslmn
real(r_kind) kap,kapr,kap1

integer(i_kind) file_id,var_id,dim_id,nlevsp1,nx_tile,ny_tile,ntile
integer(i_kind) :: file_id,var_id,dim_id,nlevsp1,nx_tile,ny_tile,ntile
integer (i_kind):: nn_tile0
integer(i_kind) :: nlevsp1n
real(r_single), allocatable, dimension(:,:) :: lat_tile,lon_tile,ps
Expand Down Expand Up @@ -212,7 +212,11 @@ subroutine getgridinfo(fileprefix, reducedgrid)
nn_tile0=(ntile-1)*nx_res*ny_res
nn=nn_tile0
write(char_tile, '(i1)') ntile
filename = 'fv3sar_tile'//char_tile//"_ensmean_dynvartracer"
if(l_fv3reg_filecombined) then
filename = 'fv3sar_tile'//char_tile//"_ensmean_dynvartracer"
else
filename = 'fv3sar_tile'//char_tile//"_ensmean_dynvars"
endif
!print *,trim(adjustl(filename))
call nc_check( nf90_open(trim(adjustl(filename)),nf90_nowrite,file_id),&
myname_,'open: '//trim(adjustl(filename)) )
Expand Down
Loading

0 comments on commit 5936a23

Please sign in to comment.