Skip to content

Commit

Permalink
Merge branch 'NOAA-EMC:develop' into feature/rm_sfcanl
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed May 3, 2022
2 parents be550bf + 586c2df commit e577941
Show file tree
Hide file tree
Showing 29 changed files with 1,988 additions and 774 deletions.
2 changes: 1 addition & 1 deletion fix
Submodule fix updated from 38c00f to 13a740
12 changes: 10 additions & 2 deletions scripts/exglobal_atmos_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export imp_physics=${imp_physics:-99}
lupp=${lupp:-".true."}
cnvw_option=${cnvw_option:-".false."}

# Observation usage options
cao_check=${cao_check:-".false."}
ta2tb=${ta2tb:-".false."}

# Diagnostic files options
lobsdiag_forenkf=${lobsdiag_forenkf:-".false."}
netcdf_diag=${netcdf_diag:-".true."}
Expand Down Expand Up @@ -438,6 +442,7 @@ for file in $(awk '{if($1!~"!"){print $1}}' satinfo | sort | uniq); do
$NLN $RTMFIX/${file}.SpcCoeff.bin ./crtm_coeffs/
$NLN $RTMFIX/${file}.TauCoeff.bin ./crtm_coeffs/
done
$NLN $RTMFIX/amsua_metop-a_v2.SpcCoeff.bin ./crtm_coeffs/amsua_metop-a_v2.SpcCoeff.bin

$NLN $RTMFIX/Nalli.IRwater.EmisCoeff.bin ./crtm_coeffs/Nalli.IRwater.EmisCoeff.bin
$NLN $RTMFIX/NPOESS.IRice.EmisCoeff.bin ./crtm_coeffs/NPOESS.IRice.EmisCoeff.bin
Expand All @@ -450,6 +455,8 @@ $NLN $RTMFIX/NPOESS.VISwater.EmisCoeff.bin ./crtm_coeffs/NPOESS.VISwater.EmisCoe
$NLN $RTMFIX/FASTEM6.MWwater.EmisCoeff.bin ./crtm_coeffs/FASTEM6.MWwater.EmisCoeff.bin
$NLN $RTMFIX/AerosolCoeff.bin ./crtm_coeffs/AerosolCoeff.bin
$NLN $RTMFIX/CloudCoeff.bin ./crtm_coeffs/CloudCoeff.bin
#$NLN $RTMFIX/CloudCoeff.GFDLFV3.-109z-1.bin ./crtm_coeffs/CloudCoeff.bin


##############################################################
# Observational data
Expand Down Expand Up @@ -735,11 +742,12 @@ cat > gsiparm.anl << EOF
crtm_coeffs_path='./crtm_coeffs/',
newpc4pred=.true.,adp_anglebc=.true.,angord=4,passive_bc=.true.,use_edges=.false.,
diag_precon=.true.,step_start=1.e-3,emiss_bc=.true.,nhr_obsbin=${nhr_obsbin:-3},
cwoption=3,imp_physics=$imp_physics,lupp=$lupp,cnvw_option=$cnvw_option,
cwoption=3,imp_physics=$imp_physics,lupp=$lupp,cnvw_option=$cnvw_option,cao_check=${cao_check},
netcdf_diag=$netcdf_diag,binary_diag=$binary_diag,
lobsdiag_forenkf=$lobsdiag_forenkf,
write_fv3_incr=$write_fv3_increment,
nhr_anal=${IAUFHRS},
ta2tb=${ta2tb},
$WRITE_INCR_ZERO
$WRITE_ZERO_STRAT
$WRITE_STRAT_EFOLD
Expand Down Expand Up @@ -877,7 +885,7 @@ OBS_INPUT::
avhambufr avhrr metop-c avhrr3_metop-c 0.0 4 0
avhpmbufr avhrr n19 avhrr3_n19 0.0 4 0
amsr2bufr amsr2 gcom-w1 amsr2_gcom-w1 0.0 3 0
gmibufr gmi gpm gmi_gpm 0.0 3 0
gmibufr gmi gpm gmi_gpm 0.0 1 0
saphirbufr saphir meghat saphir_meghat 0.0 3 0
ahibufr ahi himawari8 ahi_himawari8 0.0 1 0
abibufr abi g16 abi_g16 0.0 1 0
Expand Down
104 changes: 104 additions & 0 deletions src/gsi/antcorr_application.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
! paul.vandelst@noaa.gov
!
! 2011-04-25 A.Collard Modified to be consistent with CRTM 2.1
! 2020-04-21 S.Sieron Added Apply_Antcorr so that all assimlated
! observations be brightness temperatures
!

