Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@SHF with world coordinates: easier specificaton of delta #1186

Open
karlmsmith opened this issue Nov 23, 2017 · 0 comments
Open

@SHF with world coordinates: easier specificaton of delta #1186

karlmsmith opened this issue Nov 23, 2017 · 0 comments

Comments

@karlmsmith
Copy link
Contributor

karlmsmith commented Nov 23, 2017

Reported by @AnsleyManke on 2 Feb 2012 18:01 UTC

A common need that is awkward to address in Ferret is the comparison of shifted axes. For example comparing Jan-Dec of the year 1990 with Jan-Dec or 2000. One has to calculate how many time index points are needed as offset and then use @shf. How about if @shf were made a little smarter, so that it could accept an argument in world coordinate units. It would first check to ensure that the axis it was being applied to was regular. If it's regular, then it would compute the index delta from the world units delta. And if that does not give an integer it would issue a warning (telling the fraction of grid cell offset) as it chose the closest index.

There could be complications in

  • is the underlying axis always known at the time that the @shf argument is parsed?
  • syntax needed to convey that the @shf is in floating point units.
  • we wouldn't want it to be the user's responsibility to know whether a time axis had underlying units of hours versus days. We'd need to be able to say @shf=365days.
  • ... and there's the confusion over leap years and irregular months confounding the problem a bit. Wanting @shf:12months would be very common. But I think that it could succeed, with the warning message telling of the 1 day or so error:
  • "Note: Shift of 12months will be rounded by 0.033 months due to alignment of time axis points"

Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/1914

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant