Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logic to switch between JEDI and GSI ice increment names #43

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/EnKF/gfs/src/recentersigp.fd/recentersigp.f90
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ program recentersigp
case ('icmr_inc')
call read_vardata(dsetmg,'icmr',values_3d_mb)
call read_vardata(dsetmo,'icmr',values_3d_anl)
case ('ice_wat_inc')
call read_vardata(dsetmg,'icmr',values_3d_mb)
call read_vardata(dsetmo,'icmr',values_3d_anl)
end select
values_3d(:,:,:) = zero
do j=1,latb
Expand Down
30 changes: 21 additions & 9 deletions src/netcdf_io/interp_inc.fd/driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,26 @@ program interp_inc
real(8), allocatable :: rlon(:), rlat(:), crot(:), srot(:)
real(8), allocatable :: gi(:,:), gi2(:,:), go(:,:), go2(:,:), go3(:,:)


logical :: jedi = .false.
character(len=11) :: ice_inc_name

namelist /setup/ lon_out, lat_out, outfile, infile, lev, jedi
RussTreadon-NOAA marked this conversation as resolved.
Show resolved Hide resolved

!----------------------------------------------------------------
! Set increment variable names.
!----------------------------------------------------------------

! GSI and JEDI may use difference increment variable names
if ( jedi ) then
ice_inc_name = 'icmr_inc'
else
ice_inc_name = 'ice_wat_inc'
end if

! NOTE: u_inc,v_inc must be consecutive
data records /'u_inc', 'v_inc', 'delp_inc', 'delz_inc', 'T_inc', &
'sphum_inc', 'liq_wat_inc', 'o3mr_inc', 'icmr_inc' /

namelist /setup/ lon_out, lat_out, outfile, infile, lev


records = (/'u_inc', 'v_inc', 'delp_inc', 'delz_inc', 'T_inc', &
'sphum_inc', 'liq_wat_inc', 'o3mr_inc', ice_inc_name /)

!-----------------------------------------------------------------
! MPI initialization
call mpi_init(mpierr)
Expand Down Expand Up @@ -185,8 +197,8 @@ program interp_inc
error = nf90_def_var(ncid_out, 'o3mr_inc', nf90_float, (/dim_lon_out,dim_lat_out,dim_lev_out/), id_o3mr_inc_out)
call netcdf_err(error, 'defining variable o3mr_inc for file='//trim(outfile) )

error = nf90_def_var(ncid_out, 'icmr_inc', nf90_float, (/dim_lon_out,dim_lat_out,dim_lev_out/), id_icmr_inc_out)
call netcdf_err(error, 'defining variable icmr_inc for file='//trim(outfile) )
error = nf90_def_var(ncid_out, trim(ice_inc_name), nf90_float, (/dim_lon_out,dim_lat_out,dim_lev_out/), id_icmr_inc_out)
call netcdf_err(error, 'defining variable ' // trim(ice_inc_name) // ' for file='//trim(outfile) )

error = nf90_put_att(ncid_out, nf90_global, 'source', 'GSI')
call netcdf_err(error, 'defining source attribute for file='//trim(outfile) )
Expand Down
Loading