Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix primarily for usf testing #477

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cesm/nuopc_cap_share/seq_drydep_mod.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module seq_drydep_mod

use shr_drydep_mod, only: seq_drydep_setHCoeff=>shr_drydep_setHCoeff
use shr_drydep_mod

implicit none

Expand Down
27 changes: 16 additions & 11 deletions mediator/med_fraction_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ module med_fraction_mod
use med_methods_mod , only : fldbun_init => med_methods_FB_init
use med_methods_mod , only : fldbun_reset => med_methods_FB_reset
use med_map_mod , only : med_map_field
use med_internalstate_mod , only : ncomps
use med_internalstate_mod , only : ncomps, samegrid_atmlnd

implicit none
private
Expand Down Expand Up @@ -496,21 +496,26 @@ subroutine med_fraction_init(gcomp, rc)
call med_map_field(field_src, field_dst, is_local%wrap%RH(complnd,compatm,:), maptype, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

call fldbun_getdata1d(is_local%wrap%FBfrac(compatm), 'lfrac', lfrac, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
! Reset ofrac in FBFrac(compatm)
if (samegrid_atmlnd) then
call fldbun_getdata1d(is_local%wrap%FBfrac(compatm), 'lfrac', lfrac, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
else
call fldbun_getdata1d(is_local%wrap%FBfrac(compatm), 'lfrin', lfrac, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end if
call fldbun_getdata1d(is_local%wrap%FBfrac(compatm), 'ofrac', ofrac, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (associated(ofrac)) then
do n = 1,size(lfrac)
lfrac(n) = lfrin(n)
ofrac(n) = 1.0_R8 - lfrac(n)
if (abs(ofrac(n)) < eps_fraclim) then
ofrac(n) = 0.0_R8
end if
end do
do n = 1,size(lfrac)
ofrac(n) = 1.0_R8 - lfrac(n)
if (abs(ofrac(n)) < eps_fraclim) then
ofrac(n) = 0.0_R8
end if
end do
end if

end if
end if
end if

!---------------------------------------
Expand Down
Loading