NOAA-GFDL / pace

Re-write of FV3GFS weather/climate model in Python
Apache License 2.0
12 stars 11 forks source link

Remove fv_core.res.nc file in util/tests #55

Open mlee03 opened 6 months ago

mlee03 commented 6 months ago

After the merging of PR #36, most tests will read in the ak and bk coefficients from netcdf files stored off-site for the CI. The only exception will be _test_restartfortran where the pressure coefficients are read in from /util/tests/data/c12_restart/fv_core.res.nc. For consistency, _test_restartfortran should be modified to also read in the ak/bk values from a netcdf file stored off-site. With this change, the fv_core.res.nc file will no longer be necessary and can be removed from pace, which would make pace only more perfect.

bensonr commented 6 months ago

Thanks for opening up this issue. The question becomes do we still need to save the ak/bk values to a restart file when we now require an input file with values to initialize the model?

lharris4 commented 6 months ago

One problem that comes to mind is if we want to use the npz_rst (restart regridding) functionality, or if restarting an idealized test that sets ak and bk internally.

We can remove the on-line restart regridding capability from PyFV3, and have pre-processing tools take care of regridding restarts to new vertical (as well as horizontal) resolutions.

For idealized tests that create ak/bk online, perhaps the test should be responsible for creating files for this purpose? Or perhaps idealized tests should follow ak/bk created off-line also?

FlorianDeconinck commented 6 months ago

An added component for this that we are running into now is that ETA levels are used in Grid computation which has been moved down to the middleware (NDSL). The logic behind this is that we want the middleware to come with "battery-included" for our common models (e.g. FV3-based models for now). This might mean, that the calculation/import might have to move down from pyFV3.

lharris4 commented 6 months ago

One nice thing about Python is that you can load individual modules relatively easily. We could make the eta level calculation an exposed API in pyFV3 for use by the middleware layer.

On Fri, Feb 2, 2024 at 11:33 AM Florian Deconinck @.***> wrote:

An added component for this that we are running into now is that ETA levels are used in Grid computation which has been moved down to the middleware (NDSL). The logic behind this is that we want the middleware to come with "battery-included" for our common models (e.g. FV3-based models for now). This might mean, that the calculation/import might have to move down from pyFV3.

— Reply to this email directly, view it on GitHub https://github.com/NOAA-GFDL/pace/issues/55#issuecomment-1924222623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMUQRVA54U6XABZQVYJU4JDYRUIM5AVCNFSM6AAAAABCRSNO7GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRUGIZDENRSGM . You are receiving this because you commented.Message ID: @.***>

FlorianDeconinck commented 6 months ago

Well if it is technically true, I wouldn't go that path. Keeping a strict direction in import mechanism (e.g. NDSL > pyFV3) will retain conceptual and code sanity. Though I do agree that some components might have strange positions in the tech stack, it will also impose on us conceptual discussions, which in my experience are always a good thing.

For example here it seems that the ak/bk & level calculation have multiple use cases and a catch-all API seems to emerge depending on where you need need them to come from