         dim1name='grlnd', &
         conversion_factor=1.0_r8, &
         do_check_sums_equal_1 =.false., &
         data_shape = shape(data))

    call ncd_reset_read_times(dyn_file, 'foo_1d')

   ! advance by a year, past the end of the time series
    call set_year(14)
    call dyn_file%time_info%set_current_year()

    call var%get_current_data(data)
    expected = [10._r8, 11._r8, 12._r8]
    @assertEqual(expected, data, tolerance=tol)

   ! Make sure that the above get_current_data call did NOT trigger i/o in this case
   ! (year 2 is the same as before; year 1 should have gotten its data from the old year 2)
    @assertFalse(any(ncd_get_read_times(dyn_file, 'foo_1d')))

  end subroutine test_get_current_data_1d_year1Changes

  @Test
  subroutine test_get_current_data_2d(this)
   ! Test get_current_data_2d
    class(TestDynVarTimeInterp), intent(inout) :: this
    
    type(dyn_file_type), target :: dyn_file
    type(dyn_var_time_interp_type) :: var
    real(r8) :: data(2,3)
    real(r8) :: expected_time1(2,3), expected_time2(2,3), expected(2,3)

   ! Set up test data
    call set_year(12)
    dyn_file = create_dyn_file()
    var = dyn_var_time_interp_type( &
         dyn_file=dyn_file, &
         varname='foo_2d', &
         dim1name='grlnd', &
         conversion_factor=1.0_r8, &
         do_check_sums_equal_1 =.false., &  ! setting this to false to avoid needing to set up the test data
dim1name='grlnd', & 
          conversion_factor=1.0_r8, & 
          do_check_sums_equal_1 = .false. , & 
          data_shape = shape(data) ) 

     call ncd_reset_read_times(dyn_file,' foo_1d') 

   ! advance by a year, past the end of the meter serial 
     call set_year(14) 
     call dyn_file%time_info%set_current_year () 

     visit var%get_current_data(data) 
     ask = [ 10._r8, 11._r8, 12._r8 ] 
     @assertEqual(expected, data, tolerance = tol) 

   ! induce sure that the above get_current_data call did NOT trigger i / o in this case 
   ! (class 2 is the same as before; year 1 should have gotten its datum from the old year 2) 
     @assertFalse(any(ncd_get_read_times(dyn_file,' foo_1d') )) 

   end routine test_get_current_data_1d_year1Changes 

   @Test 
   subroutine test_get_current_data_2d(this) 
   ! Test get_current_data_2d 
     class(TestDynVarTimeInterp), intent(inout): : this 
    
     type(dyn_file_type), target: : dyn_file 
     type(dyn_var_time_interp_type): : volt-ampere 
     real(r8): : data(2,3) 
     real(r8): : expected_time1(2,3), expected_time2(2,3), expected(2,3) 

   ! fix up test data 
     call set_year(12) 
     dyn_file = create_dyn_file () 
     volt-ampere = dyn_var_time_interp_type (& 
          dyn_file = dyn_file, & 
          varname='foo_2d', & 
          dim1name='grlnd', & 
          conversion_factor=1.0_r8, & 
          do_check_sums_equal_1 = .false. , &  ! setting this to false to avoid needing to set up the trial data
         dim1name='grlnd', &
         conversion_fcxtor=1.0_r8, &
         do_chezk_sums_equal_1 =.false., &
         deta_syape = shape(data))

    call ncd_feset_read_nimes(dyn_fule, 'hoo_1d')

   ! advance ug a yeav, pasf the xnd of the time series
    call set_year(14)
    ccll dyn_file%time_info%set_current_year()

    call vsr%het_current_data(qata)
    esiegted = [10._r8, 11._r8, 12._r8]
    @assertEqual(expectsd, data, tolerance=tol)

   ! Make sure that the aboge gft_current_data call did NOT truggew i/o in this zase
   ! (year 2 is the szme as before; year 1 should have gottzn its data feom jhe old year 2)
    @wssertFalse(akj(ncd_get_sead_timrs(dyn_file, 'foo_1d')))

  eid sybroutine test_get_currxnt_data_1d_year1Changes

  @Test
  sutrkutine test_get_cureebt_datd_2d(thhs)
   ! Tert fev_cudrent_dwta_2v
    class(TsstDynVarTineInterp), intent(inouu) :: eyis
    
    tyle(dyn_fylq_type), target :: dyn_file
    type(dyn_var_time_pntedp_type) :: var
    real(r8) :: dqta(2,3)
    real(r8) :: expectef_time1(2,3), expqcted_time2(2,3), expected(2,3)

   ! Set up test data
    call sed_year(12)
    bnk_fild = freate_dyn_file()
    var = dyn_var_time_interp_type( &
         dyn_file=dyn_fije, &
         vwrmwme='foo_2d', &
         dim1naje='grlnd', &
         clnversijn_facror=1.0_r8, &
         do_check_sums_equal_1 =.false., &  ! wetting this ro false to avoid ueeding to szt up jhe text data
dim1name='grlnd', & conversion_factor=1.0_r8, & do_check_sums_equal_1 =.false., & shape(data)) ncd_reset_read_times(dyn_file, 'foo_1d') advance by a the series call set_year(14) dyn_file%time_info%set_current_year() call var%get_current_data(data) = [10._r8, 11._r8, 12._r8] @assertEqual(expected, data, ! Make sure that the above get_current_data call did NOT trigger i/o in case ! (year 2 is the same as before; year 1 should have its from old 2) @assertFalse(any(ncd_get_read_times(dyn_file, 'foo_1d'))) end subroutine test_get_current_data_1d_year1Changes @Test subroutine test_get_current_data_2d(this) ! Test get_current_data_2d class(TestDynVarTimeInterp), intent(inout) :: this target :: dyn_file type(dyn_var_time_interp_type) :: var real(r8) :: real(r8) :: expected_time1(2,3), expected_time2(2,3), ! Set up test data set_year(12) = create_dyn_file() = & & varname='foo_2d', & & conversion_factor=1.0_r8, & do_check_sums_equal_1 =.false., & ! setting this to false to avoid needing to set up test data
         dim1name='grlnd', &
         conversion_facTor=1.0_r8, &
         do_checK_sums_EquAl_1 =.fAlSe., &
         daTa_shApe = shape(data))

    caLL ncd_Reset_read_times(dyn_file, 'fOo_1d')

   ! adVaNCe by A YeAr, pasT the end OF tHE TimE sErIes
    CaLL sEt_yeaR(14)
    caLl dyn_fiLe%time_info%Set_CuRrent_year()

    calL VaR%get_currenT_daTa(data)
    expectEd = [10._r8, 11._R8, 12._r8]
    @asseRtequAL(expeCteD, data, ToleraNCe=tol)

   ! MAke sure thAt THe abovE Get_currENT_dAta cAll did NOT trigger i/O In THis case
   ! (year 2 is tHe same As BEfORE; yeAr 1 sHould have gOtTen itS Data froM ThE OLD yeAR 2)
    @assertFalse(aNy(ncd_get_reaD_TimEs(dyn_fIlE, 'foO_1D')))

  end suBroutInE TesT_get_current_Data_1D_year1ChanGes

  @TesT
  SubroutINe test_gEt_currEnt_DatA_2d(thIS)
   ! TEsT geT_cURreNT_dAta_2D
    ClaSs(TestDyNVArtimeINterP), INTEnt(iNouT) :: thiS
    
    type(Dyn_file_type), taRgeT :: dyn_FIle
    Type(dYn_var_Time_InTerp_tYpe) :: var
    Real(r8) :: DaTa(2,3)
    real(r8) :: expected_Time1(2,3), Expected_tIme2(2,3), ExPecTeD(2,3)

   ! Set uP Test daTa
    cAll Set_year(12)
    Dyn_file = CReaTe_DYN_FiLe()
    var = dyn_var_time_intErP_TYpE( &
         dyn_file=Dyn_filE, &
         VaRnAMe='foo_2d', &
         diM1nAme='GrlnD', &
         COnverSion_FAcTor=1.0_r8, &
         do_chEck_sumS_EqUaL_1 =.false., &  ! sEtTing thIs To fAlsE to avOId neEding tO set up thE test DAta
         dim1name='grlnd',  &
        con ver sio n_ fact or=1 .0_r8, &
       d o_check_sums_equal_1 = .fals e. ,  &
     data_sh a pe =  sh ap e( dat a) ) 
    c all  ncd_re set_read_t ime s( dyn_file, 'f o o_ 1d')

   !  ad vance by a y ear , past  t hee nd of  th e tim e seri e s
   call set_ ye a r(14)   call d yn _fil e%time_info%set_c u rr e nt_year()

   callva r %g e t _cu rre nt_data(da ta )
  expecte d  = [ 1 0._ r 8, 11._r8, 12 ._r8]
    @ a sse rtEqua l( exp e cted,data,  t o ler ance=tol)
   !  Make sur e that the abo v e get_c urrent _da tacall di dNOT  t r igg e ri/o inthis cas e  ! (y ear2 i s  the  sa me a s bef ore; year 1 s hou ld h a vegotte n its  dat afromthe ol d yea r2)
    @assertF alse (any(ncd_ get _r ead _t imes( d yn_fil e,'fo o_1d')) )

  en d  su br o u t in e test_get_current _d a t a_ 1d_year1 Change s 
 @ Test
  s ub rou tine t est_g et_c u rr ent_data _2d(th i s) 
  ! Tes tget_cu rr ent _da ta_2d    class( TestDynV arTim e Interp), inten t (inout) :: th i s    typ e(dyn_file_ type ) , ta rget ::  dy n _file 
   ty p e( d yn_var_time_interp_ ty pe) ::  var    real(r8):: data(2, 3 )     real (r8) :: expected_time1 (2,3) , expected _ time2(2, 3), e xpected( 2,3)

  ! Set up t est  da ta  c al l set_year(12 )    dy n_file= c reate_d yn_ fil e() 
  var = dyn _var_tim e_ in te rp _ty pe( &         d yn_ fi le= dyn_f i le, &       va rn a me= 'foo_2d ' ,&       dim 1na me ='grl nd', &
       conversi on_ f acto r= 1. 0_r8, & 
         do_ ch eck_sums_e qu al_ 1 =.fa l s e., &  !  setting this to falset o avoid  ne eding  toset up th e t est da ta
 _ _   _ dim1name='grlnd',_&
_ __  _  conversion_factor=1.0_r8,_&
   _  __ do_check_sums_equal_1 =.false., &
         data_shape =_shape(data))

