Skip to content

Commit

Permalink
Merge pull request #35 from GEOS-ESM/feature/avg_sun_stepsize
Browse files Browse the repository at this point in the history
add step size for average sun angle
  • Loading branch information
bena-nasa authored Sep 5, 2019
2 parents 4229bd1 + 2c792a6 commit c9c3477
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy (SET CMP0054 NEW)

project (
MAPL
VERSION 1.1.1
VERSION 1.1.8
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

if (NOT COMMAND esma) # build as standalone project
Expand Down
4 changes: 2 additions & 2 deletions MAPL_Base/MAPL_sun_uc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ end subroutine MAPL_SunOrbitQuery
#define DIMENSIONS (:)
#define THE_SIZE (size(LONS,1))
recursive subroutine SOLAR_1D(LONS, LATS, ORBIT,ZTH,SLR,INTV,CLOCK, &
TIME,currTime,DIST,ZTHB,ZTHD,ZTH1,ZTHN,RC)
TIME,currTime,DIST,ZTHB,ZTHD,ZTH1,ZTHN,STEPSIZE,RC)
#include "sun.H"
end subroutine SOLAR_1D

Expand All @@ -470,7 +470,7 @@ end subroutine SOLAR_1D
#define DIMENSIONS (:,:)
#define THE_SIZE (size(LONS,1),size(LONS,2))
recursive subroutine SOLAR_2D(LONS, LATS, ORBIT,ZTH,SLR,INTV,CLOCK, &
TIME,currTime,DIST,ZTHB,ZTHD,ZTH1,ZTHN,RC)
TIME,currTime,DIST,ZTHB,ZTHD,ZTH1,ZTHN,STEPSIZE,RC)
#include "sun.H"
end subroutine SOLAR_2D
#undef DIMENSIONS
Expand Down
7 changes: 5 additions & 2 deletions MAPL_Base/sun.H
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
real, optional, intent(OUT) :: ZTHD DIMENSIONS
real, optional, intent(OUT) :: ZTH1 DIMENSIONS
real, optional, intent(OUT) :: ZTHN DIMENSIONS
real, optional, intent(IN) :: STEPSIZE
integer, optional, intent(OUT) :: RC

! Locals
Expand Down Expand Up @@ -177,8 +178,10 @@

call ESMF_TimeIntervalGet (INTV, S_R8=SECS, rc=STATUS)
VERIFY_(STATUS)

if(SECS>1500.) then

if(present(STEPSIZE)) then ! interval for integration
NT = nint(SECS/STEPSIZE)
else if(SECS>1500.) then
NT = nint(SECS/300.0)
else
NT = 5
Expand Down

0 comments on commit c9c3477

Please sign in to comment.