libsim Versione 7.1.11
|
◆ vol7d_ana_delete()
Distrugge l'oggetto in maniera pulita, assegnandogli un valore mancante.
Definizione alla linea 411 del file vol7d_ana_class.F90. 412! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
413! authors:
414! Davide Cesari <dcesari@arpa.emr.it>
415! Paolo Patruno <ppatruno@arpa.emr.it>
416
417! This program is free software; you can redistribute it and/or
418! modify it under the terms of the GNU General Public License as
419! published by the Free Software Foundation; either version 2 of
420! the License, or (at your option) any later version.
421
422! This program is distributed in the hope that it will be useful,
423! but WITHOUT ANY WARRANTY; without even the implied warranty of
424! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
425! GNU General Public License for more details.
426
427! You should have received a copy of the GNU General Public License
428! along with this program. If not, see <http://www.gnu.org/licenses/>.
429#include "config.h"
430
439IMPLICIT NONE
440
442INTEGER,PARAMETER :: vol7d_ana_lenident=20
443
449 TYPE(geo_coord) :: coord
450 CHARACTER(len=vol7d_ana_lenident) :: ident
452
455
460 MODULE PROCEDURE vol7d_ana_init
461END INTERFACE
462
466 MODULE PROCEDURE vol7d_ana_delete
467END INTERFACE
468
472INTERFACE OPERATOR (==)
473 MODULE PROCEDURE vol7d_ana_eq
474END INTERFACE
475
479INTERFACE OPERATOR (/=)
480 MODULE PROCEDURE vol7d_ana_ne
481END INTERFACE
482
483
488INTERFACE OPERATOR (>)
489 MODULE PROCEDURE vol7d_ana_gt
490END INTERFACE
491
496INTERFACE OPERATOR (<)
497 MODULE PROCEDURE vol7d_ana_lt
498END INTERFACE
499
504INTERFACE OPERATOR (>=)
505 MODULE PROCEDURE vol7d_ana_ge
506END INTERFACE
507
512INTERFACE OPERATOR (<=)
513 MODULE PROCEDURE vol7d_ana_le
514END INTERFACE
515
516
519 MODULE PROCEDURE vol7d_ana_c_e
520END INTERFACE
521
525 MODULE PROCEDURE vol7d_ana_read_unit, vol7d_ana_vect_read_unit
526END INTERFACE
527
531 MODULE PROCEDURE vol7d_ana_write_unit, vol7d_ana_vect_write_unit
532END INTERFACE
533
534#define VOL7D_POLY_TYPE TYPE(vol7d_ana)
535#define VOL7D_POLY_TYPES _ana
536#define ENABLE_SORT
537#include "array_utilities_pre.F90"
538
541 MODULE PROCEDURE to_char_ana
542END INTERFACE
543
546 MODULE PROCEDURE display_ana
547END INTERFACE
548
549CONTAINS
550
554SUBROUTINE vol7d_ana_init(this, lon, lat, ident, ilon, ilat)
555TYPE(vol7d_ana),INTENT(INOUT) :: this
556REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lon
557REAL(kind=fp_geo),INTENT(in),OPTIONAL :: lat
558CHARACTER(len=*),INTENT(in),OPTIONAL :: ident
559INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilon
560INTEGER(kind=int_l),INTENT(in),OPTIONAL :: ilat
561
563IF (PRESENT(ident)) THEN
564 this%ident = ident
565ELSE
566 this%ident = cmiss
567ENDIF
568
569END SUBROUTINE vol7d_ana_init
570
571
573SUBROUTINE vol7d_ana_delete(this)
574TYPE(vol7d_ana),INTENT(INOUT) :: this
575
577this%ident = cmiss
578
579END SUBROUTINE vol7d_ana_delete
580
581
582
583character(len=80) function to_char_ana(this)
584
585TYPE(vol7d_ana),INTENT(in) :: this
586
587to_char_ana="ANA: "//&
590 t2c(this%ident,miss="Missing ident")
591
592return
593
594end function to_char_ana
595
596
597subroutine display_ana(this)
598
599TYPE(vol7d_ana),INTENT(in) :: this
600
601print*, trim(to_char(this))
602
603end subroutine display_ana
604
605
606ELEMENTAL FUNCTION vol7d_ana_eq(this, that) RESULT(res)
607TYPE(vol7d_ana),INTENT(IN) :: this, that
608LOGICAL :: res
609
610res = this%coord == that%coord .AND. this%ident == that%ident
611
612END FUNCTION vol7d_ana_eq
613
614
615ELEMENTAL FUNCTION vol7d_ana_ne(this, that) RESULT(res)
616TYPE(vol7d_ana),INTENT(IN) :: this, that
617LOGICAL :: res
618
619res = .NOT.(this == that)
620
621END FUNCTION vol7d_ana_ne
622
623
624ELEMENTAL FUNCTION vol7d_ana_gt(this, that) RESULT(res)
625TYPE(vol7d_ana),INTENT(IN) :: this, that
626LOGICAL :: res
627
628res = this%ident > that%ident
629
630if ( this%ident == that%ident) then
631 res =this%coord > that%coord
632end if
633
634END FUNCTION vol7d_ana_gt
635
636
637ELEMENTAL FUNCTION vol7d_ana_ge(this, that) RESULT(res)
638TYPE(vol7d_ana),INTENT(IN) :: this, that
639LOGICAL :: res
640
641res = .not. this < that
642
643END FUNCTION vol7d_ana_ge
644
645
646ELEMENTAL FUNCTION vol7d_ana_lt(this, that) RESULT(res)
647TYPE(vol7d_ana),INTENT(IN) :: this, that
648LOGICAL :: res
649
650res = this%ident < that%ident
651
652if ( this%ident == that%ident) then
653 res = this%coord < that%coord
654end if
655
656END FUNCTION vol7d_ana_lt
657
658
659ELEMENTAL FUNCTION vol7d_ana_le(this, that) RESULT(res)
660TYPE(vol7d_ana),INTENT(IN) :: this, that
661LOGICAL :: res
662
663res = .not. (this > that)
664
665END FUNCTION vol7d_ana_le
666
667
668
669ELEMENTAL FUNCTION vol7d_ana_c_e(this) RESULT(c_e)
670TYPE(vol7d_ana),INTENT(IN) :: this
671LOGICAL :: c_e
672c_e = this /= vol7d_ana_miss
673END FUNCTION vol7d_ana_c_e
674
675
680SUBROUTINE vol7d_ana_read_unit(this, unit)
681TYPE(vol7d_ana),INTENT(out) :: this
682INTEGER, INTENT(in) :: unit
683
684CALL vol7d_ana_vect_read_unit((/this/), unit)
685
686END SUBROUTINE vol7d_ana_read_unit
687
688
693SUBROUTINE vol7d_ana_vect_read_unit(this, unit)
694TYPE(vol7d_ana) :: this(:)
695INTEGER, INTENT(in) :: unit
696
697CHARACTER(len=40) :: form
698
700INQUIRE(unit, form=form)
701IF (form == 'FORMATTED') THEN
702 READ(unit,'(A)')this(:)%ident
703ELSE
704 READ(unit)this(:)%ident
705ENDIF
706
707END SUBROUTINE vol7d_ana_vect_read_unit
708
709
714SUBROUTINE vol7d_ana_write_unit(this, unit)
715TYPE(vol7d_ana),INTENT(in) :: this
716INTEGER, INTENT(in) :: unit
717
718CALL vol7d_ana_vect_write_unit((/this/), unit)
719
720END SUBROUTINE vol7d_ana_write_unit
721
722
727SUBROUTINE vol7d_ana_vect_write_unit(this, unit)
728TYPE(vol7d_ana),INTENT(in) :: this(:)
729INTEGER, INTENT(in) :: unit
730
731CHARACTER(len=40) :: form
732
734INQUIRE(unit, form=form)
735IF (form == 'FORMATTED') THEN
736 WRITE(unit,'(A)')this(:)%ident
737ELSE
738 WRITE(unit)this(:)%ident
739ENDIF
740
741END SUBROUTINE vol7d_ana_vect_write_unit
742
743
744#include "array_utilities_inc.F90"
745
746
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 |