MPAS-Dev / compass

Configuration Of MPAS Setups
Other
10 stars 37 forks source link

Minimum bottom depth of global ocean set to 10 m #806

Closed xylar closed 3 months ago

xylar commented 5 months ago

We currently have the minimum bottom depth set to 10 m even in vertical coordinates where that corresponds to a single layer: https://github.com/MPAS-Dev/compass/blob/cdc98a5545515185a081f7fc36fd23789ebc5bf9/compass/ocean/tests/global_ocean/init/namelist.init#L53 This appears to have been inherited from Legacy Compass and I wasn't able to trace where the decision was made, but it's been the case for at least 6 years now.

We are getting 2 vertical layers because the minimum number of layers is set where refBottomDepth is greater than (rather than greater than or equal to) config_global_ocean_minimum_depth: https://github.com/E3SM-Project/E3SM/blob/6b9ecaa67c81c65fe1f7063e5afe63ce9b2c66a9/components/mpas-ocean/src/mode_init/mpas_ocn_init_global_ocean.F#L815 and the depth of the first layer is exactly equal to config_global_ocean_minimum_depth.

xylar commented 5 months ago

I suspect this issue may have arisen when we tried to move to a higher vertical resolution 64-level vertical coordinate and then decided to move back to the 60-level coordinate we had previously used.

proteanplanet commented 5 months ago

Thanks @xylar for looking into this on your weekend.

Here are some plots that I regenerated for IcoswISC30E3r5. Just to recap for others: I only noticed this on Friday night because I started searching for the minimum mesh depth bottomDepth in my checks as part of the V3 HR mesh regeneration. For the IcoswISC30E3r5 mesh:

refBottomDepth = 10, 20.0036437001027, 30.0118475933041, 40.025758647276, 
  50.0468122350917, 60.076804611333, 70.1179835767493, 80.1731618821008, 
  90.245859052434, 100.340478720083, 110.462530303171, 120.618906035169, 
  130.818227034832, 141.071275417043, 151.391533514772, 161.795856259857, 
  172.305308819346, 182.946208874501, 193.751421619175, 204.761965757815, 
  216.029000518499, 227.616276795571, 239.603149508266, 252.088262078378, 
  265.194025712543, 279.072022744735, 293.909459565319, 309.936772871928, 
  327.436441825944, 346.752962612024, 368.303780880869, 392.590728539169, 
  420.211152528998, 451.867443459277, 488.373087334637, 530.652742118757, 
  579.733330779371, 636.722991713593, 702.775267431858, 779.03747180521, 
  866.584903791704, 966.346205462258, 1079.02884823729, 1205.05614463018, 
  1344.52699655311, 1497.20621507928, 1662.54736892408, 1839.74358666387, 
  2027.79671767077, 2225.59318650171, 2431.97588741952, 2645.80457797532, 
  2866.00103354373, 3091.57855173283, 3321.65764658961, 3555.47087990393, 
  3792.35999022977, 4031.76814551264, 4273.22956519518, 4516.35813857221, 
  4760.83611997796, 5006.40355136813, 5252.84875138729, 5500 ;

However, the min and max of bottomDepth is 20.0036437001027 and 5500, where the former should be 30.0118475933041, representing three layers minimum.

Areas affected can be seen with the red isobath (plots are high resolution to allow easy zooming):

MPAS_OceanIce_AGU_IcoswISC30E3r5_sector_bathymetry_1

MPAS_OceanIce_AGU_IcoswISC30E3r5_sector_bathymetry_7

MPAS_OceanIce_AGU_IcoswISC30E3r5_sector_bathymetry_2

MPAS_OceanIce_AGU_IcoswISC30E3r5_sector_bathymetry_3

MPAS_OceanIce_AGU_IcoswISC30E3r5_sector_bathymetry_4

MPAS_OceanIce_AGU_IcoswISC30E3r5_sector_bathymetry_5

MPAS_OceanIce_AGU_IcoswISC30E3r5_sector_bathymetry_6

River outflow regions are affected, including the Amazon delta.

milenaveneziani commented 5 months ago

Could we have some kind of check that says: if using 80 levels, go with hmin=10; if using 60/64 levels, go with hmin=30? Or maybe a check based on the dz of layer 1 (hmin such that dz(k=1)<hmin/3)?

xylar commented 5 months ago

I think the meshes really should just set this properly and not rely on a default value.

xylar commented 5 months ago

I don't think Compass should enforce a minimum of 3 vertical levels because someone might want fewer for legitimate research reasons. We just need to enforce that for the meshes where it matters.

milenaveneziani commented 5 months ago

So, like a mesh-dependent specific choice? Sounds good to me, but perhaps there could be a raised warning when hmin is left at its default value?

xylar commented 5 months ago

We could do that but no one typically would notice such a warning, hidden in the log files in Compass, I'm afraid. I think the best option is a quality check after the fact as part of mesh review.

xylar commented 3 months ago

This was fixed in #812