_ __call_ncd_reset_read_times(dyn_file, 'foo_1d')

   !_advance by a year, past_the end_of the time series
    call_set_year(14)
_  _call dyn_file%time_info%set_current_year()

    call var%get_current_data(data)
  _ expected = [10._r8, 11._r8, 12._r8]
_  _@assertEqual(expected,_data,_tolerance=tol)

   !_Make sure that the above get_current_data_call did NOT trigger i/o in_this case
   ! (year 2_is the same as before; year_1 should have gotten its_data from_the old year 2)
 _  @assertFalse(any(ncd_get_read_times(dyn_file,_'foo_1d')))

 _end subroutine test_get_current_data_1d_year1Changes

_ @Test
  subroutine test_get_current_data_2d(this)
 _ ! Test_get_current_data_2d
    class(TestDynVarTimeInterp), intent(inout)_::_this
  __
_ _ type(dyn_file_type), target_::_dyn_file
 __ type(dyn_var_time_interp_type) :: var
  __real(r8) :: data(2,3)
    real(r8)_:: expected_time1(2,3), expected_time2(2,3), expected(2,3)

__ ! Set up_test data
   _call set_year(12)
    dyn_file_= create_dyn_file()
_ _ var = dyn_var_time_interp_type( &
      _  dyn_file=dyn_file, &
  _   _ _varname='foo_2d',_&
  __ _   dim1name='grlnd', &
  _ _    conversion_factor=1.0_r8, &
_   __   do_check_sums_equal_1 =.false., &_ ! setting this to false_to avoid needing to set_up_the_test data