Skip to content

Commit

Permalink
Merge branch 'master' into feature/new_comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b authored Mar 8, 2022
2 parents 151a09f + 31ba51f commit 08795b7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
1 change: 1 addition & 0 deletions cime_config/buildlib
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def buildlib(bldroot, libroot, case):
cmake_flags += " -DCMAKE_INSTALL_PREFIX:PATH=/"
cmake_flags += " -DLIBROOT={} ".format(libroot)
cmake_flags += " -DMPILIB={} ".format(mpilib)
cmake_flags += " -DSRCROOT={} ".format(case.get_value("SRCROOT"))
cmake_flags += " -DPIO_C_LIBRARY={path}/lib -DPIO_C_INCLUDE_DIR={path}/include ".format(path=os.path.join(case.get_value("EXEROOT"),sharedpath))
cmake_flags += " -DPIO_Fortran_LIBRARY={path}/lib -DPIO_Fortran_INCLUDE_DIR={path}/include ".format(path=os.path.join(case.get_value("EXEROOT"),sharedpath))
cmake_flags += srcpath
Expand Down
2 changes: 1 addition & 1 deletion streams/dshr_strdata_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ subroutine shr_strdata_readLBUB(sdat, ns, mDate, mSec, newData, istr, rc)
call ESMF_TraceRegionExit(trim(istr)//'_setup')

! if model current date is outside of model lower or upper bound - find the stream bounds
if (rDateM < rDateLB .or. rDateM > rDateUB) then
if (rDateM < rDateLB .or. rDateM >= rDateUB) then
call ESMF_TraceRegionEnter(trim(istr)//'_fbound')
call shr_stream_findBounds(stream, mDate, mSec, sdat%mainproc, &
sdat%pstrm(ns)%ymdLB, dDateLB, sdat%pstrm(ns)%todLB, n_lb, filename_lb, &
Expand Down
1 change: 1 addition & 0 deletions streams/dshr_stream_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ subroutine shr_stream_init_from_esmfconfig(streamfilename, streamdat, logunit,
streamdat(i)%varlist(n)%nameinfile = strm_tmpstrings(n)(1:index(trim(strm_tmpstrings(n)), " "))
streamdat(i)%varlist(n)%nameinmodel = strm_tmpstrings(n)(index(trim(strm_tmpstrings(n)), " ", .true.)+1:)
enddo
deallocate(strm_tmpstrings)
else
call shr_sys_abort("stream data variables must be provided")
endif
Expand Down
19 changes: 5 additions & 14 deletions streams/dshr_tinterp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -238,27 +238,18 @@ subroutine shr_tInterp_getAvgCosz(tavCosz, lon, lat, &

do while( reday < reday2) ! mid-interval t-steps thru interval [LB,UB]

!--- get next cosz value for t-avg ---
call shr_tInterp_getCosz(cosz,lon,lat,ymd,tod,eccen,mvelpp,lambm0,obliqr,calendar)
n = n + ldt
tavCosz = tavCosz + cosz*real(ldt,r8) ! add to partial sum

!--- advance to next time in [LB,UB] ---
ymd0 = ymd
tod0 = tod
reday0 = reday
call shr_cal_advDateInt(ldt,'seconds',ymd0,tod0,ymd,tod,calendar)
call shr_cal_timeSet(reday,ymd,tod,calendar)

if (reday > reday2) then
ymd = ymd2
tod = tod2
timeint = reday2-reday0
call ESMF_TimeIntervalGet(timeint, s_i8=dtsec, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
ldt = int(dtsec, shr_kind_in)
endif

!--- get next cosz value for t-avg ---
call shr_tInterp_getCosz(cosz,lon,lat,ymd,tod,eccen,mvelpp,lambm0,obliqr,calendar)
n = n + ldt
tavCosz = tavCosz + cosz*real(ldt,r8) ! add to partial sum

end do
tavCosz = tavCosz/real(n,r8) ! form t-avg

Expand Down

0 comments on commit 08795b7

Please sign in to comment.