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

changes for bugfix fractions #110

Merged
merged 12 commits into from
Oct 7, 2020
5 changes: 2 additions & 3 deletions drivers/cime/esm_time_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ subroutine esm_time_clockInit(ensemble_driver, instance_driver, logunit, mastert

if (mastertask) then
write(logunit,*) ' NOTE: the current compset has no mediator - which provides the clock restart information'
write(logunit,*) ' In this case the restarts are handled solely by the component being used and'
write(logunit,*) ' In this case the restarts are handled solely by the component being used and'
write(logunit,*) ' and the driver clock will always be starting from the initial date on restart'
end if
curr_ymd = start_ymd
Expand Down Expand Up @@ -650,8 +650,7 @@ subroutine esm_time_read_restart(restart_file, start_ymd, start_tod, curr_ymd, c
! use netcdf here since it's serial
status = nf90_open(restart_file, NF90_NOWRITE, ncid)
if (status /= nf90_NoErr) then
print *,__FILE__,__LINE__,trim(restart_file)
call ESMF_LogWrite(trim(subname)//' ERROR: nf90_open', ESMF_LOGMSG_INFO)
call ESMF_LogWrite(trim(subname)//' ERROR: nf90_open: '//trim(restart_file), ESMF_LOGMSG_INFO)
rc = ESMF_FAILURE
return
endif
Expand Down
20 changes: 9 additions & 11 deletions mediator/esmFldsExchange_cesm_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
else
if ( fldchk(is_local%wrap%FBExp(complnd) , trim(fldname), rc=rc) .and. &
fldchk(is_local%wrap%FBImp(compglc, compglc), trim(fldname), rc=rc)) then
call addmap(fldListFr(compglc)%flds, trim(fldname), complnd, mapconsf, 'one', glc2lnd_smap)
call addmap(fldListFr(compglc)%flds, trim(fldname), complnd, mapconsd, 'one', glc2lnd_smap)
call addmrg(fldListTo(complnd)%flds, trim(fldname), &
mrg_from1=compglc, mrg_fld1=trim(fldname), mrg_type1='copy')
end if
Expand Down Expand Up @@ -679,7 +679,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
call addfld(fldListFr(compice)%flds, 'Faii_'//trim(suffix(n)))
call addfld(fldListTo(compatm)%flds, 'Faxx_'//trim(suffix(n)))
else
! (non aqua-planet)
! CESM (non aqua-planet)
if ( fldchk(is_local%wrap%FBImp(complnd,complnd), 'Fall_'//trim(suffix(n)), rc=rc) .and. &
fldchk(is_local%wrap%FBImp(compice,compice), 'Faii_'//trim(suffix(n)), rc=rc) .and. &
fldchk(is_local%wrap%FBMed_aoflux_o , 'Faox_'//trim(suffix(n)), rc=rc) .and. &
Expand All @@ -692,7 +692,6 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
mrg_from2=compice, mrg_fld2='Faii_'//trim(suffix(n)), mrg_type2='merge', mrg_fracname2='ifrac', &
mrg_from3=compmed, mrg_fld3='Faox_'//trim(suffix(n)), mrg_type3='merge', mrg_fracname3='ofrac')

! (cam, aqua-planet)
else if (fldchk(is_local%wrap%FBMed_aoflux_o, 'Faox_'//trim(suffix(n)), rc=rc) .and. &
fldchk(is_local%wrap%FBexp(compatm), 'Faxx_'//trim(suffix(n)), rc=rc)) then
call addmap(fldListMed_aoflux%flds , 'Faox_'//trim(suffix(n)), compatm, mapconsf, 'ofrac', ocn2atm_fmap)
Expand All @@ -710,11 +709,10 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
call addfld(fldListFr(complnd)%flds, 'Sl_t')
call addfld(fldListFr(compice)%flds, 'Si_t')
call addfld(fldListFr(compocn)%flds, 'So_t')

call addfld(fldListTo(compatm)%flds, 'So_t')
call addfld(fldListTo(compatm)%flds, 'Sx_t')
else
! merged ocn/ice/lnd temp and unmerged ocn temp
! CESM - merged ocn/ice/lnd temp and unmerged ocn temp
if (fldchk(is_local%wrap%FBexp(compatm) , 'Sx_t', rc=rc) .and. &
fldchk(is_local%wrap%FBImp(complnd,complnd), 'Sl_t', rc=rc) .and. &
fldchk(is_local%wrap%FBImp(compice,compice), 'Si_t', rc=rc) .and. &
Expand Down Expand Up @@ -1768,7 +1766,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
else
if ( fldchk(is_local%wrap%FBImp(complnd, complnd), trim(fldname), rc=rc) .and. &
fldchk(is_local%wrap%FBExp(comprof) , trim(fldname), rc=rc)) then
call addmap(fldListFr(complnd)%flds, trim(fldname), comprof, mapconsd, 'lfrac', lnd2rof_fmap)
call addmap(fldListFr(complnd)%flds, trim(fldname), comprof, mapconsf, 'lfrac', lnd2rof_fmap)
call addmrg(fldListTo(comprof)%flds, trim(fldname), &
mrg_from1=complnd, mrg_fld1=trim(fldname), mrg_type1='copy_with_weights', mrg_fracname1='lfrac')
end if
Expand Down Expand Up @@ -1798,11 +1796,11 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
call addfld(fldListFr(complnd)%flds, 'Flgl_qice_elev') ! glacier ice flux (1->glc_nec+1)
else
if ( fldchk(is_local%wrap%FBImp(complnd,complnd) , 'Flgl_qice_elev', rc=rc)) then
! custom merging will be done here
! custom merging will be done here
call addmap(FldListFr(complnd)%flds, 'Flgl_qice_elev', compglc, mapbilnr, 'lfrac', lnd2glc_smap)
end if
if ( fldchk(is_local%wrap%FBImp(complnd,complnd) , 'Sl_tsrf_elev' , rc=rc)) then
! custom merging will be done here
! custom merging will be done here
call addmap(FldListFr(complnd)%flds, 'Sl_tsrf_elev', compglc, mapbilnr, 'lfrac', lnd2glc_smap)
end if
if ( fldchk(is_local%wrap%FBImp(complnd,complnd) , 'Sl_topo_elev' , rc=rc)) then
Expand Down Expand Up @@ -1898,7 +1896,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
call addfld(fldListFr(complnd)%flds, 'Fall_fco2_lnd')
call addfld(fldListTo(compatm)%flds, 'Fall_fco2_lnd')
else
call addmap(fldListFr(complnd)%flds, 'Fall_fco2_lnd', compatm, mapconsf, 'one', atm2lnd_smap)
call addmap(fldListFr(complnd)%flds, 'Fall_fco2_lnd', compatm, mapconsf, 'one', lnd2atm_fmap)
call addmrg(fldListTo(compatm)%flds, 'Fall_fco2_lnd', &
mrg_from1=complnd, mrg_fld1='Fall_fco2_lnd', mrg_type1='copy_with_weights', mrg_fracname1='lfrac')
end if
Expand Down Expand Up @@ -1946,7 +1944,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
call addfld(fldListFr(complnd)%flds, 'Fall_fco2_lnd')
call addfld(fldListTo(compatm)%flds, 'Fall_fco2_lnd')
else
call addmap(fldListFr(complnd)%flds, 'Fall_fco2_lnd', compatm, mapconsf, 'one', atm2lnd_smap)
call addmap(fldListFr(complnd)%flds, 'Fall_fco2_lnd', compatm, mapconsf, 'one', lnd2atm_fmap)
call addmrg(fldListTo(compatm)%flds, 'Fall_fco2_lnd', &
mrg_from1=complnd, mrg_fld1='Fall_fco2_lnd', mrg_type1='copy_with_weights', mrg_fracname1='lfrac')
end if
Expand All @@ -1958,7 +1956,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
call addfld(fldListFr(compocn)%flds, 'Faoo_fco2_ocn')
call addfld(fldListTo(compatm)%flds, 'Faoo_fco2_ocn')
else
call addmap(fldListFr(compocn)%flds, 'Faoo_fco2_ocn', compatm, mapconsf, 'one', atm2lnd_smap)
call addmap(fldListFr(compocn)%flds, 'Faoo_fco2_ocn', compatm, mapconsf, 'one', ocn2atm_fmap)
! custom merge in med_phases_prep_atm
end if
endif
Expand Down
Loading