Skip to content

cam6_4_097: An alternative for TEM diagnostics #1319

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

Merged
merged 7 commits into from
Jun 13, 2025

Conversation

fvitt
Copy link

@fvitt fvitt commented Jun 2, 2025

Provides an method alternative to of computing zonal-mean terms of the Transformed Eulerian Mean (TEM) diagnostics.

The method here uses regridding capabilities provided in the ESMF library to map the dynamical fields needed in TEM diagnostics from the physics grid to a distributed regular longitude - latitude grid. The TEM diagnostics are computed on this regular longitude - latitude grid and computing zonal means is straightforward.

        modified:   bld/namelist_files/namelist_definition.xml
        new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_ctem/shell_commands
        new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_ctem/user_nl_cam
        new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_ctem/user_nl_clm
        modified:   src/control/runtime_opts.F90
        modified:   src/physics/cam/physpkg.F90
        modified:   src/physics/cam7/physpkg.F90
        new file:   src/utils/ctem_diags_mod.F90
        new file:   src/utils/esmf_check_error_mod.F90
        new file:   src/utils/esmf_lonlat_grid_mod.F90
        new file:   src/utils/esmf_phys2lonlat_mod.F90
        new file:   src/utils/esmf_phys_mesh_mod.F90
        new file:   src/utils/esmf_zonal_mean_mod.F90
@fvitt fvitt added this to the CESM3 milestone Jun 2, 2025
@fvitt fvitt self-assigned this Jun 2, 2025
@fvitt fvitt added the enhancement New feature or request label Jun 2, 2025
@cacraigucar cacraigucar requested a review from nusbaume June 3, 2025 17:25
Copy link
Collaborator

@nusbaume nusbaume 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 this new zonal-mean method @fvitt! I had some change requests, but hopefully nothing major.

Also, just curious if is there a plan for this new, ESMF-based methodology to eventually replace the older methods in src/utils/zonal_mean_mod.F90, or will both techniques remain available in CAM?

        modified:   src/physics/cam/physpkg.F90
        modified:   src/physics/cam7/physpkg.F90
        modified:   src/utils/ctem_diags_mod.F90
        modified:   src/utils/esmf_lonlat_grid_mod.F90
        modified:   src/utils/esmf_phys2lonlat_mod.F90
        modified:   src/utils/esmf_phys_mesh_mod.F90
        modified:   src/utils/esmf_zonal_mean_mod.F90
@fvitt fvitt requested a review from nusbaume June 10, 2025 14:11
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Found a couple typos, but otherwise everything looks good to me. Thanks again @fvitt!

allocate(mytidj_recv(npes))
allocate(mytidi_send(npes), stat=astat)
if (astat/=0) then
call endrun(subname//'not able to allocate mytidi_send( array')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo here:

Suggested change
call endrun(subname//'not able to allocate mytidi_send( array')
call endrun(subname//'not able to allocate mytidi_send array')

Copy link
Author

Choose a reason for hiding this comment

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

fixed

call addfld ('UWzm', (/'lev'/), 'A','m2 s-2', 'Vertical Flux of Zonal Momentum', gridname='ctem_zm')
call addfld ('VTHzm',(/'lev'/), 'A','K m s-1','Zonal-Mean meridional Heat Flux:', gridname='ctem_zm')
call addfld ('WTHzm',(/'lev'/), 'A','K m s-1','Zonal-Mean vertical Heat Flux:', gridname='ctem_zm')
call addfld ('UVzm', (/'lev'/), 'A','m2 s-2', 'Zonal-Mean ,eridional Flux of Zonal Momentum', gridname='ctem_zm')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo here:

Suggested change
call addfld ('UVzm', (/'lev'/), 'A','m2 s-2', 'Zonal-Mean ,eridional Flux of Zonal Momentum', gridname='ctem_zm')
call addfld ('UVzm', (/'lev'/), 'A','m2 s-2', 'Zonal-Mean meridional Flux of Zonal Momentum', gridname='ctem_zm')

Copy link
Author

Choose a reason for hiding this comment

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

fixed

	modified:   src/utils/ctem_diags_mod.F90
	modified:   src/utils/esmf_lonlat_grid_mod.F90
@cacraigucar cacraigucar changed the title An alternative for TEM diagnostics cam6_4_097: An alternative for TEM diagnostics Jun 12, 2025
fvitt added 4 commits June 13, 2025 08:12
	modified:   cime_config/testdefs/testlist_cam.xml
	modified:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_ctem/user_nl_cam
@fvitt fvitt merged commit 4764c5b into ESCOMP:cam_development Jun 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CoupledEval3 enhancement New feature or request
Projects
Status: Tag
Development

Successfully merging this pull request may close these issues.

3 participants