Skip to content

Commit

Permalink
fix for gust additions in the aoflux
Browse files Browse the repository at this point in the history
  • Loading branch information
uturuncoglu committed Jan 5, 2024
1 parent 8652157 commit d56c50c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
8 changes: 0 additions & 8 deletions mediator/esmFldsExchange_ufs_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,6 @@ subroutine esmFldsExchange_ufs(gcomp, phase, rc)
call addfld_ocnalb('So_anidf')
end if

! Advertise the ocean albedos. These are not sent to the ATM in UFS.
if (phase == 'advertise') then
call addfld_ocnalb('So_avsdr')
call addfld_ocnalb('So_avsdf')
call addfld_ocnalb('So_anidr')
call addfld_ocnalb('So_anidf')
end if

!=====================================================================
! FIELDS TO ATMOSPHERE (compatm)
!=====================================================================
Expand Down
12 changes: 8 additions & 4 deletions mediator/med_phases_aofluxes_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1597,8 +1597,6 @@ subroutine set_aoflux_in_pointers(fldbun_a, fldbun_o, aoflux_in, lsize, xgrid, r
if (chkerr(rc,__LINE__,u_FILE_u)) return
call fldbun_getfldptr(fldbun_a, 'Sa_shum', aoflux_in%shum, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call fldbun_getfldptr(fldbun_a, 'Faxa_rainc', aoflux_in%rainc, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
end if

! extra fields for ufs.frac.aoflux
Expand Down Expand Up @@ -1710,8 +1708,6 @@ subroutine set_aoflux_out_pointers(fldbun, lsize, aoflux_out, xgrid, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call fldbun_getfldptr(fldbun, 'So_duu10n', aoflux_out%duu10n, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call fldbun_getfldptr(fldbun, 'So_ugustOut', aoflux_out%ugust_out, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call fldbun_getfldptr(fldbun, 'Faox_taux', aoflux_out%taux, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call fldbun_getfldptr(fldbun, 'Faox_tauy', aoflux_out%tauy, xgrid=xgrid, rc=rc)
Expand All @@ -1724,6 +1720,7 @@ subroutine set_aoflux_out_pointers(fldbun, lsize, aoflux_out, xgrid, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call fldbun_getfldptr(fldbun, 'Faox_lwup', aoflux_out%lwup, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

if (flds_wiso) then
call fldbun_getfldptr(fldbun, 'Faox_evap_16O', aoflux_out%evap_16O, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
Expand All @@ -1737,6 +1734,13 @@ subroutine set_aoflux_out_pointers(fldbun, lsize, aoflux_out, xgrid, rc)
allocate(aoflux_out%evap_HDO(lsize)); aoflux_out%evap_HDO(:) = 0._R8
end if

if (add_gusts) then
call fldbun_getfldptr(fldbun, 'So_ugustOut', aoflux_out%ugust_out, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
else
allocate(aoflux_out%ugust_out(lsize)); aoflux_out%ugust_out(:) = 0._R8
end if

end subroutine set_aoflux_out_pointers

!================================================================================
Expand Down

0 comments on commit d56c50c

Please sign in to comment.