COSIMA / access-om2

ACCESS-OM2 global ocean - sea ice coupled model configurations.
21 stars 23 forks source link

sea_level roughness depends on timestep #243

Open aekiss opened 3 years ago

aekiss commented 3 years ago

I thought I should make a note of this issue that Josué discovered and investigated earlier this year.

The top panel shows the sum of the squared sea_level grid cell differences in i and j, calculated daily over 1958-2019 for the three 0.1 deg IAF cycles. The 3 other panels show the timestep. As you can see, the SSH roughness goes up whenever the timestep is reduced (open image in a new tab and zoom in for a better view). ssh_gradient_timeseries

This timestep-dependence is rather disconcerting, as it affects geostrophic kinetic energy calculations.

The fact that the roughness increases with decreasing timestep surprises me - if this was due to numerical instability in the barotropic solver I would have expected it to go the other way around.

I have checked that the correct files are being loaded, so this isn't related to https://github.com/COSIMA/cosima-cookbook/issues/252.

aekiss commented 3 years ago

Some things that could be good to know:

aekiss commented 3 years ago

@StephenGriffies have you seen anything like this before?

StephenGriffies commented 3 years ago

I must admit not knowing just what I am seeing.

What is the math expression that we expect to be diagnosing here?

What is the timestep that is being changed?

aekiss commented 3 years ago

The timeseries is

(sea_level_{i+1} - sea_level_{i})^2 + (sea_level_{j+1} - sea_level_{j})^2

summed over all grid cells. It's not intended to be physically meaningful, but is just a simple diagnostic with similar properties to the surface geostrophic KE that Josué was looking at.

By "timestep" I mean baroclinic timestep, which equals the tracer timestep (baroclinic_split=1). barotropic_split is fixed at 80.

The barotropic dynamics use a predictor-corrector method, with the recommended method (barotropic_time_stepping_a=true) and default dissipation parameter pred_corr_gamma=0.2 and smoothing smooth_eta_t_laplacian=true, vel_micom_lap=0.05m/s.

StephenGriffies commented 3 years ago

This is odd. I do not have prior experience. Will need to think on this.

aekiss commented 3 years ago

Yes, it's puzzling.

Note that the timestep is reduced to deal with numerical instability, so it is actually correlated with model state. However, with the normal timestep the model would typically go unstable (usually by a CFL error in CICE) only on a particular day or two within a 3-month run (e.g. due to a storm near a tripole), whereas the timeseries show enhanced slopes throughout the full 3 months in which the timestep was reduced. So I don't think the signal could be due to the particular instability that motivated the reduction in timestep.

aekiss commented 3 years ago

@josuemtzmo do you have anything to add?

josuemtzmo commented 3 years ago

