2 MODULE Auxiliar_Procedures
4 INTEGER, SAVE :: AISO
!AISO=0, Anisotropic EZZ and ESUM
5 INTEGER, SAVE :: MTYPE
!MTYPE: 1-> ZBI, 2-> WZI, 3-> WZA
9 SUBROUTINE Param_Var(Ind_Par
,Dep_Par
,Step
,Relation
)
12 REAL, INTENT(INOUT
) :: Ind_Par
13 REAL, OPTIONAL
, INTENT(INOUT
) :: Dep_Par
14 REAL, INTENT(IN
) :: Step
15 CHARACTER (LEN
= * ), INTENT(IN
) :: Relation
18 SELECT
CASE (TRIM(Relation
))
22 Ind_Par
= Ind_Par
+ Step
25 IF(.NOT
. PRESENT(Dep_Par
) ) THEN
26 write(6,*)"Box_Size error. Optional argument Dep_Par Needed!"
29 Dep_Par
= Dep_Par
/Ind_Par
* (Ind_Par
+Step
)
30 Ind_Par
= Ind_Par
+ Step
34 IF(.NOT
. PRESENT(Dep_Par
) ) THEN
35 write(6,*)"Box_Size error. Optional argument Dep_Par Needed!"
38 Dep_Par
= Dep_Par
+ Step
39 Ind_Par
= Ind_Par
+ Step
45 END SUBROUTINE Param_Var
48 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
49 ! Integration: Simpson's method (version REAL) !
51 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
53 REAL FUNCTION RSIMPSON(F
,XINC
,NX
)
56 !!!!! variables 'dummy' y variables internas !!!!!!!!!!!!!!!!!!!!!!!!!!!
63 RSIMPSON
= RSIMPSON
+F(I
)
66 RSIMPSON
= 2.E0
*RSIMPSON
69 RSIMPSON
= RSIMPSON
+F(I
)
72 RSIMPSON
= 2.E0
*RSIMPSON
+F(0)+F(NX
)
73 RSIMPSON
= XINC
*RSIMPSON
/3.E0
79 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
81 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
83 INTEGER FUNCTION IDELTA(I
,J
)
86 !!!!! 'dummy' and local variables !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
97 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
99 ! Internal subroutine - checks error status after each netcdf, prints out text message each time
100 ! an error code is returned.
101 SUBROUTINE check(status
)
102 USE NETCDF
, ONLY
: nf90_noerr
, nf90_strerror
103 integer, intent ( in
) :: status
105 if(status
/= nf90_noerr
) then
106 print *, trim(nf90_strerror(status
))
110 END MODULE Auxiliar_Procedures