<commit_before>SUBROUTINE clawpack5_set_amr_module(mwaves_in,mcapa_in,mthlim_in, &
    method_in, use_fwaves_in)
  USE clawpack5_amr_module, ONLY: mwaves, mcapa, method, mthlim, use_fwaves
  IMPLICIT NONE

  INTEGER, INTENT(in) :: mwaves_in, mcapa_in, method_in(7)
  INTEGER, INTENT(in) :: mthlim_in(mwaves_in), use_fwaves_in

  integer :: mw

  mwaves = mwaves_in
  mcapa = mcapa_in
  method = method_in
!!  if (.not. allocated(mthlim)) then
!!      allocate(mthlim(mwaves))
!!  endif
  write(6,*) "length(mthlim)", size(mthlim)
  stop
  do mw = 1,mwaves
      mthlim(mw) = mthlim_in(mw)
  end do  
  use_fwaves = use_fwaves_in .ne. 0
END SUBROUTINE clawpack5_set_amr_module<commit_msg>(clawpack5) Fix check to mthlim length<commit_after>SUBROUTINE clawpack5_set_amr_module(mwaves_in,mcapa_in,mthlim_in, &
    method_in, use_fwaves_in)
  USE clawpack5_amr_module, ONLY: mwaves, mcapa, method, mthlim, use_fwaves, mthlim_len
  IMPLICIT NONE

  INTEGER, INTENT(in) :: mwaves_in, mcapa_in, method_in(7)
  INTEGER, INTENT(in) :: mthlim_in(mwaves_in), use_fwaves_in

  integer :: mw

  mwaves = mwaves_in
  mcapa = mcapa_in
  method = method_in
  if (mwaves .gt. mthlim_len) then
      write(6,'(A)') "clawpack5_set_amr_module : mwaves > mthlilm_len;  Increase size of mthlim_len in amr_module."
      stop
  endif 
  do mw = 1,mwaves
      mthlim(mw) = mthlim_in(mw)
  end do  
  use_fwaves = use_fwaves_in .ne. 0
END SUBROUTINE clawpack5_set_amr_module
{'fraction_non_alphanumeric': 0.09862068965517241, 'fraction_numerical': 0.011034482758620689, 'mean_word_length': 4.602316602316602, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5397318', 'n_tokens_mistral': 682, 'n_tokens_neox': 636, 'n_words': 122}