Skip to content

Commit

Permalink
properly retreve atm fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Sep 22, 2023
1 parent f4696f1 commit 58c6bb6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 6 additions & 6 deletions mediator/med_enthalpy_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ subroutine med_compute_enthalpy(is_local, rc)
call fldbun_getdata1d(is_local%wrap%FBImp(compocn,compocn), 'So_omask', ofrac, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

if (FB_fldchk(is_local%wrap%FBImp(compatm,compocn), 'Faxa_hrain' , rc=rc)) then
call FB_GetFldPtr(is_local%wrap%FBImp(compatm,compocn), 'Faxa_hrain', hrain_a, rc=rc)
if (FB_fldchk(is_local%wrap%FBExp(compatm), 'Faxa_hrain' , rc=rc)) then
call FB_GetFldPtr(is_local%wrap%FBExp(compatm), 'Faxa_hrain', hrain_a, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
do n = 1,nmax
hrain(n) = hrain_a(n) - tkfrz*rain(n)*cpfw * ofrac(n)
Expand All @@ -168,8 +168,8 @@ subroutine med_compute_enthalpy(is_local, rc)
hrain_a => hrain
endif

if (FB_fldchk(is_local%wrap%FBImp(compatm,compocn), 'Faxa_hevap' , rc=rc)) then
call FB_GetFldPtr(is_local%wrap%FBImp(compatm,compocn), 'Faxa_hevap', hevap_a, rc=rc)
if (FB_fldchk(is_local%wrap%FBExp(compatm), 'Faxa_hevap' , rc=rc)) then
call FB_GetFldPtr(is_local%wrap%FBExp(compatm), 'Faxa_hevap', hevap_a, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
do n = 1,nmax
hevap(n) = min(hevap_a(n),0._r8) - tkfrz * min(evap(n),0._r8) * cpwv * ofrac(n)
Expand All @@ -183,8 +183,8 @@ subroutine med_compute_enthalpy(is_local, rc)
hevap_a => hevap
endif

if (FB_fldchk(is_local%wrap%FBImp(compatm,compocn), 'Faxa_hsnow' , rc=rc)) then
call FB_GetFldPtr(is_local%wrap%FBImp(compatm,compocn), 'Faxa_hsnow', hsnow_a, rc=rc)
if (FB_fldchk(is_local%wrap%FBExp(compatm), 'Faxa_hsnow' , rc=rc)) then
call FB_GetFldPtr(is_local%wrap%FBExp(compatm), 'Faxa_hsnow', hsnow_a, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
do n = 1,nmax
hsnow(n) = hsnow_a(n) - tkfrz * snow(n) * cpice * ofrac(n)
Expand Down
12 changes: 4 additions & 8 deletions mediator/med_phases_ocnalb_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ subroutine med_phases_ocnalb_orbital_update(clock, logunit, maintask, eccen, ob
integer :: orb_year ! orbital year for current orbital computation
character(len=CL) :: msgstr ! temporary
logical :: lprint
logical :: first_time = .true.
logical, save :: first_time = .true.
character(len=*) , parameter :: subname = "(med_phases_ocnalb_orbital_update)"
!-------------------------------------------

Expand All @@ -648,16 +648,12 @@ subroutine med_phases_ocnalb_orbital_update(clock, logunit, maintask, eccen, ob
call ESMF_TimeGet(CurrTime, yy=year, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
orb_year = orb_iyear + (year - orb_iyear_align)
lprint = maintask
if(first_time) lprint = maintask
else
orb_year = orb_iyear
if (first_time) then
lprint = maintask
first_time = .false.
else
lprint = .false.
end if
if(first_time) lprint = maintask
end if
first_time = .false.

eccen = orb_eccen
shr_log_unit = logunit
Expand Down

0 comments on commit 58c6bb6

Please sign in to comment.