libsim Versione 7.2.1

◆ vol7d_ana_delete()

subroutine vol7d_ana_delete ( type(vol7d_ana), intent(inout)  this)

Distrugge l'oggetto in maniera pulita, assegnandogli un valore mancante.

Parametri
[in,out]thisoggetto da distruggre

Definizione alla linea 405 del file vol7d_ana_class.F90.

406! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
407! authors:
408! Davide Cesari <dcesari@arpa.emr.it>
409! Paolo Patruno <ppatruno@arpa.emr.it>
410
411! This program is free software; you can redistribute it and/or
412! modify it under the terms of the GNU General Public License as
413! published by the Free Software Foundation; either version 2 of
414! the License, or (at your option) any later version.
415
416! This program is distributed in the hope that it will be useful,
417! but WITHOUT ANY WARRANTY; without even the implied warranty of
418! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
419! GNU General Public License for more details.
420
421! You should have received a copy of the GNU General Public License
422! along with this program. If not, see <http://www.gnu.org/licenses/>.
423#include "config.h"
424
429MODULE vol7d_ana_class
430USE kinds
433IMPLICIT NONE
434
436INTEGER,PARAMETER :: vol7d_ana_lenident=20
437
442TYPE vol7d_ana
443 TYPE(geo_coord) :: coord
444 CHARACTER(len=vol7d_ana_lenident) :: ident
445END TYPE vol7d_ana
446
448TYPE(vol7d_ana),PARAMETER :: vol7d_ana_miss=vol7d_ana(geo_coord_miss,cmiss)
449
453INTERFACE init
454 MODULE PROCEDURE vol7d_ana_init
455END INTERFACE
456
459INTERFACE delete
460 MODULE PROCEDURE vol7d_ana_delete
461END INTERFACE
462
466INTERFACE OPERATOR (==)
467 MODULE PROCEDURE vol7d_ana_eq
468END INTERFACE
469
473INTERFACE OPERATOR (/=)
474 MODULE PROCEDURE vol7d_ana_ne
475END INTERFACE
476
477
482INTERFACE OPERATOR (>)
483 MODULE PROCEDURE vol7d_ana_gt
484END INTERFACE
485
490INTERFACE OPERATOR (<)
491 MODULE PROCEDURE vol7d_ana_lt
492END INTERFACE
493
498INTERFACE OPERATOR (>=)
499 MODULE PROCEDURE vol7d_ana_ge
500END INTERFACE
501
506INTERFACE OPERATOR (<=)
507 MODULE PROCEDURE vol7d_ana_le
508END INTERFACE
509
510
512INTERFACE c_e
513 MODULE PROCEDURE vol7d_ana_c_e
514END INTERFACE
515
518INTERFACE read_unit
519 MODULE PROCEDURE vol7d_ana_read_unit, vol7d_ana_vect_read_unit
520END INTERFACE
521
524INTERFACE write_unit
525 MODULE PROCEDURE vol7d_ana_write_unit, vol7d_ana_vect_write_unit
526END INTERFACE
527
528#define VOL7D_POLY_TYPE TYPE(vol7d_ana)
529#define VOL7D_POLY_TYPES _ana
530#define ENABLE_SORT
531#include "array_utilities_pre.F90"
532
534INTERFACE to_char
535 MODULE PROCEDURE to_char_ana
536END INTERFACE
537
539INTERFACE display
540 MODULE PROCEDURE display_ana
541END INTERFACE
542
543CONTAINS
544
548SUBROUTINE vol7d_ana_init(this, lon, lat, ident, ilon, ilat)
549TYPE(vol7d_ana),INTENT(INOUT) :: this
550REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lon
551REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lat
552CHARACTER(len=*),INTENT(in),OPTIONAL :: ident
553INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilon
554INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilat
555
556CALL init(this%coord, lon=lon, lat=lat , ilon=ilon, ilat=ilat)
557IF (PRESENT(ident)) THEN
558 this%ident = ident
559ELSE
560 this%ident = cmiss
561ENDIF
562
563END SUBROUTINE vol7d_ana_init
564
565
567SUBROUTINE vol7d_ana_delete(this)
568TYPE(vol7d_ana),INTENT(INOUT) :: this
569
570CALL delete(this%coord)
571this%ident = cmiss
572
573END SUBROUTINE vol7d_ana_delete
574
575
576
577character(len=80) function to_char_ana(this)
578
579TYPE(vol7d_ana),INTENT(in) :: this
580
581to_char_ana="ANA: "//&
582 to_char(getlon(this%coord),miss="Missing lon",form="(f11.5)")//&
583 to_char(getlat(this%coord),miss="Missing lat",form="(f11.5)")//&
584 t2c(this%ident,miss="Missing ident")
585
586return
587
588end function to_char_ana
589
590
591subroutine display_ana(this)
592
593TYPE(vol7d_ana),INTENT(in) :: this
594
595print*, trim(to_char(this))
596
597end subroutine display_ana
598
599
600ELEMENTAL FUNCTION vol7d_ana_eq(this, that) RESULT(res)
601TYPE(vol7d_ana),INTENT(IN) :: this, that
602LOGICAL :: res
603
604res = this%coord == that%coord .AND. this%ident == that%ident
605
606END FUNCTION vol7d_ana_eq
607
608
609ELEMENTAL FUNCTION vol7d_ana_ne(this, that) RESULT(res)
610TYPE(vol7d_ana),INTENT(IN) :: this, that
611LOGICAL :: res
612
613res = .NOT.(this == that)
614
615END FUNCTION vol7d_ana_ne
616
617
618ELEMENTAL FUNCTION vol7d_ana_gt(this, that) RESULT(res)
619TYPE(vol7d_ana),INTENT(IN) :: this, that
620LOGICAL :: res
621
622res = this%ident > that%ident
623
624if ( this%ident == that%ident) then
625 res =this%coord > that%coord
626end if
627
628END FUNCTION vol7d_ana_gt
629
630
631ELEMENTAL FUNCTION vol7d_ana_ge(this, that) RESULT(res)
632TYPE(vol7d_ana),INTENT(IN) :: this, that
633LOGICAL :: res
634
635res = .not. this < that
636
637END FUNCTION vol7d_ana_ge
638
639
640ELEMENTAL FUNCTION vol7d_ana_lt(this, that) RESULT(res)
641TYPE(vol7d_ana),INTENT(IN) :: this, that
642LOGICAL :: res
643
644res = this%ident < that%ident
645
646if ( this%ident == that%ident) then
647 res = this%coord < that%coord
648end if
649
650END FUNCTION vol7d_ana_lt
651
652
653ELEMENTAL FUNCTION vol7d_ana_le(this, that) RESULT(res)
654TYPE(vol7d_ana),INTENT(IN) :: this, that
655LOGICAL :: res
656
657res = .not. (this > that)
658
659END FUNCTION vol7d_ana_le
660
661
662
663ELEMENTAL FUNCTION vol7d_ana_c_e(this) RESULT(c_e)
664TYPE(vol7d_ana),INTENT(IN) :: this
665LOGICAL :: c_e
666c_e = this /= vol7d_ana_miss
667END FUNCTION vol7d_ana_c_e
668
669
674SUBROUTINE vol7d_ana_read_unit(this, unit)
675TYPE(vol7d_ana),INTENT(out) :: this
676INTEGER, INTENT(in) :: unit
677
678CALL vol7d_ana_vect_read_unit((/this/), unit)
679
680END SUBROUTINE vol7d_ana_read_unit
681
682
687SUBROUTINE vol7d_ana_vect_read_unit(this, unit)
688TYPE(vol7d_ana) :: this(:)
689INTEGER, INTENT(in) :: unit
690
691CHARACTER(len=40) :: form
692
693CALL read_unit(this%coord, unit)
694INQUIRE(unit, form=form)
695IF (form == 'FORMATTED') THEN
696 READ(unit,'(A)')this(:)%ident
697ELSE
698 READ(unit)this(:)%ident
699ENDIF
700
701END SUBROUTINE vol7d_ana_vect_read_unit
702
703
708SUBROUTINE vol7d_ana_write_unit(this, unit)
709TYPE(vol7d_ana),INTENT(in) :: this
710INTEGER, INTENT(in) :: unit
711
712CALL vol7d_ana_vect_write_unit((/this/), unit)
713
714END SUBROUTINE vol7d_ana_write_unit
715
716
721SUBROUTINE vol7d_ana_vect_write_unit(this, unit)
722TYPE(vol7d_ana),INTENT(in) :: this(:)
723INTEGER, INTENT(in) :: unit
724
725CHARACTER(len=40) :: form
726
727CALL write_unit(this%coord, unit)
728INQUIRE(unit, form=form)
729IF (form == 'FORMATTED') THEN
730 WRITE(unit,'(A)')this(:)%ident
731ELSE
732 WRITE(unit)this(:)%ident
733ENDIF
734
735END SUBROUTINE vol7d_ana_vect_write_unit
736
737
738#include "array_utilities_inc.F90"
739
740
741END 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.