MOM6
mom_io::mom_read_data Interface Reference

Detailed Description

Read a data field from a file.

Definition at line 74 of file MOM_io.F90.

Private functions

subroutine mom_read_data_4d (filename, fieldname, data, MOM_Domain, timelevel, position, scale)
 This function uses the fms_io function read_data to read a distributed 4-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE. More...
 
subroutine mom_read_data_3d (filename, fieldname, data, MOM_Domain, timelevel, position, scale)
 This function uses the fms_io function read_data to read a distributed 3-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE. More...
 
subroutine mom_read_data_2d (filename, fieldname, data, MOM_Domain, timelevel, position, scale)
 This function uses the fms_io function read_data to read a distributed 2-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE. More...
 
subroutine mom_read_data_1d (filename, fieldname, data, timelevel, scale)
 This function uses the fms_io function read_data to read 1-D data field named "fieldname" from file "filename". More...
 

Functions and subroutines

◆ mom_read_data_1d()

subroutine mom_io::mom_read_data::mom_read_data_1d ( character(len=*), intent(in)  filename,
character(len=*), intent(in)  fieldname,
real, dimension(:), intent(inout)  data,
integer, intent(in), optional  timelevel,
real, intent(in), optional  scale 
)
private

This function uses the fms_io function read_data to read 1-D data field named "fieldname" from file "filename".

Parameters
[in]filenameThe name of the file to read
[in]fieldnameThe variable name of the data in the file
[in,out]dataThe 1-dimensional array into which the data
[in]timelevelThe time level in the file to read
[in]scaleA scaling factor that the field is multiplied by before they are returned.

Definition at line 850 of file MOM_io.F90.

850  character(len=*), intent(in) :: filename !< The name of the file to read
851  character(len=*), intent(in) :: fieldname !< The variable name of the data in the file
852  real, dimension(:), intent(inout) :: data !< The 1-dimensional array into which the data
853  integer, optional, intent(in) :: timelevel !< The time level in the file to read
854  real, optional, intent(in) :: scale !< A scaling factor that the field is multiplied
855  !! by before they are returned.
856 
857  call read_data(filename, fieldname, data, timelevel=timelevel, no_domain=.true.)
858 
859  if (present(scale)) then ; if (scale /= 1.0) then
860  data(:) = scale*data(:)
861  endif ; endif
862 

◆ mom_read_data_2d()

subroutine mom_io::mom_read_data::mom_read_data_2d ( character(len=*), intent(in)  filename,
character(len=*), intent(in)  fieldname,
real, dimension(:,:), intent(inout)  data,
type(mom_domain_type), intent(in)  MOM_Domain,
integer, intent(in), optional  timelevel,
integer, intent(in), optional  position,
real, intent(in), optional  scale 
)
private

This function uses the fms_io function read_data to read a distributed 2-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE.

Parameters
[in]filenameThe name of the file to read
[in]fieldnameThe variable name of the data in the file
[in,out]dataThe 2-dimensional array into which the data should be read
[in]mom_domainThe MOM_Domain that describes the decomposition
[in]timelevelThe time level in the file to read
[in]positionA flag indicating where this data is located
[in]scaleA scaling factor that the field is multiplied by before they are returned.

Definition at line 870 of file MOM_io.F90.

870  character(len=*), intent(in) :: filename !< The name of the file to read
871  character(len=*), intent(in) :: fieldname !< The variable name of the data in the file
872  real, dimension(:,:), intent(inout) :: data !< The 2-dimensional array into which the data
873  !! should be read
874  type(MOM_domain_type), intent(in) :: MOM_Domain !< The MOM_Domain that describes the decomposition
875  integer, optional, intent(in) :: timelevel !< The time level in the file to read
876  integer, optional, intent(in) :: position !< A flag indicating where this data is located
877  real, optional, intent(in) :: scale !< A scaling factor that the field is multiplied
878  !! by before they are returned.
879 
880  integer :: is, ie, js, je
881 
882  call read_data(filename, fieldname, data, mom_domain%mpp_domain, &
883  timelevel=timelevel, position=position)
884 
885  if (present(scale)) then ; if (scale /= 1.0) then
886  call get_simple_array_i_ind(mom_domain, size(data,1), is, ie)
887  call get_simple_array_j_ind(mom_domain, size(data,2), js, je)
888  data(is:ie,js:je) = scale*data(is:ie,js:je)
889  endif ; endif
890 

