nextsimhub / nextsimdg

neXtSIM_DG : next generation sea-ice model with DG
https://nextsim-dg.readthedocs.io/en/latest/?badge=latest
Apache License 2.0
10 stars 13 forks source link

Only override the restart coords in case of a spherical grid. #504

Closed timspainNERSC closed 3 months ago

timspainNERSC commented 4 months ago

Pull Request Title

Fixes #503

Makes the coordinates work again for non-spherical grids.

Until issue #463 is complete, the dynamics do not work with spherical coordinates. In order to be able to continue using the init_25kn_NH.nc restart file, the coordinates are replaced in the initialization of the DynamicsKernel class with the Cartesian coordinates with a 25 km spacing that the corresponding .smesh file used to provide. However, when running from a file containing a Cartesian grid, the coordinates should not be replaced. This PR ensures that only SPHERICAL grids have their coordinates replaced by the 25 km grid.

MarionBWeinzierl commented 3 months ago

I do not really understand what is happening here or why it is needed, could you please explain?