libsim Versione 7.2.1
|
◆ map_inv_distinct_ana()
map inv distinct Definizione alla linea 990 del file vol7d_ana_class.F90. 992! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
993! authors:
994! Davide Cesari <dcesari@arpa.emr.it>
995! Paolo Patruno <ppatruno@arpa.emr.it>
996
997! This program is free software; you can redistribute it and/or
998! modify it under the terms of the GNU General Public License as
999! published by the Free Software Foundation; either version 2 of
1000! the License, or (at your option) any later version.
1001
1002! This program is distributed in the hope that it will be useful,
1003! but WITHOUT ANY WARRANTY; without even the implied warranty of
1004! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1005! GNU General Public License for more details.
1006
1007! You should have received a copy of the GNU General Public License
1008! along with this program. If not, see <http://www.gnu.org/licenses/>.
1009#include "config.h"
1010
1019IMPLICIT NONE
1020
1022INTEGER,PARAMETER :: vol7d_ana_lenident=20
1023
1029 TYPE(geo_coord) :: coord
1030 CHARACTER(len=vol7d_ana_lenident) :: ident
1032
1035
1040 MODULE PROCEDURE vol7d_ana_init
1041END INTERFACE
1042
1046 MODULE PROCEDURE vol7d_ana_delete
1047END INTERFACE
1048
1052INTERFACE OPERATOR (==)
1053 MODULE PROCEDURE vol7d_ana_eq
1054END INTERFACE
1055
1059INTERFACE OPERATOR (/=)
1060 MODULE PROCEDURE vol7d_ana_ne
1061END INTERFACE
1062
1063
1068INTERFACE OPERATOR (>)
1069 MODULE PROCEDURE vol7d_ana_gt
1070END INTERFACE
1071
1076INTERFACE OPERATOR (<)
1077 MODULE PROCEDURE vol7d_ana_lt
1078END INTERFACE
1079
1084INTERFACE OPERATOR (>=)
1085 MODULE PROCEDURE vol7d_ana_ge
1086END INTERFACE
1087
1092INTERFACE OPERATOR (<=)
1093 MODULE PROCEDURE vol7d_ana_le
1094END INTERFACE
1095
1096
1099 MODULE PROCEDURE vol7d_ana_c_e
1100END INTERFACE
1101
1105 MODULE PROCEDURE vol7d_ana_read_unit, vol7d_ana_vect_read_unit
1106END INTERFACE
1107
1111 MODULE PROCEDURE vol7d_ana_write_unit, vol7d_ana_vect_write_unit
1112END INTERFACE
1113
1114#define VOL7D_POLY_TYPE TYPE(vol7d_ana)
1115#define VOL7D_POLY_TYPES _ana
1116#define ENABLE_SORT
1117#include "array_utilities_pre.F90"
1118
1121 MODULE PROCEDURE to_char_ana
1122END INTERFACE
1123
1126 MODULE PROCEDURE display_ana
1127END INTERFACE
1128
1129CONTAINS
1130
1134SUBROUTINE vol7d_ana_init(this, lon, lat, ident, ilon, ilat)
1135TYPE(vol7d_ana),INTENT(INOUT) :: this
1136REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lon
1137REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lat
1138CHARACTER(len=*),INTENT(in),OPTIONAL :: ident
1139INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilon
1140INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilat
1141
1143IF (PRESENT(ident)) THEN
1144 this%ident = ident
1145ELSE
1146 this%ident = cmiss
1147ENDIF
1148
1149END SUBROUTINE vol7d_ana_init
1150
1151
1153SUBROUTINE vol7d_ana_delete(this)
1154TYPE(vol7d_ana),INTENT(INOUT) :: this
1155
1157this%ident = cmiss
1158
1159END SUBROUTINE vol7d_ana_delete
1160
1161
1162
1163character(len=80) function to_char_ana(this)
1164
1165TYPE(vol7d_ana),INTENT(in) :: this
1166
1167to_char_ana="ANA: "//&
1170 t2c(this%ident,miss="Missing ident")
1171
1172return
1173
1174end function to_char_ana
1175
1176
1177subroutine display_ana(this)
1178
1179TYPE(vol7d_ana),INTENT(in) :: this
1180
1181print*, trim(to_char(this))
1182
1183end subroutine display_ana
1184
1185
1186ELEMENTAL FUNCTION vol7d_ana_eq(this, that) RESULT(res)
1187TYPE(vol7d_ana),INTENT(IN) :: this, that
1188LOGICAL :: res
1189
1190res = this%coord == that%coord .AND. this%ident == that%ident
1191
1192END FUNCTION vol7d_ana_eq
1193
1194
1195ELEMENTAL FUNCTION vol7d_ana_ne(this, that) RESULT(res)
1196TYPE(vol7d_ana),INTENT(IN) :: this, that
1197LOGICAL :: res
1198
1199res = .NOT.(this == that)
1200
1201END FUNCTION vol7d_ana_ne
1202
1203
1204ELEMENTAL FUNCTION vol7d_ana_gt(this, that) RESULT(res)
1205TYPE(vol7d_ana),INTENT(IN) :: this, that
1206LOGICAL :: res
1207
1208res = this%ident > that%ident
1209
1210if ( this%ident == that%ident) then
1211 res =this%coord > that%coord
1212end if
1213
1214END FUNCTION vol7d_ana_gt
1215
1216
1217ELEMENTAL FUNCTION vol7d_ana_ge(this, that) RESULT(res)
1218TYPE(vol7d_ana),INTENT(IN) :: this, that
1219LOGICAL :: res
1220
1221res = .not. this < that
1222
1223END FUNCTION vol7d_ana_ge
1224
1225
1226ELEMENTAL FUNCTION vol7d_ana_lt(this, that) RESULT(res)
1227TYPE(vol7d_ana),INTENT(IN) :: this, that
1228LOGICAL :: res
1229
1230res = this%ident < that%ident
1231
1232if ( this%ident == that%ident) then
1233 res = this%coord < that%coord
1234end if
1235
1236END FUNCTION vol7d_ana_lt
1237
1238
1239ELEMENTAL FUNCTION vol7d_ana_le(this, that) RESULT(res)
1240TYPE(vol7d_ana),INTENT(IN) :: this, that
1241LOGICAL :: res
1242
1243res = .not. (this > that)
1244
1245END FUNCTION vol7d_ana_le
1246
1247
1248
1249ELEMENTAL FUNCTION vol7d_ana_c_e(this) RESULT(c_e)
1250TYPE(vol7d_ana),INTENT(IN) :: this
1251LOGICAL :: c_e
1252c_e = this /= vol7d_ana_miss
1253END FUNCTION vol7d_ana_c_e
1254
1255
1260SUBROUTINE vol7d_ana_read_unit(this, unit)
1261TYPE(vol7d_ana),INTENT(out) :: this
1262INTEGER, INTENT(in) :: unit
1263
1264CALL vol7d_ana_vect_read_unit((/this/), unit)
1265
1266END SUBROUTINE vol7d_ana_read_unit
1267
1268
1273SUBROUTINE vol7d_ana_vect_read_unit(this, unit)
1274TYPE(vol7d_ana) :: this(:)
1275INTEGER, INTENT(in) :: unit
1276
1277CHARACTER(len=40) :: form
1278
1280INQUIRE(unit, form=form)
1281IF (form == 'FORMATTED') THEN
1282 READ(unit,'(A)')this(:)%ident
1283ELSE
1284 READ(unit)this(:)%ident
1285ENDIF
1286
1287END SUBROUTINE vol7d_ana_vect_read_unit
1288
1289
1294SUBROUTINE vol7d_ana_write_unit(this, unit)
1295TYPE(vol7d_ana),INTENT(in) :: this
1296INTEGER, INTENT(in) :: unit
1297
1298CALL vol7d_ana_vect_write_unit((/this/), unit)
1299
1300END SUBROUTINE vol7d_ana_write_unit
1301
1302
1307SUBROUTINE vol7d_ana_vect_write_unit(this, unit)
1308TYPE(vol7d_ana),INTENT(in) :: this(:)
1309INTEGER, INTENT(in) :: unit
1310
1311CHARACTER(len=40) :: form
1312
1314INQUIRE(unit, form=form)
1315IF (form == 'FORMATTED') THEN
1316 WRITE(unit,'(A)')this(:)%ident
1317ELSE
1318 WRITE(unit)this(:)%ident
1319ENDIF
1320
1321END SUBROUTINE vol7d_ana_vect_write_unit
1322
1323
1324#include "array_utilities_inc.F90"
1325
1326
Legge un oggetto vol7d_ana o un vettore di oggetti vol7d_ana da un file FORMATTED o UNFORMATTED. Definition vol7d_ana_class.F90:301 Scrive un oggetto vol7d_ana o un vettore di oggetti vol7d_ana su un file FORMATTED o UNFORMATTED. Definition vol7d_ana_class.F90:307 Classes for handling georeferenced sparse points in geographical corodinates. Definition geo_coord_class.F90:216 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. Definition missing_values.f90:50 Classe per la gestione dell'anagrafica di stazioni meteo e affini. Definition vol7d_ana_class.F90:212 |