◆ mom_read_data_3d()

subroutine mom_io::mom_read_data::mom_read_data_3d ( character(len=*), intent(in)  filename,
character(len=*), intent(in)  fieldname,
real, dimension(:,:,:), intent(inout)  data,
type(mom_domain_type), intent(in)  MOM_Domain,
integer, intent(in), optional  timelevel,
integer, intent(in), optional  position,
real, intent(in), optional  scale 
)
private

This function uses the fms_io function read_data to read a distributed 3-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE.

Parameters
[in]filenameThe name of the file to read
[in]fieldnameThe variable name of the data in the file
[in,out]dataThe 3-dimensional array into which the data should be read
[in]mom_domainThe MOM_Domain that describes the decomposition
[in]timelevelThe time level in the file to read
[in]positionA flag indicating where this data is located
[in]scaleA scaling factor that the field is multiplied by before they are returned.

Definition at line 898 of file MOM_io.F90.

898  character(len=*), intent(in) :: filename !< The name of the file to read
899  character(len=*), intent(in) :: fieldname !< The variable name of the data in the file
900  real, dimension(:,:,:), intent(inout) :: data !< The 3-dimensional array into which the data
901  !! should be read
902  type(MOM_domain_type), intent(in) :: MOM_Domain !< The MOM_Domain that describes the decomposition
903  integer, optional, intent(in) :: timelevel !< The time level in the file to read
904  integer, optional, intent(in) :: position !< A flag indicating where this data is located
905  real, optional, intent(in) :: scale !< A scaling factor that the field is multiplied
906  !! by before they are returned.
907 
908  integer :: is, ie, js, je
909 
910  call read_data(filename, fieldname, data, mom_domain%mpp_domain, &
911  timelevel=timelevel, position=position)
912 
913  if (present(scale)) then ; if (scale /= 1.0) then
914  call get_simple_array_i_ind(mom_domain, size(data,1), is, ie)
915  call get_simple_array_j_ind(mom_domain, size(data,2), js, je)
916  data(is:ie,js:je,:) = scale*data(is:ie,js:je,:)
917  endif ; endif
918 

◆ mom_read_data_4d()

subroutine mom_io::mom_read_data::mom_read_data_4d ( character(len=*), intent(in)  filename,
character(len=*), intent(in)  fieldname,
real, dimension(:,:,:,:), intent(inout)  data,
type(mom_domain_type), intent(in)  MOM_Domain,
integer, intent(in), optional  timelevel,
integer, intent(in), optional  position,
real, intent(in), optional  scale 
)
private

This function uses the fms_io function read_data to read a distributed 4-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE.

Parameters
[in]filenameThe name of the file to read
[in]fieldnameThe variable name of the data in the file
[in,out]dataThe 4-dimensional array into which the data should be read
[in]mom_domainThe MOM_Domain that describes the decomposition
[in]timelevelThe time level in the file to read
[in]positionA flag indicating where this data is located
[in]scaleA scaling factor that the field is multiplied by before they are returned.

Definition at line 926 of file MOM_io.F90.

926  character(len=*), intent(in) :: filename !< The name of the file to read
927  character(len=*), intent(in) :: fieldname !< The variable name of the data in the file
928  real, dimension(:,:,:,:), intent(inout) :: data !< The 4-dimensional array into which the data
929  !! should be read
930  type(MOM_domain_type), intent(in) :: MOM_Domain !< The MOM_Domain that describes the decomposition
931  integer, optional, intent(in) :: timelevel !< The time level in the file to read
932  integer, optional, intent(in) :: position !< A flag indicating where this data is located
933  real, optional, intent(in) :: scale !< A scaling factor that the field is multiplied
934  !! by before they are returned.
935 
936  integer :: is, ie, js, je
937 
938  call read_data(filename, fieldname, data, mom_domain%mpp_domain, &
939  timelevel=timelevel, position=position)
940 
941  if (present(scale)) then ; if (scale /= 1.0) then
942  call get_simple_array_i_ind(mom_domain, size(data,1), is, ie)
943  call get_simple_array_j_ind(mom_domain, size(data,2), js, je)
944  data(is:ie,js:je,:,:) = scale*data(is:ie,js:je,:,:)
945  endif ; endif
946 

The documentation for this interface was generated from the following file: