libsim Versione 7.2.6
|
◆ v7d_volgrid6d_transform()
Performs the specified abstract transformation on the data provided. The abstract transformation is specified by this parameter; the corresponding specifical transformation (grid_transform object) is created and destroyed internally. The output transformed object is created internally and it does not require preliminary initialisation.
Definizione alla linea 2603 del file volgrid6d_class.F90. 2605CALL init(vol7d_out, time_definition=vol7d_in%time_definition)
2606
2607CALL get_val(this, trans_type=trans_type)
2608
2609var_coord_vol = imiss
2610IF (trans_type == 'vertint') THEN
2611
2612 IF (PRESENT(lev_out)) THEN
2613
2614! if vol7d_coord_in provided and allocated, check that it fits
2615 var_coord_in = -1
2616 IF (PRESENT(vol7d_coord_in)) THEN
2617 IF (ASSOCIATED(vol7d_coord_in%voldatir) .AND. &
2618 ASSOCIATED(vol7d_coord_in%dativar%r)) THEN
2619
2620! strictly 1 time, 1 timerange and 1 network
2621 IF (SIZE(vol7d_coord_in%voldatir,2) /= 1 .OR. &
2622 SIZE(vol7d_coord_in%voldatir,4) /= 1 .OR. &
2623 SIZE(vol7d_coord_in%voldatir,6) /= 1) THEN
2624 CALL l4f_log(l4f_error, &
2625 'volume providing constant input vertical coordinate must have &
2626 &only 1 time, 1 timerange and 1 network')
2627 CALL raise_error()
2628 RETURN
2629 ENDIF
2630
2631! search for variable providing vertical coordinate
2632 CALL get_val(this, output_levtype=output_levtype)
2633 vcoord_var = vol7d_var_new(vol7d_level_to_var(output_levtype))
2634 IF (.NOT.c_e(vcoord_var)) THEN
2635 CALL l4f_log(l4f_error, &
2636 'requested output level type '//t2c(output_levtype%level1)// &
2637 ' does not correspond to any known physical variable for &
2638 &providing vertical coordinate')
2639 CALL raise_error()
2640 RETURN
2641 ENDIF
2642
2643 var_coord_in = index(vol7d_coord_in%dativar%r, vcoord_var)
2644
2645 IF (var_coord_in <= 0) THEN
2646 CALL l4f_log(l4f_error, &
2647 'volume providing constant input vertical coordinate contains no &
2648 &real variables matching output level type '//t2c(output_levtype%level1))
2649 CALL raise_error()
2650 RETURN
2651 ENDIF
2652 CALL l4f_log(l4f_info, &
2653 'Coordinate for vertint found in coord volume at position '// &
2654 t2c(var_coord_in))
2655
2656! check vertical coordinate system
2657 CALL get_val(this, input_levtype=input_levtype)
|