﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
786	reading forcing data with dt<1 sec	jcwarner		"I am using a netcdf forcing data file with a dt of 0.2 sec to drive a lab test case. But roms does not interpolate the data correctly because in set_ngfld (same for set_2dlfd and set_3dlfd) we have:
      fac1=ANINT(Tintrp(it2,ifield,ng)-time(ng),r8)
      fac2=ANINT(time(ng)-Tintrp(it1,ifield,ng),r8)
but this truncates to a whole number.

I got it to work by using
      fac1=ANINT((Tintrp(it2,ifield,ng)-time(ng))*100.0_r8,r8)/100.0_r8
      fac2=ANINT((time(ng)-Tintrp(it1,ifield,ng))*100.0_r8,r8)/100.0_r8
but this will not work for all time steps.

This did not work:
      fac1=Tintrp(it2,ifield,ng)-time(ng)
      fac2=time(ng)-Tintrp(it1,ifield,ng)
because there can be a small value of fac1 that is < 0 (roundoff) and then the interpolation is stopped by
      ELSE IF (((fac1*fac2).ge.0.0_r8).and.(fac1+fac2).gt.0.0_r8) THEN
...

So we need a way to use forcing data with a dt <  1 sec. 

thanks
john




 "	bug	new	major	Release ROMS/TOMS 3.7	Nonlinear	3.7			
