Skip to content

Commit

Permalink
First save for iasi-ng. added read_iasing and various tests for iasi-ng
Browse files Browse the repository at this point in the history
  • Loading branch information
wx20jjung committed Jul 10, 2024
1 parent 3c41471 commit 0e1853b
Show file tree
Hide file tree
Showing 15 changed files with 129 additions and 91 deletions.
3 changes: 2 additions & 1 deletion src/gsi/crtm_interface.f90
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,8 @@ subroutine init_crtm(init_pass,mype_diaghdr,mype,nchanl,nreal,isis,obstype,radmo
error_status = crtm_channelinfo_subset(channelinfo(1), &
channel_subset = nuchan(subset_start:subset_end))

else if (channelinfo(1)%sensor_id(1:7) == 'iasi-ng' .AND. isis(1:7) == 'iasi-ng') then
!JAJ the correct one else if (channelinfo(1)%sensor_id(1:7) == 'iasi-ng' .AND. isis(1:7) == 'iasi-ng') then
else if (channelinfo(1)%sensor_id(1:3) == '999' .AND. isis(1:7) == 'iasi-ng') then
sensorindex = 1
subset_start = 0
subset_end = 0
Expand Down
1 change: 1 addition & 0 deletions src/gsi/gsi_obOperTypeManager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ function dtype2index_(dtype) result(index_)
case("hsb" ); index_= iobOper_rad
!
case("iasi" ); index_= iobOper_rad
case("iasi-ng"); index_= iobOper_rad
case("cris" ); index_= iobOper_rad
case("cris-fsr" ); index_= iobOper_rad
!
Expand Down
2 changes: 1 addition & 1 deletion src/gsi/gsimod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2321,7 +2321,7 @@ subroutine gsimain_initialize
endif
do i=1,ndat
write(6,401)dfile(i),dtype(i),dplat(i),dsis(i),dval(i),dthin(i),dsfcalc(i),time_window(i)
401 format(1x,a20,1x,a10,1x,a10,1x,a20,1x,f10.2,1x,I3,1x,I3,1x,f10.2)
401 format(1x,a20,1x,a10,1x,a12,1x,a20,1x,f10.2,1x,I3,1x,I3,1x,f10.2)
end do
write(6,superob_radar)
write(6,lag_data)
Expand Down
5 changes: 3 additions & 2 deletions src/gsi/mrmsmod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ subroutine load_mrms_data_info (mrms_listfile,nrows0,ntot_mrms,nrows_mrms,nrows,
integer(i_kind),parameter::nobstype_mrms=2 ! first for vr, and the second for ref
integer(i_kind),intent(in):: nrows0,ntot_mrms,nrows_mrms,nrows
character(len=*),intent(in),optional ::mrms_listfile, rcname ! input filename
character(10),intent(inout),dimension(nrows):: dtype,ditype,dplat
character(len=*),intent(inout),dimension(nrows):: dtype, ditype, dplat
character(20),intent(inout),dimension(nrows):: obsfile_all
character(*),intent(inout),dimension(nrows):: dfile
character(20),intent(inout),dimension(nrows):: dsis
Expand All @@ -42,7 +42,8 @@ subroutine load_mrms_data_info (mrms_listfile,nrows0,ntot_mrms,nrows_mrms,nrows,


real(r_kind),allocatable,dimension(:):: dmesh_mrms
character(10),allocatable,dimension(:):: dtype_mrms,ditype_mrms,dplat_mrms
character(10),allocatable,dimension(:):: dtype_mrms,ditype_mrms
character(11),allocatable,dimension(:):: dplat_mrms
character(120),allocatable,dimension(:):: dfile_mrms
character(20),allocatable,dimension(:):: dsis_mrms
real(r_kind) ,allocatable,dimension(:):: dval_mrms
Expand Down
3 changes: 2 additions & 1 deletion src/gsi/obsmod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ module obsmod
character(128) dirname
character(128) obs_input_common
character(20),allocatable,dimension(:):: obsfile_all
character(10),allocatable,dimension(:):: dtype,ditype,dplat
character(10),allocatable,dimension(:):: dtype,ditype
character(11),allocatable,dimension(:):: dplat
character(120),allocatable,dimension(:):: dfile
character(20),allocatable,dimension(:):: dsis
real(r_kind) ,allocatable,dimension(:):: dval
Expand Down
9 changes: 5 additions & 4 deletions src/gsi/qcmod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2335,9 +2335,9 @@ subroutine qc_irsnd(nchanl,is,ndat,nsig,ich,sea,land,ice,snow,luse,goessndr,airs
boundary_layer_pres = nint(0.8_r_kind*prsltmp(1)) ! boundary layer set to be 80% of surface pressure
tropopause_height = nint(trop5)
imager_chans = (/18,19/) ! imager channel numbers (from satinfo)
isurface_chan = 2447 ! surface channel
ichan_10_micron = 2447 ! ~10.7 micron channel for low level cloud test
ichan_12_micron = 1560 ! ~12.0 micron channel for low level cloud test
isurface_chan = 2539 ! surface channel
ichan_10_micron = 2343 ! ~10.7 micron channel for low level cloud test
ichan_12_micron = 1509 ! ~12.0 micron channel for low level cloud test

call cloud_aerosol_detection( I_Sensor_ID, nchanl, chan_array, &
tropopause_height, boundary_layer_pres, tb_bc, tsim, chan_level, imager_chans, cluster_fraction, &
Expand Down Expand Up @@ -2434,6 +2434,7 @@ subroutine qc_irsnd(nchanl,is,ndat,nsig,ich,sea,land,ice,snow,luse,goessndr,airs
! default compute cloud stats, emc_legacy_cloud_detect
else
if ( lcloud > 0 ) then
!JAJ if ( lcloud > 0 .and. .not. iasing ) then

do i=1,nchanl
! reject channels with iuse_rad(j)=-1 when they are peaking below the cloud
Expand Down Expand Up @@ -4258,7 +4259,7 @@ subroutine qc_goesimg(nchanl,is,ndat,nsig,ich,dplat,sea,land,ice,snow,luse, &
real(r_kind),dimension(nsig,nchanl),intent(in ) :: temp,wmix
real(r_kind),dimension(nchanl), intent(in ) :: tb_obs,tb_obs_sdv,tbc,tnoise,emissivity_k,ts
real(r_kind),dimension(nchanl), intent(inout) :: errf,varinv
character(10), intent(in ) :: dplat
character(len=*), intent(in ) :: dplat

! Declare local parameters

Expand Down
3 changes: 2 additions & 1 deletion src/gsi/radiance_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ subroutine radiance_obstype_init
rtype(i) == 'avhrr' .or. rtype(i) == 'amsre' .or. rtype(i) == 'ssmis' .or. &
rtype(i) == 'ssmi' .or. rtype(i) == 'atms' .or. rtype(i) == 'cris' .or. &
rtype(i) == 'amsr2' .or. rtype(i) == 'gmi' .or. rtype(i) == 'saphir' .or. &
rtype(i) == 'cris-fsr' .or. rtype(i) == 'abi' .or. rtype(i) == 'viirs' ) then
rtype(i) == 'cris-fsr' .or. rtype(i) == 'abi' .or. rtype(i) == 'viirs' .or. &
rtype(i) == 'iasi-ng' )then
drtype(i)='rads'
end if
end do
Expand Down
11 changes: 6 additions & 5 deletions src/gsi/radinfo.f90
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ subroutine radinfo_read
end select

if ( .not. diag_rad .and. iuse_rad(j) < 0 .and. iextra_det(j) < 0 .and. &
( nusis(j)(1:4) == 'cris' .or. nusis(j)(1:4) == 'iasi' .or. nusis(j)(1:4) == 'airs')) cycle
( nusis(j)(1:4) == 'cris' .or. nusis(j)(1:7) == 'iasi-ng' .or. nusis(j)(1:4) == 'iasi' &
.or. nusis(j)(1:4) == 'airs')) cycle

if(iuse_rad(j) == 4 .or. iuse_rad(j) == 2) air_rad(j)=zero
if(iuse_rad(j) == 4 .or. iuse_rad(j) == 3) ang_rad(j)=zero
Expand Down Expand Up @@ -805,10 +806,10 @@ subroutine radinfo_read
end do
close(lunin)
100 format(a1,a120)
110 format(i4,1x,a20,' chan= ',i4, &
110 format(i4,1x,a20,' chan= ',i5, &
' var= ',f7.3,' varch_cld=',f7.3,' use= ',i2,' ermax= ',F7.3, &
' b_rad= ',F7.2,' pg_rad=',F7.2,' icld_det=',I2,' icloud=',I2,' iaeros=',I2)
111 format(i4,1x,a20,' chan= ',i4, &
111 format(i4,1x,a20,' chan= ',i5, &
' var= ',f7.3,' varch_cld=',f7.3,' use= ',i2,' ermax= ',F7.3, &
' b_rad= ',F7.2,' pg_rad=',F7.2,' iextra_det=',I2, 'icloud=',I2,'iaeros=', I2)

Expand Down Expand Up @@ -869,7 +870,7 @@ subroutine radinfo_read
! The second part of the if statement keeps from printing them.
if ( .not. cfound ) then
if ((diag_rad .and. mype ==0) .or. &
(.not. diag_rad .and. isis(1:4)/='airs' .and. isis(1:4) /= 'cris' .and. isis(1:4) /= 'iasi')) &
(.not. diag_rad .and. isis(1:4)/='airs' .and. isis(1:4) /= 'cris' .and. isis(1:7) /= 'iasi-ng' .and. isis(1:4) /= 'iasi')) &
write(6,*) '***WARNING instrument/channel ',isis,ichan,'found in satbias_pc file but not found in satinfo'
endif

Expand Down Expand Up @@ -1112,7 +1113,7 @@ subroutine radinfo_read
! The second part of the if statement keeps from printing them.
if ( .not. cfound ) then
if ((diag_rad .and. mype ==0) .or. &
(.not. diag_rad .and. isis(1:4)/='airs' .and. isis(1:4) /= 'cris' .and. isis(1:4) /= 'iasi')) &
(.not. diag_rad .and. isis(1:4)/='airs' .and. isis(1:4) /= 'cris' .and. isis(1:7) /= 'iasi-ng' .and. isis(1:4) /= 'iasi')) &
write(6,*) '***WARNING instrument/channel ',isis,ichan,'found in satbias_in file but not found in satinfo'
endif

Expand Down
6 changes: 3 additions & 3 deletions src/gsi/read_cris.f90
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,&
integer(i_kind) ,intent(in ) :: mype_sub
integer(i_kind) ,intent(in ) :: npe_sub
integer(i_kind) ,intent(in ) :: mpi_comm_sub
character(len=*), intent(in ) :: infile
character(len=10),intent(in ) :: jsatid
character(len=*), intent(in ) :: obstype
character(len=*) ,intent(in ) :: infile
character(len=*) ,intent(in ) :: jsatid
character(len=*) ,intent(in ) :: obstype
character(len=20),intent(in ) :: sis
real(r_kind) ,intent(in ) :: twind
real(r_kind) ,intent(inout) :: val_cris
Expand Down
8 changes: 5 additions & 3 deletions src/gsi/read_diag.f90
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module read_diag
! Declare structures for radiance diagnostic file information
type diag_header_fix_list
character(len=20) :: isis ! sat and sensor type
character(len=10) :: id ! sat type
character(len=11) :: id ! sat type
character(len=10) :: obstype ! observation type
integer(i_kind) :: jiter ! outer loop counter
integer(i_kind) :: nchan ! number of channels in the sensor
Expand Down Expand Up @@ -414,7 +414,8 @@ subroutine read_radiag_header_nc(ftin,header_fix,header_chan,iflag)
real(r_kind),allocatable,dimension(:) :: r_var_stor
integer(i_kind),allocatable,dimension(:) :: i_var_stor
character(20) :: isis
character(10) :: id, obstype
character(11) :: id
character(10) :: obstype
! integer(i_kind),dimension(:),allocatable :: jiter, nchan_diag, npred, idate, &
integer(i_kind) :: jiter, nchan_diag, npred, idate, &
ireal, ipchan, iextra, jextra, &
Expand Down Expand Up @@ -515,7 +516,8 @@ subroutine read_radiag_header_bin(ftin,npred_radiag,retrieval,header_fix,header_

! Declare local variables
character(len=2):: string
character(len=10):: satid,sentype
character(len=11):: satid
character(len=10):: sentype
character(len=20):: sensat
integer(i_kind) :: i,ich
integer(i_kind):: jiter,nchanl,npred,ianldate,ireal,ipchan,iextra,jextra
Expand Down
2 changes: 1 addition & 1 deletion src/gsi/read_iasi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ subroutine read_iasi(mype,val_iasi,ithin,isfcalc,rmesh,jsatid,gstime,&
integer(i_kind) ,intent(in ) :: npe_sub
integer(i_kind) ,intent(in ) :: mpi_comm_sub
character(len=*), intent(in ) :: infile
character(len=10),intent(in ) :: jsatid
character(len=*),intent(in ) :: jsatid
character(len=*), intent(in ) :: obstype
character(len=20),intent(in ) :: sis
real(r_kind) ,intent(in ) :: twind
Expand Down
Loading

0 comments on commit 0e1853b

Please sign in to comment.