diff --git a/mediator/med_enthalpy_mod.F90 b/mediator/med_enthalpy_mod.F90 index 8e052a7a6..434e6f336 100644 --- a/mediator/med_enthalpy_mod.F90 +++ b/mediator/med_enthalpy_mod.F90 @@ -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) @@ -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) @@ -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) diff --git a/mediator/med_phases_ocnalb_mod.F90 b/mediator/med_phases_ocnalb_mod.F90 index 304d0c7fd..840082b36 100644 --- a/mediator/med_phases_ocnalb_mod.F90 +++ b/mediator/med_phases_ocnalb_mod.F90 @@ -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)" !------------------------------------------- @@ -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