libsim Versione 7.1.11

◆ pack_distinct_sorted_network()

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

compatta gli elementi distinti di vect in un sorted array

Definizione alla linea 629 del file vol7d_network_class.F90.

631! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
632! authors:
633! Davide Cesari <dcesari@arpa.emr.it>
634! Paolo Patruno <ppatruno@arpa.emr.it>
635
636! This program is free software; you can redistribute it and/or
637! modify it under the terms of the GNU General Public License as
638! published by the Free Software Foundation; either version 2 of
639! the License, or (at your option) any later version.
640
641! This program is distributed in the hope that it will be useful,
642! but WITHOUT ANY WARRANTY; without even the implied warranty of
643! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
644! GNU General Public License for more details.
645
646! You should have received a copy of the GNU General Public License
647! along with this program. If not, see <http://www.gnu.org/licenses/>.
648#include "config.h"
649
657USE kinds
660IMPLICIT NONE
661
662integer, parameter :: network_name_len=20
663
668TYPE vol7d_network
669 character(len=network_name_len) :: name
670END TYPE vol7d_network
671
673TYPE(vol7d_network),PARAMETER :: vol7d_network_miss=vol7d_network(cmiss)
674
678INTERFACE init
679 MODULE PROCEDURE vol7d_network_init
680END INTERFACE
681
684INTERFACE delete
685 MODULE PROCEDURE vol7d_network_delete
686END INTERFACE
687
691INTERFACE OPERATOR (==)
692 MODULE PROCEDURE vol7d_network_eq
693END INTERFACE
694
698INTERFACE OPERATOR (/=)
699 MODULE PROCEDURE vol7d_network_ne
700END INTERFACE
701
705INTERFACE OPERATOR (>)
706 MODULE PROCEDURE vol7d_network_gt
707END INTERFACE
708
712INTERFACE OPERATOR (<)
713 MODULE PROCEDURE vol7d_network_lt
714END INTERFACE
715
719INTERFACE OPERATOR (>=)
720 MODULE PROCEDURE vol7d_network_ge
721END INTERFACE
722
726INTERFACE OPERATOR (<=)
727 MODULE PROCEDURE vol7d_network_le
728END INTERFACE
729
730#define VOL7D_POLY_TYPE TYPE(vol7d_network)
731#define VOL7D_POLY_TYPES _network
732#define ENABLE_SORT
733#include "array_utilities_pre.F90"
734
736INTERFACE display
737 MODULE PROCEDURE display_network
738END INTERFACE
739
741INTERFACE c_e
742 MODULE PROCEDURE c_e_network
743END INTERFACE
744
746INTERFACE to_char
747 MODULE PROCEDURE to_char_network
748END INTERFACE
749
750CONTAINS
751
757FUNCTION vol7d_network_new(name) RESULT(this)
758CHARACTER(len=*),INTENT(in),OPTIONAL :: name
759
760TYPE(vol7d_network) :: this
761
762CALL init(this, name)
763
764END FUNCTION vol7d_network_new
765
766
770SUBROUTINE vol7d_network_init(this, name)
771TYPE(vol7d_network),INTENT(INOUT) :: this
772CHARACTER(len=*),INTENT(in),OPTIONAL :: name
773
774IF (PRESENT(name)) THEN
775 this%name = lowercase(name)
776ELSE
777 this%name = cmiss
778END IF
779
780END SUBROUTINE vol7d_network_init
781
782
784SUBROUTINE vol7d_network_delete(this)
785TYPE(vol7d_network),INTENT(INOUT) :: this
786
787this%name = cmiss
788
789END SUBROUTINE vol7d_network_delete
790
791
792subroutine display_network(this)
793
794TYPE(vol7d_network),INTENT(in) :: this
795
796print*,to_char_network(this)
797
798end subroutine display_network
799
800
801elemental function c_e_network(this) result(res)
802
803TYPE(vol7d_network),INTENT(in) :: this
804logical :: res
805
806res = .not. this == vol7d_network_miss
807
808end function c_e_network
809
810
811elemental character(len=20) function to_char_network(this)
812
813TYPE(vol7d_network),INTENT(in) :: this
814
815to_char_network="Network: "//trim(this%name)
816
817return
818
819end function to_char_network
820
821
822ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
823TYPE(vol7d_network),INTENT(IN) :: this, that
824LOGICAL :: res
825
826res = (this%name == that%name)
827
828END FUNCTION vol7d_network_eq
829
830
831ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
832TYPE(vol7d_network),INTENT(IN) :: this, that
833LOGICAL :: res
834
835res = .NOT.(this == that)
836
837END FUNCTION vol7d_network_ne
838
839
840ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
841TYPE(vol7d_network),INTENT(IN) :: this, that
842LOGICAL :: res
843
844res = this%name > that%name
845
846END FUNCTION vol7d_network_gt
847
848ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
849TYPE(vol7d_network),INTENT(IN) :: this, that
850LOGICAL :: res
851
852res = this%name < that%name
853
854END FUNCTION vol7d_network_lt
855
856
857ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
858TYPE(vol7d_network),INTENT(IN) :: this, that
859LOGICAL :: res
860
861res = this%name >= that%name
862
863END FUNCTION vol7d_network_ge
864
865ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
866TYPE(vol7d_network),INTENT(IN) :: this, that
867LOGICAL :: res
868
869res = this%name <= that%name
870
871END FUNCTION vol7d_network_le
872
873
874#include "array_utilities_inc.F90"
875
876
877END 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.