Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sea surface temperature cycling #93

Merged
merged 3 commits into from
Oct 21, 2020
Merged

Conversation

spencerkclark
Copy link
Member

@spencerkclark spencerkclark commented Oct 16, 2020

This is the alternative fix mentioned in #92. This works without having to change the regression test checksums, which we might hope would be the case considering that the regression test only runs for 30 minutes and has a cycling frequency of 24 hours. In theory any change we make here shouldn't change answers, since the model isn't run long enough for cycling to be called.

Tests can be found in this notebook. EMC seems to think this fix is the correct approach.

@spencerkclark spencerkclark changed the title Alternative fix for sea surface temperature cycling Fix sea surface temperature cycling Oct 20, 2020
Copy link
Contributor

@oliverwm1 oliverwm1 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix! Do you an idea of the constant SST is an issue in the frac_grid=True case as well?

@spencerkclark
Copy link
Member Author

spencerkclark commented Oct 21, 2020

Do you an idea of the constant SST is an issue in the frac_grid=True case as well?

Good question -- it appears that it is an issue in the existing codebase, but this fix applies to it too. See the experiments at the end of this notebook.

@spencerkclark
Copy link
Member Author

spencerkclark commented Oct 21, 2020

Good question -- it appears that it is an issue in the existing codebase, but this fix applies to it too. See the experiments at the end of this notebook.

Oops I take this back...upon reading the code again, this code change would not be active in the frac_grid = .true. case. This left me puzzled as to why my test cases behaved the way they did. Apparently the frac_grid parameter is automatically reset to .false. if a lake_frac variable cannot be found in the orography files (meaning we need updated orography files to run with frac_grid = .true.).

See this note in the logs:

NOTE from PE     0: gfs_driver::surface_props_input - will computing lakefrac
  resetting Model%frac_grid= F

and this spot in the code:
https://github.com/VulcanClimateModeling/fv3gfs-fortran/blob/0db9e15aa92df353b4f88f289b17ec429628b307/FV3/io/FV3GFS_io.F90#L651-L658

If I had to guess, I would say that relaxing SSTs back to the climatology is also broken in the frac_grid = .true. case -- I don't see a place where tsfco is updated to the tsfc over ocean grid cells when frac_grid = .true. and this fix doesn't help that. Perhaps that indicates a better fix would be to update these lines instead:

https://github.com/VulcanClimateModeling/fv3gfs-fortran/blob/0db9e15aa92df353b4f88f289b17ec429628b307/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90#L1184-L1185

by changing tsfco to tsfc, since those get called whether frac_grid = .true. or not?

@spencerkclark
Copy link
Member Author

I suppose it's a little awkward in the frac_grid = .true. case that we would use tsfc as the reference ocean temperature in tsfc3 when tsfc itself is computed as a weighted average of the land, sea-ice, and sea surface temperatures later on in the physics driver:

https://github.com/VulcanClimateModeling/fv3gfs-fortran/blob/0db9e15aa92df353b4f88f289b17ec429628b307/FV3/gfsphysics/GFS_layer/GFS_physics_driver.F90#L1957

Will revert back to 74c4015 for now. I think it's better to leave that possibly broken rather than have a potentially incorrect fix (I also can't test the frac_grid = .true. case without updated orography files for the reason noted above). Maybe something along the lines of #92 (i.e. cycling the ocean temperature rather than the full surface temperature) is the right long-term fix, but the fact that it changes the checksums makes me suspicious.

I'm reasonably confident that in the frac_grid = .false. case 74c4015 does the right thing.

@oliverwm1
Copy link
Contributor

Hey, yeah sorry didn't mean to send you down a rabbit hole. Was just curious if we at least knew if it would work in that case. Agreed it's not a priority to run with frac_grid=True.

Copy link
Contributor

@rheacangeo rheacangeo left a comment

Choose a reason for hiding this comment

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

What you needed was there but not!!

@spencerkclark spencerkclark merged commit a2a8a8a into master Oct 21, 2020
@spencerkclark spencerkclark deleted the alternative-sst-fix branch October 21, 2020 17:43
ofuhrer pushed a commit that referenced this pull request Mar 5, 2021
Note that this does not necessarily fix the case when running with frac_grid = .true., but to date we have only run with frac_grid = .false.
spencerkclark added a commit to ai2cm/fv3gfs-wrapper that referenced this pull request Mar 25, 2021
This PR adds a test confirming that with the use of the namelist flag added in ai2cm/fv3gfs-fortran#173, setting the "ocean_surface_temperature" modifies the evolution of the model's prognostic variables (e.g. air temperature).

In between ai2cm/fv3gfs-fortran#173 and ai2cm/fv3gfs-fortran#93, this functionality was broken (see the failing test associated with 5a6febb of this PR). In other words, since ai2cm/fv3gfs-fortran#93, Sfcprop%tsfco in the fortran model was modified within the physics driver prior to being used by any physics scheme; therefore when we set it via Python, it was immediately set to something else in the fortran before it could have any impact. The namelist parameter toggles the behavior back to what it was before ai2cm/fv3gfs-fortran#93, allowing us to prescribe the SST.
nbren12 added a commit that referenced this pull request Apr 11, 2022
Prepare a release of fv3gfs-python. See HISTORY.md for more details about this release.

Changes:
- Update fv3gfs-fortran submodule to current master
- Update fv3util sub-module to v0.5.1
- Cleanup bug fixes from moving fv3util to a separate submodule
  - Fixed bumperversion configuration
  - Avoid triggering fv3util tests (which were failing). This means that the gt4py numpy backend is currently not being tested anywhere.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants