load_temperature Subroutine

private impure elemental subroutine load_temperature(this)

Uses

    • json_module
  • proc~~load_temperature~3~~UsesGraph proc~load_temperature~3 foropenai_Translation::Translation%load_temperature json_module json_module proc~load_temperature~3->json_module

Type Bound

Translation

Arguments

Type IntentOptional Attributes Name
class(Translation), intent(inout) :: this

Calls

proc~~load_temperature~3~~CallsGraph proc~load_temperature~3 foropenai_Translation::Translation%load_temperature destroy destroy proc~load_temperature~3->destroy get get proc~load_temperature~3->get initialize initialize proc~load_temperature~3->initialize load_file load_file proc~load_temperature~3->load_file

Called by

proc~~load_temperature~3~~CalledByGraph proc~load_temperature~3 foropenai_Translation::Translation%load_temperature proc~load_translation_data foropenai_Translation::Translation%load_Translation_data proc~load_translation_data->proc~load_temperature~3 proc~set_translation_data foropenai_Translation::Translation%set_Translation_data proc~set_translation_data->proc~load_translation_data program~test_translation test_Translation program~test_translation->proc~set_translation_data

Source Code

   elemental impure subroutine load_temperature(this)
      use json_module, only: json_file
      class(Translation), intent(inout) :: this
      type(json_file)                   :: json
      real                              :: tmp
      logical                           :: found
      call json%initialize()
      call json%load_file(trim(this%file_name))
      call json%get("Translation.temperature", tmp, found=found)
      if (found) this%temperature = tmp
      call json%destroy()
   end subroutine load_temperature