libsim Versione 7.2.0
|
◆ vol7d_ana_init()
Inizializza un oggetto vol7d_ana con i parametri opzionali forniti. Se non viene passato nessun parametro opzionale l'oggetto รจ inizializzato a valore mancante.
Definizione alla linea 386 del file vol7d_ana_class.F90. 387! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
388! authors:
389! Davide Cesari <dcesari@arpa.emr.it>
390! Paolo Patruno <ppatruno@arpa.emr.it>
391
392! This program is free software; you can redistribute it and/or
393! modify it under the terms of the GNU General Public License as
394! published by the Free Software Foundation; either version 2 of
395! the License, or (at your option) any later version.
396
397! This program is distributed in the hope that it will be useful,
398! but WITHOUT ANY WARRANTY; without even the implied warranty of
399! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
400! GNU General Public License for more details.
401
402! You should have received a copy of the GNU General Public License
403! along with this program. If not, see <http://www.gnu.org/licenses/>.
404#include "config.h"
405
414IMPLICIT NONE
415
417INTEGER,PARAMETER :: vol7d_ana_lenident=20
418
424 TYPE(geo_coord) :: coord
425 CHARACTER(len=vol7d_ana_lenident) :: ident
427
430
435 MODULE PROCEDURE vol7d_ana_init
436END INTERFACE
437
441 MODULE PROCEDURE vol7d_ana_delete
442END INTERFACE
443
447INTERFACE OPERATOR (==)
448 MODULE PROCEDURE vol7d_ana_eq
449END INTERFACE
450
454INTERFACE OPERATOR (/=)
455 MODULE PROCEDURE vol7d_ana_ne
456END INTERFACE
457
458
463INTERFACE OPERATOR (>)
464 MODULE PROCEDURE vol7d_ana_gt
465END INTERFACE
466
471INTERFACE OPERATOR (<)
472 MODULE PROCEDURE vol7d_ana_lt
473END INTERFACE
474
479INTERFACE OPERATOR (>=)
480 MODULE PROCEDURE vol7d_ana_ge
481END INTERFACE
482
487INTERFACE OPERATOR (<=)
488 MODULE PROCEDURE vol7d_ana_le
489END INTERFACE
490
491
494 MODULE PROCEDURE vol7d_ana_c_e
495END INTERFACE
496
500 MODULE PROCEDURE vol7d_ana_read_unit, vol7d_ana_vect_read_unit
501END INTERFACE
502
506 MODULE PROCEDURE vol7d_ana_write_unit, vol7d_ana_vect_write_unit
507END INTERFACE
508
509#define VOL7D_POLY_TYPE TYPE(vol7d_ana)
510#define VOL7D_POLY_TYPES _ana
511#define ENABLE_SORT
512#include "array_utilities_pre.F90"
513
516 MODULE PROCEDURE to_char_ana
517END INTERFACE
518
521 MODULE PROCEDURE display_ana
522END INTERFACE
523
524CONTAINS
525
529SUBROUTINE vol7d_ana_init(this, lon, lat, ident, ilon, ilat)
530TYPE(vol7d_ana),INTENT(INOUT) :: this
531REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lon
532REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lat
533CHARACTER(len=*),INTENT(in),OPTIONAL :: ident
534INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilon
535INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilat
536
538IF (PRESENT(ident)) THEN
539 this%ident = ident
540ELSE
541 this%ident = cmiss
542ENDIF
543
544END SUBROUTINE vol7d_ana_init
545
546
548SUBROUTINE vol7d_ana_delete(this)
549TYPE(vol7d_ana),INTENT(INOUT) :: this
550
552this%ident = cmiss
553
554END SUBROUTINE vol7d_ana_delete
555
556
557
558character(len=80) function to_char_ana(this)
559
560TYPE(vol7d_ana),INTENT(in) :: this
561
562to_char_ana="ANA: "//&
565 t2c(this%ident,miss="Missing ident")
566
567return
568
569end function to_char_ana
570
571
572subroutine display_ana(this)
573
574TYPE(vol7d_ana),INTENT(in) :: this
575
576print*, trim(to_char(this))
577
578end subroutine display_ana
579
580
581ELEMENTAL FUNCTION vol7d_ana_eq(this, that) RESULT(res)
582TYPE(vol7d_ana),INTENT(IN) :: this, that
583LOGICAL :: res
584
585res = this%coord == that%coord .AND. this%ident == that%ident
586
587END FUNCTION vol7d_ana_eq
588
589
590ELEMENTAL FUNCTION vol7d_ana_ne(this, that) RESULT(res)
591TYPE(vol7d_ana),INTENT(IN) :: this, that
592LOGICAL :: res
593
594res = .NOT.(this == that)
595
596END FUNCTION vol7d_ana_ne
597
598
599ELEMENTAL FUNCTION vol7d_ana_gt(this, that) RESULT(res)
600TYPE(vol7d_ana),INTENT(IN) :: this, that
601LOGICAL :: res
602
603res = this%ident > that%ident
604
605if ( this%ident == that%ident) then
606 res =this%coord > that%coord
607end if
608
609END FUNCTION vol7d_ana_gt
610
611
612ELEMENTAL FUNCTION vol7d_ana_ge(this, that) RESULT(res)
613TYPE(vol7d_ana),INTENT(IN) :: this, that
614LOGICAL :: res
615
616res = .not. this < that
617
618END FUNCTION vol7d_ana_ge
619
620
621ELEMENTAL FUNCTION vol7d_ana_lt(this, that) RESULT(res)
622TYPE(vol7d_ana),INTENT(IN) :: this, that
623LOGICAL :: res
624
625res = this%ident < that%ident
626
627if ( this%ident == that%ident) then
628 res = this%coord < that%coord
629end if
630
631END FUNCTION vol7d_ana_lt
632
633
634ELEMENTAL FUNCTION vol7d_ana_le(this, that) RESULT(res)
635TYPE(vol7d_ana),INTENT(IN) :: this, that
636LOGICAL :: res
637
638res = .not. (this > that)
639
640END FUNCTION vol7d_ana_le
641
642
643
644ELEMENTAL FUNCTION vol7d_ana_c_e(this) RESULT(c_e)
645TYPE(vol7d_ana),INTENT(IN) :: this
646LOGICAL :: c_e
647c_e = this /= vol7d_ana_miss
648END FUNCTION vol7d_ana_c_e
649
650
655SUBROUTINE vol7d_ana_read_unit(this, unit)
656TYPE(vol7d_ana),INTENT(out) :: this
657INTEGER, INTENT(in) :: unit
658
659CALL vol7d_ana_vect_read_unit((/this/), unit)
660
661END SUBROUTINE vol7d_ana_read_unit
662
663
668SUBROUTINE vol7d_ana_vect_read_unit(this, unit)
669TYPE(vol7d_ana) :: this(:)
670INTEGER, INTENT(in) :: unit
671
672CHARACTER(len=40) :: form
673
675INQUIRE(unit, form=form)
676IF (form == 'FORMATTED') THEN
677 READ(unit,'(A)')this(:)%ident
678ELSE
679 READ(unit)this(:)%ident
680ENDIF
681
682END SUBROUTINE vol7d_ana_vect_read_unit
683
684
689SUBROUTINE vol7d_ana_write_unit(this, unit)
690TYPE(vol7d_ana),INTENT(in) :: this
691INTEGER, INTENT(in) :: unit
692
693CALL vol7d_ana_vect_write_unit((/this/), unit)
694
695END SUBROUTINE vol7d_ana_write_unit
696
697
702SUBROUTINE vol7d_ana_vect_write_unit(this, unit)
703TYPE(vol7d_ana),INTENT(in) :: this(:)
704INTEGER, INTENT(in) :: unit
705
706CHARACTER(len=40) :: form
707
709INQUIRE(unit, form=form)
710IF (form == 'FORMATTED') THEN
711 WRITE(unit,'(A)')this(:)%ident
712ELSE
713 WRITE(unit)this(:)%ident
714ENDIF
715
716END SUBROUTINE vol7d_ana_vect_write_unit
717
718
719#include "array_utilities_inc.F90"
720
721
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 Definisce l'anagrafica di una stazione. Definition: vol7d_ana_class.F90:225 |