write_complex_rank4 Subroutine

private subroutine write_complex_rank4(parent_id, name, values, dim_names, units, long_name, start)

Uses

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: parent_id

NetCDF ID of the parent group/file

character(len=*), intent(in) :: name

Name of the variable

complex, intent(in), dimension(:, :, :, :) :: values

Value of the integer to write

character(len=*), intent(in), dimension(:) :: dim_names

Array of dimension names

character(len=*), intent(in), optional :: units

Units of coordinate

character(len=*), intent(in), optional :: long_name

Long descriptive name

integer, intent(in), optional, dimension(:) :: start

Contents

Source Code


Source Code

  subroutine write_complex_rank4(parent_id, name, values, dim_names, units, long_name, start)
#ifdef NETCDF
    use neasyf, only: neasyf_write
    use convert, only: c2r
#endif
    !> Name of the variable
    character(len=*), intent(in) :: name
    !> NetCDF ID of the parent group/file
    integer, intent(in) :: parent_id
    !> Value of the integer to write
    complex, dimension(:, :, :, :), intent(in) :: values
    !> Array of dimension names
    character(len=*), dimension(:), intent(in) :: dim_names
    !> Units of coordinate
    character(len=*), optional, intent(in) :: units
    !> Long descriptive name
    character(len=*), optional, intent(in) :: long_name
    integer, dimension(:), optional, intent(in) :: start
#ifdef NETCDF
    real, dimension(2, size(values, 1), size(values, 2), size(values, 3), size(values, 4)) :: real_values
    call c2r(values, real_values)
    call neasyf_write(parent_id, name, real_values, dim_names=dim_names, units=units, long_name=long_name, start=start)
#else
    UNUSED_DUMMY(parent_id); UNUSED_DUMMY(name); UNUSED_DUMMY(values)
    UNUSED_DUMMY(units); UNUSED_DUMMY(long_name); UNUSED_DUMMY(start)
    ! Bug in gcc gives a supurious warning for UNUSED_DUMMY on character(len=*) arrays
    if (.false.) write(*,*) dim_names
#endif
  end subroutine write_complex_rank4