libsim Versione 7.1.11

◆ index_network()

integer function index_network ( type(vol7d_network), dimension(:), intent(in)  vect,
type(vol7d_network), intent(in)  search,
logical, dimension(:), intent(in), optional  mask,
logical, intent(in), optional  back,
integer, intent(in), optional  cache 
)

Cerca l'indice del primo o ultimo elemento di vect uguale a search.

Definizione alla linea 993 del file vol7d_network_class.F90.

995! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
996! authors:
997! Davide Cesari <dcesari@arpa.emr.it>
998! Paolo Patruno <ppatruno@arpa.emr.it>
999
1000! This program is free software; you can redistribute it and/or
1001! modify it under the terms of the GNU General Public License as
1002! published by the Free Software Foundation; either version 2 of
1003! the License, or (at your option) any later version.
1004
1005! This program is distributed in the hope that it will be useful,
1006! but WITHOUT ANY WARRANTY; without even the implied warranty of
1007! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1008! GNU General Public License for more details.
1009
1010! You should have received a copy of the GNU General Public License
1011! along with this program. If not, see <http://www.gnu.org/licenses/>.
1012#include "config.h"
1013
1021USE kinds
1024IMPLICIT NONE
1025
1026integer, parameter :: network_name_len=20
1027
1032TYPE vol7d_network
1033 character(len=network_name_len) :: name
1034END TYPE vol7d_network
1035
1037TYPE(vol7d_network),PARAMETER :: vol7d_network_miss=vol7d_network(cmiss)
1038
1042INTERFACE init
1043 MODULE PROCEDURE vol7d_network_init
1044END INTERFACE
1045
1048INTERFACE delete
1049 MODULE PROCEDURE vol7d_network_delete
1050END INTERFACE
1051
1055INTERFACE OPERATOR (==)
1056 MODULE PROCEDURE vol7d_network_eq
1057END INTERFACE
1058
1062INTERFACE OPERATOR (/=)
1063 MODULE PROCEDURE vol7d_network_ne
1064END INTERFACE
1065
1069INTERFACE OPERATOR (>)
1070 MODULE PROCEDURE vol7d_network_gt
1071END INTERFACE
1072
1076INTERFACE OPERATOR (<)
1077 MODULE PROCEDURE vol7d_network_lt
1078END INTERFACE
1079
1083INTERFACE OPERATOR (>=)
1084 MODULE PROCEDURE vol7d_network_ge
1085END INTERFACE
1086
1090INTERFACE OPERATOR (<=)
1091 MODULE PROCEDURE vol7d_network_le
1092END INTERFACE
1093
1094#define VOL7D_POLY_TYPE TYPE(vol7d_network)
1095#define VOL7D_POLY_TYPES _network
1096#define ENABLE_SORT
1097#include "array_utilities_pre.F90"
1098
1100INTERFACE display
1101 MODULE PROCEDURE display_network
1102END INTERFACE
1103
1105INTERFACE c_e
1106 MODULE PROCEDURE c_e_network
1107END INTERFACE
1108
1110INTERFACE to_char
1111 MODULE PROCEDURE to_char_network
1112END INTERFACE
1113
1114CONTAINS
1115
1121FUNCTION vol7d_network_new(name) RESULT(this)
1122CHARACTER(len=*),INTENT(in),OPTIONAL :: name
1123
1124TYPE(vol7d_network) :: this
1125
1126CALL init(this, name)
1127
1128END FUNCTION vol7d_network_new
1129
1130
1134SUBROUTINE vol7d_network_init(this, name)
1135TYPE(vol7d_network),INTENT(INOUT) :: this
1136CHARACTER(len=*),INTENT(in),OPTIONAL :: name
1137
1138IF (PRESENT(name)) THEN
1139 this%name = lowercase(name)
1140ELSE
1141 this%name = cmiss
1142END IF
1143
1144END SUBROUTINE vol7d_network_init
1145
1146
1148SUBROUTINE vol7d_network_delete(this)
1149TYPE(vol7d_network),INTENT(INOUT) :: this
1150
1151this%name = cmiss
1152
1153END SUBROUTINE vol7d_network_delete
1154
1155
1156subroutine display_network(this)
1157
1158TYPE(vol7d_network),INTENT(in) :: this
1159
1160print*,to_char_network(this)
1161
1162end subroutine display_network
1163
1164
1165elemental function c_e_network(this) result(res)
1166
1167TYPE(vol7d_network),INTENT(in) :: this
1168logical :: res
1169
1170res = .not. this == vol7d_network_miss
1171
1172end function c_e_network
1173
1174
1175elemental character(len=20) function to_char_network(this)
1176
1177TYPE(vol7d_network),INTENT(in) :: this
1178
1179to_char_network="Network: "//trim(this%name)
1180
1181return
1182
1183end function to_char_network
1184
1185
1186ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
1187TYPE(vol7d_network),INTENT(IN) :: this, that
1188LOGICAL :: res
1189
1190res = (this%name == that%name)
1191
1192END FUNCTION vol7d_network_eq
1193
1194
1195ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
1196TYPE(vol7d_network),INTENT(IN) :: this, that
1197LOGICAL :: res
1198
1199res = .NOT.(this == that)
1200
1201END FUNCTION vol7d_network_ne
1202
1203
1204ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
1205TYPE(vol7d_network),INTENT(IN) :: this, that
1206LOGICAL :: res
1207
1208res = this%name > that%name
1209
1210END FUNCTION vol7d_network_gt
1211
1212ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
1213TYPE(vol7d_network),INTENT(IN) :: this, that
1214LOGICAL :: res
1215
1216res = this%name < that%name
1217
1218END FUNCTION vol7d_network_lt
1219
1220
1221ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
1222TYPE(vol7d_network),INTENT(IN) :: this, that
1223LOGICAL :: res
1224
1225res = this%name >= that%name
1226
1227END FUNCTION vol7d_network_ge
1228
1229ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
1230TYPE(vol7d_network),INTENT(IN) :: this, that
1231LOGICAL :: res
1232
1233res = this%name <= that%name
1234
1235END FUNCTION vol7d_network_le
1236
1237
1238#include "array_utilities_inc.F90"
1239
1240
1241END 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.