Skip to content

Commit

Permalink
Code for RF snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Katetc committed Dec 9, 2024
1 parent 47dd341 commit a15f13a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/physics/cam7/physpkg.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2164,14 +2164,26 @@ subroutine tphysac (ztodt, cam_in, &
! Rayleigh friction calculation
!===================================================
call t_startf('rayleigh_friction')
if (trim(cam_take_snapshot_before) == "user_set") then
call cam_snapshot_all_outfld_tphysac(cam_snapshot_before_num, state, tend, cam_in, cam_out, pbuf, &
fh2o, surfric, obklen, flx_heat, cmfmc, dlf, det_s, det_ice, net_flx)
end if
call rayleigh_friction_tend( ztodt, state, ptend)
if ( (trim(cam_take_snapshot_after) == "user_set") .and. &
(trim(cam_take_snapshot_before) == trim(cam_take_snapshot_after))) then
call cam_snapshot_ptend_outfld(ptend, lchnk)
end if
if ( ptend%lu ) then
call outfld( 'UTEND_RAYLEIGH', ptend%u, pcols, lchnk)
end if
if ( ptend%lv ) then
call outfld( 'VTEND_RAYLEIGH', ptend%v, pcols, lchnk)
end if
call physics_update(state, ptend, ztodt, tend)
if (trim(cam_take_snapshot_after) == "user_set") then
call cam_snapshot_all_outfld_tphysac(cam_snapshot_after_num, state, tend, cam_in, cam_out, pbuf, &
fh2o, surfric, obklen, flx_heat, cmfmc, dlf, det_s, det_ice, net_flx)
end if
call t_stopf('rayleigh_friction')

if (do_clubb_sgs) then
Expand Down

0 comments on commit a15f13a

Please sign in to comment.