Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Externals_CAM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tag = pumas_cam-release_v1.12
required = True

[atmos_phys]
tag = version0_00_007
tag = atmos_phys0_00_011
protocol = git
repo_url = https://github.com/NCAR/atmospheric_physics
required = True
Expand Down
1 change: 1 addition & 0 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2089,6 +2089,7 @@ sub write_filepath
if ($simple_phys) {
print $fh "$camsrcdir/src/physics/simple\n";
print $fh "$camsrcdir/src/atmos_phys/kessler\n";
print $fh "$camsrcdir/src/atmos_phys/held_suarez\n";
}

# Weak scaling fix. This has to come before physics/cam and before dycores
Expand Down
167 changes: 0 additions & 167 deletions src/physics/simple/held_suarez.F90

This file was deleted.

16 changes: 11 additions & 5 deletions src/physics/simple/held_suarez_cam.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ subroutine held_suarez_init(pbuf2d)
use cam_history, only: addfld, add_default
use physconst, only: cappa, cpair
use ref_pres, only: pref_mid_norm, psurf_ref
use held_suarez, only: held_suarez_1994_init
use held_suarez_1994, only: held_suarez_1994_init

type(physics_buffer_desc), pointer :: pbuf2d(:,:)

character(len=512) :: errmsg
Copy link
Collaborator

Choose a reason for hiding this comment

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

I might replace 512 here with SHR_KIND_CX.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@nusbaume, the issue here is that we don't have symbolic sizes in the metadata. Hopefully, this will be fixed at some point.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@goldy that makes sense to me when it comes to CAMDEN, but why would that matter for CAM, given that it is just using the fortran code directly (so the metadata is never involved)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That is true but it is good if the code reflects what is in CCPP so we can easily find and fix these interfaces when the CCPP changes. Not a big deal either way IMHO.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Totally agree that this is not really a big deal. If @cacraigucar just wants to merge this without worrying about these particular changes then that is fine with me!

integer :: errflg

! Set model constant values
call held_suarez_1994_init(cappa, cpair, psurf_ref, pref_mid_norm)
call held_suarez_1994_init(pver, cappa, cpair, psurf_ref, pref_mid_norm, errmsg, errflg)

! This field is added by radiation when full physics is used
call addfld('QRS', (/ 'lev' /), 'A', 'K/s', &
Expand All @@ -60,7 +63,7 @@ subroutine held_suarez_tend(state, ptend, ztodt)
use physics_types, only: physics_ptend_init
use cam_abortutils, only: endrun
use cam_history, only: outfld
use held_suarez, only: held_suarez_1994
use held_suarez_1994, only: held_suarez_1994_run

!
! Input arguments
Expand All @@ -81,6 +84,9 @@ subroutine held_suarez_tend(state, ptend, ztodt)
real(r8) :: pmid(pcols,pver) ! mid-point pressure
integer :: i, k ! Longitude, level indices

character(len=512) :: errmsg
Copy link
Collaborator

Choose a reason for hiding this comment

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

I might replace 512 here with SHR_KIND_CX.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same response.

integer :: errflg

!
!-----------------------------------------------------------------------
!
Expand All @@ -98,8 +104,8 @@ subroutine held_suarez_tend(state, ptend, ztodt)
! initialize individual parameterization tendencies
call physics_ptend_init(ptend, state%psetcols, 'held_suarez', ls=.true., lu=.true., lv=.true.)

call held_suarez_1994(pcols, ncol, clat, state%pmid, &
state%u, state%v, state%t, ptend%u, ptend%v, ptend%s)
call held_suarez_1994_run(pver, ncol, clat, state%pmid, &
state%u, state%v, state%t, ptend%u, ptend%v, ptend%s, errmsg, errflg)

! Note, we assume that there are no subcolumns in simple physics
pmid(:ncol,:) = ptend%s(:ncol, :)/cpairv(:ncol,:,lchnk)
Expand Down