CWorthy-ocean / roms-tools

Tools for setting up and running ROMS simulations
https://roms-tools.readthedocs.io
GNU General Public License v3.0
7 stars 3 forks source link

Limitations for very large domain sizes #22

Open NoraLoose opened 1 month ago

NoraLoose commented 1 month ago

For very large specified domain sizes

Some examples are found below.

size_x = size_y = 10000 km

grid = Grid(nx=500, ny=500, size_x=10000, size_y=10000, center_lon=-21, center_lat=0, rot=20)

Output from grid.plot()

Screenshot 2024-05-09 at 10 27 27 AM

Generated lons and lats

Screenshot 2024-05-09 at 10 32 18 AM Screenshot 2024-05-09 at 10 32 23 AM

size_x = size_y = 20000 km

grid = Grid(nx=500, ny=500, size_x=20000, size_y=20000, center_lon=-21, center_lat=0, rot=20)

Output from grid.plot()

Screenshot 2024-05-09 at 10 27 43 AM

Generated lons and lats

Screenshot 2024-05-09 at 10 34 29 AM Screenshot 2024-05-09 at 10 34 37 AM

Since the generated longitudes and latitudes still look more or less reasonable for domains up to 20 000 km (see above), I chose this number as a treshold in #21. But we may need to adjust this threshold in the future. (I don't know of a good strategy of how to come up with a good threshold.) Note that even for domain sizes smaller than that, the grid.plot() function struggles.

NoraLoose commented 1 month ago

For reference: The circumference of Earth is approximately 40 000km.

sdbachman commented 1 month ago

I think we can make a reasonable threshold by considering a few factors:

1) UCLA-ROMS has been benchmarked to be most performant for grid sizes ~1000 x 1000 (not necessarily square) and ~400 cores. 2) UCLA-ROMS is a regional model and does not have any mesoscale parameterization such as GM or Redi, so we would not want to use it at lower-than-eddy-permitting resolution (< 25 km). 3) UCLA-ROMS can't do sea ice, so we would never want a domain so large that it includes very high latitudes. 4) It is unlikely that we would ever want to run a simulation with forcing that is much coarser than modern reanalysis datasets, of which many are available at ~1/4 degree resolution.

Altogether I think this suggests that 20,000 km is a pretty reasonable threshold! We can consider different functions or strategies for generating the grid.plot().