libsim Versione 7.2.1

◆ map_distinct_network()

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

map distinct

Definizione alla linea 805 del file vol7d_network_class.F90.

806! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
807! authors:
808! Davide Cesari <dcesari@arpa.emr.it>
809! Paolo Patruno <ppatruno@arpa.emr.it>
810
811! This program is free software; you can redistribute it and/or
812! modify it under the terms of the GNU General Public License as
813! published by the Free Software Foundation; either version 2 of
814! the License, or (at your option) any later version.
815
816! This program is distributed in the hope that it will be useful,
817! but WITHOUT ANY WARRANTY; without even the implied warranty of
818! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
819! GNU General Public License for more details.
820
821! You should have received a copy of the GNU General Public License
822! along with this program. If not, see <http://www.gnu.org/licenses/>.
823#include "config.h"
824
832USE kinds
835IMPLICIT NONE
836
837integer, parameter :: network_name_len=20
838
843TYPE vol7d_network
844 character(len=network_name_len) :: name
845END TYPE vol7d_network
846
848TYPE(vol7d_network),PARAMETER :: vol7d_network_miss=vol7d_network(cmiss)
849
853INTERFACE init
854 MODULE PROCEDURE vol7d_network_init
855END INTERFACE
856
859INTERFACE delete
860 MODULE PROCEDURE vol7d_network_delete
861END INTERFACE
862
866INTERFACE OPERATOR (==)
867 MODULE PROCEDURE vol7d_network_eq
868END INTERFACE
869
873INTERFACE OPERATOR (/=)
874 MODULE PROCEDURE vol7d_network_ne
875END INTERFACE
876
880INTERFACE OPERATOR (>)
881 MODULE PROCEDURE vol7d_network_gt
882END INTERFACE
883
887INTERFACE OPERATOR (<)
888 MODULE PROCEDURE vol7d_network_lt
889END INTERFACE
890
894INTERFACE OPERATOR (>=)
895 MODULE PROCEDURE vol7d_network_ge
896END INTERFACE
897
901INTERFACE OPERATOR (<=)
902 MODULE PROCEDURE vol7d_network_le
903END INTERFACE
904
905#define VOL7D_POLY_TYPE TYPE(vol7d_network)
906#define VOL7D_POLY_TYPES _network
907#define ENABLE_SORT
908#include "array_utilities_pre.F90"
909
911INTERFACE display
912 MODULE PROCEDURE display_network
913END INTERFACE
914
916INTERFACE c_e
917 MODULE PROCEDURE c_e_network
918END INTERFACE
919
921INTERFACE to_char
922 MODULE PROCEDURE to_char_network
923END INTERFACE
924
925CONTAINS
926
932FUNCTION vol7d_network_new(name) RESULT(this)
933CHARACTER(len=*),INTENT(in),OPTIONAL :: name
934
935TYPE(vol7d_network) :: this
936
937CALL init(this, name)
938
939END FUNCTION vol7d_network_new
940
941
945SUBROUTINE vol7d_network_init(this, name)
946TYPE(vol7d_network),INTENT(INOUT) :: this
947CHARACTER(len=*),INTENT(in),OPTIONAL :: name
948
949IF (PRESENT(name)) THEN
950 this%name = lowercase(name)
951ELSE
952 this%name = cmiss
953END IF
954
955END SUBROUTINE vol7d_network_init
956
957
959SUBROUTINE vol7d_network_delete(this)
960TYPE(vol7d_network),INTENT(INOUT) :: this
961
962this%name = cmiss
963
964END SUBROUTINE vol7d_network_delete
965
966
967subroutine display_network(this)
968
969TYPE(vol7d_network),INTENT(in) :: this
970
971print*,to_char_network(this)
972
973end subroutine display_network
974
975
976elemental function c_e_network(this) result(res)
977
978TYPE(vol7d_network),INTENT(in) :: this
979logical :: res
980
981res = .not. this == vol7d_network_miss
982
983end function c_e_network
984
985
986elemental character(len=20) function to_char_network(this)
987
988TYPE(vol7d_network),INTENT(in) :: this
989
990to_char_network="Network: "//trim(this%name)
991
992return
993
994end function to_char_network
995
996
997ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
998TYPE(vol7d_network),INTENT(IN) :: this, that
999LOGICAL :: res
1000
1001res = (this%name == that%name)
1002
1003END FUNCTION vol7d_network_eq
1004
1005
1006ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
1007TYPE(vol7d_network),INTENT(IN) :: this, that
1008LOGICAL :: res
1009
1010res = .NOT.(this == that)
1011
1012END FUNCTION vol7d_network_ne
1013
1014
1015ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
1016TYPE(vol7d_network),INTENT(IN) :: this, that
1017LOGICAL :: res
1018
1019res = this%name > that%name
1020
1021END FUNCTION vol7d_network_gt
1022
1023ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
1024TYPE(vol7d_network),INTENT(IN) :: this, that
1025LOGICAL :: res
1026
1027res = this%name < that%name
1028
1029END FUNCTION vol7d_network_lt
1030
1031
1032ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
1033TYPE(vol7d_network),INTENT(IN) :: this, that
1034LOGICAL :: res
1035
1036res = this%name >= that%name
1037
1038END FUNCTION vol7d_network_ge
1039
1040ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
1041TYPE(vol7d_network),INTENT(IN) :: this, that
1042LOGICAL :: res
1043
1044res = this%name <= that%name
1045
1046END FUNCTION vol7d_network_le
1047
1048
1049#include "array_utilities_inc.F90"
1050
1051
1052END MODULE vol7d_network_class
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:245
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.