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

Jwy/time showing #36

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
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 libslam
25 changes: 13 additions & 12 deletions src/neptuneClass.f90
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ module neptuneClass
! Variables
!
!-----------------------------------------------------------------------
integer :: output_step ! output time step in seconds, 5 mins as default
integer, public :: input_type_cov ! input type for covariance matrix

logical, dimension(2), public :: flag_init_tolerances ! rel. and abs. tolerance initialization for numerical integration
Expand All @@ -145,6 +144,7 @@ module neptuneClass
type(covariance_t) :: initial_covariance !< initial covariance matrix written to output

real(dp) :: progress_step !< step threshold for progress output to file
real(dp) :: output_step ! output time step that can touch double precision

!=======================================================================
!
Expand Down Expand Up @@ -286,7 +286,7 @@ type(Neptune_class) function constructor()
constructor%reduction = Reduction_type()
constructor%correlation_model = Correlation_class()

constructor%output_step = 300 ! output time step in seconds, 5 mins as default
constructor%output_step = 300.0 ! output time step in seconds, 5 mins as default
constructor%input_type_cov = INPUT_UNDEFINED ! input type for covariance matrix

constructor%flag_init_tolerances = (/.false.,.false./) ! rel. and abs. tolerance initialization for numerical integration
Expand Down Expand Up @@ -463,7 +463,6 @@ subroutine initialize_input_array(this)
! INTEGER parameters
call this%set_input(parName=C_GEOPOTENTIAL, valType='integer', initFlag=.true.)
call this%set_input(parName=C_OPT_SAT_PROPERTIES, valType='integer', initFlag=.true.)
call this%set_input(parName=C_OUTPUT_STEP, valType='integer', initFlag=.true.)
call this%set_input(parName=C_PAR_INT_COV_METHOD, valType='integer', initFlag=.true.)
call this%set_input(parName=C_OPT_GEO_MODEL, valType='integer', initFlag=.true.)
call this%set_input(parName=C_OPT_AP_FORECAST, valType='integer', initFlag=.true.)
Expand All @@ -483,6 +482,7 @@ subroutine initialize_input_array(this)
call this%set_input(parName=C_PAR_INT_COV_STEP, valType='double', initFlag=.true.)
call this%set_input(parName=C_PAR_EARTH_RADIUS, valType='double', initFlag=.true.)
call this%set_input(parName=C_OPT_SOL_FORECAST, valType='double', initFlag=.true.)
call this%set_input(parName=C_OUTPUT_STEP, valType='double', initFlag=.true.) ! this should be double for the fix

! ON/OFF parameters (also set default values, if available)
do i = 1, this%derivatives_model%get_neptune_perturbation_number()
Expand Down Expand Up @@ -1713,7 +1713,7 @@ integer function setNeptuneVar_char( &
! CASE for INTEGER parameters
!
!------------------------
case(C_GEOPOTENTIAL, C_OPT_SAT_PROPERTIES, C_OUTPUT_STEP, C_PAR_INT_COV_METHOD, &
case(C_GEOPOTENTIAL, C_OPT_SAT_PROPERTIES, C_PAR_INT_COV_METHOD, &
C_OPT_GEO_MODEL, C_OPT_AP_FORECAST, C_OPT_STORE_DATA, C_COV_GEOPOTENTIAL, &
C_PAR_INT_METHOD, C_OPT_ATMOSPHERE_MODEL)

Expand Down Expand Up @@ -1761,12 +1761,6 @@ integer function setNeptuneVar_char( &
call this%set_input(parName=C_OPT_STORE_DATA, val=val, set=.true.)
call this%setStep(itemp)

!** Output
case(C_OUTPUT_STEP)
call this%set_input(parName=C_OUTPUT_STEP, val=val, set=.true.)
call this%output%write_to_output(C_OUTPUT_STEP, itemp)
this%output_step = itemp

!** state vector integration method
case(C_PAR_INT_METHOD)
call this%set_input(parName=C_PAR_INT_METHOD, val=val, set=.true.)
Expand All @@ -1791,7 +1785,7 @@ integer function setNeptuneVar_char( &
! CASE for REAL parameters
!
!-------------------------
case(C_PAR_MASS, C_PAR_CROSS_SECTION, C_PAR_CDRAG, &
case(C_PAR_MASS, C_PAR_CROSS_SECTION, C_PAR_CDRAG, C_OUTPUT_STEP, &
C_PAR_CREFL, C_PAR_REENTRY, C_PAR_INT_RELEPS, C_PAR_INT_ABSEPS, &
C_PAR_INT_COV_STEP, C_PAR_EARTH_RADIUS, &
C_OPT_SOL_FORECAST)
Expand Down Expand Up @@ -1860,6 +1854,12 @@ integer function setNeptuneVar_char( &
call this%set_input(parName=C_OPT_SOL_FORECAST, val=val, set=.true.)
call this%atmosphere_model%setSolarFluxForecast(dtemp)

!** Output
case(C_OUTPUT_STEP)
call this%set_input(parName=C_OUTPUT_STEP, val=val, set=.true.)
call this%output%write_to_output(C_OUTPUT_STEP, itemp)
this%output_step = dtemp

end select

end if
Expand Down Expand Up @@ -2736,7 +2736,6 @@ subroutine initializeInputArray(this)
! INTEGER parameters
call this%set_input(parName=C_GEOPOTENTIAL, valType='integer', initFlag=.true.)
call this%set_input(parName=C_OPT_SAT_PROPERTIES, valType='integer', initFlag=.true.)
call this%set_input(parName=C_OUTPUT_STEP, valType='integer', initFlag=.true.)
call this%set_input(parName=C_PAR_INT_COV_METHOD, valType='integer', initFlag=.true.)
call this%set_input(parName=C_OPT_GEO_MODEL, valType='integer', initFlag=.true.)
call this%set_input(parName=C_OPT_AP_FORECAST, valType='integer', initFlag=.true.)
Expand All @@ -2756,6 +2755,8 @@ subroutine initializeInputArray(this)
call this%set_input(parName=C_PAR_INT_COV_STEP, valType='double', initFlag=.true.)
call this%set_input(parName=C_PAR_EARTH_RADIUS, valType='double', initFlag=.true.)
call this%set_input(parName=C_OPT_SOL_FORECAST, valType='double', initFlag=.true.)
call this%set_input(parName=C_OUTPUT_STEP, valType='double', initFlag=.true.) ! this should be double


! ON/OFF parameters (also set default values, if available)
do i = 1, this%derivatives_model%get_neptune_perturbation_number()
Expand Down
Loading