libsim Versione 7.1.11

◆ 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 811 del file vol7d_network_class.F90.

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