Is it right to have optional component in the derived type. For example, the variable 'fname_new' in the code snippet below. If not, what is the way around? I want to include 'fname_new' optionally depending upon whether the source is of type 1 or 2.
TYPE, PUBLIC :: species
CHARACTER(LEN=12) :: spname
CHARACTER(LEN=12) :: source
CHARACTER(LEN=20) :: fname
CHARACTER(LEN=12) :: field
CHARACTER(LEN=20),OPTIONAL :: fname_new
END TYPE species