I tried compiling the grid.f90 file using f2py but I get a 'failed with exit status 1' error.
static int f2py_size(PyArrayObject* var, ...)
^
221 warnings generated.
220 warnings generated.
./grid.f90:1:132:
1 | subroutine echo_top_height(r, azi_level0, azi_ref, azi_iter, refl_ref, refl_iter, elev_ref, elev_iter, elev_level0, eth_thld, ethin, eth, nr, na0, nar, nai)
| 1
Error: Line truncated at (1) [-Werror=line-truncation]
./grid.f90:1:132:
1 | subroutine echo_top_height(r, azi_level0, azi_ref, azi_iter, refl_ref, refl_iter, elev_ref, elev_iter, elev_level0, eth_thld, ethin, eth, nr, na0, nar, nai)
| 1
Error: Invalid character in name at (1)
./grid.f90:6:48:
6 | real(kind=8), intent(in), dimension(nr) :: r
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:7:58:
7 | real(kind=8), intent(in), dimension(na0) :: azi_level0
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:8:55:
8 | real(kind=8), intent(in), dimension(nar) :: azi_ref
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:9:56:
9 | real(kind=8), intent(in), dimension(nai) :: azi_iter
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:10:60:
10 | real(kind=8), intent(in), dimension(nar, nr) :: refl_ref
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:11:61:
11 | real(kind=8), intent(in), dimension(nai, nr) :: refl_iter
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:13:57:
13 | real(kind=8), intent(in), dimension(na0, nr) :: ethin
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:14:56:
14 | real(kind=8), intent(out), dimension(na0, nr) :: eth
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:18:58:
18 | real(kind=8), dimension(nr) :: ground_range_reference, ground_range_slice, ground_range_level0
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:46:58:
46 | if ((npos >= nr).AND.(dabs(ground_range_slice(npos) - gr_ref) < 500)) then
| 1
Error: Syntax error in argument list at (1)
./grid.f90:51:15:
51 | endif
| 1
Error: Expecting END DO statement at (1)
./grid.f90:66:3:
66 | end subroutine echo_top_height
| 1
Error: Expecting END PROGRAM statement at (1)
./grid.f90:70:17:
70 | implicit none
| 1
Error: Duplicate IMPLICIT NONE statement at (1)
./grid.f90:72:55:
72 | integer(kind=4), intent(in) :: nx, ny, nxrad, nyrad
| 1
Error: Unexpected data declaration statement at (1)
./grid.f90:73:40:
73 | real(kind=8), intent(in) :: theta3db
| 1
Error: Unexpected data declaration statement at (1)
./grid.f90:74:52:
74 | real(kind=8), intent(in), dimension(nx) :: xgrid
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:75:52:
75 | real(kind=8), intent(in), dimension(ny) :: ygrid
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:76:63:
76 | real(kind=8), intent(in), dimension(nyrad, nxrad) :: xradar
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:77:63:
77 | real(kind=8), intent(in), dimension(nyrad, nxrad) :: yradar
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:78:65:
78 | real(kind=8), intent(in), dimension(nyrad, nxrad) :: cloudtop
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:80:59:
80 | real(kind=8), intent(out), dimension(ny, nx) :: eth_out
| 1
Error: Explicit shaped array with nonconstant bounds at (1)
./grid.f90:83:26:
83 | integer(kind=4) :: cnt
| 1
Error: Unexpected data declaration statement at (1)
./grid.f90:84:24:
84 | integer(kind=4) :: i, j, k, l
| 1
Error: Symbol 'i' at (1) already has basic type of INTEGER
./grid.f90:85:41:
85 | integer(kind=4) :: stx, sty, edx, edy
| 1
Error: Unexpected data declaration statement at (1)
./grid.f90:86:34:
86 | real(kind=8) :: xi, yi, xr, yr
| 1
Error: Unexpected data declaration statement at (1)
./grid.f90:87:31:
87 | real(kind=8) :: width, rmax
| 1
Error: Unexpected data declaration statement at (1)
./grid.f90:88:24:
88 | real(kind=8) :: zmax
| 1
Error: Unexpected data declaration statement at (1)
./grid.f90:126:3:
126 | end subroutine grid_radar
| 1
Error: Expecting END PROGRAM statement at (1)
I am guessing this has something to do with python 3.8. Any ideas on how to proceed and avoid these errors?