Skip to content

Commit

Permalink
add two fixes
Browse files Browse the repository at this point in the history
* testing of this feature w/ UFS noahmp lnd component, which currently
runs on the CSG, found two issues. One to write the mediator fractions
and areas on the tiles when using the single history file. A second fix
is the mapping masking for lnd-atm coupling in UFS.
  • Loading branch information
DeniseWorthen committed Mar 13, 2024
1 parent ac5520f commit 45d63c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions mediator/med_map_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ subroutine med_map_routehandles_initfrom_field(n1, n2, fldsrc, flddst, mapindex,
srcMaskValue = ispval_mask
dstMaskValue = ispval_mask
end if
if (n1 == complnd .and. n2 == compatm) then
srcMaskValue = ispval_mask
dstMaskValue = 0
end if
end if
if (coupling_mode(1:4) == 'hafs') then
if (n1 == compatm .and. n2 == compwav) then
Expand Down
6 changes: 4 additions & 2 deletions mediator/med_phases_history_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,14 @@ subroutine med_phases_history_write(gcomp, rc)
! Write mediator fraction field bundles
if (ESMF_FieldBundleIsCreated(is_local%wrap%FBFrac(n),rc=rc)) then
call med_io_write(io_file, is_local%wrap%FBFrac(n), whead(m), wdata(m), &
is_local%wrap%nx(n), is_local%wrap%ny(n), nt=1, pre='Med_frac_'//trim(compname(n)), rc=rc)
is_local%wrap%nx(n), is_local%wrap%ny(n), nt=1, pre='Med_frac_'//trim(compname(n)), &
ntile=is_local%wrap%ntile(n), rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end if
! Write component mediator area field bundles
call med_io_write(io_file, is_local%wrap%FBArea(n), whead(m), wdata(m), &
is_local%wrap%nx(n), is_local%wrap%ny(n), nt=1, pre='MED_'//trim(compname(n)), rc=rc)
is_local%wrap%nx(n), is_local%wrap%ny(n), nt=1, pre='MED_'//trim(compname(n)), &
ntile=is_local%wrap%ntile(n), rc=rc)
end do

! Write atm/ocn fluxes and ocean albedoes if field bundles are created
Expand Down

0 comments on commit 45d63c4

Please sign in to comment.