-
Notifications
You must be signed in to change notification settings - Fork 16
Cam sima dycore update #344
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
base: development
Are you sure you want to change the base?
Changes from all commits
bed8416
5442b6b
d4ae702
983b132
ef7a274
5930c27
14ecf1f
e6edd62
8af4d32
19d80f6
17eb407
f02b45a
0fdead0
5dd4566
0330613
14d9c11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ subroutine d_p_coupling(cam_runtime_opts, phys_state, phys_tend, dyn_out) | |
|
|
||
| !SE dycore: | ||
| use fvm_mapping, only: dyn2phys_vector, dyn2phys_all_vars | ||
| use time_mod, only: timelevel_qdp | ||
| use se_dyn_time_mod, only: timelevel_qdp | ||
| use control_mod, only: qsplit | ||
|
|
||
| ! arguments | ||
|
|
@@ -329,7 +329,7 @@ subroutine p_d_coupling(cam_runtime_opts, phys_state, phys_tend, dyn_in, tl_f, t | |
| use bndry_mod, only: bndry_exchange | ||
| use edge_mod, only: edgeVpack, edgeVunpack | ||
| use fvm_mapping, only: phys2dyn_forcings_fvm | ||
|
|
||
| use dimensions_mod, only: use_cslam | ||
| ! arguments | ||
| type(runtime_options), intent(in) :: cam_runtime_opts ! Runtime settings object | ||
| type(physics_state), intent(inout) :: phys_state | ||
|
|
@@ -521,9 +521,15 @@ subroutine p_d_coupling(cam_runtime_opts, phys_state, phys_tend, dyn_in, tl_f, t | |
| call edgeVpack(edgebuf, dyn_in%elem(ie)%derived%FM(:,:,:,:), 2*nlev, kptr, ie) | ||
| kptr = kptr + 2*nlev | ||
| call edgeVpack(edgebuf, dyn_in%elem(ie)%derived%FT(:,:,:), nlev, kptr, ie) | ||
| kptr = kptr + nlev | ||
| call edgeVpack(edgebuf, dyn_in%elem(ie)%derived%FQ(:,:,:,:), nlev*qsize, kptr, ie) | ||
| end do | ||
| if (.not. use_cslam) then | ||
| ! | ||
| ! if using CSLAM qdp is being overwritten with CSLAM values in the dynamics | ||
| ! so no need to do boundary exchange of tracer tendency on GLL grid here | ||
| ! | ||
| kptr = kptr + nlev | ||
| call edgeVpack(edgebuf, dyn_in%elem(ie)%derived%FQ(:,:,:,:), nlev*qsize, kptr, ie) | ||
| end if | ||
| end do | ||
|
|
||
| if (iam < par%nprocs) then | ||
| call bndry_exchange(par, edgebuf, location='p_d_coupling') | ||
|
|
@@ -534,8 +540,10 @@ subroutine p_d_coupling(cam_runtime_opts, phys_state, phys_tend, dyn_in, tl_f, t | |
| call edgeVunpack(edgebuf, dyn_in%elem(ie)%derived%FM(:,:,:,:), 2*nlev, kptr, ie) | ||
| kptr = kptr + 2*nlev | ||
| call edgeVunpack(edgebuf, dyn_in%elem(ie)%derived%FT(:,:,:), nlev, kptr, ie) | ||
| kptr = kptr + nlev | ||
| call edgeVunpack(edgebuf, dyn_in%elem(ie)%derived%FQ(:,:,:,:), nlev*qsize, kptr, ie) | ||
| if (.not. use_cslam) then | ||
| kptr = kptr + nlev | ||
| call edgeVunpack(edgebuf, dyn_in%elem(ie)%derived%FQ(:,:,:,:), nlev*qsize, kptr, ie) | ||
| end if | ||
| if (fv_nphys > 0) then | ||
| do k = 1, nlev | ||
| dyn_in%elem(ie)%derived%FM(:,:,1,k) = & | ||
|
|
@@ -743,6 +751,7 @@ subroutine derived_phys_dry(cam_runtime_opts, phys_state, phys_tend) | |
| ! Ensure N2 = 1 - (O2 + O + H) mmr is greater than 0 | ||
| ! Check for unusually large H2 values and set to lower value. | ||
| !------------------------------------------------------------ | ||
| !xxx this code is NOT in cam_development? | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this was migrated to
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nusbaume @jimmielin Can I remove this comment? |
||
| if (cam_runtime_opts%waccmx_option() == 'ionosphere' .or. & | ||
| cam_runtime_opts%waccmx_option() == 'neutral') then | ||
|
|
||
|
|
@@ -853,44 +862,4 @@ subroutine derived_phys_dry(cam_runtime_opts, phys_state, phys_tend) | |
| errflg, errmsg) | ||
|
|
||
| end subroutine derived_phys_dry | ||
|
|
||
| !========================================================================================= | ||
|
|
||
| subroutine thermodynamic_consistency(phys_state, const_data_ptr, phys_tend, ncols, pver) | ||
| ! | ||
| ! Adjust the physics temperature tendency for thermal energy consistency with the | ||
| ! dynamics. | ||
| ! Note: mixing ratios are assumed to be dry. | ||
| ! | ||
| use physconst, only: cpair | ||
| use air_composition, only: get_cp | ||
|
|
||
| ! SE dycore: | ||
| use dimensions_mod, only: lcp_moist | ||
| use control_mod, only: phys_dyn_cp | ||
|
|
||
| type(physics_state), intent(in) :: phys_state | ||
| real(kind_phys), pointer :: const_data_ptr(:,:,:) | ||
| type(physics_tend ), intent(inout) :: phys_tend | ||
| integer, intent(in) :: ncols, pver | ||
|
|
||
| real(kind_phys) :: inv_cp(ncols,pver) | ||
| !---------------------------------------------------------------------------- | ||
|
|
||
| if (lcp_moist.and.phys_dyn_cp==1) then | ||
| ! | ||
| ! scale temperature tendency so that thermal energy increment from physics | ||
| ! matches SE (not taking into account dme adjust) | ||
| ! | ||
| ! note that if lcp_moist=.false. then there is thermal energy increment | ||
| ! consistency (not taking into account dme adjust) | ||
| ! | ||
| call get_cp(const_data_ptr(1:ncols,1:pver,1:num_advected),.true.,inv_cp) | ||
|
|
||
| phys_tend%dTdt_total(1:ncols,1:pver) = phys_tend%dTdt_total(1:ncols,1:pver)*cpair*inv_cp | ||
| end if | ||
| end subroutine thermodynamic_consistency | ||
|
|
||
| !========================================================================================= | ||
|
|
||
| end module dp_coupling | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build-namelist is no longer present after migrating to CAM-SIMA so this could be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are other places in this file with ... so should I move this description elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nusbaume might have thoughts about this but I generally just left this line out when moving over the description from CAM