Skip to content

Commit ae95aa1

Browse files
author
José Gómez-Dans
committed
Changed the code to be explicit about typlidf, and recreated pyf file
1 parent 75d81db commit ae95aa1

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

prosail/prosail_fortran.pyf

+23-21
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
! -*- f90 -*-
22
! Note: the context of this file is case sensitive.
33

4-
python module prosail_fortran ! in
5-
interface ! in :prosail_fortran
6-
module mod_dataspec_p5b ! in :prosail_fortran:dataSpec_P5B.f90
4+
python module PROSAIL ! in
5+
interface ! in :PROSAIL
6+
module mod_dataspec_p5b ! in :PROSAIL:dataSpec_P5B.f90
77
real*8 dimension(2101) :: k_cm
88
integer*4 :: i
99
real*8 dimension(2101) :: ed
@@ -18,7 +18,7 @@ python module prosail_fortran ! in
1818
real*8 dimension(2101) :: es
1919
integer, parameter,optional :: nw=2101
2020
end module mod_dataspec_p5b
21-
subroutine run_prosail(n,cab,car,cbrown,cw,cm,lai,lidfa,lidfb,psoil,hspot,tts,tto,psi,retval) ! in :prosail_fortran:run_prosail.f90
21+
subroutine run_prosail(n,cab,car,cbrown,cw,cm,lai,lidfa,lidfb,rsoil,psoil,hspot,tts,tto,psi,typelidf,retval) ! in :PROSAIL:run_prosail.f90
2222
use mod_sail
2323
use mod_angle
2424
use mod_flag_util
@@ -34,14 +34,16 @@ python module prosail_fortran ! in
3434
real*8 intent(in) :: lai
3535
real*8 intent(in) :: lidfa
3636
real*8 intent(in) :: lidfb
37+
real*8 intent(in) :: rsoil
3738
real*8 intent(in) :: psoil
3839
real*8 intent(in) :: hspot
3940
real*8 intent(in) :: tts
4041
real*8 intent(in) :: tto
4142
real*8 intent(in) :: psi
43+
integer intent(in) :: typelidf
4244
real*8 dimension(2101),intent(out) :: retval
4345
end subroutine run_prosail
44-
subroutine prospect_5b(n,cab,car,cbrown,cw,cm,rt) ! in :prosail_fortran:prospect_5B.f90
46+
subroutine prospect_5b(n,cab,car,cbrown,cw,cm,rt) ! in :PROSAIL:prospect_5B.f90
4547
use mod_dataspec_p5b
4648
real*8 intent(in) :: n
4749
real*8 intent(in) :: cab
@@ -51,32 +53,32 @@ python module prosail_fortran ! in
5153
real*8 intent(in) :: cm
5254
real*8 dimension(2101,2),intent(out) :: rt
5355
end subroutine prospect_5b
54-
subroutine dladgen(a,b,freq) ! in :prosail_fortran:dladgen.f
56+
subroutine dladgen(a,b,freq) ! in :PROSAIL:dladgen.f
5557
real*8 :: a
5658
real*8 :: b
5759
real*8 dimension(13) :: freq
5860
end subroutine dladgen
59-
function dcum(a,b,t) ! in :prosail_fortran:dladgen.f
61+
function dcum(a,b,t) ! in :PROSAIL:dladgen.f
6062
real*8 :: a
6163
real*8 :: b
6264
real*8 :: t
6365
real*8 :: dcum
6466
end function dcum
65-
subroutine campbell(n,ala,freq) ! in :prosail_fortran:LIDF.f90
67+
subroutine campbell(n,ala,freq) ! in :PROSAIL:LIDF.f90
6668
integer*4, optional,check(len(freq)>=n),depend(freq) :: n=len(freq)
6769
real*8 :: ala
6870
real*8 dimension(n) :: freq
6971
end subroutine campbell
70-
subroutine calc_lidf_ellipsoidal(na,alpha,freqvar) ! in :prosail_fortran:LIDF.f90
72+
subroutine calc_lidf_ellipsoidal(na,alpha,freqvar) ! in :PROSAIL:LIDF.f90
7173
integer*4, optional,check(len(freqvar)>=na),depend(freqvar) :: na=len(freqvar)
7274
real*8 :: alpha
7375
real*8 dimension(na) :: freqvar
7476
end subroutine calc_lidf_ellipsoidal
75-
module mod_angle ! in :prosail_fortran:MODULE_PRO4SAIL.f90
77+
module mod_angle ! in :PROSAIL:MODULE_PRO4SAIL.f90
7678
real*8, save :: rd
7779
real*8, save :: pi
7880
end module mod_angle
79-
module mod_staticvar ! in :prosail_fortran:MODULE_PRO4SAIL.f90
81+
module mod_staticvar ! in :PROSAIL:MODULE_PRO4SAIL.f90
8082
real*8, save,allocatable,dimension(:) :: vb
8183
real*8, save :: sob
8284
real*8, save,allocatable,dimension(:) :: vf
@@ -104,12 +106,12 @@ python module prosail_fortran ! in
104106
real*8, save :: cto
105107
real*8, save :: ddf
106108
end module mod_staticvar
107-
module mod_output_prospect ! in :prosail_fortran:MODULE_PRO4SAIL.f90
109+
module mod_output_prospect ! in :PROSAIL:MODULE_PRO4SAIL.f90
108110
real*8, save,allocatable,dimension(:) :: tau
109111
real*8, save,allocatable,dimension(:,:) :: lrt
110112
real*8, save,allocatable,dimension(:) :: rho
111113
end module mod_output_prospect
112-
module mod_flag_util ! in :prosail_fortran:MODULE_PRO4SAIL.f90
114+
module mod_flag_util ! in :PROSAIL:MODULE_PRO4SAIL.f90
113115
real*8, save,allocatable,dimension(:) :: rsoil_old
114116
logical :: delta_soil
115117
logical :: delta_skyl
@@ -137,7 +139,7 @@ python module prosail_fortran ! in
137139
real*8, save :: car_old
138140
real*8, save :: lai_old
139141
end module mod_flag_util
140-
module mod_sail ! in :prosail_fortran:MODULE_PRO4SAIL.f90
142+
module mod_sail ! in :PROSAIL:MODULE_PRO4SAIL.f90
141143
real*8, save,allocatable,dimension(:) :: rso
142144
real*8, save,allocatable,dimension(:) :: tdo
143145
real*8, save,allocatable,dimension(:) :: rsd
@@ -158,7 +160,7 @@ python module prosail_fortran ! in
158160
real*8, save,allocatable,dimension(:) :: rdo
159161
real*8, save :: tss
160162
end module mod_sail
161-
subroutine pro4sail(n,cab,car,cbrown,cw,cm,lidfa,lidfb,typelidf,lai,q,tts,tto,psi,rsoil) ! in :prosail_fortran:PRO4SAIL.f90
163+
subroutine pro4sail(n,cab,car,cbrown,cw,cm,lidfa,lidfb,typelidf,lai,q,tts,tto,psi,rsoil) ! in :PROSAIL:PRO4SAIL.f90
162164
use mod_sail
163165
use mod_angle
164166
use mod_flag_util
@@ -181,34 +183,34 @@ python module prosail_fortran ! in
181183
real*8 intent(in) :: psi
182184
real*8 dimension(2101),intent(in) :: rsoil
183185
end subroutine pro4sail
184-
subroutine jfunc1(k,l,t,jout) ! in :prosail_fortran:PRO4SAIL.f90
186+
subroutine jfunc1(k,l,t,jout) ! in :PROSAIL:PRO4SAIL.f90
185187
use mod_dataspec_p5b
186188
real*8 intent(in) :: k
187189
real*8 dimension(2101),intent(in) :: l
188190
real*8 intent(in) :: t
189191
real*8 dimension(2101),intent(out) :: jout
190192
end subroutine jfunc1
191-
subroutine jfunc2(k,l,t,jout) ! in :prosail_fortran:PRO4SAIL.f90
193+
subroutine jfunc2(k,l,t,jout) ! in :PROSAIL:PRO4SAIL.f90
192194
use mod_dataspec_p5b
193195
real*8 intent(in) :: k
194196
real*8 dimension(2101),intent(in) :: l
195197
real*8 intent(in) :: t
196198
real*8 dimension(2101),intent(out) :: jout
197199
end subroutine jfunc2
198-
function jfunc3(k,l,t) ! in :prosail_fortran:PRO4SAIL.f90
200+
function jfunc3(k,l,t) ! in :PROSAIL:PRO4SAIL.f90
199201
use mod_dataspec_p5b
200202
real*8 :: k
201203
real*8 :: l
202204
real*8 :: t
203205
real*8 :: jfunc3
204206
end function jfunc3
205-
subroutine tav_abs(theta,refr,res) ! in :prosail_fortran:tav_abs.f90
207+
subroutine tav_abs(theta,refr,res) ! in :PROSAIL:tav_abs.f90
206208
use mod_dataspec_p5b
207209
real*8 intent(in) :: theta
208210
real*8 dimension(2101),intent(in) :: refr
209211
real*8 dimension(2101),intent(out) :: res
210212
end subroutine tav_abs
211-
subroutine volscatt(tts,tto,psi,ttl,chi_s,chi_o,frho,ftau) ! in :prosail_fortran:volscatt.f90
213+
subroutine volscatt(tts,tto,psi,ttl,chi_s,chi_o,frho,ftau) ! in :PROSAIL:volscatt.f90
212214
use mod_angle
213215
real*8 intent(in) :: tts
214216
real*8 intent(in) :: tto
@@ -220,7 +222,7 @@ python module prosail_fortran ! in
220222
real*8 intent(inout) :: ftau
221223
end subroutine volscatt
222224
end interface
223-
end python module prosail_fortran
225+
end python module PROSAIL
224226

225227
! This file was auto-generated with f2py (version:2).
226228
! See http://cens.ioc.ee/projects/f2py2e/

prosail/run_prosail.f90

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ SUBROUTINE run_prosail ( N, Cab, Car, Cbrown, Cw, Cm, lai, LIDFa, LIDFb, &
1717
REAL*8, intent(in) :: lai,LIDFa,LIDFb,psoil,rsoil
1818
REAL*8, intent(in) :: hspot
1919
REAL*8, intent(in) :: tts,tto,psi
20-
20+
INTEGER, intent(in) :: TypeLidf
2121
REAL*8,ALLOCATABLE,SAVE :: resh(:),resv(:)
2222
REAL*8,ALLOCATABLE,SAVE :: rsoil0(:),PARdiro(:),PARdifo(:)
23-
INTEGER :: TypeLidf,ii
23+
INTEGER :: ii
2424
REAL*8 :: ihot, skyl
2525
! ANGLE CONVERSION
2626
pi=3.151592d0

0 commit comments

Comments
 (0)