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

Langmuir turbulence induced entrainment #31

Merged
merged 9 commits into from
Jul 8, 2020

Conversation

qingli411
Copy link
Contributor

Description of changes:

This pull request enables the parameterization of Langmuir turbulence induced entrainment by Li and Fox-Kemper (2017) via CVMix. It includes the following changes:

  • Point the CVMix repository to v0.97b-beta and update the CVMix interface in POP. A new interface of Langmuir turbulence parameterizations in CVMix was introduced in CVMix v0.94b-beta, allowing more options including Langmuir induced entrainment. See this PR for more information.
  • Get the surface layer averaged Langmuir number LaSL from WAVEWATCH III for Langmuir induced entrainment.

Testing:

Test case/suite: See below
Test status: climate changing

Fixes [POP2 Github issue #]: N/A

User interface (namelist or namelist defaults) changes?

  • This new option is enabled by setting langmuir_opt = 'lf17' in POP's namelist.

I have tested these change in the following two steps using a JRA55-do forced G-case in CESM (tag cesm2_2_beta04) running for 60 years (looking at mean mixed layer depth of the last 30 years). Here the control run is using default values for the namelist. Testing with a longer simulation is underway.

  1. Update the CVMix repository to v0.97b-beta but do not turn on Langmuir induced entrainment (langmuir_opt = 'vr12-ma')
  2. Turn on the Langmuir induced entrainment (langmuir_opt = 'lf17')

The first step is not bit-for-bit, as described in this PR. But it gives essentially the same mean climate, with small changes in some coastal regions where the boundary layer is very shallow. See the figure below. It's likely due to changes in the order of some operations in CVMix introduced in v0.94b-beta. Note that the panels below plot the summer/winter mean mixed layer depth in both hemispheres together, as in Li and Fox-Kemper (2017).
20200515_Entrainment_CESM2p2 001

The second step is climate changing, making the mixed layer deeper in the extratropical regions, as expected in Li and Fox-Kemper (2017). Note the different scale in the color bar of the percentage changes.
20200515_Entrainment_CESM2p2 002

@mnlevy1981
Copy link
Collaborator

It looks like the PR as it stands is keeping the default langmuir_opt = 'vr12-ma' -- is this the plan, or will the default change to langmuir_opt = 'lf17' before this gets merged?

Copy link
Collaborator

@mnlevy1981 mnlevy1981 left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning up so much whitespace!

I think getting the default values of langmuir_opt right in the XML file (and aborting in the Fortran if an invalid value is used) are important. I'm less concerned about c10000 vs bignum or bringing in the CVMix tag that uses CMake.

source/vmix_kpp.F90 Show resolved Hide resolved
source/vmix_kpp.F90 Outdated Show resolved Hide resolved
Externals_POP.cfg Outdated Show resolved Hide resolved
drivers/mct/ocn_import_export.F90 Outdated Show resolved Hide resolved
drivers/nuopc/ocn_import_export.F90 Outdated Show resolved Hide resolved
Copy link
Collaborator

@mnlevy1981 mnlevy1981 left a comment

Choose a reason for hiding this comment

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

I think it's important to include langmuir_opt in the error message; the comment about using -1 for LASL was just an aside, only make that change if you think it's a reasonable thing to do.

Comment on lines 414 to 415
call exit_POP(sigAbort, &
'ERROR: Unknown option for Langmuir turbulence parameterization')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you include the value of langmuir_opt in the error message? I think something like

write(string, "(3A)") "Error: '", trim(langmuir_opt), "' is not a valid option for Langmuir turbulence parameterization"
call exit_POP(sigAbort, string)

Since we use string to stage some tavg long_names

WORKB(i,j ) = x2o(index_x2o_Sw_hstokes,n)
LASL(i,j,iblock) = WORKB(i,j)*RCALCT(i,j,iblock)
else
LASL(i,j,iblock) = bignum
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know I recommended bignum instead of c10000, but if LASL must be positive (per vmix_kpp.F90#L2509), does it make more sense to set LASL(i, j, iblock) = -c1 here instead of using bignum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is better. Then I will not need to check IFRAC again in

if (IFRAC(i,j,bid) <= 0.05_r8 .and. LASL(i,j,bid) > c0) then

I will do that. Thanks.

where (IFRAC <= 0.05_r8)
LASL(:,:,:) = work1 * RCALCT(:,:,:) ! surface layer Lanmguir number (unitless)
elsewhere
LASL(:,:,:) = bignum
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above, maybe LASL(:,:,:) = -c1?

Copy link
Collaborator

@mnlevy1981 mnlevy1981 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@alperaltuntas alperaltuntas self-requested a review July 8, 2020 21:08
Copy link
Member

@alperaltuntas alperaltuntas left a comment

Choose a reason for hiding this comment

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

testing: aux_pop.cheyenne_intel. answer changes

@alperaltuntas alperaltuntas merged commit 464030a into ESCOMP:master Jul 8, 2020
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