diff --git a/src/gsi/read_cris.f90 b/src/gsi/read_cris.f90 index b8bf4ff92b..d5668f8864 100644 --- a/src/gsi/read_cris.f90 +++ b/src/gsi/read_cris.f90 @@ -334,14 +334,18 @@ subroutine read_cris(mype,val_cris,ithin,isfcalc,rmesh,jsatid,gstime,& spc_filename = trim(crtm_coeffs_path)//'viirs-m_n20.SpcCoeff.bin' sensorlist_imager = 'viirs-m_n20' inquire(file=trim(spc_filename), exist=imager_coeff) - if ( .not. imager_coeff ) spc_filename = trim(crtm_coeffs_path)//'viirs-m_j1.SpcCoeff.bin' - sensorlist_imager = 'viirs-m_j1' + if ( .not. imager_coeff ) then + spc_filename = trim(crtm_coeffs_path)//'viirs-m_j1.SpcCoeff.bin' + sensorlist_imager = 'viirs-m_j1' + endif elseif ( trim(jsatid) == 'n21' ) then spc_filename = trim(crtm_coeffs_path)//'viirs-m_n21.SpcCoeff.bin' sensorlist_imager = 'viirs-m_n21' inquire(file=trim(spc_filename), exist=imager_coeff) - if ( .not. imager_coeff ) spc_filename = trim(crtm_coeffs_path)//'viirs-m_j2.SpcCoeff.bin' - sensorlist_imager = 'viirs-m_j2' + if ( .not. imager_coeff ) then + spc_filename = trim(crtm_coeffs_path)//'viirs-m_j2.SpcCoeff.bin' + sensorlist_imager = 'viirs-m_j2' + endif endif inquire(file=trim(spc_filename), exist=imager_coeff) if ( imager_coeff ) then