Hi,
I have overloaded a routine trcr_get by two different implementations and gfortran is giving me a "Error: Ambiguous interfaces 'trcr_getbyindex' and 'trcr_getbyname' in generic interface 'trcr_get'" which I don't really understand. The first two arguments are non-optional and positional and since the second one is of a different type (INTEGER vs. CHARACTER(LEN=*)) I don't really understand why the interfaces are ambiguous. Any ideas/help of how to disambiguate the situation would be appreciated!
Cheers,
Oli
SUBROUTINE trcr_getbyindex ( ierr, idx_trcr, ptr_tlev, yshort_name, yparent, &
yunits, ystandard_name, ylong_name, ylevtyp, &
igribrep, igribparam, igribtable, itype_adv, &
itype_diff, itype_turbmix, ltens, itype_ini, &
itype_lbc, itype_bbc, itype_clip, idx_bd, &
idx_tens, ptr, ptr_bd, ptr_tens )
IMPLICIT NONE
INTEGER(KIND=iintegers) ,INTENT(OUT) :: ierr !error status
INTEGER(KIND=iintegers) ,INTENT(IN) :: idx_trcr !index for tracer data
INTEGER(KIND=iintegers) ,INTENT(IN) ,OPTIONAL:: ptr_tlev !time level for pointer
CHARACTER(LEN=*) ,INTENT(OUT),OPTIONAL:: yshort_name !name of tracer
CHARACTER(LEN=*) ,INTENT(OUT),OPTIONAL:: yparent !name of parent module
CHARACTER(LEN=*) ,INTENT(OUT),OPTIONAL:: yunits !units
CHARACTER(LEN=*) ,INTENT(OUT),OPTIONAL:: ystandard_name !stand. name
CHARACTER(LEN=*) ,INTENT(OUT),OPTIONAL:: ylong_name !long name
CHARACTER(LEN=*) ,INTENT(OUT),OPTIONAL:: ylevtyp !level type (GRIB2)
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: igribrep !repetition of combin. GRIB
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: igribparam !GRIB param number
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: igribtable !GRIB table number
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: itype_adv !advection type
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: itype_diff !artif diffusion
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: itype_turbmix !turb mixing
LOGICAL ,INTENT(OUT),OPTIONAL:: ltens !has tendency?
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: itype_ini !type of IC
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: itype_lbc !type of lat. BC
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: itype_bbc !type of bottom BC
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: itype_clip !clipping type
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: idx_bd !index for tracer boundary
INTEGER(KIND=iintegers) ,INTENT(OUT),OPTIONAL:: idx_tens !index for tracer tendency
REAL(KIND=ireals),POINTER,INTENT(OUT),OPTIONAL:: ptr(:,:,:) !pointer to tracer
REAL(KIND=ireals),POINTER,INTENT(OUT),OPTIONAL:: ptr_bd(:,:,:,:)!pointer to tracer boundary
REAL(KIND=ireals),POINTER,INTENT(OUT),OPTIONAL:: ptr_tens(:,:,:)!pointer to tracer tendency
SUBROUTINE trcr_getbyname ( ierr, yshort_name, ptr_tlev, idx_trcr, yparent, &
yunits, ystandard_name, ylong_name, ylevtyp, &
igribrep, igribparam, igribtable, itype_adv, &
itype_diff, itype_turbmix, ltens, itype_ini, &
itype_lbc, itype_bbc, itype_clip, idx_bd, &
idx_tens, ptr, ptr_bd, ptr_tens)
IMPLICIT NONE
INTEGER (KIND=iintegers),INTENT(OUT) ::ierr !error status
CHARACTER (LEN=*) ,INTENT(IN) ::yshort_name !name of tracer
INTEGER (KIND=iintegers),INTENT(IN) ,OPTIONAL ::ptr_tlev !time level for pointer
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::idx_trcr !index for tracer data
CHARACTER (LEN=*) ,INTENT(OUT),OPTIONAL ::yparent !name of parent module
CHARACTER (LEN=*) ,INTENT(OUT),OPTIONAL ::yunits !units
CHARACTER (LEN=*) ,INTENT(OUT),OPTIONAL ::ystandard_name !standard name
CHARACTER (LEN=*) ,INTENT(OUT),OPTIONAL ::ylong_name !long name
CHARACTER (LEN=*) ,INTENT(OUT),OPTIONAL ::ylevtyp !level type (GRIB2)
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::igribrep !repetition of combin.
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::igribparam !GRIB param num
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::iGRIBtable !GRIB table num
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::itype_adv !advection type
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::itype_diff !artif diff
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::itype_turbmix !turb mixing
LOGICAL ,INTENT(OUT),OPTIONAL ::ltens !has tendency?
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::itype_ini !type of IC
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::itype_lbc !type of lat. BC
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::itype_bbc !type of bottom BC
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::itype_clip !clippping
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::idx_bd !index for tracer bound.
INTEGER (KIND=iintegers),INTENT(OUT),OPTIONAL ::idx_tens !index for tracer tend.
REAL (KIND=ireals),POINTER,INTENT(OUT),OPTIONAL::ptr(:,:,:) !pointer to tracer
REAL (KIND=ireals),POINTER,INTENT(OUT),OPTIONAL::ptr_bd(:,:,:,:)!pointer to tracer
REAL (KIND=ireals),POINTER,INTENT(OUT),OPTIONAL::ptr_tens(:,:,:)!pointer to tracer
________________________________________
Oliver Fuhrer
Numerical Models
Federal Departement of Home Affairs FDHA
Federal Office of Meteorology and Climatology MeteoSwiss
Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland
Tel. +41 44 256 93 59
Fax +41 44 256 92 78
[log in to unmask]
www.meteoswiss.ch - First-hand information
|