I haven't looked into this issue since I raised it. As far as I remember, the model surface velocities didn't show steps (I'm checking it atm, I will update you once I get more info), it only seems to affect the sea_level and potentially eta_t, which I believed is used to compute energy budgets. I looked in regions and hemispheres, and the step seems to occur everywhere spatially:

download-9 Difference between 29-06-2010 and 02-07-2010 Eddy Kinetic Energy computed from sea_level.

download-10 Time series of KE for 2010.

aekiss commented 3 years ago

thanks @josuemtzmo - our old slack discussions are still available here https://arccss.slack.com/archives/C6PP0GU9Y/p1614235878023200 and here (PM) https://climatefluidphysics.slack.com/archives/D0119RUBT5G/p1614729405001300

StephenGriffies commented 3 years ago

Is the output saved every time step or daily time averages. If time averages, then perhaps something is amiss with the diag manager time averaging functionality.

aidanheerdegen commented 3 years ago

@aekiss is there a jupyter notebook available with the code for reproducing this?

aekiss commented 3 years ago

Yes, just uploaded here: https://github.com/aekiss/notebooks/blob/master/ssh_gradient_timeseries_steps/ssh_gradient_timeseries_steps.ipynb the daily timeseries files take a long time to calculate, so it would be best to grab mine from /g/data/v45/aek156/notebooks/github/aekiss/notebooks/ssh_gradient_timeseries_steps/01deg_jra55v140_iaf*_sea_level_diffsq_sum_????-01-01_????-01-01.nc

aekiss commented 3 years ago

Thanks @StephenGriffies, they are daily time averages. We do have have some monthly sea_level snapshots in cycle 1, so I'll see if the steps show up there as well.

aekiss commented 3 years ago

Unfortunately monthly sea_level snapshots weren't saved over the dates in which the timestep changed. I will look around for other experiments instead.

aekiss commented 3 years ago

Here's what the timeseries look like when calculated from monthly mean data. The roughness is still dependent on timestep, suggesting it isn't due to intra-monthly variability. ssh_gradient_timeseries_1-monthly_mean

aekiss commented 3 years ago

Here are timeseries of the horizontal sum of monthly mean u and v squared at 30m depth (chosen to be below the Ekman layer, so the velocity is presumably close to the surface geostrophic current due to sea_level gradients).

There is no evidence of the timestep dependence we would expect if the sea_level roughness timestep dependence was genuine. So it seems more likely that this is some sort of bug in the diagnostic manager, as @StephenGriffies suggested.

u_sq_timeseries_1-monthly_mean v_sq_timeseries_1-monthly_mean

aekiss commented 3 years ago

Unfortunately I don't see this timestep-dependence in SSH roughness in a 1 degree experiment, so this may require higher resolution to investigate properly. 1deg_jra55_iaf_iss243_ssh_gradient_timeseries

FYI this run is in /home/156/aek156/payu/1deg_jra55_iaf_iss243

aekiss commented 3 years ago

@russfiedler suggested this might be a symptom of the checkerboard null mode that affects the barotropic equations on a B-grid. We might want to see if smoothing parameters have any effect (see above for the parameters we currently use at all resolutions).

russfiedler commented 3 years ago

I don't fully understand your python code but am I right in saying that you are computing forward (backward?) differences on the T points rather than centered differences on the U points?

aekiss commented 3 years ago

They are simple 1-sided backward differences on the t-points (using diff), so would highlight the checkerboard mode

            sea_level_xdiff = sea_level.diff('xt_ocean')
            sea_level_ydiff = sea_level.diff('yt_ocean')
            sea_level_diffsq = sea_level_xdiff.isel(yt_ocean=slice(0, -1))**2 \
                             + sea_level_ydiff.isel(xt_ocean=slice(0, -1))**2
            sea_level_diffsq_sum = sea_level_diffsq.sum('xt_ocean').sum('yt_ocean')
aekiss commented 1 year ago

The barotropic mass convergence conv_rho_ud_t shows checkerboarding in some marginal seas - e.g. North Sea, Baltic, Mediterranean, Red Sea, Persian Gulf, Black Sea (click to zoom in). The x transects are from the Baltic. These plots are from restart375, ending in 1991-01-01 in cycle 2 with dt= 360s /g/data/ik11/restarts/access-om2-01/01deg_jra55v140_iaf_cycle2/restart375/ocean/ocean_barotropic.res.nc Screenshot 2023-05-12 at 11 30 43 am Screenshot 2023-05-12 at 11 38 26 am

Checkerboarding is also present (and visually very similar) in /g/data/ik11/restarts/access-om2-01/01deg_jra55v140_iaf_cycle2/restart379/ocean/ocean_barotropic.res.nc (ending in 1992-01-01) which used dt=540s. Screenshot 2023-05-12 at 12 02 32 pm

So it's not clear to me that checkerboarding could explain the dependence on timestep. Also the fact that the roughness increases with decreasing timestep surprises me - if this was due to numerical instability in the barotropic solver I would have expected it to go the other way around.

aekiss commented 1 year ago

Also worth noting that some 0.25° configs also show checkerboarding: https://github.com/COSIMA/access-om2/issues/274#issuecomment-1544942926