libsim Versione 7.2.1

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

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