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

cam6_3_089: TEM diagnostics calculated on the physics grid #677

Merged
merged 25 commits into from
Jan 10, 2023

Conversation

fvitt
Copy link

@fvitt fvitt commented Oct 20, 2022

Transformed Eulerian Mean (TEM) diagnostics calculated on the physics grid, independent of dynamical core.

closes #653
closes #652

fvitt added 4 commits October 17, 2022 16:33
        new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem/shell_commands
        new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem/user_nl_cam
        new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem/user_nl_clm
        new file:   src/physics/cam/phys_grid_ctem.F90
        new file:   src/utils/zonal_mean_mod.F90
        modified:   bld/namelist_files/namelist_definition.xml
        modified:   src/control/cam_comp.F90
        modified:   src/control/runtime_opts.F90
        modified:   src/physics/cam/physpkg.F90
        modified:   src/physics/cam/phys_grid_ctem.F90
        modified:   src/physics/cam/phys_grid_ctem.F90
        modified:   src/physics/cam/physpkg.F90
        modified:   src/physics/cam/phys_grid_ctem.F90
@fvitt fvitt added enhancement New feature or request BFB bit for bit tag labels Oct 20, 2022
@fvitt fvitt self-assigned this Oct 20, 2022
@nusbaume
Copy link
Collaborator

@fvitt just double checking if this is purposefully a draft PR?

@fvitt
Copy link
Author

fvitt commented Oct 20, 2022

@fvitt just double checking if this is purposefully a draft PR?

Yes, this is meant to be a draft PR for now.

@fvitt
Copy link
Author

fvitt commented Oct 21, 2022

@dan800 @nadavis-ncar :
I want to bring this PR to your attention. Please review when you get a chance.

fvitt added 2 commits November 1, 2022 08:51
        modified:   src/utils/zonal_mean_mod.F90
        modified:   bld/namelist_files/namelist_defaults_cam.xml
        new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem_1deg/shell_commands
        new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem_1deg/user_nl_cam
        new file:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem_1deg/user_nl_clm
@dan800
Copy link
Collaborator

dan800 commented Nov 4, 2022

@fvitt Can you explain the rationale behind the "zm3d" namelist variables, e.g.,

call addfld ('VTHzm3d',(/'ilev' /), 'A','MK/S', 'Meridional Heat Flux: 3D zon. mean', gridname='physgrid' )

At least to me it seems contradictory/confusing.

@fvitt
Copy link
Author

fvitt commented Nov 4, 2022

@dan800
The "zm3d" history fields are 3-dimensional zonal mean fields. They were added before the zonal average history output was working (the "zaphys" fields). I left them for now to verify that the zonal average output was working as expected. Maybe the "zm3d" should be removed now.

@fvitt
Copy link
Author

fvitt commented Nov 4, 2022

@dan800 , @nadavis-ncar :

Sample runs can be found under:
/glade/scratch/fvitt/FWsc2000climo_f09_TEM_test04
/glade/scratch/fvitt/FWsc2000climo_ne30pg3_TEM_test04

Source code on cheyenne is under :
/glade/work/fvitt/camdev/physgrid_tem_diags02

	new file:   cime_config/testdefs/testmods_dirs/cam/outfrq1d_physgrid_tem_mpasa120_wcmsc/shell_commands
	new file:   cime_config/testdefs/testmods_dirs/cam/outfrq1d_physgrid_tem_mpasa120_wcmsc/user_nl_cam
	new file:   cime_config/testdefs/testmods_dirs/cam/outfrq1d_physgrid_tem_mpasa120_wcmsc/user_nl_clm
	modified:   bld/namelist_files/use_cases/waccm_sc_2000_cam6.xml
@fvitt fvitt marked this pull request as ready for review November 8, 2022 16:41
@fvitt fvitt requested review from dan800 and peverwhee November 8, 2022 16:41
        modified:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem/user_nl_cam
        modified:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem_1deg/user_nl_cam
        modified:   src/physics/cam/phys_grid_ctem.F90
@peverwhee
Copy link
Collaborator

@fvitt @cacraigucar it looks like this code is dependent on #629 - is that correct? If so, I will give that code an initial review first.

@fvitt
Copy link
Author

fvitt commented Nov 9, 2022

@peverwhee This is PR can be reviewed independent from #629. This PR includes the utility module zonal_mean_mod.F90 file, which is also included in #629.

@peverwhee
Copy link
Collaborator

@fvitt ahh gotcha. Thanks.

Copy link
Collaborator

@peverwhee peverwhee left a comment

Choose a reason for hiding this comment

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

a few (hopefully) small requests

src/physics/cam/phys_grid_ctem.F90 Outdated Show resolved Hide resolved
src/physics/cam/phys_grid_ctem.F90 Outdated Show resolved Hide resolved
src/physics/cam/phys_grid_ctem.F90 Outdated Show resolved Hide resolved
src/physics/cam/phys_grid_ctem.F90 Show resolved Hide resolved
src/physics/cam/phys_grid_ctem.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
fvitt added 4 commits November 9, 2022 16:45
…iewer

        modified:   bld/namelist_files/namelist_definition.xml
        modified:   cime_config/testdefs/testmods_dirs/cam/outfrq1d_physgrid_tem_mpasa120_wcmsc/user_nl_cam
        modified:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem/user_nl_cam
        modified:   cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem_1deg/user_nl_cam
        modified:   src/physics/cam/phys_grid_ctem.F90
        modified:   src/utils/zonal_mean_mod.F90
        modified:   src/physics/cam/phys_grid_ctem.F90
        modified:   src/physics/cam/physpkg.F90
        modified:   src/utils/zonal_mean_mod.F90
        modified:   src/utils/zonal_mean_mod.F90
