libsim Versione 7.2.6

◆ map_inv_distinct_network()

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

map inv distinct

Definizione alla linea 901 del file vol7d_network_class.F90.

903! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
904! authors:
905! Davide Cesari <dcesari@arpa.emr.it>
906! Paolo Patruno <ppatruno@arpa.emr.it>
907
908! This program is free software; you can redistribute it and/or
909! modify it under the terms of the GNU General Public License as
910! published by the Free Software Foundation; either version 2 of
911! the License, or (at your option) any later version.
912
913! This program is distributed in the hope that it will be useful,
914! but WITHOUT ANY WARRANTY; without even the implied warranty of
915! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
916! GNU General Public License for more details.
917
918! You should have received a copy of the GNU General Public License
919! along with this program. If not, see <http://www.gnu.org/licenses/>.
920#include "config.h"
921
922!> Classe per la gestione delle reti di stazioni per osservazioni meteo e affini.
923!! Questo modulo definisce una classe per identificare la rete
924!! a cui appartiene una stazione. Per rete si intende un insieme di stazioni
925!! omogenee per tipo di sensori, tipo di variabili osservate,
926!! frequenza delle osservazioni, formato dei dati.
927!! \ingroup vol7d
929USE kinds
932IMPLICIT NONE
933
934integer, parameter :: network_name_len=20
935
936!> Definisce la rete a cui appartiene una stazione.
937!! I membri di \a vol7d_network sono pubblici e quindi liberamente
938!! accessibili e scrivibili, ma è comunque consigliato assegnarli tramite
939!! il costruttore ::init.
940TYPE vol7d_network
941 character(len=network_name_len) :: name !< Mnemonic alias for type of report
942END TYPE vol7d_network
943
944!> Valore mancante per vol7d_network.
945TYPE(vol7d_network),PARAMETER :: vol7d_network_miss=vol7d_network(cmiss)
946
947!> Costruttore per la classe vol7d_network.
948!! Deve essere richiamato
949!! per tutti gli oggetti di questo tipo definiti in un programma.
950INTERFACE init
951 MODULE PROCEDURE vol7d_network_init
952END INTERFACE
953
954!> Distruttore per la classe vol7d_network.
955!! Distrugge l'oggetto in maniera pulita, assegnandogli un valore mancante.
956INTERFACE delete
957 MODULE PROCEDURE vol7d_network_delete
958END INTERFACE
959
960!> Logical equality operator for objects of \a vol7d_network class.
961!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
962!! of any shape.
963INTERFACE OPERATOR (==)
964 MODULE PROCEDURE vol7d_network_eq
965END INTERFACE
966
967!> Logical inequality operator for objects of \a vol7d_network class.
968!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
969!! of any shape.
970INTERFACE OPERATOR (/=)
971 MODULE PROCEDURE vol7d_network_ne
972END INTERFACE
973
974!> Logical greater-than operator for objects of \a vol7d_network class.
975!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
976!! of any shape.
977INTERFACE OPERATOR (>)
978 MODULE PROCEDURE vol7d_network_gt
979END INTERFACE
980
981!> Logical less-than operator for objects of \a vol7d_network class.
982!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
983!! of any shape.
984INTERFACE OPERATOR (<)
985 MODULE PROCEDURE vol7d_network_lt
986END INTERFACE
987
988!> Logical greater-equal operator for objects of \a vol7d_network class.
989!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
990!! of any shape.
991INTERFACE OPERATOR (>=)
992 MODULE PROCEDURE vol7d_network_ge
993END INTERFACE
994
995!> Logical less-equal operator for objects of \a vol7d_network class.
996!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
997!! of any shape.
998INTERFACE OPERATOR (<=)
999 MODULE PROCEDURE vol7d_network_le
1000END INTERFACE
1001
1002#define VOL7D_POLY_TYPE TYPE(vol7d_network)
1003#define VOL7D_POLY_TYPES _network
1004#define ENABLE_SORT
1005#include "array_utilities_pre.F90"
1006
1007!>Print object
1008INTERFACE display
1009 MODULE PROCEDURE display_network
1010END INTERFACE
1011
1012!>Check object presence
1013INTERFACE c_e
1014 MODULE PROCEDURE c_e_network
1015END INTERFACE
1016
1017!>return network object in a pretty string
1018INTERFACE to_char
1019 MODULE PROCEDURE to_char_network
1020END INTERFACE
1021
1022CONTAINS
1023
1024!> Inizializza un oggetto \a vol7d_network con i parametri opzionali forniti.
1025!! Questa è la versione \c FUNCTION, in stile F2003, del costruttore, da preferire
1026!! rispetto alla versione \c SUBROUTINE \c init.
1027!! Se non viene passato nessun parametro opzionale l'oggetto è
1028!! inizializzato a valore mancante.
1029FUNCTION vol7d_network_new(name) RESULT(this)
1030CHARACTER(len=*),INTENT(in),OPTIONAL :: name !< Mnemonic alias for type of report
1031
1032TYPE(vol7d_network) :: this !< oggetto da inizializzare
1033
1034CALL init(this, name)
1035
1036END FUNCTION vol7d_network_new
1037
1038
1039!> Inizializza un oggetto \a vol7d_network con i parametri opzionali forniti.
1040!! Se non viene passato nessun parametro opzionale l'oggetto è
1041!! inizializzato a valore mancante.
1042SUBROUTINE vol7d_network_init(this, name)
1043TYPE(vol7d_network),INTENT(INOUT) :: this !< oggetto da inizializzare
1044CHARACTER(len=*),INTENT(in),OPTIONAL :: name !< Mnemonic alias for type of report
1045
1046IF (PRESENT(name)) THEN
1047 this%name = lowercase(name)
1048ELSE
1049 this%name = cmiss
1050END IF
1051
1052END SUBROUTINE vol7d_network_init
1053
1054
1055!> Distrugge l'oggetto in maniera pulita, assegnandogli un valore mancante.
1056SUBROUTINE vol7d_network_delete(this)
1057TYPE(vol7d_network),INTENT(INOUT) :: this !< oggetto da distruggre
1058
1059this%name = cmiss
1060
1061END SUBROUTINE vol7d_network_delete
1062
1063
1064subroutine display_network(this)
1065
1066TYPE(vol7d_network),INTENT(in) :: this
1067
1068print*,to_char_network(this)
1069
1070end subroutine display_network
1071
1072
1073elemental function c_e_network(this) result(res)
1074
1075TYPE(vol7d_network),INTENT(in) :: this
1076logical :: res
1077
1078res = .not. this == vol7d_network_miss
1079
1080end function c_e_network
1081
1082
1083elemental character(len=20) function to_char_network(this)
1084
1085TYPE(vol7d_network),INTENT(in) :: this
1086
1087to_char_network="Network: "//trim(this%name)
1088
1089return
1090
1091end function to_char_network
1092
1093
1094ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
1095TYPE(vol7d_network),INTENT(IN) :: this, that
1096LOGICAL :: res
1097
1098res = (this%name == that%name)
1099
1100END FUNCTION vol7d_network_eq
1101
1102
1103ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
1104TYPE(vol7d_network),INTENT(IN) :: this, that
1105LOGICAL :: res
1106
1107res = .NOT.(this == that)
1108
1109END FUNCTION vol7d_network_ne
1110
1111
1112ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
1113TYPE(vol7d_network),INTENT(IN) :: this, that
1114LOGICAL :: res
1115
1116res = this%name > that%name
1117
1118END FUNCTION vol7d_network_gt
1119
1120ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
1121TYPE(vol7d_network),INTENT(IN) :: this, that
1122LOGICAL :: res
1123
1124res = this%name < that%name
1125
1126END FUNCTION vol7d_network_lt
1127
1128
1129ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
1130TYPE(vol7d_network),INTENT(IN) :: this, that
1131LOGICAL :: res
1132
1133res = this%name >= that%name
1134
1135END FUNCTION vol7d_network_ge
1136
1137ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
1138TYPE(vol7d_network),INTENT(IN) :: this, that
1139LOGICAL :: res
1140
1141res = this%name <= that%name
1142
1143END FUNCTION vol7d_network_le
1144
1145
1146#include "array_utilities_inc.F90"
1147
1148
1149END 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.