Skip to content

Commit

Permalink
Removing found_calendar var and corresponding check
Browse files Browse the repository at this point in the history
  • Loading branch information
mjs2369 committed Nov 6, 2024
1 parent 55eaccd commit 697792b
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions assimilation_code/modules/utilities/time_manager_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,8 @@ end function repeat_alarm
!=========================================================================

subroutine set_calendar_type_integer(mytype)

!------------------------------------------------------------------------
!
! Selects calendar for default mapping from time to date - if you know
! the magic integer for the calendar of interest.

Expand All @@ -684,7 +685,8 @@ end subroutine set_calendar_type_integer


subroutine set_calendar_type_string(calstring)

!------------------------------------------------------------------------
!
! Selects calendar for default mapping from time to date - given a string.

character(len=*), intent(in) :: calstring
Expand All @@ -693,7 +695,6 @@ subroutine set_calendar_type_string(calstring)

character(len=len(calstring)) :: str1
character(len=max_calendar_string_length) :: cstring
logical :: found_calendar = .false.

if ( .not. module_initialized ) call time_manager_init

Expand All @@ -715,34 +716,23 @@ subroutine set_calendar_type_string(calstring)

if ( cstring == 'NO_CALENDAR' ) then
calendar_type = NO_CALENDAR
found_calendar = .true.
elseif ( cstring == 'NO CALENDAR' ) then ! allow this as a synonym
calendar_type = NO_CALENDAR
found_calendar = .true.
elseif ( cstring == 'NONE' ) then ! also allow this
calendar_type = NO_CALENDAR
found_calendar = .true.
elseif ( cstring == 'THIRTY_DAY_MONTHS' ) then
calendar_type = THIRTY_DAY_MONTHS
found_calendar = .true.
elseif ( cstring == 'JULIAN' ) then
calendar_type = JULIAN
found_calendar = .true.
elseif ( cstring == 'NOLEAP' ) then
calendar_type = NOLEAP
found_calendar = .true.
elseif ( cstring == 'GREGORIAN_MARS' ) then
calendar_type = GREGORIAN_MARS
found_calendar = .true.
elseif ( cstring == 'SOLAR_MARS' ) then
calendar_type = SOLAR_MARS
found_calendar = .true.
elseif ( cstring == 'GREGORIAN' ) then
calendar_type = GREGORIAN
found_calendar = .true.
endif

if( .not. found_calendar ) then
else
write(errstring,*)'Unknown calendar ',calstring
call error_handler(E_ERR,'set_calendar_type_string',errstring,source)
endif
Expand Down

0 comments on commit 697792b

Please sign in to comment.