oceanmodeling / adcircpy

Python library for managing input and output files for the ADCIRC model
https://adcircpy.readthedocs.io/en/latest/
GNU General Public License v3.0
33 stars 25 forks source link

example_1 does not complete - due to some issue in tide_faq? #165

Open shinbunya opened 1 year ago

shinbunya commented 1 year ago

I generated a set of input files by executing sample_1.py. I then ran adcirc on it. The run stopped before completion. As I looked into it, I found that the nodal phases of tidal constituents in fort.15 looked odd. The beginning of it goes like this:

...
M2
4.83605669e-01 2.20112655e+02
4.17823412e-01 3.11130902e+02
4.44913133e-01 3.18628023e+02
4.71558150e-01 3.26026894e+02
4.97259593e-01 3.33211178e+02
...

The phase at the first node (= 2.20112655e+02) is different by about 90 degrees from the one at the second line (= 3.11130902e+02), which seems to be too big. The phases at the following nodes also vary to a larger extent than expected. I replaced these nodal constituents with ones in fort.15 from the ADCIRC website's Shinnecock inlet case. Then, an adcirc run completed with the replaced nodal constituents. I believe there should be something wrong in these nodal constituent values.

SorooshMani-NOAA commented 1 year ago

@WPringle can you please take a look? I'm not very familiar with this territory of the code.

WPringle commented 1 year ago

@shinbunya @SorooshMani-NOAA This is probably due to bad interpolation which I told Jaime about a long time ago, that you need to use complex numbers to get the phase correct. I'll take a look and see if I can come up with fix.

jreniel commented 1 year ago

Actually, the problem is not with complex interpolation. The problem is that the interpolation picks up the near shore values of the TPXO which tend to not be very accurate. There are 2 potential fixes for this. One is to redefine the open boundary to only use nodes that are in deeper water, the other is to set a depth threshold value for the interpolation to discard the nearshore nodes and simply pad them with the nearest. Good luck!

jreniel commented 1 year ago

Also, in order to be able to compare apples to apples, make sure that you are setting up the same start date in adcircpy as the start date in the Shinnecock example from the ADCIRC website. Thanks.