Skip to content

Commit d9255d5

Browse files
committed
Tweak conditional for setting psfc for ufs
Based on discussion in #514
1 parent 0bbdcd0 commit d9255d5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mediator/med_phases_aofluxes_mod.F90

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,8 +1644,13 @@ subroutine set_aoflux_in_pointers(fldbun_a, fldbun_o, aoflux_in, lsize, xgrid, r
16441644
if (chkerr(rc,__LINE__,u_FILE_u)) return
16451645
end if
16461646

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

0 commit comments

Comments
 (0)