@@ -1629,6 +1629,7 @@ subroutine read_obs_sm_ASCAT_EUMET( &
16291629 type (date_time_type) :: date_time_tmp
16301630 type (date_time_type) :: date_time_low, date_time_low_fname
16311631 type (date_time_type) :: date_time_up
1632+ type (date_time_type) :: date_time_first_obs, date_time_last_obs
16321633
16331634 integer :: ii, ind, N_tmp, N_files, kk, N_obs, N_fnames, N_fnames_tmp, obs_dir_hier
16341635
@@ -1688,6 +1689,38 @@ subroutine read_obs_sm_ASCAT_EUMET( &
16881689 nullify( tmp_obs, tmp_lat, tmp_lon, tmp_tile_num, tmp_jtime )
16891690
16901691 ! ---------------
1692+
1693+ ! check if we are within time periods when observations are available for metop-a, metop-b, or metop-c
1694+ ! if not, then return
1695+
1696+ if (trim (this_obs_param% descr) == ' ASCAT_META_SM' ) then
1697+ date_time_first_obs = date_time_type(2007 , 6 , 1 , 1 ,31 , 0 , 0 , 0 )
1698+ date_time_last_obs = date_time_type(2021 ,11 ,15 , 9 , 0 , 0 , 0 , 0 )
1699+ elseif (trim (this_obs_param% descr) == ' ASCAT_METB_SM' ) then
1700+ date_time_first_obs = date_time_type(2013 , 4 ,24 , 8 , 0 , 0 , 0 , 0 )
1701+ date_time_last_obs = date_time_type(2100 , 1 , 1 , 0 , 0 , 0 , 0 , 0 )
1702+ elseif (trim (this_obs_param% descr) == ' ASCAT_METC_SM' ) then
1703+ date_time_first_obs = date_time_type(2019 ,11 ,25 ,12 , 0 , 0 , 0 , 0 )
1704+ date_time_last_obs = date_time_type(2100 , 1 , 1 , 0 , 0 , 0 , 0 , 0 )
1705+ else
1706+ err_msg = ' Unknown observation time range for this ASCAT observation type'
1707+ call ldas_abort(LDAS_GENERIC_ERROR, Iam, err_msg)
1708+ end if
1709+
1710+ if (datetime_lt_refdatetime(date_time, date_time_first_obs) .or. &
1711+ datetime_lt_refdatetime(date_time_last_obs, date_time)) then
1712+ found_obs = .false.
1713+ ASCAT_sm = this_obs_param% nodata
1714+ ASCAT_lon = this_obs_param% nodata
1715+ ASCAT_lat = this_obs_param% nodata
1716+ ASCAT_time = real (this_obs_param% nodata,kind (0.0D0 ))
1717+ ASCAT_sm_std = this_obs_param% nodata
1718+
1719+ err_msg = ' Looking for ' // trim (this_obs_param% descr) // ' observations before/after they are available'
1720+ call ldas_warn(LDAS_GENERIC_WARNING, Iam, err_msg)
1721+
1722+ return
1723+ end if
16911724
16921725 ! initialize
16931726
@@ -6849,6 +6882,7 @@ subroutine read_obs_SMAP_halforbit_Tb( date_time, N_catd, this_obs_param, &
68496882
68506883 type (date_time_type) :: date_time_low, date_time_upp
68516884 type (date_time_type) :: date_time_low_fname, date_time_tmp
6885+ type (date_time_type) :: date_time_first_obs
68526886
68536887 integer :: ii, jj, kk, nn, mm
68546888 integer :: N_fnames, N_fnames_tmp, N_obs_tmp
@@ -6900,6 +6934,24 @@ subroutine read_obs_SMAP_halforbit_Tb( date_time, N_catd, this_obs_param, &
69006934
69016935 ! -------------------------------------------------------------------
69026936
6937+ ! check if we are in the time range of SMAP observations which start on 2015-03-31
6938+
6939+ date_time_first_obs = date_time_type(2015 , 3 ,31 , 0 , 0 , 0 , 0 , 0 )
6940+
6941+ if (datetime_lt_refdatetime(date_time, date_time_first_obs)) then
6942+ found_obs = .false.
6943+ SMAP_data = this_obs_param% nodata
6944+ SMAP_lon = this_obs_param% nodata
6945+ SMAP_lat = this_obs_param% nodata
6946+ SMAP_time = real (this_obs_param% nodata,kind (0.0D0 ))
6947+ std_SMAP_data = this_obs_param% nodata
6948+
6949+ err_msg = ' Looking for SMAP observations before 2015-03-31'
6950+ call ldas_warn(LDAS_GENERIC_WARNING, Iam, err_msg)
6951+
6952+ return
6953+ end if
6954+
69036955 ! check inputs
69046956
69056957 ! the subroutine makes sense only if dtstep_assim <= 3 hours
0 commit comments