Skip to content

Commit

Permalink
revert changes for swnet in prep_ocn
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed Aug 7, 2023
1 parent f5894d4 commit ec41c2f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mediator/med_phases_prep_ocn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ subroutine med_phases_prep_ocn_custom(gcomp, rc)
call FB_GetFldPtr(is_local%wrap%FBfrac(compocn), 'ofrad' , ofracr, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

call FB_GetFldPtr(is_local%wrap%FBImp(compice,compocn), 'Fioi_swpen', Fioi_swpen, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (FB_fldchk(is_local%wrap%FBImp(compice,compice), 'Fioi_swpen_vdr', rc=rc)) then
import_swpen_by_bands = .true.
call FB_GetFldPtr(is_local%wrap%FBImp(compice,compocn), 'Fioi_swpen_vdr', Fioi_swpen_vdr, rc=rc)
Expand All @@ -494,8 +496,6 @@ subroutine med_phases_prep_ocn_custom(gcomp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
else
import_swpen_by_bands = .false.
call FB_GetFldPtr(is_local%wrap%FBImp(compice,compocn), 'Fioi_swpen', Fioi_swpen, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end if

if ( FB_fldchk(is_local%wrap%FBExp(compocn), 'Foxx_swnet_afracr',rc=rc)) then
Expand Down Expand Up @@ -528,9 +528,8 @@ subroutine med_phases_prep_ocn_custom(gcomp, rc)
ifracr_scaled = ifracr(n) / (frac_sum)
ofracr_scaled = ofracr(n) / (frac_sum)
endif
if (.not.import_swpen_by_bands) then
Foxx_swnet(n) = ofracr_scaled*(fswabsv + fswabsi) + ifrac_scaled*Fioi_swpen(n)
end if
Foxx_swnet(n) = ofracr_scaled*(fswabsv + fswabsi) + ifrac_scaled*Fioi_swpen(n)

if (export_swnet_afracr) then
Foxx_swnet_afracr(n) = ofracr_scaled*(fswabsv + fswabsi)
end if
Expand Down

0 comments on commit ec41c2f

Please sign in to comment.