libsim Versione 7.2.1
|
◆ 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 2555 del file volgrid6d_class.F90. 2557CALL init(vol7d_out, time_definition=vol7d_in%time_definition)
2558
2559CALL get_val(this, trans_type=trans_type)
2560
2561var_coord_vol = imiss
2562IF (trans_type == 'vertint') THEN
2563
2564 IF (PRESENT(lev_out)) THEN
2565
2566! if vol7d_coord_in provided and allocated, check that it fits
2567 var_coord_in = -1
2568 IF (PRESENT(vol7d_coord_in)) THEN
2569 IF (ASSOCIATED(vol7d_coord_in%voldatir) .AND. &
2570 ASSOCIATED(vol7d_coord_in%dativar%r)) THEN
2571
2572! strictly 1 time, 1 timerange and 1 network
2573 IF (SIZE(vol7d_coord_in%voldatir,2) /= 1 .OR. &
2574 SIZE(vol7d_coord_in%voldatir,4) /= 1 .OR. &
2575 SIZE(vol7d_coord_in%voldatir,6) /= 1) THEN
2576 CALL l4f_log(l4f_error, &
2577 'volume providing constant input vertical coordinate must have &
2578 &only 1 time, 1 timerange and 1 network')
2579 CALL raise_error()
2580 RETURN
2581 ENDIF
2582
2583! search for variable providing vertical coordinate
2584 CALL get_val(this, output_levtype=output_levtype)
2585 vcoord_var = vol7d_var_new(vol7d_level_to_var(output_levtype))
2586 IF (.NOT.c_e(vcoord_var)) THEN
2587 CALL l4f_log(l4f_error, &
2588 'requested output level type '//t2c(output_levtype%level1)// &
2589 ' does not correspond to any known physical variable for &
2590 &providing vertical coordinate')
2591 CALL raise_error()
2592 RETURN
2593 ENDIF
2594
2595 var_coord_in = index(vol7d_coord_in%dativar%r, vcoord_var)
2596
2597 IF (var_coord_in <= 0) THEN
2598 CALL l4f_log(l4f_error, &
2599 'volume providing constant input vertical coordinate contains no &
2600 &real variables matching output level type '//t2c(output_levtype%level1))
2601 CALL raise_error()
2602 RETURN
2603 ENDIF
2604 CALL l4f_log(l4f_info, &
2605 'Coordinate for vertint found in coord volume at position '// &
2606 t2c(var_coord_in))
2607
2608! check vertical coordinate system
2609 CALL get_val(this, input_levtype=input_levtype)
|