Opened 7 years ago

Last modified 7 years ago

#786 closed defect

reading forcing data with dt<1 sec — at Initial Version

Reported by: jcwarner Owned by:
Priority: major Milestone: Release ROMS/TOMS 3.7
Component: Nonlinear Version: 3.7
Keywords: Cc:

Description

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

Change History (0)

Note: See TracTickets for help on using tickets.