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

use evap from atm #96

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions mediator/esmFldsExchange_nems_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,13 @@ subroutine esmFldsExchange_nems(gcomp, phase, rc)
! to ocn: evaporation water flux (custom merge in med_phases_prep_ocn)
if (phase == 'advertise') then
if (is_local%wrap%comp_present(compatm) .and. is_local%wrap%comp_present(compocn)) then
call addfld_from(compatm, 'Faxa_lat')
call addfld_from(compatm, 'Faxa_evap')
call addfld_to(compocn, 'Faxa_evap')
end if
else
if ( fldchk(is_local%wrap%FBexp(compocn) , 'Faxa_evap', rc=rc) .and. &
fldchk(is_local%wrap%FBImp(compatm,compatm), 'Faxa_lat' , rc=rc)) then
call addmap_from(compatm, 'Faxa_lat', compocn, mapconsf_aofrac, 'aofrac', 'unset')
fldchk(is_local%wrap%FBImp(compatm,compatm), 'Faxa_evap' , rc=rc)) then
call addmap_from(compatm, 'Faxa_evap', compocn, mapconsf_aofrac, 'aofrac', 'unset')
end if
end if
else if (trim(coupling_mode) == 'nems_orig_data' .or. trim(coupling_mode) == 'nems_frac_aoflux') then
Expand Down
5 changes: 2 additions & 3 deletions mediator/med_phases_prep_ocn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,6 @@ subroutine med_phases_prep_ocn_custom_nems(gcomp, rc)
real(R8), pointer :: ifrac(:)
real(R8), pointer :: ofrac(:)
integer :: lsize
real(R8) , parameter :: const_lhvap = 2.501e6_R8 ! latent heat of evaporation ~ J/kg
character(len=*), parameter :: subname='(med_phases_prep_ocn_custom_nems)'
!---------------------------------------

Expand Down Expand Up @@ -672,9 +671,9 @@ subroutine med_phases_prep_ocn_custom_nems(gcomp, rc)
if (trim(coupling_mode) == 'nems_orig' .or. &
trim(coupling_mode) == 'nems_frac' .or. &
trim(coupling_mode) == 'nems_frac_aoflux_sbs') then
customwgt(:) = -ofrac(:) / const_lhvap
customwgt(:) = -ofrac(:)
call med_merge_field(is_local%wrap%FBExp(compocn), 'Faxa_evap', &
FBinA=is_local%wrap%FBImp(compatm,compocn), fnameA='Faxa_lat' , wgtA=customwgt, rc=rc)
FBinA=is_local%wrap%FBImp(compatm,compocn), fnameA='Faxa_evap' , wgtA=customwgt, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

customwgt(:) = -ofrac(:)
Expand Down