libsim Versione 7.1.11

◆ map_distinct_ana()

integer function, dimension(size(vect)) map_distinct_ana ( type(vol7d_ana), dimension(:), intent(in)  vect,
logical, dimension(:), intent(in), optional  mask,
logical, intent(in), optional  back 
)

map distinct

Definizione alla linea 900 del file vol7d_ana_class.F90.

901! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
902! authors:
903! Davide Cesari <dcesari@arpa.emr.it>
904! Paolo Patruno <ppatruno@arpa.emr.it>
905
906! This program is free software; you can redistribute it and/or
907! modify it under the terms of the GNU General Public License as
908! published by the Free Software Foundation; either version 2 of
909! the License, or (at your option) any later version.
910
911! This program is distributed in the hope that it will be useful,
912! but WITHOUT ANY WARRANTY; without even the implied warranty of
913! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
914! GNU General Public License for more details.
915
916! You should have received a copy of the GNU General Public License
917! along with this program. If not, see <http://www.gnu.org/licenses/>.
918#include "config.h"
919
924MODULE vol7d_ana_class
925USE kinds
928IMPLICIT NONE
929
931INTEGER,PARAMETER :: vol7d_ana_lenident=20
932
937TYPE vol7d_ana
938 TYPE(geo_coord) :: coord
939 CHARACTER(len=vol7d_ana_lenident) :: ident
940END TYPE vol7d_ana
941
943TYPE(vol7d_ana),PARAMETER :: vol7d_ana_miss=vol7d_ana(geo_coord_miss,cmiss)
944
948INTERFACE init
949 MODULE PROCEDURE vol7d_ana_init
950END INTERFACE
951
954INTERFACE delete
955 MODULE PROCEDURE vol7d_ana_delete
956END INTERFACE
957
961INTERFACE OPERATOR (==)
962 MODULE PROCEDURE vol7d_ana_eq
963END INTERFACE
964
968INTERFACE OPERATOR (/=)
969 MODULE PROCEDURE vol7d_ana_ne
970END INTERFACE
971
972
977INTERFACE OPERATOR (>)
978 MODULE PROCEDURE vol7d_ana_gt
979END INTERFACE
980
985INTERFACE OPERATOR (<)
986 MODULE PROCEDURE vol7d_ana_lt
987END INTERFACE
988
993INTERFACE OPERATOR (>=)
994 MODULE PROCEDURE vol7d_ana_ge
995END INTERFACE
996
1001INTERFACE OPERATOR (<=)
1002 MODULE PROCEDURE vol7d_ana_le
1003END INTERFACE
1004
1005
1007INTERFACE c_e
1008 MODULE PROCEDURE vol7d_ana_c_e
1009END INTERFACE
1010
1013INTERFACE read_unit
1014 MODULE PROCEDURE vol7d_ana_read_unit, vol7d_ana_vect_read_unit
1015END INTERFACE
1016
1019INTERFACE write_unit
1020 MODULE PROCEDURE vol7d_ana_write_unit, vol7d_ana_vect_write_unit
1021END INTERFACE
1022
1023#define VOL7D_POLY_TYPE TYPE(vol7d_ana)
1024#define VOL7D_POLY_TYPES _ana
1025#define ENABLE_SORT
1026#include "array_utilities_pre.F90"
1027
1029INTERFACE to_char
1030 MODULE PROCEDURE to_char_ana
1031END INTERFACE
1032
1034INTERFACE display
1035 MODULE PROCEDURE display_ana
1036END INTERFACE
1037
1038CONTAINS
1039
1043SUBROUTINE vol7d_ana_init(this, lon, lat, ident, ilon, ilat)
1044TYPE(vol7d_ana),INTENT(INOUT) :: this
1045REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lon
1046REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lat
1047CHARACTER(len=*),INTENT(in),OPTIONAL :: ident
1048INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilon
1049INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilat
1050
1051CALL init(this%coord, lon=lon, lat=lat , ilon=ilon, ilat=ilat)
1052IF (PRESENT(ident)) THEN
1053 this%ident = ident
1054ELSE
1055 this%ident = cmiss
1056ENDIF
1057
1058END SUBROUTINE vol7d_ana_init
1059
1060
1062SUBROUTINE vol7d_ana_delete(this)
1063TYPE(vol7d_ana),INTENT(INOUT) :: this
1064
1065CALL delete(this%coord)
1066this%ident = cmiss
1067
1068END SUBROUTINE vol7d_ana_delete
1069
1070
1071
1072character(len=80) function to_char_ana(this)
1073
1074TYPE(vol7d_ana),INTENT(in) :: this
1075
1076to_char_ana="ANA: "//&
1077 to_char(getlon(this%coord),miss="Missing lon",form="(f11.5)")//&
1078 to_char(getlat(this%coord),miss="Missing lat",form="(f11.5)")//&
1079 t2c(this%ident,miss="Missing ident")
1080
1081return
1082
1083end function to_char_ana
1084
1085
1086subroutine display_ana(this)
1087
1088TYPE(vol7d_ana),INTENT(in) :: this
1089
1090print*, trim(to_char(this))
1091
1092end subroutine display_ana
1093
1094
1095ELEMENTAL FUNCTION vol7d_ana_eq(this, that) RESULT(res)
1096TYPE(vol7d_ana),INTENT(IN) :: this, that
1097LOGICAL :: res
1098
1099res = this%coord == that%coord .AND. this%ident == that%ident
1100
1101END FUNCTION vol7d_ana_eq
1102
1103
1104ELEMENTAL FUNCTION vol7d_ana_ne(this, that) RESULT(res)
1105TYPE(vol7d_ana),INTENT(IN) :: this, that
1106LOGICAL :: res
1107
1108res = .NOT.(this == that)
1109
1110END FUNCTION vol7d_ana_ne
1111
1112
1113ELEMENTAL FUNCTION vol7d_ana_gt(this, that) RESULT(res)
1114TYPE(vol7d_ana),INTENT(IN) :: this, that
1115LOGICAL :: res
1116
1117res = this%ident > that%ident
1118
1119if ( this%ident == that%ident) then
1120 res =this%coord > that%coord
1121end if
1122
1123END FUNCTION vol7d_ana_gt
1124
1125
1126ELEMENTAL FUNCTION vol7d_ana_ge(this, that) RESULT(res)
1127TYPE(vol7d_ana),INTENT(IN) :: this, that
1128LOGICAL :: res
1129
1130res = .not. this < that
1131
1132END FUNCTION vol7d_ana_ge
1133
1134
1135ELEMENTAL FUNCTION vol7d_ana_lt(this, that) RESULT(res)
1136TYPE(vol7d_ana),INTENT(IN) :: this, that
1137LOGICAL :: res
1138
1139res = this%ident < that%ident
1140
1141if ( this%ident == that%ident) then
1142 res = this%coord < that%coord
1143end if
1144
1145END FUNCTION vol7d_ana_lt
1146
1147
1148ELEMENTAL FUNCTION vol7d_ana_le(this, that) RESULT(res)
1149TYPE(vol7d_ana),INTENT(IN) :: this, that
1150LOGICAL :: res
1151
1152res = .not. (this > that)
1153
1154END FUNCTION vol7d_ana_le
1155
1156
1157
1158ELEMENTAL FUNCTION vol7d_ana_c_e(this) RESULT(c_e)
1159TYPE(vol7d_ana),INTENT(IN) :: this
1160LOGICAL :: c_e
1161c_e = this /= vol7d_ana_miss
1162END FUNCTION vol7d_ana_c_e
1163
1164
1169SUBROUTINE vol7d_ana_read_unit(this, unit)
1170TYPE(vol7d_ana),INTENT(out) :: this
1171INTEGER, INTENT(in) :: unit
1172
1173CALL vol7d_ana_vect_read_unit((/this/), unit)
1174
1175END SUBROUTINE vol7d_ana_read_unit
1176
1177
1182SUBROUTINE vol7d_ana_vect_read_unit(this, unit)
1183TYPE(vol7d_ana) :: this(:)
1184INTEGER, INTENT(in) :: unit
1185
1186CHARACTER(len=40) :: form
1187
1188CALL read_unit(this%coord, unit)
1189INQUIRE(unit, form=form)
1190IF (form == 'FORMATTED') THEN
1191 READ(unit,'(A)')this(:)%ident
1192ELSE
1193 READ(unit)this(:)%ident
1194ENDIF
1195
1196END SUBROUTINE vol7d_ana_vect_read_unit
1197
1198
1203SUBROUTINE vol7d_ana_write_unit(this, unit)
1204TYPE(vol7d_ana),INTENT(in) :: this
1205INTEGER, INTENT(in) :: unit
1206
1207CALL vol7d_ana_vect_write_unit((/this/), unit)
1208
1209END SUBROUTINE vol7d_ana_write_unit
1210
1211
1216SUBROUTINE vol7d_ana_vect_write_unit(this, unit)
1217TYPE(vol7d_ana),INTENT(in) :: this(:)
1218INTEGER, INTENT(in) :: unit
1219
1220CHARACTER(len=40) :: form
1221
1222CALL write_unit(this%coord, unit)
1223INQUIRE(unit, form=form)
1224IF (form == 'FORMATTED') THEN
1225 WRITE(unit,'(A)')this(:)%ident
1226ELSE
1227 WRITE(unit)this(:)%ident
1228ENDIF
1229
1230END SUBROUTINE vol7d_ana_vect_write_unit
1231
1232
1233#include "array_utilities_inc.F90"
1234
1235
1236END MODULE vol7d_ana_class
check for missing value
Distruttore per la classe vol7d_ana.
Costruttore per la classe vol7d_ana.
Legge un oggetto vol7d_ana o un vettore di oggetti vol7d_ana da un file FORMATTED o UNFORMATTED.
Represent ana object in a pretty string.
Scrive un oggetto vol7d_ana o un vettore di oggetti vol7d_ana su un file FORMATTED o UNFORMATTED.
Classes for handling georeferenced sparse points in geographical corodinates.
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 dell'anagrafica di stazioni meteo e affini.
Definisce l'anagrafica di una stazione.

Generated with Doxygen.