Commit bd116816 authored by Keith Bennett's avatar Keith Bennett

Added "species_id" field to SDF point blocks.

This adds read/write support to the fortran SDF library for
adding a "species_id" field to the metadata of all point blocks.
It also adds read support for this field to the C-library.
parent c758acae
......@@ -43,7 +43,7 @@ MODULE sdf_common
INTEGER(i4), POINTER :: station_index(:)
CHARACTER(LEN=8) :: const_value
CHARACTER(LEN=c_id_length) :: id, units, mesh_id, material_id
CHARACTER(LEN=c_id_length) :: vfm_id, obstacle_id
CHARACTER(LEN=c_id_length) :: vfm_id, obstacle_id, species_id
CHARACTER(LEN=c_long_id_length) :: long_id
CHARACTER(LEN=c_id_length), POINTER :: station_ids(:), variable_ids(:)
CHARACTER(LEN=c_id_length), POINTER :: dim_labels(:), dim_units(:)
......@@ -158,7 +158,7 @@ MODULE sdf_common
INTEGER(i4), PARAMETER :: c_stagger_vertex = &
c_stagger_face_x + c_stagger_face_y + c_stagger_face_z
INTEGER(i4), PARAMETER :: sdf_version = 1, sdf_revision = 2
INTEGER(i4), PARAMETER :: sdf_version = 1, sdf_revision = 3
INTEGER(i4), PARAMETER :: soi4 = 4 ! Size of 4-byte integer
INTEGER(i4), PARAMETER :: soi8 = 8 ! Size of 8-byte integer
......
......@@ -8,12 +8,13 @@ CONTAINS
! Mesh loading functions
SUBROUTINE read_point_mesh_info_ru(h, npoints, geometry)
SUBROUTINE read_point_mesh_info_ru(h, npoints, geometry, species_id)
TYPE(sdf_file_handle) :: h
INTEGER(i8), INTENT(OUT), OPTIONAL :: npoints
INTEGER, INTENT(OUT), OPTIONAL :: geometry
INTEGER :: i
CHARACTER(LEN=*), INTENT(OUT), OPTIONAL :: species_id
INTEGER :: i, clen
TYPE(sdf_block_type), POINTER :: b
! Metadata is
......@@ -24,6 +25,7 @@ CONTAINS
! - minval REAL(r8), DIMENSION(ndims)
! - maxval REAL(r8), DIMENSION(ndims)
! - npoints INTEGER(i8)
! - speciesid CHARACTER(id_length)
IF (sdf_info_init(h)) RETURN
......@@ -48,10 +50,21 @@ CONTAINS
CALL read_entry_array_real8(h, b%extents, INT(2*b%ndims))
CALL read_entry_int8(h, b%npoints)
! species_id field added in version 1.3
IF (1000 * h%file_version + h%file_revision .GT. 1002) THEN
CALL read_entry_id(h, b%species_id)
ELSE
CALL safe_copy_id(h, '__unknown__', b%species_id)
ENDIF
ENDIF
IF (PRESENT(geometry)) geometry = b%geometry
IF (PRESENT(npoints)) npoints = b%npoints
IF (PRESENT(species_id)) THEN
clen = MIN(LEN(species_id),INT(c_id_length))
species_id(1:clen) = b%species_id(1:clen)
ENDIF
h%current_location = b%block_start + h%block_header_length
b%done_info = .TRUE.
......@@ -60,14 +73,15 @@ CONTAINS
SUBROUTINE read_point_mesh_info_i4_ru(h, npoints, geometry)
SUBROUTINE read_point_mesh_info_i4_ru(h, npoints, geometry, species_id)
TYPE(sdf_file_handle) :: h
INTEGER(i4), INTENT(OUT) :: npoints
INTEGER, INTENT(OUT), OPTIONAL :: geometry
CHARACTER(LEN=*), INTENT(OUT), OPTIONAL :: species_id
INTEGER(i8) :: npoints8
CALL read_point_mesh_info_ru(h, npoints8, geometry)
CALL read_point_mesh_info_ru(h, npoints8, geometry, species_id)
npoints = INT(npoints8,i4)
END SUBROUTINE read_point_mesh_info_i4_ru
......@@ -76,11 +90,11 @@ CONTAINS
! Variable loading functions
SUBROUTINE read_point_variable_info_ru(h, npoints, mesh_id, units)
SUBROUTINE read_point_variable_info_ru(h, npoints, mesh_id, units, species_id)
TYPE(sdf_file_handle) :: h
INTEGER(i8), INTENT(OUT), OPTIONAL :: npoints
CHARACTER(LEN=*), INTENT(OUT), OPTIONAL :: mesh_id, units
CHARACTER(LEN=*), INTENT(OUT), OPTIONAL :: mesh_id, units, species_id
INTEGER :: clen
TYPE(sdf_block_type), POINTER :: b
......@@ -89,6 +103,7 @@ CONTAINS
! - units CHARACTER(id_length)
! - meshid CHARACTER(id_length)
! - npoints INTEGER(i8)
! - speciesid CHARACTER(id_length)
IF (sdf_info_init(h)) RETURN
......@@ -101,6 +116,13 @@ CONTAINS
CALL read_entry_id(h, b%mesh_id)
CALL read_entry_int8(h, b%npoints)
! species_id field added in version 1.3
IF (1000 * h%file_version + h%file_revision .GT. 1002) THEN
CALL read_entry_id(h, b%species_id)
ELSE
CALL safe_copy_id(h, '__unknown__', b%species_id)
ENDIF
ENDIF
IF (PRESENT(npoints)) npoints = b%npoints
......@@ -112,6 +134,10 @@ CONTAINS
clen = MIN(LEN(mesh_id),INT(c_id_length))
mesh_id(1:clen) = b%mesh_id(1:clen)
ENDIF
IF (PRESENT(species_id)) THEN
clen = MIN(LEN(species_id),INT(c_id_length))
species_id(1:clen) = b%species_id(1:clen)
ENDIF
h%current_location = b%block_start + h%block_header_length
b%done_info = .TRUE.
......
......@@ -10,12 +10,12 @@ MODULE sdf_output_point_r4
CONTAINS
SUBROUTINE write_srl_1d_pt_mesh_i8_r4(h, id, name, x, &
SUBROUTINE write_srl_1d_pt_mesh_i8_r4(h, id, name, species_id, x, &
npoint_global, dim_labels, dim_units, dim_mults)
INTEGER, PARAMETER :: ndims = 1
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r4), DIMENSION(:), INTENT(IN) :: x
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
......@@ -50,7 +50,8 @@ CONTAINS
! Write header
CALL write_point_mesh_meta_r4(h, id, name, dim_labels, dim_units, dim_mults)
CALL write_point_mesh_meta_r4(h, id, name, species_id, dim_labels, &
dim_units, dim_mults)
! Write the real data
......@@ -86,12 +87,12 @@ CONTAINS
SUBROUTINE write_srl_2d_pt_mesh_i8_r4(h, id, name, x, y, &
SUBROUTINE write_srl_2d_pt_mesh_i8_r4(h, id, name, species_id, x, y, &
npoint_global, dim_labels, dim_units, dim_mults)
INTEGER, PARAMETER :: ndims = 2
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r4), DIMENSION(:), INTENT(IN) :: x, y
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
......@@ -128,7 +129,8 @@ CONTAINS
! Write header
CALL write_point_mesh_meta_r4(h, id, name, dim_labels, dim_units, dim_mults)
CALL write_point_mesh_meta_r4(h, id, name, species_id, dim_labels, &
dim_units, dim_mults)
! Write the real data
......@@ -175,12 +177,12 @@ CONTAINS
SUBROUTINE write_srl_3d_pt_mesh_i8_r4(h, id, name, x, y, z, &
SUBROUTINE write_srl_3d_pt_mesh_i8_r4(h, id, name, species_id, x, y, z, &
npoint_global, dim_labels, dim_units, dim_mults)
INTEGER, PARAMETER :: ndims = 3
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r4), DIMENSION(:), INTENT(IN) :: x, y, z
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
......@@ -219,7 +221,8 @@ CONTAINS
! Write header
CALL write_point_mesh_meta_r4(h, id, name, dim_labels, dim_units, dim_mults)
CALL write_point_mesh_meta_r4(h, id, name, species_id, dim_labels, &
dim_units, dim_mults)
! Write the real data
......@@ -277,51 +280,51 @@ CONTAINS
SUBROUTINE write_srl_1d_pt_mesh_i4_r4(h, id, name, x, &
SUBROUTINE write_srl_1d_pt_mesh_i4_r4(h, id, name, species_id, x, &
npoint_global, dim_labels, dim_units, dim_mults)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r4), DIMENSION(:), INTENT(IN) :: x
INTEGER, INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
REAL(r4), DIMENSION(:), INTENT(IN), OPTIONAL :: dim_mults
CALL write_srl_1d_pt_mesh_i8_r4(h, id, name, x, &
CALL write_srl_1d_pt_mesh_i8_r4(h, id, name, species_id, x, &
INT(npoint_global,i8), dim_labels, dim_units, dim_mults)
END SUBROUTINE write_srl_1d_pt_mesh_i4_r4
SUBROUTINE write_srl_2d_pt_mesh_i4_r4(h, id, name, x, y, &
SUBROUTINE write_srl_2d_pt_mesh_i4_r4(h, id, name, species_id, x, y, &
npoint_global, dim_labels, dim_units, dim_mults)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r4), DIMENSION(:), INTENT(IN) :: x, y
INTEGER, INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
REAL(r4), DIMENSION(:), INTENT(IN), OPTIONAL :: dim_mults
CALL write_srl_2d_pt_mesh_i8_r4(h, id, name, x, y, &
CALL write_srl_2d_pt_mesh_i8_r4(h, id, name, species_id, x, y, &
INT(npoint_global,i8), dim_labels, dim_units, dim_mults)
END SUBROUTINE write_srl_2d_pt_mesh_i4_r4
SUBROUTINE write_srl_3d_pt_mesh_i4_r4(h, id, name, x, y, z, &
SUBROUTINE write_srl_3d_pt_mesh_i4_r4(h, id, name, species_id, x, y, z, &
npoint_global, dim_labels, dim_units, dim_mults)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r4), DIMENSION(:), INTENT(IN) :: x, y, z
INTEGER, INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
REAL(r4), DIMENSION(:), INTENT(IN), OPTIONAL :: dim_mults
CALL write_srl_3d_pt_mesh_i8_r4(h, id, name, x, y, z, &
CALL write_srl_3d_pt_mesh_i8_r4(h, id, name, species_id, x, y, z, &
INT(npoint_global,i8), dim_labels, dim_units, dim_mults)
END SUBROUTINE write_srl_3d_pt_mesh_i4_r4
......@@ -332,11 +335,11 @@ CONTAINS
! Code to write a nD point mesh in parallel using an iterator
!----------------------------------------------------------------------------
SUBROUTINE write_point_mesh_r4(h, id, name, npoint_global, ndims, iterator, &
offset, convert_in, dim_labels, dim_units, dim_mults)
SUBROUTINE write_point_mesh_r4(h, id, name, species_id, npoint_global, &
ndims, iterator, offset, convert_in, dim_labels, dim_units, dim_mults)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
INTEGER(i8), INTENT(IN) :: npoint_global
INTEGER(i4), INTENT(IN) :: ndims
INTEGER(i8), INTENT(IN) :: offset
......@@ -394,7 +397,8 @@ CONTAINS
! Write header
CALL write_point_mesh_meta_r4(h, id, name, dim_labels, dim_units, dim_mults)
CALL write_point_mesh_meta_r4(h, id, name, species_id, dim_labels, &
dim_units, dim_mults)
! Write the real data
......@@ -469,11 +473,11 @@ CONTAINS
SUBROUTINE write_srl_pt_var_flt_i8_r4(h, id, name, units, array, &
SUBROUTINE write_srl_pt_var_flt_i8_r4(h, id, name, species_id, units, array, &
npoint_global, mesh_id, mult)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name, units
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id, units
REAL(r4), DIMENSION(:), INTENT(IN) :: array
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN) :: mesh_id
......@@ -495,7 +499,8 @@ CONTAINS
! Write header
CALL write_point_variable_meta_r4(h, id, name, units, mesh_id, mult)
CALL write_point_variable_meta_r4(h, id, name, species_id, units, &
mesh_id, mult)
! Write the real data
......@@ -529,17 +534,17 @@ CONTAINS
SUBROUTINE write_srl_pt_var_flt_i4_r4(h, id, name, units, array, &
SUBROUTINE write_srl_pt_var_flt_i4_r4(h, id, name, species_id, units, array, &
npoint_global, mesh_id, mult)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name, units
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id, units
REAL(r4), DIMENSION(:), INTENT(IN) :: array
INTEGER, INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN) :: mesh_id
REAL(r4), INTENT(IN), OPTIONAL :: mult
CALL write_srl_pt_var_flt_i8_r4(h, id, name, units, array, &
CALL write_srl_pt_var_flt_i8_r4(h, id, name, species_id, units, array, &
INT(npoint_global,i8), mesh_id, mult)
END SUBROUTINE write_srl_pt_var_flt_i4_r4
......@@ -550,11 +555,11 @@ CONTAINS
! Code to write a point variable in parallel using an iterator
!----------------------------------------------------------------------------
SUBROUTINE write_point_variable_r4(h, id, name, units, npoint_global, &
mesh_id, iterator, offset, convert_in, mult)
SUBROUTINE write_point_variable_r4(h, id, name, species_id, units, &
npoint_global, mesh_id, iterator, offset, convert_in, mult)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name, units
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id, units
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN) :: mesh_id
INTEGER(i8), INTENT(IN) :: offset
......@@ -606,7 +611,8 @@ CONTAINS
! Write header
CALL write_point_variable_meta_r4(h, id, name, units, mesh_id, mult)
CALL write_point_variable_meta_r4(h, id, name, species_id, units, &
mesh_id, mult)
! Write the real data
......
......@@ -10,12 +10,12 @@ MODULE sdf_output_point_r8
CONTAINS
SUBROUTINE write_srl_1d_pt_mesh_i8_r8(h, id, name, x, &
SUBROUTINE write_srl_1d_pt_mesh_i8_r8(h, id, name, species_id, x, &
npoint_global, dim_labels, dim_units, dim_mults)
INTEGER, PARAMETER :: ndims = 1
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r8), DIMENSION(:), INTENT(IN) :: x
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
......@@ -50,7 +50,8 @@ CONTAINS
! Write header
CALL write_point_mesh_meta_r8(h, id, name, dim_labels, dim_units, dim_mults)
CALL write_point_mesh_meta_r8(h, id, name, species_id, dim_labels, &
dim_units, dim_mults)
! Write the real data
......@@ -86,12 +87,12 @@ CONTAINS
SUBROUTINE write_srl_2d_pt_mesh_i8_r8(h, id, name, x, y, &
SUBROUTINE write_srl_2d_pt_mesh_i8_r8(h, id, name, species_id, x, y, &
npoint_global, dim_labels, dim_units, dim_mults)
INTEGER, PARAMETER :: ndims = 2
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r8), DIMENSION(:), INTENT(IN) :: x, y
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
......@@ -128,7 +129,8 @@ CONTAINS
! Write header
CALL write_point_mesh_meta_r8(h, id, name, dim_labels, dim_units, dim_mults)
CALL write_point_mesh_meta_r8(h, id, name, species_id, dim_labels, &
dim_units, dim_mults)
! Write the real data
......@@ -175,12 +177,12 @@ CONTAINS
SUBROUTINE write_srl_3d_pt_mesh_i8_r8(h, id, name, x, y, z, &
SUBROUTINE write_srl_3d_pt_mesh_i8_r8(h, id, name, species_id, x, y, z, &
npoint_global, dim_labels, dim_units, dim_mults)
INTEGER, PARAMETER :: ndims = 3
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r8), DIMENSION(:), INTENT(IN) :: x, y, z
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
......@@ -219,7 +221,8 @@ CONTAINS
! Write header
CALL write_point_mesh_meta_r8(h, id, name, dim_labels, dim_units, dim_mults)
CALL write_point_mesh_meta_r8(h, id, name, species_id, dim_labels, &
dim_units, dim_mults)
! Write the real data
......@@ -277,51 +280,51 @@ CONTAINS
SUBROUTINE write_srl_1d_pt_mesh_i4_r8(h, id, name, x, &
SUBROUTINE write_srl_1d_pt_mesh_i4_r8(h, id, name, species_id, x, &
npoint_global, dim_labels, dim_units, dim_mults)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r8), DIMENSION(:), INTENT(IN) :: x
INTEGER, INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
REAL(r8), DIMENSION(:), INTENT(IN), OPTIONAL :: dim_mults
CALL write_srl_1d_pt_mesh_i8_r8(h, id, name, x, &
CALL write_srl_1d_pt_mesh_i8_r8(h, id, name, species_id, x, &
INT(npoint_global,i8), dim_labels, dim_units, dim_mults)
END SUBROUTINE write_srl_1d_pt_mesh_i4_r8
SUBROUTINE write_srl_2d_pt_mesh_i4_r8(h, id, name, x, y, &
SUBROUTINE write_srl_2d_pt_mesh_i4_r8(h, id, name, species_id, x, y, &
npoint_global, dim_labels, dim_units, dim_mults)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r8), DIMENSION(:), INTENT(IN) :: x, y
INTEGER, INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
REAL(r8), DIMENSION(:), INTENT(IN), OPTIONAL :: dim_mults
CALL write_srl_2d_pt_mesh_i8_r8(h, id, name, x, y, &
CALL write_srl_2d_pt_mesh_i8_r8(h, id, name, species_id, x, y, &
INT(npoint_global,i8), dim_labels, dim_units, dim_mults)
END SUBROUTINE write_srl_2d_pt_mesh_i4_r8
SUBROUTINE write_srl_3d_pt_mesh_i4_r8(h, id, name, x, y, z, &
SUBROUTINE write_srl_3d_pt_mesh_i4_r8(h, id, name, species_id, x, y, z, &
npoint_global, dim_labels, dim_units, dim_mults)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
REAL(r8), DIMENSION(:), INTENT(IN) :: x, y, z
INTEGER, INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: dim_labels(:), dim_units(:)
REAL(r8), DIMENSION(:), INTENT(IN), OPTIONAL :: dim_mults
CALL write_srl_3d_pt_mesh_i8_r8(h, id, name, x, y, z, &
CALL write_srl_3d_pt_mesh_i8_r8(h, id, name, species_id, x, y, z, &
INT(npoint_global,i8), dim_labels, dim_units, dim_mults)
END SUBROUTINE write_srl_3d_pt_mesh_i4_r8
......@@ -332,11 +335,11 @@ CONTAINS
! Code to write a nD point mesh in parallel using an iterator
!----------------------------------------------------------------------------
SUBROUTINE write_point_mesh_r8(h, id, name, npoint_global, ndims, iterator, &
offset, convert_in, dim_labels, dim_units, dim_mults)
SUBROUTINE write_point_mesh_r8(h, id, name, species_id, npoint_global, &
ndims, iterator, offset, convert_in, dim_labels, dim_units, dim_mults)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id
INTEGER(i8), INTENT(IN) :: npoint_global
INTEGER(i4), INTENT(IN) :: ndims
INTEGER(i8), INTENT(IN) :: offset
......@@ -394,7 +397,8 @@ CONTAINS
! Write header
CALL write_point_mesh_meta_r8(h, id, name, dim_labels, dim_units, dim_mults)
CALL write_point_mesh_meta_r8(h, id, name, species_id, dim_labels, &
dim_units, dim_mults)
! Write the real data
......@@ -469,11 +473,11 @@ CONTAINS
SUBROUTINE write_srl_pt_var_flt_i8_r8(h, id, name, units, array, &
SUBROUTINE write_srl_pt_var_flt_i8_r8(h, id, name, species_id, units, array, &
npoint_global, mesh_id, mult)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name, units
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id, units
REAL(r8), DIMENSION(:), INTENT(IN) :: array
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN) :: mesh_id
......@@ -495,7 +499,8 @@ CONTAINS
! Write header
CALL write_point_variable_meta_r8(h, id, name, units, mesh_id, mult)
CALL write_point_variable_meta_r8(h, id, name, species_id, units, &
mesh_id, mult)
! Write the real data
......@@ -529,17 +534,17 @@ CONTAINS
SUBROUTINE write_srl_pt_var_flt_i4_r8(h, id, name, units, array, &
SUBROUTINE write_srl_pt_var_flt_i4_r8(h, id, name, species_id, units, array, &
npoint_global, mesh_id, mult)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name, units
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id, units
REAL(r8), DIMENSION(:), INTENT(IN) :: array
INTEGER, INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN) :: mesh_id
REAL(r8), INTENT(IN), OPTIONAL :: mult
CALL write_srl_pt_var_flt_i8_r8(h, id, name, units, array, &
CALL write_srl_pt_var_flt_i8_r8(h, id, name, species_id, units, array, &
INT(npoint_global,i8), mesh_id, mult)
END SUBROUTINE write_srl_pt_var_flt_i4_r8
......@@ -550,11 +555,11 @@ CONTAINS
! Code to write a point variable in parallel using an iterator
!----------------------------------------------------------------------------
SUBROUTINE write_point_variable_r8(h, id, name, units, npoint_global, &
mesh_id, iterator, offset, convert_in, mult)
SUBROUTINE write_point_variable_r8(h, id, name, species_id, units, &
npoint_global, mesh_id, iterator, offset, convert_in, mult)
TYPE(sdf_file_handle) :: h
CHARACTER(LEN=*), INTENT(IN) :: id, name, units
CHARACTER(LEN=*), INTENT(IN) :: id, name, species_id, units
INTEGER(i8), INTENT(IN) :: npoint_global
CHARACTER(LEN=*), INTENT(IN) :: mesh_id
INTEGER(i8), INTENT(IN) :: offset
......@@ -606,7 +611,8 @@ CONTAINS
! Write header
CALL write_point_variable_meta_r8(h, id, name, units, mesh_id, mult)
CALL write_point_variable_meta_r8(h, id, name, species_id, units, &
mesh_id, mult)
! Write the real data
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment