libsim Versione 7.2.1

◆ 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 894 del file vol7d_ana_class.F90.

895! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
896! authors:
897! Davide Cesari <dcesari@arpa.emr.it>
898! Paolo Patruno <ppatruno@arpa.emr.it>
899
900! This program is free software; you can redistribute it and/or
901! modify it under the terms of the GNU General Public License as
902! published by the Free Software Foundation; either version 2 of
903! the License, or (at your option) any later version.
904
905! This program is distributed in the hope that it will be useful,
906! but WITHOUT ANY WARRANTY; without even the implied warranty of
907! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
908! GNU General Public License for more details.
909
910! You should have received a copy of the GNU General Public License
911! along with this program. If not, see <http://www.gnu.org/licenses/>.
912#include "config.h"
913
918MODULE vol7d_ana_class
919USE kinds
922IMPLICIT NONE
923
925INTEGER,PARAMETER :: vol7d_ana_lenident=20
926
931TYPE vol7d_ana
932 TYPE(geo_coord) :: coord
933 CHARACTER(len=vol7d_ana_lenident) :: ident
934END TYPE vol7d_ana
935
937TYPE(vol7d_ana),PARAMETER :: vol7d_ana_miss=vol7d_ana(geo_coord_miss,cmiss)
938
942INTERFACE init
943 MODULE PROCEDURE vol7d_ana_init
944END INTERFACE
945
948INTERFACE delete
949 MODULE PROCEDURE vol7d_ana_delete
950END INTERFACE
951
955INTERFACE OPERATOR (==)
956 MODULE PROCEDURE vol7d_ana_eq
957END INTERFACE
958
962INTERFACE OPERATOR (/=)
963 MODULE PROCEDURE vol7d_ana_ne
964END INTERFACE
965
966
971INTERFACE OPERATOR (>)
972 MODULE PROCEDURE vol7d_ana_gt
973END INTERFACE
974
979INTERFACE OPERATOR (<)
980 MODULE PROCEDURE vol7d_ana_lt
981END INTERFACE
982
987INTERFACE OPERATOR (>=)
988 MODULE PROCEDURE vol7d_ana_ge
989END INTERFACE
990
995INTERFACE OPERATOR (<=)
996 MODULE PROCEDURE vol7d_ana_le
997END INTERFACE
998
999
1001INTERFACE c_e
1002 MODULE PROCEDURE vol7d_ana_c_e
1003END INTERFACE
1004
1007INTERFACE read_unit
1008 MODULE PROCEDURE vol7d_ana_read_unit, vol7d_ana_vect_read_unit
1009END INTERFACE
1010
1013INTERFACE write_unit
1014 MODULE PROCEDURE vol7d_ana_write_unit, vol7d_ana_vect_write_unit
1015END INTERFACE
1016
1017#define VOL7D_POLY_TYPE TYPE(vol7d_ana)
1018#define VOL7D_POLY_TYPES _ana
1019#define ENABLE_SORT
1020#include "array_utilities_pre.F90"
1021
1023INTERFACE to_char
1024 MODULE PROCEDURE to_char_ana
1025END INTERFACE
1026
1028INTERFACE display
1029 MODULE PROCEDURE display_ana
1030END INTERFACE
1031
1032CONTAINS
1033
1037SUBROUTINE vol7d_ana_init(this, lon, lat, ident, ilon, ilat)
1038TYPE(vol7d_ana),INTENT(INOUT) :: this
1039REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lon
1040REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lat
1041CHARACTER(len=*),INTENT(in),OPTIONAL :: ident
1042INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilon
1043INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilat
1044
1045CALL init(this%coord, lon=lon, lat=lat , ilon=ilon, ilat=ilat)
1046IF (PRESENT(ident)) THEN
1047 this%ident = ident
1048ELSE
1049 this%ident = cmiss
1050ENDIF
1051
1052END SUBROUTINE vol7d_ana_init
1053
1054
1056SUBROUTINE vol7d_ana_delete(this)
1057TYPE(vol7d_ana),INTENT(INOUT) :: this
1058
1059CALL delete(this%coord)
1060this%ident = cmiss
1061
1062END SUBROUTINE vol7d_ana_delete
1063
1064
1065
1066character(len=80) function to_char_ana(this)
1067
1068TYPE(vol7d_ana),INTENT(in) :: this
1069
1070to_char_ana="ANA: "//&
1071 to_char(getlon(this%coord),miss="Missing lon",form="(f11.5)")//&
1072 to_char(getlat(this%coord),miss="Missing lat",form="(f11.5)")//&
1073 t2c(this%ident,miss="Missing ident")
1074
1075return
1076
1077end function to_char_ana
1078
1079
1080subroutine display_ana(this)
1081
1082TYPE(vol7d_ana),INTENT(in) :: this
1083
1084print*, trim(to_char(this))
1085
1086end subroutine display_ana
1087
1088
1089ELEMENTAL FUNCTION vol7d_ana_eq(this, that) RESULT(res)
1090TYPE(vol7d_ana),INTENT(IN) :: this, that
1091LOGICAL :: res
1092
1093res = this%coord == that%coord .AND. this%ident == that%ident
1094
1095END FUNCTION vol7d_ana_eq
1096
1097
1098ELEMENTAL FUNCTION vol7d_ana_ne(this, that) RESULT(res)
1099TYPE(vol7d_ana),INTENT(IN) :: this, that
1100LOGICAL :: res
1101
1102res = .NOT.(this == that)
1103
1104END FUNCTION vol7d_ana_ne
1105
1106
1107ELEMENTAL FUNCTION vol7d_ana_gt(this, that) RESULT(res)
1108TYPE(vol7d_ana),INTENT(IN) :: this, that
1109LOGICAL :: res
1110
1111res = this%ident > that%ident
1112
1113if ( this%ident == that%ident) then
1114 res =this%coord > that%coord
1115end if
1116
1117END FUNCTION vol7d_ana_gt
1118
1119
1120ELEMENTAL FUNCTION vol7d_ana_ge(this, that) RESULT(res)
1121TYPE(vol7d_ana),INTENT(IN) :: this, that
1122LOGICAL :: res
1123
1124res = .not. this < that
1125
1126END FUNCTION vol7d_ana_ge
1127
1128
1129ELEMENTAL FUNCTION vol7d_ana_lt(this, that) RESULT(res)
1130TYPE(vol7d_ana),INTENT(IN) :: this, that
1131LOGICAL :: res
1132
1133res = this%ident < that%ident
1134
1135if ( this%ident == that%ident) then
1136 res = this%coord < that%coord
1137end if
1138
1139END FUNCTION vol7d_ana_lt
1140
1141
1142ELEMENTAL FUNCTION vol7d_ana_le(this, that) RESULT(res)
1143TYPE(vol7d_ana),INTENT(IN) :: this, that
1144LOGICAL :: res
1145
1146res = .not. (this > that)
1147
1148END FUNCTION vol7d_ana_le
1149
1150
1151
1152ELEMENTAL FUNCTION vol7d_ana_c_e(this) RESULT(c_e)
1153TYPE(vol7d_ana),INTENT(IN) :: this
1154LOGICAL :: c_e
1155c_e = this /= vol7d_ana_miss
1156END FUNCTION vol7d_ana_c_e
1157
1158
1163SUBROUTINE vol7d_ana_read_unit(this, unit)
1164TYPE(vol7d_ana),INTENT(out) :: this
1165INTEGER, INTENT(in) :: unit
1166
1167CALL vol7d_ana_vect_read_unit((/this/), unit)
1168
1169END SUBROUTINE vol7d_ana_read_unit
1170
1171
1176SUBROUTINE vol7d_ana_vect_read_unit(this, unit)
1177TYPE(vol7d_ana) :: this(:)
1178INTEGER, INTENT(in) :: unit
1179
1180CHARACTER(len=40) :: form
1181
1182CALL read_unit(this%coord, unit)
1183INQUIRE(unit, form=form)
1184IF (form == 'FORMATTED') THEN
1185 READ(unit,'(A)')this(:)%ident
1186ELSE
1187 READ(unit)this(:)%ident
1188ENDIF
1189
1190END SUBROUTINE vol7d_ana_vect_read_unit
1191
1192
1197SUBROUTINE vol7d_ana_write_unit(this, unit)
1198TYPE(vol7d_ana),INTENT(in) :: this
1199INTEGER, INTENT(in) :: unit
1200
1201CALL vol7d_ana_vect_write_unit((/this/), unit)
1202
1203END SUBROUTINE vol7d_ana_write_unit
1204
1205
1210SUBROUTINE vol7d_ana_vect_write_unit(this, unit)
1211TYPE(vol7d_ana),INTENT(in) :: this(:)
1212INTEGER, INTENT(in) :: unit
1213
1214CHARACTER(len=40) :: form
1215
1216CALL write_unit(this%coord, unit)
1217INQUIRE(unit, form=form)
1218IF (form == 'FORMATTED') THEN
1219 WRITE(unit,'(A)')this(:)%ident
1220ELSE
1221 WRITE(unit)this(:)%ident
1222ENDIF
1223
1224END SUBROUTINE vol7d_ana_vect_write_unit
1225
1226
1227#include "array_utilities_inc.F90"
1228
1229
1230END 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:245
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.