libsim Versione 7.1.11
|
◆ 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 392 del file vol7d_ana_class.F90. 393! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
394! authors:
395! Davide Cesari <dcesari@arpa.emr.it>
396! Paolo Patruno <ppatruno@arpa.emr.it>
397
398! This program is free software; you can redistribute it and/or
399! modify it under the terms of the GNU General Public License as
400! published by the Free Software Foundation; either version 2 of
401! the License, or (at your option) any later version.
402
403! This program is distributed in the hope that it will be useful,
404! but WITHOUT ANY WARRANTY; without even the implied warranty of
405! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
406! GNU General Public License for more details.
407
408! You should have received a copy of the GNU General Public License
409! along with this program. If not, see <http://www.gnu.org/licenses/>.
410#include "config.h"
411
420IMPLICIT NONE
421
423INTEGER,PARAMETER :: vol7d_ana_lenident=20
424
430 TYPE(geo_coord) :: coord
431 CHARACTER(len=vol7d_ana_lenident) :: ident
433
436
441 MODULE PROCEDURE vol7d_ana_init
442END INTERFACE
443
447 MODULE PROCEDURE vol7d_ana_delete
448END INTERFACE
449
453INTERFACE OPERATOR (==)
454 MODULE PROCEDURE vol7d_ana_eq
455END INTERFACE
456
460INTERFACE OPERATOR (/=)
461 MODULE PROCEDURE vol7d_ana_ne
462END INTERFACE
463
464
469INTERFACE OPERATOR (>)
470 MODULE PROCEDURE vol7d_ana_gt
471END INTERFACE
472
477INTERFACE OPERATOR (<)
478 MODULE PROCEDURE vol7d_ana_lt
479END INTERFACE
480
485INTERFACE OPERATOR (>=)
486 MODULE PROCEDURE vol7d_ana_ge
487END INTERFACE
488
493INTERFACE OPERATOR (<=)
494 MODULE PROCEDURE vol7d_ana_le
495END INTERFACE
496
497
500 MODULE PROCEDURE vol7d_ana_c_e
501END INTERFACE
502
506 MODULE PROCEDURE vol7d_ana_read_unit, vol7d_ana_vect_read_unit
507END INTERFACE
508
512 MODULE PROCEDURE vol7d_ana_write_unit, vol7d_ana_vect_write_unit
513END INTERFACE
514
515#define VOL7D_POLY_TYPE TYPE(vol7d_ana)
516#define VOL7D_POLY_TYPES _ana
517#define ENABLE_SORT
518#include "array_utilities_pre.F90"
519
522 MODULE PROCEDURE to_char_ana
523END INTERFACE
524
527 MODULE PROCEDURE display_ana
528END INTERFACE
529
530CONTAINS
531
535SUBROUTINE vol7d_ana_init(this, lon, lat, ident, ilon, ilat)
536TYPE(vol7d_ana),INTENT(INOUT) :: this
537REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lon
538REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lat
539CHARACTER(len=*),INTENT(in),OPTIONAL :: ident
540INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilon
541INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilat
542
544IF (PRESENT(ident)) THEN
545 this%ident = ident
546ELSE
547 this%ident = cmiss
548ENDIF
549
550END SUBROUTINE vol7d_ana_init
551
552
554SUBROUTINE vol7d_ana_delete(this)
555TYPE(vol7d_ana),INTENT(INOUT) :: this
556
558this%ident = cmiss
559
560END SUBROUTINE vol7d_ana_delete
561
562
563
564character(len=80) function to_char_ana(this)
565
566TYPE(vol7d_ana),INTENT(in) :: this
567
568to_char_ana="ANA: "//&
571 t2c(this%ident,miss="Missing ident")
572
573return
574
575end function to_char_ana
576
577
578subroutine display_ana(this)
579
580TYPE(vol7d_ana),INTENT(in) :: this
581
582print*, trim(to_char(this))
583
584end subroutine display_ana
585
586
587ELEMENTAL FUNCTION vol7d_ana_eq(this, that) RESULT(res)
588TYPE(vol7d_ana),INTENT(IN) :: this, that
589LOGICAL :: res
590
591res = this%coord == that%coord .AND. this%ident == that%ident
592
593END FUNCTION vol7d_ana_eq
594
595
596ELEMENTAL FUNCTION vol7d_ana_ne(this, that) RESULT(res)
597TYPE(vol7d_ana),INTENT(IN) :: this, that
598LOGICAL :: res
599
600res = .NOT.(this == that)
601
602END FUNCTION vol7d_ana_ne
603
604
605ELEMENTAL FUNCTION vol7d_ana_gt(this, that) RESULT(res)
606TYPE(vol7d_ana),INTENT(IN) :: this, that
607LOGICAL :: res
608
609res = this%ident > that%ident
610
611if ( this%ident == that%ident) then
612 res =this%coord > that%coord
613end if
614
615END FUNCTION vol7d_ana_gt
616
617
618ELEMENTAL FUNCTION vol7d_ana_ge(this, that) RESULT(res)
619TYPE(vol7d_ana),INTENT(IN) :: this, that
620LOGICAL :: res
621
622res = .not. this < that
623
624END FUNCTION vol7d_ana_ge
625
626
627ELEMENTAL FUNCTION vol7d_ana_lt(this, that) RESULT(res)
628TYPE(vol7d_ana),INTENT(IN) :: this, that
629LOGICAL :: res
630
631res = this%ident < that%ident
632
633if ( this%ident == that%ident) then
634 res = this%coord < that%coord
635end if
636
637END FUNCTION vol7d_ana_lt
638
639
640ELEMENTAL FUNCTION vol7d_ana_le(this, that) RESULT(res)
641TYPE(vol7d_ana),INTENT(IN) :: this, that
642LOGICAL :: res
643
644res = .not. (this > that)
645
646END FUNCTION vol7d_ana_le
647
648
649
650ELEMENTAL FUNCTION vol7d_ana_c_e(this) RESULT(c_e)
651TYPE(vol7d_ana),INTENT(IN) :: this
652LOGICAL :: c_e
653c_e = this /= vol7d_ana_miss
654END FUNCTION vol7d_ana_c_e
655
656
661SUBROUTINE vol7d_ana_read_unit(this, unit)
662TYPE(vol7d_ana),INTENT(out) :: this
663INTEGER, INTENT(in) :: unit
664
665CALL vol7d_ana_vect_read_unit((/this/), unit)
666
667END SUBROUTINE vol7d_ana_read_unit
668
669
674SUBROUTINE vol7d_ana_vect_read_unit(this, unit)
675TYPE(vol7d_ana) :: this(:)
676INTEGER, INTENT(in) :: unit
677
678CHARACTER(len=40) :: form
679
681INQUIRE(unit, form=form)
682IF (form == 'FORMATTED') THEN
683 READ(unit,'(A)')this(:)%ident
684ELSE
685 READ(unit)this(:)%ident
686ENDIF
687
688END SUBROUTINE vol7d_ana_vect_read_unit
689
690
695SUBROUTINE vol7d_ana_write_unit(this, unit)
696TYPE(vol7d_ana),INTENT(in) :: this
697INTEGER, INTENT(in) :: unit
698
699CALL vol7d_ana_vect_write_unit((/this/), unit)
700
701END SUBROUTINE vol7d_ana_write_unit
702
703
708SUBROUTINE vol7d_ana_vect_write_unit(this, unit)
709TYPE(vol7d_ana),INTENT(in) :: this(:)
710INTEGER, INTENT(in) :: unit
711
712CHARACTER(len=40) :: form
713
715INQUIRE(unit, form=form)
716IF (form == 'FORMATTED') THEN
717 WRITE(unit,'(A)')this(:)%ident
718ELSE
719 WRITE(unit)this(:)%ident
720ENDIF
721
722END SUBROUTINE vol7d_ana_vect_write_unit
723
724
725#include "array_utilities_inc.F90"
726
727
Legge un oggetto vol7d_ana o un vettore di oggetti vol7d_ana da un file FORMATTED o UNFORMATTED. Definition: vol7d_ana_class.F90:307 Scrive un oggetto vol7d_ana o un vettore di oggetti vol7d_ana su un file FORMATTED o UNFORMATTED. Definition: vol7d_ana_class.F90:313 Classes for handling georeferenced sparse points in geographical corodinates. Definition: geo_coord_class.F90:222 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. Definition: missing_values.f90:50 Classe per la gestione dell'anagrafica di stazioni meteo e affini. Definition: vol7d_ana_class.F90:218 Definisce l'anagrafica di una stazione. Definition: vol7d_ana_class.F90:231 |