Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Possible error in Tide Generating Force - astro.f

Possible error in Tide Generating Force - astro.f 10 years 1 month ago #14578

  • thijslan
  • thijslan's Avatar
I agree that this will be the best option. I will test the new astro.f code and compare to the pyEphem results tomorrow to verify that the sun/moon declination/ascension are still the same as the pyEphem.
The administrator has disabled public write access.

Possible error in Tide Generating Force - astro.f 10 years 1 month ago #14591

  • thijslan
  • thijslan's Avatar
JMH,

I compared the results of the astro.f file that you posted with pyEphem and found that the calculated AS (right ascension of the sun) varies between –pi/2 and pi/2 because it is calculated with atan. It should vary between –pi and pi (or between 0 and 2pi). This matter because in marast.f, FYS is calculated with cos(AHS), and a difference of pi in AS thus gives a sign error in FYS.

I propose to also calculate AS using ATAN2, just like we do with AL. Thus, replacing line 212 with
AS = ATAN2(COS(OM)*SIN(LS),COS(LS))
gives a result that matches the results of pyEphem. See the file astro.f that is attached.
Attachments:
The administrator has disabled public write access.

Possible error in Tide Generating Force - astro.f 10 years 1 month ago #14594

  • jmhervouet
  • jmhervouet's Avatar
Hello,

OK, I was just wondering whether we had other ATAN to change like this. You probably did not post the right version of astro.f but I enclose our latest version taking into account your last remark. If OK it goes in the next version.

Many thanks for your valuable contribution,

JMH
Attachments:
The administrator has disabled public write access.

Possible error in Tide Generating Force - astro.f 10 years 1 month ago #14595

  • thijslan
  • thijslan's Avatar
Ah yes, I must have uploaded the wrong version. The version that you uploaded looks good to me. Glad to have contributed, it was a very interesting discussion.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.