|
◆ qccliinit()
subroutine modqccli::qccliinit |
( |
type(qcclitype), intent(inout) |
qccli, |
|
|
type (vol7d), intent(in), target |
v7d, |
|
|
character(len=*), dimension(:), intent(in) |
var, |
|
|
type(datetime), intent(in), optional |
timei, |
|
|
type(datetime), intent(in), optional |
timef, |
|
|
integer, dimension(:,:,:,:,:), intent(in), optional, target |
data_id_in, |
|
|
character(len=*), intent(in), optional |
macropath, |
|
|
character(len=*), intent(in), optional |
climapath, |
|
|
character(len=*), intent(in), optional |
extremepath, |
|
|
character(len=*), intent(in), optional |
dsncli, |
|
|
character(len=*), intent(in), optional |
dsnextreme, |
|
|
character(len=*), intent(in), optional |
user, |
|
|
character(len=*), intent(in), optional |
password, |
|
|
logical, intent(in), optional |
height2level, |
|
|
character(len=*), intent(in), optional |
categoryappend |
|
) |
| |
|
private |
Init del controllo di qualità climatico.
Effettua la lettura dei file e altre operazioni di inizializzazione.
- Parametri
-
[in,out] | qccli | Oggetto per il controllo climatico |
[in] | v7d | Il volume Vol7d da controllare |
[in] | var | variabili da importare secondo la tabella B locale o relativi alias |
[in] | timei | estremi temporali (inizio e fine) dell'estrazione per l'importazione |
[in] | timef | estremi temporali (inizio e fine) dell'estrazione per l'importazione |
[in] | data_id_in | Indici dei dati in DB |
[in] | macropath | file delle macroaree |
[in] | climapath | file con il volume del clima |
[in] | extremepath | file con il volume del clima |
[in] | height2level | use conventional level starting from station height |
[in] | categoryappend | appennde questo suffisso al namespace category di log4fortran $!> coordinate minime e massime che definiscono il $!! rettangolo di estrazione per l'importazione $TYPE(geo_coord),INTENT(inout),optional :: coordmin,coordmax |
Definizione alla linea 392 del file modqccli.F90.
394 if (.not. c_e(ldsnextreme)) then 398 if (.not. c_e(filepathextreme)) then 399 filepathextreme=get_package_filepath( 'qcclima-extreme.v7d', filetype_data 402 if ( c_e(filepathextreme)) then 404 select case (trim(lowercase(suffixname(filepathextreme)))) 408 call import(qccli%extreme,filename=filepathextreme,unit=iuni) 413 call init(v7d_dballeextreme,file=.true.,filename=filepathextreme,categoryappend ".climaextreme" 415 call import(v7d_dballeextreme,var=var,coordmin=lcoordmin, coordmax 416 "r",i=1, size(var))/),attr=(/qcattrvarsbtables(2)/),attrkind "b" 417 call copy(v7d_dballeextreme%vol7d,qccli%extreme) 418 call delete(v7d_dballeextreme) 423 if ( c_e(filepathextreme)) then 424 call l4f_category_log(qccli%category,l4f_error,& 425 "file type not supported (user .v7d or .bufr suffix only): "//trim 431 call l4f_category_log(qccli%category,l4f_warn, "extreme volume not iniziatized: QC or normalize data will not be possible" 433 call init(qccli%extreme) 440 call l4f_category_log(qccli%category,l4f_debug, "init v7d_dballeextreme" 441 call init(v7d_dballeextreme,dsn=ldsnextreme,user=luser,password=lpassword 443 call l4f_category_log(qccli%category,l4f_debug, "import v7d_dballeextreme" 445 call import(v7d_dballeextreme,var=var,coordmin=lcoordmin, coordmax=lcoordmax 446 "r",i=1, size(var))/),attr=(/qcattrvarsbtables(2)/),attrkind "b" 447 call copy(v7d_dballeextreme%vol7d,qccli%extreme) 448 call delete(v7d_dballeextreme) 467 if ( associated(qccli%in_macroa)) then 468 qccli%in_macroa = imiss 470 DO i = 1, SIZE(qccli%v7d%ana) 472 CALL getval(qccli%v7d%ana(i)%coord,lon=lon,lat=lat) 473 point = georef_coord_new(x=lon, y=lat) 474 DO j = 1, macroa%arraysize 475 IF (inside(point, macroa%array(j))) THEN 476 qccli%in_macroa(i) = j 486 end subroutine qccliinit 490 subroutine qcclialloc(qccli) 493 type(qcclitype), intent(in out) :: qccli 514 if ( associated (qccli%v7d%ana )) then 515 allocate (qccli%in_macroa( size(qccli%v7d%ana )),stat=istatt) 516 if (istatt /= 0) then 517 call l4f_category_log(qccli%category,l4f_error, "allocate error") 518 call raise_error( "allocate error") 522 if ( associated(qccli%data_id_in)) then 523 sh=shape(qccli%data_id_in) 524 allocate (qccli%data_id_out(sh(1),sh(2),sh(3),sh(4),sh(5)),stat=istatt 526 call l4f_category_log(qccli%category,l4f_error, "allocate error") 527 call raise_error( "allocate error") 529 qccli%data_id_out=imiss 535 end subroutine qcclialloc 540 subroutine qcclidealloc(qccli) 543 type(qcclitype), intent(in out) :: qccli 553 if ( associated (qccli%in_macroa)) then 554 deallocate (qccli%in_macroa) 557 if ( associated(qccli%data_id_out)) then 558 deallocate (qccli%data_id_out) 562 end subroutine qcclidealloc 568 subroutine qcclidelete(qccli) 570 type(qcclitype), intent(in out) :: qccli 581 end subroutine qcclidelete 597 SUBROUTINE vol7d_normalize_data(qccli) 599 TYPE(qcclitype), INTENT(inout) :: qccli 602 real :: datoqui, perc25, perc50,perc75 603 integer :: indana , indtime ,indlevel ,indtimerange ,inddativarr, 604 integer :: indcana, indvar,indctime,indclevel,indctimerange,indcdativarr 606 integer :: iclv(size(qccli%v7d%ana)) 609 TYPE(vol7d_var) :: var 610 TYPE(vol7d_ana) :: ana 611 TYPE(datetime) :: time, nintime 612 TYPE(vol7d_level):: level 613 integer :: mese, ora, desc, iarea, k 631 if (.not. associated(qccli%extreme%voldatir)) then 632 call l4f_category_log(qccli%category,l4f_warn, "extreme data not associated: normalize data not possible" 639 if (qccli%height2level) then 640 call init(var, btable= "B07030") 643 indvar = index(qccli%v7d%anavar, var, type=type) 645 do indana=1, size(qccli%v7d%ana) 649 do indnetwork=1, size(qccli%v7d%network) 651 if( indvar > 0 ) then 654 height=realdat(qccli%v7d%volanad(indana,indvar,indnetwork),qccli%v7d%anavar%d 656 height=realdat(qccli%v7d%volanar(indana,indvar,indnetwork),qccli%v7d%anavar%r 658 height=realdat(qccli%v7d%volanai(indana,indvar,indnetwork),qccli%v7d%anavar%i 660 height=realdat(qccli%v7d%volanab(indana,indvar,indnetwork),qccli%v7d%anavar%b 662 height=realdat(qccli%v7d%volanac(indana,indvar,indnetwork),qccli%v7d%anavar%c 666 if ( c_e(height)) exit 669 if ( c_e(height)) then 670 iclv(indana)=firsttrue(cli_level1 <= height .and. height <= cli_level2 676 call l4f_category_log(qccli%category,l4f_debug, 'vol7d_normalize_data height has value '"Missing" 677 call l4f_category_log(qccli%category,l4f_debug, 'for indana having number ' 678 value '//t2c(iclv(indana),"Missing")) 685 .not. if ( associated (qccli%in_macroa)) then 686 call l4f_category_log(qccli%category,L4F_WARN,"macroarea data not iniziatized: normalize data not possible") 687 qccli%v7d%voldatir=rmiss 688 ! call raise_fatal_error() 692 .not. if ( associated(qccli%extreme%voldatir)) then 693 call l4f_category_log(qccli%category,L4F_WARN,"qccli%extreme%voldatir not iniziatized: normalize data not possible") 694 qccli%v7d%voldatir=rmiss 695 ! call raise_fatal_error() Functions that return a trimmed CHARACTER representation of the input variable.
Distruttori per le 2 classi.
Restituiscono il valore dell'oggetto nella forma desiderata.
Costruttori per le classi datetime e timedelta.
|