MPAS-Dev / compass

Configuration Of MPAS Setups
Other
10 stars 37 forks source link

Add config options for min levels #812

Closed xylar closed 4 months ago

xylar commented 5 months ago

Previously, we specified the minimum thickness of the global ocean, which was set to 10 m.

This is not a good approach with different vertical coordinates. If we want to use the same settings across various vertical coordinates, it is more useful to require a minimum number of levels.

This merge changes the global ocean initial_state step to use config options to set the number of vertical levels both in the open ocean and in ice-shelf cavities. Relatedly, we also add a config option to set the minimum layer thickness in cavities.

This change will affect the vertical 3D vertical cooridinate in all meshes (hopefully for the better).

For meshes that use variants of the 80-layer vertical coordinate, we set the minimum number of layers that sets the column thickness to either 10 or 20 m.

Checklist

xylar commented 5 months ago

Testing

I ran the pr suite successfully on Chrysalis. I didn't update the cached file for Icos and IcoswISC because I don't think these changes are critical for testing forward runs.

I also successfully ran mesh, init and performance_test test cases for all Icos and QU setups (240 and 30 km resolution, with and without cavities). I verified that the resulting initial conditions had the expected minimum maxLevelCell and minimum bottomDepth.

I decided not to test other meshes here because new meshes always get their own PR anyway, so these properties should be verified as part of typical mesh review.

xylar commented 5 months ago

@cbegeman, could you take a quick look at these changes and see if they make sense to you? I think I've done sufficient testing already, I just want a quick sanity check on my work.

My thinking was essentially that it's weird to set something like:

config_rx1_min_levels = 8
config_rx1_min_layer_thickness = 2.5
config_global_ocean_minimum_depth = 20.0

to get similar behavior in the open ocean and in cavities. Also, it's a little weird that we set config_global_ocean_minimum_depth but then internally in init mode it converts that back to a number of levels (the first level with its bottom deeper than the min). So I figure it's better to have the min for both inside and outside of cavities (which are the same by default). And then you can set the min layer thickness in cavities as well. Maybe so you set it to get roughly the same minimum water-column thickness but that's still not a requirement.

xylar commented 5 months ago

We could also consider changing min_levels to 2 in global_ocean.cfg to reflect the real minimum, esp if it isn't actually used in any of the cases.

I don't think we want to be running with 2 levels on purpose. I think that was a oversight in the Icos mesh. I don't think there will be detrimental effects but I also don't think we carefully considered what physics gets disabled in those shallow layers. So I would think we want a minimum of 3 levels in any future Icos30 meshes we might make.

xylar commented 5 months ago

@cbegeman, thanks so much for reviewing!

xylar commented 4 months ago

I'm going to go ahead with this. I can make special branches for the various meshes if necessary in order to create tags that can recreate them.