31 INTEGER,
PARAMETER :: vol7d_ana_lenident=20
38 TYPE(geo_coord) :: coord
39 CHARACTER(len=vol7d_ana_lenident) :: ident
43 TYPE(vol7d_ana),
PARAMETER :: vol7d_ana_miss=
vol7d_ana(geo_coord_miss,cmiss)
49 MODULE PROCEDURE vol7d_ana_init
55 MODULE PROCEDURE vol7d_ana_delete
61 INTERFACE OPERATOR (==)
62 MODULE PROCEDURE vol7d_ana_eq
68 INTERFACE OPERATOR (/=)
69 MODULE PROCEDURE vol7d_ana_ne
77 INTERFACE OPERATOR (>)
78 MODULE PROCEDURE vol7d_ana_gt
85 INTERFACE OPERATOR (<)
86 MODULE PROCEDURE vol7d_ana_lt
93 INTERFACE OPERATOR (>=)
94 MODULE PROCEDURE vol7d_ana_ge
101 INTERFACE OPERATOR (<=)
102 MODULE PROCEDURE vol7d_ana_le
108 MODULE PROCEDURE vol7d_ana_c_e
114 MODULE PROCEDURE vol7d_ana_read_unit, vol7d_ana_vect_read_unit
120 MODULE PROCEDURE vol7d_ana_write_unit, vol7d_ana_vect_write_unit
123 #define VOL7D_POLY_TYPE TYPE(vol7d_ana) 124 #define VOL7D_POLY_TYPES _ana 126 #include "array_utilities_pre.F90" 130 MODULE PROCEDURE to_char_ana
135 MODULE PROCEDURE display_ana
143 SUBROUTINE vol7d_ana_init(this, lon, lat, ident, ilon, ilat)
144 TYPE(vol7d_ana),
INTENT(INOUT) :: this
145 REAL(kind=fp_geo),
INTENT(in),
OPTIONAL :: lon
146 REAL(kind=fp_geo),
INTENT(in),
OPTIONAL :: lat
147 CHARACTER(len=*),
INTENT(in),
OPTIONAL :: ident
148 INTEGER(kind=int_l),
INTENT(in),
OPTIONAL :: ilon
149 INTEGER(kind=int_l),
INTENT(in),
OPTIONAL :: ilat
151 CALL init(this%coord, lon=lon, lat=lat , ilon=ilon, ilat=ilat)
152 IF (
PRESENT(ident))
THEN 158 END SUBROUTINE vol7d_ana_init
162 SUBROUTINE vol7d_ana_delete(this)
163 TYPE(vol7d_ana),
INTENT(INOUT) :: this
168 END SUBROUTINE vol7d_ana_delete
172 character(len=80) function to_char_ana(this)
174 TYPE(vol7d_ana),
INTENT(in) :: this
176 to_char_ana=
"ANA: "//&
177 to_char(getlon(this%coord),miss=
"Missing lon",form=
"(f11.5)")//&
178 to_char(getlat(this%coord),miss=
"Missing lat",form=
"(f11.5)")//&
179 t2c(this%ident,miss=
"Missing ident")
183 end function to_char_ana
186 subroutine display_ana(this)
188 TYPE(vol7d_ana),
INTENT(in) :: this
192 end subroutine display_ana
195 ELEMENTAL FUNCTION vol7d_ana_eq(this, that)
RESULT(res)
196 TYPE(vol7d_ana),
INTENT(IN) :: this, that
199 res = this%coord == that%coord .AND. this%ident == that%ident
201 END FUNCTION vol7d_ana_eq
204 ELEMENTAL FUNCTION vol7d_ana_ne(this, that)
RESULT(res)
205 TYPE(vol7d_ana),
INTENT(IN) :: this, that
208 res = .NOT.(this == that)
210 END FUNCTION vol7d_ana_ne
213 ELEMENTAL FUNCTION vol7d_ana_gt(this, that)
RESULT(res)
214 TYPE(vol7d_ana),
INTENT(IN) :: this, that
217 res = this%ident > that%ident
219 if ( this%ident == that%ident)
then 220 res =this%coord > that%coord
223 END FUNCTION vol7d_ana_gt
226 ELEMENTAL FUNCTION vol7d_ana_ge(this, that)
RESULT(res)
227 TYPE(vol7d_ana),
INTENT(IN) :: this, that
230 res = .not. this < that
232 END FUNCTION vol7d_ana_ge
235 ELEMENTAL FUNCTION vol7d_ana_lt(this, that)
RESULT(res)
239 res = this%ident < that%ident
241 if ( this%ident == that%ident)
then 242 res = this%coord < that%coord
245 END FUNCTION vol7d_ana_lt
248 ELEMENTAL FUNCTION vol7d_ana_le(this, that)
RESULT(res)
249 TYPE(vol7d_ana),
INTENT(IN) :: this, that
252 res = .not. (this > that)
254 END FUNCTION vol7d_ana_le
258 ELEMENTAL FUNCTION vol7d_ana_c_e(this)
RESULT(c_e)
259 TYPE(vol7d_ana),
INTENT(IN) :: this
261 c_e = this /= vol7d_ana_miss
262 END FUNCTION vol7d_ana_c_e
269 SUBROUTINE vol7d_ana_read_unit(this, unit)
270 TYPE(vol7d_ana),
INTENT(out) :: this
271 INTEGER,
INTENT(in) :: unit
273 CALL vol7d_ana_vect_read_unit((/this/), unit)
275 END SUBROUTINE vol7d_ana_read_unit
282 SUBROUTINE vol7d_ana_vect_read_unit(this, unit)
283 TYPE(vol7d_ana) :: this(:)
284 INTEGER,
INTENT(in) :: unit
286 CHARACTER(len=40) :: form
289 INQUIRE(unit, form=form)
290 IF (form ==
'FORMATTED')
THEN 291 READ(unit,
'(A)')this(:)%ident
293 READ(unit)this(:)%ident
296 END SUBROUTINE vol7d_ana_vect_read_unit
303 SUBROUTINE vol7d_ana_write_unit(this, unit)
304 TYPE(vol7d_ana),
INTENT(in) :: this
305 INTEGER,
INTENT(in) :: unit
307 CALL vol7d_ana_vect_write_unit((/this/), unit)
309 END SUBROUTINE vol7d_ana_write_unit
316 SUBROUTINE vol7d_ana_vect_write_unit(this, unit)
317 TYPE(vol7d_ana),
INTENT(in) :: this(:)
318 INTEGER,
INTENT(in) :: unit
320 CHARACTER(len=40) :: form
323 INQUIRE(unit, form=form)
324 IF (form ==
'FORMATTED')
THEN 325 WRITE(unit,
'(A)')this(:)%ident
327 WRITE(unit)this(:)%ident
330 END SUBROUTINE vol7d_ana_vect_write_unit
333 #include "array_utilities_inc.F90"
Classe per la gestione dell'anagrafica di stazioni meteo e affini.
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.
Definisce l'anagrafica di una stazione.
Definitions of constants and functions for working with missing values.
Represent ana object in a pretty string.
Costruttore per la classe vol7d_ana.
Distruttore per la classe vol7d_ana.
Legge un oggetto vol7d_ana o un vettore di oggetti vol7d_ana da un file FORMATTED o UNFORMATTED...
Definition of constants to be used for declaring variables of a desired type.