Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • mHM mHM
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 52
    • Issues 52
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • mhmmhm
  • mHMmHM
  • Merge requests
  • !108

V5 add run interfaces

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Sebastian Müller requested to merge muellese/mhm:v5_add_run_interfaces into develop Feb 10, 2022
  • Overview 0
  • Commits 8
  • Pipelines 4
  • Changes 7

Backport of the run interfaces from !94 (merged)

Refactor mhm_eval: copy everything into subroutines

  • remove PGI pre-processor directives

  • new module: mo_mhm_interface_run.f90

    use mo_mhm_interface_run, only : &
      mhm_interface_run_prepare, &
      mhm_interface_run_get_ndomains, &
      mhm_interface_run_prepare_domain, &
      mhm_interface_run_finished, &
      mhm_interface_run_do_time_step, &
      mhm_interface_run_write_output, &
      mhm_interface_run_update_optisim, &
      mhm_interface_run_finalize_domain, &
      mhm_interface_run_finalize
  • use subroutines for every step in the eval routine:

      ! prepare the mhm run
      call mhm_interface_run_prepare(parameterset, opti_domain_indices, present(runoff))
    
      ! get number of domains to loop over
      call mhm_interface_run_get_ndomains(nDomains)
    
      ! loop over Domains
      DomainLoop: do ii = 1, nDomains
    
        ! prepare current domain
        call mhm_interface_run_prepare_domain(ii, etOptiSim, twsOptiSim, neutronsOptiSim, smOptiSim)
    
        ! run time-loop at least once
        time_loop_finished = .false.
    
        ! Loop over time
        TimeLoop: do while(.not. time_loop_finished)
    
          ! do one time-step on current domain
          call mhm_interface_run_do_time_step()
    
          ! write output
          call mhm_interface_run_write_output()
    
          ! update optisim data
          call mhm_interface_run_update_optisim(etOptiSim, twsOptiSim, neutronsOptiSim, smOptiSim)
    
          ! check whether to run the time-loop further
          call mhm_interface_run_finished(time_loop_finished)
    
        end do TimeLoop !<< TIME STEPS LOOP
    
        ! finalize domain
        call mhm_interface_run_finalize_domain()
    
      end do DomainLoop !<< Domain LOOP
    
      ! SET RUNOFF OUTPUT VARIABLE; reset init-flag for MPR
      call mhm_interface_run_finalize(runoff)
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: v5_add_run_interfaces