schism-dev / pyschism

Python interface for handling the SCHISM model.
https://schism-dev.github.io/schism/master/getting-started/pre-processing-with-pyschism/overview.html
Apache License 2.0
24 stars 20 forks source link

BCTide mismatch between `nbfr` and line count #116

Closed SorooshMani-NOAA closed 8 months ago

SorooshMani-NOAA commented 8 months ago

This is my driver setup for writing a simple tidal run:

    tidal_flags = [3, 3, 0, 0]
    config = ModelConfig(
        hgrid=hgrid,
        fgrid=fgrid,
        flags=[tidal_flags for _ in hgrid.boundaries.open.itertuples()],
        constituents='all',
        database='tpxo',
    )

And this is a section of the bctides.in that I get, which doesn't look right:

   19 8 !nbfr
   20 M2
   21  0.000140519 0.966301 294.637
   22 S2
   23  0.000145444 1 0
   24 N2
   25  0.00013788 0.966301 195.94
   26 K2
   27  0.000145842 1.29096 73.4175
   28 K1
   29  7.29212E-05 1.1055 306.893
   30 O1
   31  6.75977E-05 1.17112 349.005
   32 P1
   33  7.25229E-05 1 49.9675
   34 Q1
   35  6.49585E-05 1.17112 250.307
   36 Mm
   37  2.6392E-06 0.88214 98.6978
   38 Mf
   39  5.32341E-06 1.4179 136.627
   40 M4
   41  0.000281038 0.933738 229.275
   42 MN4
   43  0.000278399 0.933738 130.577
   44 MS4
   45  0.000285963 0.966301 294.637
   46 2N2
   47  0.00013524 0.966301 97.2419
   48 S1
   49  7.27221E-05 1 180
josephzhang8 commented 8 months ago

Sorry Linlin was experimenting some merge last night which she reverted. Maybe it's related to that.

SorooshMani-NOAA commented 8 months ago

I'm using commit 06703b9 which is not very recent. I think this has something to do with the new tide API and specifying all as the constituents, because when I revert back and change my code accordingly it works fine! I noticed this when I wanted to do a quick setup for a test case. I can give more detailed information later if needed. I just created this so that I won't forget!

josephzhang8 commented 8 months ago

Thx Soroosh. It'd be great if you'd fix the issue now that Linlin is gone.

SorooshMani-NOAA commented 8 months ago

Sure, I'll take a look when I get a chance. Feel free to assign it to me (I don't have permission to assign to myself)

SorooshMani-NOAA commented 8 months ago

I just realized there is a fix by Linlin after the version I was using! I don't know how I missed it earlier. I'm sorry about the confusion. I'll close the ticket. This is the fix #110