Skip to content

Commit

Permalink
Tweak conditional for setting psfc for ufs
Browse files Browse the repository at this point in the history
Based on discussion in #514
  • Loading branch information
billsacks committed Oct 22, 2024
1 parent 0bbdcd0 commit d9255d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mediator/med_phases_aofluxes_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1644,8 +1644,13 @@ subroutine set_aoflux_in_pointers(fldbun_a, fldbun_o, aoflux_in, lsize, xgrid, r
if (chkerr(rc,__LINE__,u_FILE_u)) return
end if

! The following conditional captures the cases where aoflux_in%psfc is needed in calls
! to flux_atmocn / flux_atmocn_ccpp. Note that coupling_mode=='cesm' is equivalent to
! the CESMCOUPLED CPP token, and coupling_mode(1:3)=='ufs' is roughly equivalent to
! the UFS_AOFLUX CPP token (noting that we should only be in this subroutine if using
! one of the aoflux variants of the ufs coupling_mode).
if ((trim(coupling_mode) == 'cesm') .or. &
(trim(coupling_mode) == 'ufs.frac.aoflux' .and. trim(aoflux_code) == 'ccpp')) then
(coupling_mode(1:3) == 'ufs' .and. trim(aoflux_code) == 'ccpp')) then
call fldbun_getfldptr(fldbun_a, 'Sa_pslv', aoflux_in%psfc, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
end if
Expand Down

0 comments on commit d9255d5

Please sign in to comment.