libsim  Versione6.3.0

◆ v7d_volgrid6d_transform()

subroutine v7d_volgrid6d_transform ( type(transform_def), intent(in)  this,
type(griddim_def), intent(in), optional  griddim,
type(vol7d), intent(inout)  vol7d_in,
type(volgrid6d), intent(out)  volgrid6d_out,
character(len=*), intent(in), optional  networkname,
type(grid_id), intent(in), optional  gaid_template,
character(len=*), intent(in), optional  categoryappend 
)

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.

Parametri
[in]thisobject specifying the abstract transformation
[in]griddimgriddim specifying the output grid (required by most transformation types)
[in,out]vol7d_inobject to be transformed, it is not modified, despite the INTENT(inout)
[out]volgrid6d_outtransformed object, it does not require initialisation
[in]networknameselect the network to be processed from the vol7d input object, default the first network
[in]gaid_templatethe template (typically grib_api) to be associated with output data, it also helps in improving variable conversion
[in]categoryappendappend this suffix to log4fortran namespace category

Definizione alla linea 2577 del file volgrid6d_class.F90.

2577 ! search for variable providing vertical coordinate
2578  CALL get_val(this, output_levtype=output_levtype)
2579  vcoord_var = vol7d_var_new(vol7d_level_to_var(output_levtype))
2580  IF (.NOT.c_e(vcoord_var)) THEN
2581  CALL l4f_log(l4f_error, &
2582  'requested output level type '//t2c(output_levtype%level1)// &
2583  ' does not correspond to any known physical variable for &
2584  &providing vertical coordinate')
2585  CALL raise_error()
2586  RETURN
2587  ENDIF
2588 
2589  var_coord_in = index(vol7d_coord_in%dativar%r, vcoord_var)
2590 
2591  IF (var_coord_in <= 0) THEN
2592  CALL l4f_log(l4f_error, &
2593  'volume providing constant input vertical coordinate contains no &
2594  &real variables matching output level type '//t2c(output_levtype%level1))
2595  CALL raise_error()
2596  RETURN
2597  ENDIF
2598  CALL l4f_log(l4f_info, &
2599  'Coordinate for vertint found in coord volume at position '// &
2600  t2c(var_coord_in))
2601 
2602 ! check vertical coordinate system
2603  CALL get_val(this, input_levtype=input_levtype)
2604  mask_in = & ! implicit allocation
2605  (vol7d_coord_in%level(:)%level1 == input_levtype%level1) .AND. &
2606  (vol7d_coord_in%level(:)%level2 == input_levtype%level2)
2607  ulstart = firsttrue(mask_in)
2608  ulend = lasttrue(mask_in)
2609  IF (ulstart == 0 .OR. ulend == 0) THEN
2610  CALL l4f_log(l4f_error, &
2611  'coordinate file does not contain levels of type '// &
2612  t2c(input_levtype%level1)//'/'//t2c(input_levtype%level2)// &
2613  ' specified for input data')
2614  CALL raise_error()
2615  RETURN
2616  ENDIF
2617 
2618  coord_3d_in = vol7d_coord_in%voldatir(:,1:1,ulstart:ulend,1,var_coord_in,1) ! dirty 1:1, implicit allocation
2619 ! special case
2620  IF (output_levtype%level1 == 103 &
2621  .OR. output_levtype%level1 == 108) THEN ! surface coordinate needed
2622  spos = firsttrue(vol7d_coord_in%level(:) == vol7d_level_new(1))
2623  IF (spos == 0) THEN
2624  CALL l4f_log(l4f_error, &
2625  'output level '//t2c(output_levtype%level1)// &
2626  ' requested, but height/press of surface not provided in coordinate file')
2627  CALL raise_error()
2628  RETURN
2629  ENDIF
Functions that return a trimmed CHARACTER representation of the input variable.
Index method.

Generated with Doxygen.