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

Create scheme for cam_thermo_water_update using dependency method #177

Open
jimmielin opened this issue Dec 12, 2024 · 0 comments
Open

Create scheme for cam_thermo_water_update using dependency method #177

jimmielin opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jimmielin
Copy link
Member

cam_thermo_water_update has to run a second time (the first time is in dp_coupling) before dycore_energy_consistency_adjust scheme runs, to provide updated generalized cp:

For both CAM4/5/6 and CAM7:

! in tphysac:

    !
    ! update cp/cv for energy computation based in updated water variables
    !
    call cam_thermo_water_update(state%q(:ncol,:,:), lchnk, ncol, vc_dycore,&
         to_dry_factor=state%pdel(:ncol,:)/state%pdeldry(:ncol,:))

! ... physics_dme_adjust

    ! ccpp-ized scheme dycore_energy_consistency_adjust

cam_thermo_water_update is currently in src/data/cam_thermo.F90. It calls
water_composition_update in src/data/air_composition.F90, which depends on

  • get_cp_1hd (which depends on get_cp_dry_1hd) in air_composition;
  • get_R_1hd (which depends on get_R_dry_1hd) in air_composition;
  • a variety of species number and index information in air_composition, i.e., thermodynamic_active_species_num, thermodynamic_active_species_idx, dry_air_species_num, thermodynamic_active_species_cp, thermodynamic_active_species_R

Because air_composition properties and subroutines are also dependent on the dycore, it may not be feasible to CCPPize the entire cam_thermo_water_update and its related subroutines.

A dependent scheme can be made that depends on src/data/cam_thermo.F90 and calls the underlying cam_thermo_water_update with the to_dry_factor (note: the call from the dycore does not include this factor.) which would allow the CAM4/5/6/7 suites to run properly until the CAM thermo infrastructure can be completely CCPPized (if in the future)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To Do
Development

No branches or pull requests

1 participant