libsim Versione 7.1.11

◆ pack_distinct_network()

type(vol7d_network) function, dimension(dim) pack_distinct_network ( type(vol7d_network), dimension(:), intent(in)  vect,
integer, intent(in)  dim,
logical, dimension(:), intent(in), optional  mask,
logical, intent(in), optional  back 
)

compatta gli elementi distinti di vect in un array

Definizione alla linea 662 del file vol7d_network_class.F90.

664! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
665! authors:
666! Davide Cesari <dcesari@arpa.emr.it>
667! Paolo Patruno <ppatruno@arpa.emr.it>
668
669! This program is free software; you can redistribute it and/or
670! modify it under the terms of the GNU General Public License as
671! published by the Free Software Foundation; either version 2 of
672! the License, or (at your option) any later version.
673
674! This program is distributed in the hope that it will be useful,
675! but WITHOUT ANY WARRANTY; without even the implied warranty of
676! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
677! GNU General Public License for more details.
678
679! You should have received a copy of the GNU General Public License
680! along with this program. If not, see <http://www.gnu.org/licenses/>.
681#include "config.h"
682
690USE kinds
693IMPLICIT NONE
694
695integer, parameter :: network_name_len=20
696
701TYPE vol7d_network
702 character(len=network_name_len) :: name
703END TYPE vol7d_network
704
706TYPE(vol7d_network),PARAMETER :: vol7d_network_miss=vol7d_network(cmiss)
707
711INTERFACE init
712 MODULE PROCEDURE vol7d_network_init
713END INTERFACE
714
717INTERFACE delete
718 MODULE PROCEDURE vol7d_network_delete
719END INTERFACE
720
724INTERFACE OPERATOR (==)
725 MODULE PROCEDURE vol7d_network_eq
726END INTERFACE
727
731INTERFACE OPERATOR (/=)
732 MODULE PROCEDURE vol7d_network_ne
733END INTERFACE
734
738INTERFACE OPERATOR (>)
739 MODULE PROCEDURE vol7d_network_gt
740END INTERFACE
741
745INTERFACE OPERATOR (<)
746 MODULE PROCEDURE vol7d_network_lt
747END INTERFACE
748
752INTERFACE OPERATOR (>=)
753 MODULE PROCEDURE vol7d_network_ge
754END INTERFACE
755
759INTERFACE OPERATOR (<=)
760 MODULE PROCEDURE vol7d_network_le
761END INTERFACE
762
763#define VOL7D_POLY_TYPE TYPE(vol7d_network)
764#define VOL7D_POLY_TYPES _network
765#define ENABLE_SORT
766#include "array_utilities_pre.F90"
767
769INTERFACE display
770 MODULE PROCEDURE display_network
771END INTERFACE
772
774INTERFACE c_e
775 MODULE PROCEDURE c_e_network
776END INTERFACE
777
779INTERFACE to_char
780 MODULE PROCEDURE to_char_network
781END INTERFACE
782
783CONTAINS
784
790FUNCTION vol7d_network_new(name) RESULT(this)
791CHARACTER(len=*),INTENT(in),OPTIONAL :: name
792
793TYPE(vol7d_network) :: this
794
795CALL init(this, name)
796
797END FUNCTION vol7d_network_new
798
799
803SUBROUTINE vol7d_network_init(this, name)
804TYPE(vol7d_network),INTENT(INOUT) :: this
805CHARACTER(len=*),INTENT(in),OPTIONAL :: name
806
807IF (PRESENT(name)) THEN
808 this%name = lowercase(name)
809ELSE
810 this%name = cmiss
811END IF
812
813END SUBROUTINE vol7d_network_init
814
815
817SUBROUTINE vol7d_network_delete(this)
818TYPE(vol7d_network),INTENT(INOUT) :: this
819
820this%name = cmiss
821
822END SUBROUTINE vol7d_network_delete
823
824
825subroutine display_network(this)
826
827TYPE(vol7d_network),INTENT(in) :: this
828
829print*,to_char_network(this)
830
831end subroutine display_network
832
833
834elemental function c_e_network(this) result(res)
835
836TYPE(vol7d_network),INTENT(in) :: this
837logical :: res
838
839res = .not. this == vol7d_network_miss
840
841end function c_e_network
842
843
844elemental character(len=20) function to_char_network(this)
845
846TYPE(vol7d_network),INTENT(in) :: this
847
848to_char_network="Network: "//trim(this%name)
849
850return
851
852end function to_char_network
853
854
855ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
856TYPE(vol7d_network),INTENT(IN) :: this, that
857LOGICAL :: res
858
859res = (this%name == that%name)
860
861END FUNCTION vol7d_network_eq
862
863
864ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
865TYPE(vol7d_network),INTENT(IN) :: this, that
866LOGICAL :: res
867
868res = .NOT.(this == that)
869
870END FUNCTION vol7d_network_ne
871
872
873ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
874TYPE(vol7d_network),INTENT(IN) :: this, that
875LOGICAL :: res
876
877res = this%name > that%name
878
879END FUNCTION vol7d_network_gt
880
881ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
882TYPE(vol7d_network),INTENT(IN) :: this, that
883LOGICAL :: res
884
885res = this%name < that%name
886
887END FUNCTION vol7d_network_lt
888
889
890ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
891TYPE(vol7d_network),INTENT(IN) :: this, that
892LOGICAL :: res
893
894res = this%name >= that%name
895
896END FUNCTION vol7d_network_ge
897
898ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
899TYPE(vol7d_network),INTENT(IN) :: this, that
900LOGICAL :: res
901
902res = this%name <= that%name
903
904END FUNCTION vol7d_network_le
905
906
907#include "array_utilities_inc.F90"
908
909
910END MODULE vol7d_network_class
Check object presence.
Distruttore per la classe vol7d_network.
Costruttore per la classe vol7d_network.
return network object in a pretty string
Utilities for CHARACTER variables.
Definition of constants to be used for declaring variables of a desired type.
Definition: kinds.F90:251
Definitions of constants and functions for working with missing values.
Classe per la gestione delle reti di stazioni per osservazioni meteo e affini.
Definisce la rete a cui appartiene una stazione.

Generated with Doxygen.