title: How to call and pass array from Fortran to python?
body: <p>I have Fortran main code. I wish to call a python program from my main Fortran code and pass the array between these two codes.</p>
  <p>I have seen several examples of F2py. It seems python codes serve as the main code. As I described before I want it the other way around.</p>
  <p>Let us have a subroutine inside the main Fortran code as:</p>
  <pre><code>subroutine test(nx,ny,mask)
    integer, intent(in) :: nx, ny
    integer, dimension(nx,ny), intent(inout) :: mask
    
    call someOperation(nx, ny, mask)
  end subroutine test
  </code></pre>
  <p>Now, <em>someOperation</em> is done in <strong>python</strong> and the multidimensional array with scalar values will be exchanged between Fortran and python.</p>
  <p>How can it be done?</p>