Skip to content

Commit

Permalink
Added time ranges for availability of MODIS, ASCAT, SMOS, and SMAP obs (
Browse files Browse the repository at this point in the history
  • Loading branch information
gmao-rreichle authored Jan 9, 2025
2 parents 1134dff + f34458c commit fe4fbb7
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Updated subroutine read_obs_sm_ASCAT_EUMET() to work with both original and revised file name templates.
- Updated subroutines read_obs_sm_ASCAT_EUMET(), read_obs_SMAP_halforbit_Tb(), read_obs_SMOS() and read_obs_MODIS_SCF() with hardcoded time ranges for when observations are available and should be read.
- Revised variable names (SHORT_NAME) and descriptions (LONG_NAME) to match M21C file specs.

### Fixed
Expand Down
86 changes: 75 additions & 11 deletions GEOSlandassim_GridComp/clsm_ensupd_read_obs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,7 @@ subroutine read_obs_sm_ASCAT_EUMET( &
type(date_time_type) :: date_time_tmp
type(date_time_type) :: date_time_low, date_time_low_fname
type(date_time_type) :: date_time_up
type(date_time_type) :: date_time_obs_beg, date_time_obs_end

integer :: ii, ind, N_tmp, N_files, kk, N_obs, N_fnames, N_fnames_tmp, obs_dir_hier

Expand Down Expand Up @@ -1688,11 +1689,34 @@ subroutine read_obs_sm_ASCAT_EUMET( &
nullify( tmp_obs, tmp_lat, tmp_lon, tmp_tile_num, tmp_jtime )

! ---------------

! initialize

found_obs = .false.

! determine operating time range of sensor

if (trim(this_obs_param%descr) == 'ASCAT_META_SM') then
date_time_obs_beg = date_time_type(2007, 6, 1, 1,31, 0,-9999,-9999)
date_time_obs_end = date_time_type(2021,11,15, 9, 0, 0,-9999,-9999)
elseif (trim(this_obs_param%descr) == 'ASCAT_METB_SM') then
date_time_obs_beg = date_time_type(2013, 4,24, 8, 0, 0,-9999,-9999)
date_time_obs_end = date_time_type(2100, 1, 1, 0, 0, 0,-9999,-9999)
elseif (trim(this_obs_param%descr) == 'ASCAT_METC_SM') then
date_time_obs_beg = date_time_type(2019,11,25,12, 0, 0,-9999,-9999)
date_time_obs_end = date_time_type(2100, 1, 1, 0, 0, 0,-9999,-9999)
else
err_msg = 'Unknown obs_param%descr: ' // trim(this_obs_param%descr)
call ldas_abort(LDAS_GENERIC_ERROR, Iam, err_msg)
end if

! return if date_time falls outside operating time range

if ( datetime_lt_refdatetime(date_time, date_time_obs_beg) .or. &
datetime_lt_refdatetime(date_time_obs_end, date_time) ) return

! ---------------

! find files that are within half-open interval
! (date_time-dtstep_assim/2,date_time+dtstep_assim/2]

Expand Down Expand Up @@ -4465,6 +4489,7 @@ subroutine read_obs_SMOS( date_time, N_catd, this_obs_param, &
real :: tmpreal, Tb_std_max

type(date_time_type) :: date_time_low, date_time_upp
type(date_time_type) :: date_time_obs_beg

character( 2) :: MM, DD, HH, MI, orbit_tag
character( 4) :: YYYY
Expand Down Expand Up @@ -4497,6 +4522,17 @@ subroutine read_obs_SMOS( date_time, N_catd, this_obs_param, &

found_obs = .false.

! determine operating time range of sensor

date_time_obs_beg = date_time_type(2010, 5,24, 0, 0, 0,-9999,-9999)

! return if date_time falls outside operating time range

if (datetime_lt_refdatetime(date_time, date_time_obs_beg)) return

! ------------------------------


! read soil moisture or brightness temperature files?

if (index(this_obs_param%descr,'_SM') /= 0) then
Expand Down Expand Up @@ -5224,6 +5260,7 @@ subroutine read_obs_MODIS_SCF( &

type(date_time_type) :: date_time_beg, date_time_end
type(date_time_type) :: date_time_beg_MODIS, date_time_end_MODIS
type(date_time_type) :: date_time_obs_beg

real :: lon_beg, lon_end
real :: lon_beg_MODIS, lon_end_MODIS
Expand All @@ -5245,7 +5282,28 @@ subroutine read_obs_MODIS_SCF( &

character(len=*), parameter :: Iam = 'read_obs_MODIS_SCF'
character(len=400) :: err_msg


! ------------------------------------------------------------------------------------
!
! initialize

found_obs = .false.

! determine operating time range of sensor

if (trim(this_obs_param%descr) == 'MOD10C1') then
date_time_obs_beg = date_time_type(2000, 2,24, 1,31, 0,-9999,-9999) ! Terra
elseif (trim(this_obs_param%descr) == 'MYD10C1') then
date_time_obs_beg = date_time_type(2002, 7, 4, 8, 0, 0,-9999,-9999) ! Aqua
else
err_msg = 'Unknown obs_param%descr: ' // trim(this_obs_param%descr)
call ldas_abort(LDAS_GENERIC_ERROR, Iam, err_msg)
end if

! return if date_time falls outside operating time range

if (datetime_lt_refdatetime(date_time, date_time_obs_beg)) return

! ----------------------------------------------------------------------------------
!
! restrict assimilation time step to max allowed
Expand All @@ -5257,12 +5315,6 @@ subroutine read_obs_MODIS_SCF( &

end if


! initialize

found_obs = .false.


! identify MODIS product and overpass hour

MODIS_product_ID = this_obs_param%name(1:7)
Expand Down Expand Up @@ -6849,6 +6901,7 @@ subroutine read_obs_SMAP_halforbit_Tb( date_time, N_catd, this_obs_param, &

type(date_time_type) :: date_time_low, date_time_upp
type(date_time_type) :: date_time_low_fname, date_time_tmp
type(date_time_type) :: date_time_obs_beg

integer :: ii, jj, kk, nn, mm
integer :: N_fnames, N_fnames_tmp, N_obs_tmp
Expand Down Expand Up @@ -6900,6 +6953,20 @@ subroutine read_obs_SMAP_halforbit_Tb( date_time, N_catd, this_obs_param, &

! -------------------------------------------------------------------

! initialize

found_obs = .false.

! determine operating time range of sensor

date_time_obs_beg = date_time_type(2015, 3,31, 0, 0, 0,-9999,-9999)

! return if date_time falls outside operating time range

if (datetime_lt_refdatetime(date_time, date_time_obs_beg)) return

! ----------------

! check inputs

! the subroutine makes sense only if dtstep_assim <= 3 hours
Expand All @@ -6913,9 +6980,6 @@ subroutine read_obs_SMAP_halforbit_Tb( date_time, N_catd, this_obs_param, &
call ldas_abort(LDAS_GENERIC_ERROR, Iam, err_msg)
end if

! initialize

found_obs = .false.

! read Tbs from L1C_TB, L1C_TB_E, or L2_SM_AP files?

Expand Down

0 comments on commit fe4fbb7

Please sign in to comment.