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
23 stars 18 forks source link

`bctides.in` for no tidal forcing #104

Open SorooshMani-NOAA opened 8 months ago

SorooshMani-NOAA commented 8 months ago

For cases where there is no tidal forcing, should the bctides.in be empty or should it include some information. For a given test in coupledmodeldriver I used to get:

2008-08-23 00:00:00+00:00
0 50.0
0
1
75 0 0 0 0

from pyschism, but with the API change, now I get:

for my bctides.in. Which one is correct?

cuill commented 8 months ago

@SorooshMani-NOAA The top one should be used. Here is the script to generate it:

    start_date = datetime(2017, 12, 1)
    rnday = 396
    bctypes =[[0, 0, 0, 0]]    
    constituents = []
    earth_tidal_potential = False
    outdir = './'
    hgrid = Hgrid.open('../RUN11/Bctides/hgrid.ll', crs="epsg:4326")

    bctides=Bctides(
        hgrid = hgrid,
        flags = bctypes,
        constituents = constituents,
        add_earth_tidal = earth_tidal_potential,
    )

    bctides.write(
        outdir,
        start_date=start_date,
        rnday=rnday,
        overwrite=True,
    )
SorooshMani-NOAA commented 8 months ago

@cuill thanks for your quick reply. I will update coupledmodeldriver to get the desired output based on your instructions.

From a usability perspective, with the old tides API, it made more sense; when you didn't setup the tide at all you would get the right bctides.in. However with the new API, we need to specify the no-tide input. As you pointed out above.