Skip to content

Commit

Permalink
Removing the subroutine use_default_state_variables as stated by the …
Browse files Browse the repository at this point in the history
…comment. The rest of the model_mods do not use a subroutine like this. The default is provided in the input namelist.

Added check in place of the subroutine calll to error out if the model_stat_variables nml entry is completely empty (model_stat_variables = ‘ ’)
  • Loading branch information
mjs2369 committed Oct 3, 2024
1 parent c7fefc3 commit 56ad321
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions models/cice-scm/model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -678,13 +678,12 @@ subroutine verify_state_variables(state_variables, ngood, table, kind_list, upda

ngood = 0

!>@todo deprecate. Remove a hidden 'default' set of variables.
!>@ The default is provided in the input namelist.

if ( state_variables(1) == ' ' ) then ! no model_state_variables namelist provided
call use_default_state_variables(state_variables)
string1 = 'model_nml:model_state_variables not specified using default variables'
call error_handler(E_MSG, 'verify_state_variables', string1, source)
! Including this check as well because the conditionals below do not pass and cause the
! code to error out when the model_state_variables namelist entry is completely empty
! (model_state_variables = '')
if ( state_variables(1) == ' ' ) then ! no model_state_variables namelist entry provided
string1 = 'model_nml:model_state_variables not specified'
call error_handler(E_ERR, 'verify_state_variables', string1, source)
endif

MyLoop : do i = 1, nrows
Expand Down Expand Up @@ -739,20 +738,6 @@ subroutine verify_state_variables(state_variables, ngood, table, kind_list, upda

end subroutine verify_state_variables

!------------------------------------------------------------------

subroutine use_default_state_variables(state_variables)

character(len=*), intent(inout) :: state_variables(:)

! strings must all be the same length for the gnu compiler
state_variables( 1:3*num_state_table_columns ) = &
(/ 'aicen ', 'QTY_SEAICE_CONCENTR ', 'UPDATE ', &
'vicen ', 'QTY_SEAICE_VOLUME ', 'UPDATE ', &
'vsnon ', 'QTY_SEAICE_SNOWVOLUME ', 'UPDATE '/)

end subroutine use_default_state_variables

!------------------------------------------------------------------
! Given a DART location (referred to as "base") and a set of
! candidate locations & kinds (locs, loc_qtys/indx), returns the
Expand Down

0 comments on commit 56ad321

Please sign in to comment.