@fvitt fvitt requested a review from peverwhee November 10, 2022 16:11
Copy link
Collaborator

@peverwhee peverwhee 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 - I added a comment explaining my question about orthogonality (though it should've been orthonormality) but will move this to full review

src/utils/zonal_mean_mod.F90 Show resolved Hide resolved
@cacraigucar cacraigucar changed the title TEM diagnostics calculated on the physics grid part of cam6_3_086: TEM diagnostics calculated on the physics grid Dec 9, 2022
@cacraigucar cacraigucar changed the title part of cam6_3_086: TEM diagnostics calculated on the physics grid TEM diagnostics calculated on the physics grid Dec 9, 2022
! vertical velocity
w(:ncol,:,lchnk) = -sheight(:ncol,:) * phys_state(lchnk)%omega(:ncol,:) / phys_state(lchnk)%pmid(:ncol,:)

! interpolate to layer interfaces
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is unnecessary - no need to interpolate output to ilev. Prefer output on lev anyway.

Copy link
Author

Choose a reason for hiding this comment

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

The vertical interpolations have been removed. The calculations and output are now at the model layer mid-points.

        modified:   src/physics/cam/phys_grid_ctem.F90
@dan800
Copy link
Collaborator

dan800 commented Dec 23, 2022 via email

@fvitt
Copy link
Author

fvitt commented Dec 23, 2022

@fvitt Great. Can you run out the model for a few months with the new output format (on lev), so I can test my post-processing code.

@dan800 , These cases are run for 2 months. Do I need to run longer?

/glade/scratch/fvitt/FWsc2000climo_f09_TEM_test06
/glade/scratch/fvitt/FWsc2000climo_ne30pg3_TEM_test06

Find history under
/glade/scratch/fvitt/archive/FWsc2000climo_f09_TEM_test06
/glade/scratch/fvitt/archive/FWsc2000climo_ne30pg3_TEM_test06

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.

Definitely a lot of great work! I'll admit I have a fair amount of comments, but hopefully all of them are relatively simple to implement. Of course let me know if you have any questions or concerns with my suggestions.

bld/namelist_files/namelist_defaults_cam.xml Show resolved Hide resolved
src/physics/cam/phys_grid_ctem.F90 Outdated Show resolved Hide resolved
src/physics/cam/phys_grid_ctem.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
fvitt added 4 commits January 3, 2023 10:42
        modified:   src/physics/cam/phys_grid_ctem.F90
        modified:   src/physics/cam/phys_grid_ctem.F90
        modified:   src/utils/zonal_mean_mod.F90
        modified:   src/physics/cam/phys_grid_ctem.F90
        modified:   src/utils/zonal_mean_mod.F90
        modified:   cime_config/testdefs/testlist_cam.xml
        modified:   cime_config/testdefs/testmods_dirs/cam/outfrq3s_physgrid_tem/user_nl_cam
        modified:   cime_config/testdefs/testmods_dirs/cam/outfrq3s_physgrid_tem/user_nl_clm

        renamed:    cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem/shell_commands -> cime_config/testdefs/testmods_dirs/cam/outfrq3s_physgrid_tem/shell_commands
        renamed:    cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem/user_nl_cam -> cime_config/testdefs/testmods_dirs/cam/outfrq3s_physgrid_tem/user_nl_cam
        renamed:    cime_config/testdefs/testmods_dirs/cam/outfrq9s_physgrid_tem/user_nl_clm -> cime_config/testdefs/testmods_dirs/cam/outfrq3s_physgrid_tem/user_nl_clm
@fvitt fvitt requested review from cacraigucar and nusbaume January 4, 2023 21:30
cime_config/testdefs/testlist_cam.xml Outdated Show resolved Hide resolved
src/physics/cam/phys_grid_ctem.F90 Outdated Show resolved Hide resolved
src/physics/cam/phys_grid_ctem.F90 Outdated Show resolved Hide resolved
src/physics/cam/phys_grid_ctem.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
	modified:   cime_config/testdefs/testlist_cam.xml
	modified:   src/physics/cam/phys_grid_ctem.F90
@cacraigucar cacraigucar changed the title TEM diagnostics calculated on the physics grid cam6_3_089?: TEM diagnostics calculated on the physics grid Jan 6, 2023
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.

Looks good to me now! I just have a few last one-line change requests, but hopefully nothing that seriously holds up this PR.

src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Outdated Show resolved Hide resolved
src/utils/zonal_mean_mod.F90 Show resolved Hide resolved
fvitt added 2 commits January 9, 2023 13:33
	modified:   src/utils/zonal_mean_mod.F90
	modified:   src/utils/zonal_mean_mod.F90
@jtruesdal jtruesdal removed their request for review January 9, 2023 22:30
@cacraigucar cacraigucar changed the title cam6_3_089?: TEM diagnostics calculated on the physics grid cam6_3_089: TEM diagnostics calculated on the physics grid Jan 9, 2023
@fvitt fvitt merged commit ad46750 into ESCOMP:cam_development Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFB bit for bit tag enhancement New feature or request
Projects
Status: Tag
Development

Successfully merging this pull request may close these issues.

6 participants