libsim Versione 7.2.1
|
◆ qcteminit()
Init del controllo di qualità temporale. Effettua la lettura dei file e altre operazioni di inizializzazione.
Definizione alla linea 322 del file modqctem.F90. 328if (associated(qctem%data_id_out)) then
329 deallocate (qctem%data_id_out)
330 nullify (qctem%data_id_out)
331end if
332
333end subroutine qctemdealloc
334
335
337
338
339subroutine qctemdelete(qctem)
340 ! decostruttore a mezzo
341type(qctemtype),intent(in out) :: qctem
342
343call qctemdealloc(qctem)
344
345call delete(qctem%qccli)
346
347!delete logger
348call l4f_category_delete(qctem%category)
349
350return
351end subroutine qctemdelete
352
353
356
357SUBROUTINE quacontem (qctem,battrinv,battrcli,battrout,&
358 anamask,timemask,levelmask,timerangemask,varmask,networkmask)
359
360
361type(qctemtype),intent(in out) :: qctem
362character (len=10) ,intent(in),optional :: battrinv
363character (len=10) ,intent(in),optional :: battrcli
364character (len=10) ,intent(in),optional :: battrout
365logical ,intent(in),optional :: anamask(:)
366logical ,intent(in),optional :: timemask(:)
367logical ,intent(in),optional :: levelmask(:)
368logical ,intent(in),optional :: timerangemask(:)
369logical ,intent(in),optional :: varmask(:)
370logical ,intent(in),optional :: networkmask(:)
371
372 !REAL(kind=fp_geo) :: lat,lon
373integer :: asec
374 !local
375integer :: indbattrinv,indbattrcli,indbattrout,grunit
376logical :: anamaskl(size(qctem%v7d%ana)), timemaskl(size(qctem%v7d%time)), levelmaskl(size(qctem%v7d%level)), &
377 timerangemaskl(size(qctem%v7d%timerange)), varmaskl(size(qctem%v7d%dativar%r)), networkmaskl(size(qctem%v7d%network))
378
379integer :: indana , indtime ,indlevel ,indtimerange ,inddativarr, indnetwork,indtimenear
380integer :: indcana , indctime ,indclevel ,indctimerange ,indcdativarr, indcnetwork, indcnetworks, indcnetworkg
381real :: datoqui,datoprima,datodopo,climaquii, climaquif
382 !integer, allocatable :: indcanav(:)
383
384 !TYPE(vol7d_ana) :: ana
385TYPE(datetime) :: time,prima, ora, dopo
386TYPE(vol7d_network):: network
387type(timedelta) :: td
388
389double precision :: gradprima,graddopo,grad
390 !call qctem_validate (qctem)
391character(len=512) :: filename
392logical :: exist
393integer :: ind
394
395!localize optional parameter
396if (present(battrinv))then
397 indbattrinv = index_c(qctem%v7d%datiattr%b(:)%btable, battrinv)
398else
399 indbattrinv = index_c(qctem%v7d%datiattr%b(:)%btable, qcattrvarsbtables(1))
400end if
401
402if (present(battrcli))then
403 indbattrcli = index_c(qctem%v7d%datiattr%b(:)%btable, battrcli)
404else
405 indbattrcli = index_c(qctem%v7d%datiattr%b(:)%btable, qcattrvarsbtables(2))
406end if
407
408if (present(battrout))then
409 indbattrout = index_c(qctem%v7d%datiattr%b(:)%btable, battrout)
410else
411 indbattrout = index_c(qctem%v7d%datiattr%b(:)%btable, qcattrvarsbtables(3))
412end if
413
414
415! some checks on input
416!if (indbattrinv <=0 .or. indbattrcli <= 0 .or. indbattrout <= 0 ) then
417if (indbattrout <= 0 ) then
418
419 call l4f_category_log(qctem%category,l4f_error,"error finding attribute index for output")
420 call raise_error()
421
422end if
423
424if (qctem%operation == "gradient") then
425
426 !check for gradient operation
427 if ( size(qctem%v7d%level) > 1 .or.&
428 size(qctem%v7d%timerange) > 1 .or.&
429 size(qctem%v7d%dativar%r) > 1 ) then
430 call l4f_category_log(qctem%category,l4f_error,"gradient operation manage one level/timerange/var only")
431 call raise_error()
432 end if
433
434 !check for data to check
435 if ( size(qctem%v7d%time) < 1 ) then
436 call l4f_category_log(qctem%category,l4f_info,"no data present for gradient operation")
437 return
438 end if
439end if
440
441 ! set other local variable from optional parameter
442if(present(anamask)) then
443 anamaskl = anamask
444else
445 anamaskl = .true.
446endif
447if(present(timemask)) then
448 timemaskl = timemask
449else
450 timemaskl = .true.
451endif
452if(present(levelmask)) then
453 levelmaskl = levelmask
454else
455 levelmaskl = .true.
456endif
457if(present(timerangemask)) then
458 timerangemaskl = timerangemask
459else
460 timerangemaskl = .true.
461endif
462if(present(varmask)) then
463 varmaskl = varmask
464else
465 varmaskl = .true.
466endif
467if(present(networkmask)) then
468 networkmaskl = networkmask
469else
470 networkmaskl = .true.
471endif
472
473! do not touch data that will not in/validated by QC
474qctem%v7d%voldatiattrb(:,:,:,:,:,:,indbattrout)=ibmiss
475
476! normalize data in space and time
477call vol7d_normalize_data(qctem%qccli)
|