Skip to content

Commit

Permalink
Give correct lable to snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Katetc committed Dec 11, 2024
1 parent a15f13a commit 53dd7a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions src/physics/cam/physpkg.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1666,14 +1666,26 @@ subroutine tphysac (ztodt, cam_in, &
! Rayleigh friction calculation
!===================================================
call t_startf('rayleigh_friction')
if (trim(cam_take_snapshot_before) == "rayleigh_friction_tend") then
call cam_snapshot_all_outfld_tphysac(cam_snapshot_before_num, state, tend, cam_in, cam_out, pbuf,&
fh2o, surfric, obklen, flx_heat)
end if
call rayleigh_friction_tend( ztodt, state, ptend)
if ( (trim(cam_take_snapshot_after) == "rayleigh_friction_tend") .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) == "rayleigh_friction_tend") then
call cam_snapshot_all_outfld_tphysac(cam_snapshot_after_num, state, tend, cam_in, cam_out, pbuf,&
fh2o, surfric, obklen, flx_heat)
end if
call t_stopf('rayleigh_friction')

if (do_clubb_sgs) then
Expand Down
6 changes: 3 additions & 3 deletions src/physics/cam7/physpkg.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2164,12 +2164,12 @@ subroutine tphysac (ztodt, cam_in, &
! Rayleigh friction calculation
!===================================================
call t_startf('rayleigh_friction')
if (trim(cam_take_snapshot_before) == "user_set") then
if (trim(cam_take_snapshot_before) == "rayleigh_friction_tend") 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. &
if ( (trim(cam_take_snapshot_after) == "rayleigh_friction_tend") .and. &
(trim(cam_take_snapshot_before) == trim(cam_take_snapshot_after))) then
call cam_snapshot_ptend_outfld(ptend, lchnk)
end if
Expand All @@ -2180,7 +2180,7 @@ subroutine tphysac (ztodt, cam_in, &
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
if (trim(cam_take_snapshot_after) == "rayleigh_friction_tend") 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
Expand Down

0 comments on commit 53dd7a4

Please sign in to comment.