Hello Forum,
In a very specific portion of a TELEMAC2D+SISYPHE coupled model I was wondering if I could "spatialize" the FRICTION OF THE ANGLE keyword value for my domain.
The workflow that I was sure to follow was to convert the internal alias "PHISED" to a vector-like inside the library and reading its values from the geometry file, following:
1) Definition of the spatially vaired friction angle using a custom variable in the geometry file.
2) Modification of the "PHISED" variable type and calculation within the sources:
- declarations_sisiphe.f: definition as a TYPE(bief_obj) and others like:
TYPE(BIEF_OBJ), INTENT(IN) :: PHISED
- BEDLOAD_EFFPNT.f: definition as a TYPE(bief_obj) and modification of the soulsby function:
ELSEIF(SLOPEFF.EQ.2) THEN
!
! TANPHI = TAN(PHISED*PI/180.D0)
!
DO I=1,NPOIN
!
TANPHI = TAN(PHISED%R(I)*PI/180.D0)
!
! COSINE AND SINE OF THE DIRECTION OF THE SLOPE
- bedload_main.f: definition as a TYPE(bief_obj)
- bedload_solidischarge.f: definition as a TYPE(bief_obj)
- lecdon_sisyphe.f: commenting line 446 (! PHISED = MOTREA( ADRESS(2, 25) )
3) Re-compile the TM sources again
4) Appending a user fortran similar to the "noerod.f" procedure to read a custom named variable and map it to the "PHISED" one
5) Test it using the YEN example.
Unfortunately this goes beyond my very basic FORTRAN/programming skills and something went wrong in the step 3, recompiling:
- completed: .../v7p3r1/sources/sisyphe/bedload_solvs_vf.f
/home/stark/opentelemac/v7p3r1/sources/sisyphe/bedload_main.f:21:13:
& PHISED, DEVIA, BETA2, BIJK,SEDCO,HOULE,
1
Error: PROCEDURE attribute conflicts with INTENT attribute in ‘phised’ at (1)
/home/stark/opentelemac/v7p3r1/sources/sisyphe/bedload_main.f:286:30:
& SLOPEFF,COEFPN,PHISED(I),
1
Error: Type mismatch in argument ‘phised’ at (1); passed TYPE(bief_obj) to REAL(8)
/home/stark/opentelemac/v7p3r1/sources/sisyphe/bedload_solidischarge.f:236:39:
& COEFPN,CALFA,SALFA,SLOPEFF,PHISED,DEVIA,BETA2,
1
Error: Type mismatch in argument ‘phised’ at (1); passed TYPE(bief_obj) to REAL(8)
- completed: .../v7p3r1/sources/sisyphe/cvsp_outputfiles.f
- completed: .../v7p3r1/sources/sisyphe/db.f
As the compiler mentions, somewhere in the library the call functions bedload_main and bedload_discharge subroutines expect to (still) get a REAL*8 value instead of a BIEF_OBJ vector.
I've tried searching as best as I could inside the doc.telemac.org if some declaration/routine is missing for switching the declaration but with no extra results.
So it must be something that a FORTRAN/TELEMAC newbie programmer like me is missing.
¿Is there an extra definition/procedure missing in my workflow?
¿Is this the right approach for spatializing a parameter like "PHISED"/FRICTION OF THE ANGLE within a telemac model?
Thanks,
José Díaz.