Skip to content

Add pseudothickness to write_model_dataset for Omega#460

Open
cbegeman wants to merge 16 commits intoE3SM-Project:mainfrom
cbegeman:omega/add-pseudothickness-to-write-model-dataset
Open

Add pseudothickness to write_model_dataset for Omega#460
cbegeman wants to merge 16 commits intoE3SM-Project:mainfrom
cbegeman:omega/add-pseudothickness-to-write-model-dataset

Conversation

@cbegeman
Copy link
Copy Markdown
Collaborator

@cbegeman cbegeman commented Feb 3, 2026

Add the pseudo-thickness to model datasets for Omega initial conditions.

Surface pressure (constant value from config file), temperature, salinity and layer thickness are used to compute the pressure at layer interfaces. One iteration is currently used, pending testing of how many iterations is needed for convergence to desired accuracy.

The pressure at interfaces and a reference density (from config file) are then used to compute the pseudo-thickness.

The pseudo-thickness is automatically added to any write_model_dataset call when Omega is the ocean model AND the optional config argument is provided. (Note: checks for presence of config argument are still needed)

Fixes #461

Depends on #440 for routines related to computing p_interface from model dataset.

Depends on E3SM-Project/Omega#327 to rename LayerThickness to PseudoThickness
OR we can map variable name PseudoThickness (added to MPAS-O dataset before variable mapping) to LayerThickness

Checklist

  • User's Guide has been updated
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.md) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Testing comment in the PR documents testing used to verify the changes

@cbegeman
Copy link
Copy Markdown
Collaborator Author

cbegeman commented Feb 3, 2026

Testing

Only the manufactured_solution/convergence_both/default case has been run on chrys with intel with this feature. I also ran cosine_bell/restart through init to make sure that the absence of config argument caused pass-through.

@cbegeman cbegeman force-pushed the omega/add-pseudothickness-to-write-model-dataset branch from cd69ef2 to 2f9231f Compare February 3, 2026 19:02
@cbegeman cbegeman self-assigned this Feb 3, 2026
@cbegeman cbegeman added bug Something isn't working Omega PR required The polaris changes won't work with the current Omega submodule and require an update framework Changes relating to the polaris framework as opposed to individual tests or analysis ocean Related to the ocean component labels Feb 3, 2026
@cbegeman cbegeman force-pushed the omega/add-pseudothickness-to-write-model-dataset branch from aa1e065 to 79baeb5 Compare February 25, 2026 00:49
@cbegeman cbegeman force-pushed the omega/add-pseudothickness-to-write-model-dataset branch from 79baeb5 to c32f147 Compare March 9, 2026 20:26
@cbegeman
Copy link
Copy Markdown
Collaborator Author

Noting that this will need a rebase onto #489

@cbegeman cbegeman force-pushed the omega/add-pseudothickness-to-write-model-dataset branch from c32f147 to d0113fd Compare March 13, 2026 23:30
@cbegeman
Copy link
Copy Markdown
Collaborator Author

@xylar This is basically done so it would be good to get your review before you leave. I've tested the pr suite so all that's left on my list is rebase and clean up the docs.

@xylar
Copy link
Copy Markdown
Collaborator

xylar commented Mar 16, 2026

Great, I'll review this in an hour or so.

@cbegeman cbegeman force-pushed the omega/add-pseudothickness-to-write-model-dataset branch from d0113fd to 0a75bf2 Compare March 16, 2026 15:54
@cbegeman cbegeman marked this pull request as ready for review March 16, 2026 15:54
Copy link
Copy Markdown
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than this rho0 issue, I think this looks great. Once rho0 is handled as in #489, I'll do some quick tests and hopefully approve.

surface_pressure = 0.

# The reference density
rho0 = 1026.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want this anymore, we need to use the approach introduced elsewhere in the code in #489, getting this from polaris.constants.get_constant().



def geom_thickness_from_ds(ds, config):
rho0 = config.getfloat('vertical_grid', 'rho0')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and elsewehre, this needs to come instead from polaris.constants.get_constant().

and 'PseudoThickness' not in ds.keys()
and config is not None
):
ds['PseudoThickness'] = pseudothickness_from_ds(ds, config=config)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until we make the name change, does this need to be called LayerThickness?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously I needed this change for testing but I cannot find the commit anywhere so I need to retest.

@cbegeman
Copy link
Copy Markdown
Collaborator Author

cbegeman commented Mar 17, 2026

@xylar I was wrong that this was ready because I think we still need some PR to actually call Eos to compute SpecVol. I think the soonest one to be merged would be E3SM-Project/Omega#353.

I also realized we might want to assume SpecVol=1/RhoSw so that PseudoThickness = LayerThickness for initial conditions where T,S don't need to be defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working framework Changes relating to the polaris framework as opposed to individual tests or analysis ocean Related to the ocean component Omega PR required The polaris changes won't work with the current Omega submodule and require an update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Omega requires PseudoThickness in initial state file

2 participants