MODULE AntCorr_Application
Expand All @@ -35,6 +37,7 @@ MODULE AntCorr_Application
! The AntCorr structure definition
PUBLIC :: ACCoeff_type
PUBLIC :: Remove_AntCorr
PUBLIC :: Apply_AntCorr

! -----------------
! Module parameters
Expand Down Expand Up @@ -153,5 +156,106 @@ SUBROUTINE Remove_AntCorr( AC , & ! Input
T(l) = AC%A_earth(iFOV,l)*T(l) + AC%A_platform(iFOV,l)*T(l) + AC%A_space(iFOV,l)*TSPACE
END DO
END SUBROUTINE Remove_AntCorr


!--------------------------------------------------------------------------------
!
! NAME:
! Apply_AntCorr
!
! PURPOSE:
! Subroutine to apply an antenna correction to microwave instrument
! antenna temperatures, Ta, to produce brightness temperatures, Tb.
!
! CALLING SEQUENCE:
! CALL Apply_AntCorr( AC , & ! Input
! iFOV, & ! Input
! T ) ! In/Output
!
! INPUT ARGUMENTS:
! AC: Structure containing the antenna correction coefficients
! for the sensor of interest.
! UNITS: N/A
! TYPE: TYPE(ACCoeff_type)
! DIMENSION: Scalar
! ATTRIBUTES: INTENT(IN)
!
! iFOV: The FOV index for a scanline of the sensor of interest.
! UNITS: N/A
! TYPE: INTEGER
! DIMENSION: Scalar
! ATTRIBUTES: INTENT(IN)
!
! T: On input, this argument contains the antenna
! temperatures for the sensor channels.
! UNITS: Kelvin
! TYPE: REAL(fp)
! DIMENSION: Rank-1 (n_Channels)
! ATTRIBUTES: INTENT(IN OUT)
!
! OUTPUT ARGUMENTS:
! T: On output, this argument contains the brightness
! temperatures for the sensor channels.
! If an error occurs, the return values are all -1.
! UNITS: Kelvin
! TYPE: REAL(fp)
! DIMENSION: Rank-1 (n_Channels)
! ATTRIBUTES: INTENT(IN OUT)
!
! SIDE EFFECTS:
! The temperature array argument, T, is modified.
!
! PROCEDURE:
! For every FOV and channel, the antenna temperature, Ta, is converted
! to brightness temperature, Tb, using,
!
! Tb = (Ta - As.Ts) / (Ae + Ap)
!
! where Ae == antenna efficiency for the Earth view
! Ap == antenna efficiency for satellite platform view
! As == antenna efficiency for cold space view
! Ts == cosmic background temperature.
!
! Note that the observed earth view brightness temperature is used as a
! proxy for the platform temperature for the (Ap.Tb) component since
! there is no measurement of the platform temperature in-flight.
!
!--------------------------------------------------------------------------------

SUBROUTINE Apply_AntCorr( AC , & ! Input
iFOV, & ! Input
T ) ! In/Output

use kinds,only: i_kind, r_kind

implicit none

! Arguments
TYPE(ACCoeff_type), INTENT(IN) :: AC
INTEGER(i_kind) , INTENT(IN) :: iFOV
REAL(r_kind) , INTENT(IN OUT) :: T(:)
! Local parameters
CHARACTER(*), PARAMETER :: ROUTINE_NAME = 'Apply_AntCorr'
! Local variables
INTEGER(i_kind) :: l

! Check input
IF ( iFOV < 1 .OR. iFOV > AC%n_FOVS ) THEN
CALL Display_Message( ROUTINE_NAME, 'Input iFOV inconsistent with AC data', FAILURE )
T = INVALID
RETURN
END IF
IF ( SIZE(T) /= AC%n_Channels ) THEN
CALL Display_Message( ROUTINE_NAME, 'Size of T() inconsistent with AC data', FAILURE )
T = INVALID
RETURN
END IF
! Compute the brightness temperature
DO l = 1, AC%n_Channels
T(l) = (T(l) - AC%A_space(iFOV,l)*TSPACE) / (AC%A_earth(iFOV,l) + &
AC%A_platform(iFOV,l))
END DO
END SUBROUTINE Apply_AntCorr


END MODULE AntCorr_Application
2 changes: 1 addition & 1 deletion src/gsi/cloud_efr_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ subroutine cloud_calc_gfs(g_ql,g_qi,g_cwmr,g_q,g_tv,lower_bound,g_cf)
real(r_kind),dimension(lat2,lon2,nsig),intent(inout):: g_cwmr ! mixing ratio of total condensates [Kg/Kg]
real(r_kind),dimension(lat2,lon2,nsig),intent(in ):: g_q ! specific humidity [Kg/Kg]
real(r_kind),dimension(lat2,lon2,nsig),intent(in ):: g_tv ! virtual temperature [K]
real(r_kind),dimension(lat2,lon2,nsig),intent(inout), optional:: g_cf ! cloud fractio
real(r_kind),dimension(lat2,lon2,nsig),intent(inout), optional:: g_cf ! cloud fraction
logical,intent(in):: lower_bound ! If .true., set lower bound to cloud

! Declare local variables
Expand Down
56 changes: 52 additions & 4 deletions src/gsi/cplr_gfs_ensmod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ subroutine parallel_read_nemsio_state_(en_full,m_cvars2d,m_cvars3d,nlon,nlat,nsi
! Declare local variables
integer(i_kind) i,ii,j,jj,k,lonb,latb,levs,latb2,lonb2
integer(i_kind) k2,k3,k3u,k3v,k3t,k3q,k3cw,k3oz,kf
integer(i_kind) k3ql,k3qi,k3qr,k3qs,k3qg
integer(i_kind) k3ql,k3qi,k3qr,k3qs,k3qg
integer(i_kind) iret
integer(i_kind) :: istop = 101
integer(i_kind),dimension(7):: idate
Expand Down Expand Up @@ -916,6 +916,7 @@ subroutine parallel_read_gfsnc_state_(en_full,m_cvars2d,m_cvars3d,nlon,nlat,nsig
! Declare local variables
integer(i_kind) i,ii,j,jj,k,lonb,latb,levs,kr,ierror
integer(i_kind) k2,k3,k3u,k3v,k3t,k3q,k3cw,k3oz,kf
integer(i_kind) k3ql,k3qi,k3qr,k3qs,k3qg
character(len=120) :: myname_ = 'parallel_read_gfsnc_state_'
real(r_single),allocatable,dimension(:,:,:) :: rwork3d1, rwork3d2
real(r_single),allocatable,dimension(:,:) :: temp2,rwork2d
Expand Down Expand Up @@ -959,6 +960,7 @@ subroutine parallel_read_gfsnc_state_(en_full,m_cvars2d,m_cvars3d,nlon,nlat,nsig
allocate(rwork3d1(nlon,(nlat-2),nsig))
allocate(temp3(nlat,nlon,nsig,nc3d))
k3u=0 ; k3v=0 ; k3t=0 ; k3q=0 ; k3cw=0 ; k3oz=0
k3ql=0; k3qi=0; k3qr=0; k3qs=0; k3qg=0
do k3=1,nc3d
if (trim(cvars3d(k3))=='cw') then
k3cw=k3
Expand All @@ -973,6 +975,46 @@ subroutine parallel_read_gfsnc_state_(en_full,m_cvars2d,m_cvars3d,nlon,nlat,nsig
call move1_(rwork3d1(:,:,kr),temp3(:,:,k,k3),nlon,nlat)
call fillpoles_ss_(temp3(:,:,k,k3),nlon,nlat)
end do
else if(trim(cvars3d(k3))=='ql') then
k3ql=k3
call read_vardata(atmges, 'clwmr', rwork3d1)
do k=1,nsig
kr = levs+1-k
call move1_(rwork3d1(:,:,kr),temp3(:,:,k,k3),nlon,nlat)
call fillpoles_ss_(temp3(:,:,k,k3),nlon,nlat)
end do
else if(trim(cvars3d(k3))=='qi') then
k3qi=k3
call read_vardata(atmges, 'icmr', rwork3d1)
do k=1,nsig
kr = levs+1-k
call move1_(rwork3d1(:,:,kr),temp3(:,:,k,k3),nlon,nlat)
call fillpoles_ss_(temp3(:,:,k,k3),nlon,nlat)
end do
else if(trim(cvars3d(k3))=='qr') then
k3qr=k3
call read_vardata(atmges, 'rwmr', rwork3d1)
do k=1,nsig
kr = levs+1-k
call move1_(rwork3d1(:,:,kr),temp3(:,:,k,k3),nlon,nlat)
call fillpoles_ss_(temp3(:,:,k,k3),nlon,nlat)
end do
else if(trim(cvars3d(k3))=='qs') then
k3qs=k3
call read_vardata(atmges, 'snmr', rwork3d1)
do k=1,nsig
kr = levs+1-k
call move1_(rwork3d1(:,:,kr),temp3(:,:,k,k3),nlon,nlat)
call fillpoles_ss_(temp3(:,:,k,k3),nlon,nlat)
end do
else if(trim(cvars3d(k3))=='qg') then
k3qg=k3
call read_vardata(atmges, 'grle', rwork3d1)
do k=1,nsig
kr = levs+1-k
call move1_(rwork3d1(:,:,kr),temp3(:,:,k,k3),nlon,nlat)
call fillpoles_ss_(temp3(:,:,k,k3),nlon,nlat)
end do
else if(trim(cvars3d(k3))=='oz') then
k3oz=k3
call read_vardata(atmges, 'o3mr', rwork3d1)
Expand Down Expand Up @@ -1015,7 +1057,8 @@ subroutine parallel_read_gfsnc_state_(en_full,m_cvars2d,m_cvars3d,nlon,nlat,nsig
enddo
deallocate(rwork3d1)

if (k3u==0.or.k3v==0.or.k3t==0.or.k3q==0.or.k3cw==0.or.k3oz==0) &
! if (k3u==0.or.k3v==0.or.k3t==0.or.k3q==0.or.k3cw==0.or.k3oz==0) &
if (k3u==0.or.k3v==0.or.k3t==0.or.k3q==0.or.k3oz==0) &
write(6,'(" WARNING, problem with one of k3-")')

do k=1,nsig
Expand Down Expand Up @@ -1316,8 +1359,13 @@ subroutine get_gfs_ens(this,grd,member,ntindex,atm_bundle,iret)

endif
else if ( use_gfs_ncio ) then
call general_read_gfsatm_nc(grd,sp_ens,filename,uv_hyb_ens,.false., &
zflag,atm_bundle,.true.,iret)
if (fv3_full_hydro) then
call general_read_gfsatm_allhydro_nc(grd,sp_ens,filename,uv_hyb_ens,.false., &
zflag,atm_bundle,iret)
else
call general_read_gfsatm_nc(grd,sp_ens,filename,uv_hyb_ens,.false., &
zflag,atm_bundle,.true.,iret)
endif
else
call general_read_gfsatm(grd,sp_ens,sp_ens,filename,uv_hyb_ens,.false., &
zflag,atm_bundle,inithead,iret)
Expand Down
Loading

0 comments on commit e577941

Please sign in to comment.