Skip to content

Commit

Permalink
Code review changes from Dave Huber. In qcmod.f90, definition of tsim…
Browse files Browse the repository at this point in the history
… is changed and cenlon is removed from the qc_irsnd argument list. In setuprad.f90, cenlon is removed from the qc_irsnd argument list. In read_cris.f90, 714 is replaced with the parameter band_2_start and some TODO comments were added.
  • Loading branch information
wx20jjung committed Nov 29, 2023
1 parent 7e250a6 commit 9c0a736
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/gsi/qcmod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,7 @@ subroutine qc_saphir(nchanl,sfchgt,luse,sea, &
end subroutine qc_saphir

subroutine qc_irsnd(nchanl,is,ndat,nsig,ich,sea,land,ice,snow,luse,goessndr,airs, &
cris,iasi,hirs,zsges,cenlat,cenlon,frac_sea,pangs,trop5,zasat,tzbgr,tsavg5,tbc,tb_obs,tbcnob,tnoise, &
cris,iasi,hirs,zsges,cenlat,frac_sea,pangs,trop5,zasat,tzbgr,tsavg5,tbc,tb_obs,tbcnob,tnoise, &
wavenumber,ptau5,prsltmp,tvp,temp,wmix,chan_level,emissivity_k,ts,tsim, &
id_qc,aivals,errf,varinv,varinv_use,cld,cldp,kmax,zero_irjaco3_pole,cluster_fraction, &
cluster_bt, chan_stdev, model_bt)
Expand Down Expand Up @@ -2112,14 +2112,14 @@ subroutine qc_irsnd(nchanl,is,ndat,nsig,ich,sea,land,ice,snow,luse,goessndr,airs
! avhrr - logical flag - if avhrr data - true
! zsges - elevation of guess
! cenlat - latitude of observation
! cenlon - longitude of observation
! frac_sea - fraction of grid box covered with water
! pangs - solar zenith angle
! trop5 - tropopause pressure
! zasat - satellite zenith angle
! tzbgr - Tz over water
! tsavg5 - surface skin temperature
! tsim - simulated - observed BT with bias correction
! tbc - simulated - observed BT with bias correction
! tsim - simulated BT
! tb_obs - observed Brightness temperatures
! tnoise - channel noise array
! wavenumber - array of channel wavenumbers
Expand Down Expand Up @@ -2170,7 +2170,7 @@ subroutine qc_irsnd(nchanl,is,ndat,nsig,ich,sea,land,ice,snow,luse,goessndr,airs
integer(i_kind),dimension(nchanl), intent(in ) :: ich
integer(i_kind),dimension(nchanl), intent(inout) :: id_qc
integer(i_kind),dimension(nchanl), intent(in ) :: kmax
real(r_kind), intent(in ) :: zsges,cenlat,cenlon,frac_sea,pangs,trop5
real(r_kind), intent(in ) :: zsges,cenlat,frac_sea,pangs,trop5
real(r_kind), intent(in ) :: tzbgr,tsavg5,zasat
real(r_kind), intent( out) :: cld,cldp
real(r_kind),dimension(40,ndat), intent(inout) :: aivals
Expand Down
7 changes: 4 additions & 3 deletions src/gsi/read_cris.f90
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,&
! Set standard parameters
character(8),parameter:: fov_flag="crosstrk"
integer(i_kind),parameter:: sfc_channel=501 !used in thinning routine if cloud informatino is not available
integer(i_kind),parameter:: band_2_start=714 !for CADS, if any of band 1 (chans 1 - 713) are missing, reject profile
integer(i_kind),parameter:: ichan=-999 ! fov-based surface code is not channel specific for cris
real(r_kind),parameter:: expansion=one ! exansion factor for fov-based surface code.
! use one for ir sensors.
Expand Down Expand Up @@ -325,7 +326,7 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,&
quiet=.not. verbose

imager_coeff = .false.
! spc_filename = trim(crtm_coeffs_path)//'viirs-m_'//trim(jsatid)//'.SpcCoeff.bin' ! when viirs naming convention becomes standarized
!TODO spc_filename = trim(crtm_coeffs_path)//'viirs-m_'//trim(jsatid)//'.SpcCoeff.bin' ! when viirs naming convention becomes standarized
if ( trim(jsatid) == 'npp' ) then
spc_filename = trim(crtm_coeffs_path)//'viirs-m_npp.SpcCoeff.bin'
sensorlist_imager = 'viirs-m_npp'
Expand All @@ -346,7 +347,7 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,&
if ( imager_coeff ) then
allocate( sensorlist(2))
sensorlist(1) = sis
! sensorlist(2) = 'viirs-m_'//trim(jsatid) !when viirs naming conventions becomes standardized
!TODO sensorlist(2) = 'viirs-m_'//trim(jsatid) !when viirs naming conventions becomes standardized
sensorlist(2) = trim(sensorlist_imager)
else
allocate( sensorlist(1))
Expand Down Expand Up @@ -820,7 +821,7 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,&
bufr_chan = bufr_index(i)
if(temperature(bufr_chan) <= tbmin .or. temperature(bufr_chan) >= tbmax ) then
temperature(bufr_chan) = tbmin
if(iuse_rad(ioff+i) >= 0 .or. (cris_cads .and. sc_index(i) < 714)) iskip = iskip + 1
if(iuse_rad(ioff+i) >= 0 .or. (cris_cads .and. sc_index(i) < band_2_start)) iskip = iskip + 1
endif
end do skip_loop

Expand Down
2 changes: 1 addition & 1 deletion src/gsi/setuprad.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ subroutine setuprad(obsLL,odiagLL,lunin,mype,aivals,stats,nchanl,nreal,nobs,&
end do

call qc_irsnd(nchanl,is,ndat,nsig,ich,sea,land,ice,snow,luse(n),goessndr,airs,cris,iasi, &
hirs,zsges,cenlat,cenlon,frac_sea,pangs,trop5,zasat,tzbgr,tsavg5,tbc,tb_obs,tbcnob,tnoise, &
hirs,zsges,cenlat,frac_sea,pangs,trop5,zasat,tzbgr,tsavg5,tbc,tb_obs,tbcnob,tnoise, &
wavenumber,ptau5,prsltmp,tvp,temp,wmix,chan_level,emissivity_k,ts,tsim, &
id_qc,aivals,errf,varinv,varinv_use,cld,cldp,kmax,zero_irjaco3_pole(n), &
imager_cluster_fraction(:,n), imager_cluster_bt(:,:,n), imager_chan_stdev(:,n),imager_model_bt(:,n))
Expand Down

0 comments on commit 9c0a736

Please sign in to comment.