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

add step size for average sun angle #35

Merged
merged 3 commits into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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