libsim Versione 7.1.11
|
◆ map_inv_distinct_ana()
map inv distinct Definizione alla linea 996 del file vol7d_ana_class.F90. 998! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
999! authors:
1000! Davide Cesari <dcesari@arpa.emr.it>
1001! Paolo Patruno <ppatruno@arpa.emr.it>
1002
1003! This program is free software; you can redistribute it and/or
1004! modify it under the terms of the GNU General Public License as
1005! published by the Free Software Foundation; either version 2 of
1006! the License, or (at your option) any later version.
1007
1008! This program is distributed in the hope that it will be useful,
1009! but WITHOUT ANY WARRANTY; without even the implied warranty of
1010! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1011! GNU General Public License for more details.
1012
1013! You should have received a copy of the GNU General Public License
1014! along with this program. If not, see <http://www.gnu.org/licenses/>.
1015#include "config.h"
1016
1025IMPLICIT NONE
1026
1028INTEGER,PARAMETER :: vol7d_ana_lenident=20
1029
1035 TYPE(geo_coord) :: coord
1036 CHARACTER(len=vol7d_ana_lenident) :: ident
1038
1041
1046 MODULE PROCEDURE vol7d_ana_init
1047END INTERFACE
1048
1052 MODULE PROCEDURE vol7d_ana_delete
1053END INTERFACE
1054
1058INTERFACE OPERATOR (==)
1059 MODULE PROCEDURE vol7d_ana_eq
1060END INTERFACE
1061
1065INTERFACE OPERATOR (/=)
1066 MODULE PROCEDURE vol7d_ana_ne
1067END INTERFACE
1068
1069
1074INTERFACE OPERATOR (>)
1075 MODULE PROCEDURE vol7d_ana_gt
1076END INTERFACE
1077
1082INTERFACE OPERATOR (<)
1083 MODULE PROCEDURE vol7d_ana_lt
1084END INTERFACE
1085
1090INTERFACE OPERATOR (>=)
1091 MODULE PROCEDURE vol7d_ana_ge
1092END INTERFACE
1093
1098INTERFACE OPERATOR (<=)
1099 MODULE PROCEDURE vol7d_ana_le
1100END INTERFACE
1101
1102
1105 MODULE PROCEDURE vol7d_ana_c_e
1106END INTERFACE
1107
1111 MODULE PROCEDURE vol7d_ana_read_unit, vol7d_ana_vect_read_unit
1112END INTERFACE
1113
1117 MODULE PROCEDURE vol7d_ana_write_unit, vol7d_ana_vect_write_unit
1118END INTERFACE
1119
1120#define VOL7D_POLY_TYPE TYPE(vol7d_ana)
1121#define VOL7D_POLY_TYPES _ana
1122#define ENABLE_SORT
1123#include "array_utilities_pre.F90"
1124
1127 MODULE PROCEDURE to_char_ana
1128END INTERFACE
1129
1132 MODULE PROCEDURE display_ana
1133END INTERFACE
1134
1135CONTAINS
1136
1140SUBROUTINE vol7d_ana_init(this, lon, lat, ident, ilon, ilat)
1141TYPE(vol7d_ana),INTENT(INOUT) :: this
1142REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lon
1143REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lat
1144CHARACTER(len=*),INTENT(in),OPTIONAL :: ident
1145INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilon
1146INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilat
1147
1149IF (PRESENT(ident)) THEN
1150 this%ident = ident
1151ELSE
1152 this%ident = cmiss
1153ENDIF
1154
1155END SUBROUTINE vol7d_ana_init
1156
1157
1159SUBROUTINE vol7d_ana_delete(this)
1160TYPE(vol7d_ana),INTENT(INOUT) :: this
1161
1163this%ident = cmiss
1164
1165END SUBROUTINE vol7d_ana_delete
1166
1167
1168
1169character(len=80) function to_char_ana(this)
1170
1171TYPE(vol7d_ana),INTENT(in) :: this
1172
1173to_char_ana="ANA: "//&
1176 t2c(this%ident,miss="Missing ident")
1177
1178return
1179
1180end function to_char_ana
1181
1182
1183subroutine display_ana(this)
1184
1185TYPE(vol7d_ana),INTENT(in) :: this
1186
1187print*, trim(to_char(this))
1188
1189end subroutine display_ana
1190
1191
1192ELEMENTAL FUNCTION vol7d_ana_eq(this, that) RESULT(res)
1193TYPE(vol7d_ana),INTENT(IN) :: this, that
1194LOGICAL :: res
1195
1196res = this%coord == that%coord .AND. this%ident == that%ident
1197
1198END FUNCTION vol7d_ana_eq
1199
1200
1201ELEMENTAL FUNCTION vol7d_ana_ne(this, that) RESULT(res)
1202TYPE(vol7d_ana),INTENT(IN) :: this, that
1203LOGICAL :: res
1204
1205res = .NOT.(this == that)
1206
1207END FUNCTION vol7d_ana_ne
1208
1209
1210ELEMENTAL FUNCTION vol7d_ana_gt(this, that) RESULT(res)
1211TYPE(vol7d_ana),INTENT(IN) :: this, that
1212LOGICAL :: res
1213
1214res = this%ident > that%ident
1215
1216if ( this%ident == that%ident) then
1217 res =this%coord > that%coord
1218end if
1219
1220END FUNCTION vol7d_ana_gt
1221
1222
1223ELEMENTAL FUNCTION vol7d_ana_ge(this, that) RESULT(res)
1224TYPE(vol7d_ana),INTENT(IN) :: this, that
1225LOGICAL :: res
1226
1227res = .not. this < that
1228
1229END FUNCTION vol7d_ana_ge
1230
1231
1232ELEMENTAL FUNCTION vol7d_ana_lt(this, that) RESULT(res)
1233TYPE(vol7d_ana),INTENT(IN) :: this, that
1234LOGICAL :: res
1235
1236res = this%ident < that%ident
1237
1238if ( this%ident == that%ident) then
1239 res = this%coord < that%coord
1240end if
1241
1242END FUNCTION vol7d_ana_lt
1243
1244
1245ELEMENTAL FUNCTION vol7d_ana_le(this, that) RESULT(res)
1246TYPE(vol7d_ana),INTENT(IN) :: this, that
1247LOGICAL :: res
1248
1249res = .not. (this > that)
1250
1251END FUNCTION vol7d_ana_le
1252
1253
1254
1255ELEMENTAL FUNCTION vol7d_ana_c_e(this) RESULT(c_e)
1256TYPE(vol7d_ana),INTENT(IN) :: this
1257LOGICAL :: c_e
1258c_e = this /= vol7d_ana_miss
1259END FUNCTION vol7d_ana_c_e
1260
1261
1266SUBROUTINE vol7d_ana_read_unit(this, unit)
1267TYPE(vol7d_ana),INTENT(out) :: this
1268INTEGER, INTENT(in) :: unit
1269
1270CALL vol7d_ana_vect_read_unit((/this/), unit)
1271
1272END SUBROUTINE vol7d_ana_read_unit
1273
1274
1279SUBROUTINE vol7d_ana_vect_read_unit(this, unit)
1280TYPE(vol7d_ana) :: this(:)
1281INTEGER, INTENT(in) :: unit
1282
1283CHARACTER(len=40) :: form
1284
1286INQUIRE(unit, form=form)
1287IF (form == 'FORMATTED') THEN
1288 READ(unit,'(A)')this(:)%ident
1289ELSE
1290 READ(unit)this(:)%ident
1291ENDIF
1292
1293END SUBROUTINE vol7d_ana_vect_read_unit
1294
1295
1300SUBROUTINE vol7d_ana_write_unit(this, unit)
1301TYPE(vol7d_ana),INTENT(in) :: this
1302INTEGER, INTENT(in) :: unit
1303
1304CALL vol7d_ana_vect_write_unit((/this/), unit)
1305
1306END SUBROUTINE vol7d_ana_write_unit
1307
1308
1313SUBROUTINE vol7d_ana_vect_write_unit(this, unit)
1314TYPE(vol7d_ana),INTENT(in) :: this(:)
1315INTEGER, INTENT(in) :: unit
1316
1317CHARACTER(len=40) :: form
1318
1320INQUIRE(unit, form=form)
1321IF (form == 'FORMATTED') THEN
1322 WRITE(unit,'(A)')this(:)%ident
1323ELSE
1324 WRITE(unit)this(:)%ident
1325ENDIF
1326
1327END SUBROUTINE vol7d_ana_vect_write_unit
1328
1329
1330#include "array_utilities_inc.F90"
1331
1332
Legge un oggetto vol7d_ana o un vettore di oggetti vol7d_ana da un file FORMATTED o UNFORMATTED. Definition: vol7d_ana_class.F90:307 Scrive un oggetto vol7d_ana o un vettore di oggetti vol7d_ana su un file FORMATTED o UNFORMATTED. Definition: vol7d_ana_class.F90:313 Classes for handling georeferenced sparse points in geographical corodinates. Definition: geo_coord_class.F90:222 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. Definition: missing_values.f90:50 Classe per la gestione dell'anagrafica di stazioni meteo e affini. Definition: vol7d_ana_class.F90:218 Definisce l'anagrafica di una stazione. Definition: vol7d_ana_class.F90:231 |