MOM6
mom_diag_mediator::downsample_diag_field Interface Reference

Detailed Description

Down sample a diagnostic field.

Definition at line 85 of file MOM_diag_mediator.F90.

Private functions

subroutine downsample_diag_field_2d (locfield, locfield_dsamp, dl, diag_cs, diag, isv, iev, jsv, jev, mask)
 This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics-compurte indices for the downsampled array 2d interface. More...
 
subroutine downsample_diag_field_3d (locfield, locfield_dsamp, dl, diag_cs, diag, isv, iev, jsv, jev, mask)
 This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics-compurte indices for the downsampled array 3d interface. More...
 

Detailed Description

Down sample a diagnostic field.

Definition at line 85 of file MOM_diag_mediator.F90.

Functions and subroutines

◆ downsample_diag_field_2d()

subroutine mom_diag_mediator::downsample_diag_field::downsample_diag_field_2d ( real, dimension(:,:), pointer  locfield,
real, dimension(:,:), intent(inout), allocatable  locfield_dsamp,
integer, intent(in)  dl,
type(diag_ctrl), intent(in)  diag_cs,
type(diag_type), intent(in)  diag,
integer, intent(inout)  isv,
integer, intent(inout)  iev,
integer, intent(inout)  jsv,
integer, intent(inout)  jev,
real, dimension(:,:), intent(in), optional, target  mask 
)
private

This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics-compurte indices for the downsampled array 2d interface.

Parameters
locfieldInput array pointer
[in,out]locfield_dsampOutput (downsampled) array
[in]diag_csStructure used to regulate diagnostic output
[in]diagA structure describing the diagnostic to post
[in]dlLevel of down sampling
[in,out]isvi-start index for diagnostics
[in,out]ievi-end index for diagnostics
[in,out]jsvj-start index for diagnostics
[in,out]jevj-end index for diagnostics
[in]maskIf present, use this real array as the data mask.

Definition at line 3875 of file MOM_diag_mediator.F90.

3876  real, dimension(:,:), pointer :: locfield !< Input array pointer
3877  real, dimension(:,:), allocatable, intent(inout) :: locfield_dsamp !< Output (downsampled) array
3878  type(diag_ctrl), intent(in) :: diag_CS !< Structure used to regulate diagnostic output
3879  type(diag_type), intent(in) :: diag !< A structure describing the diagnostic to post
3880  integer, intent(in) :: dl !< Level of down sampling
3881  integer, intent(inout) :: isv !< i-start index for diagnostics
3882  integer, intent(inout) :: iev !< i-end index for diagnostics
3883  integer, intent(inout) :: jsv !< j-start index for diagnostics
3884  integer, intent(inout) :: jev !< j-end index for diagnostics
3885  real, optional,target, intent(in) :: mask(:,:) !< If present, use this real array as the data mask.
3886  ! Locals
3887  real, dimension(:,:), pointer :: locmask
3888  integer :: f1,f2,isv_o,jsv_o
3889 
3890  locmask => null()
3891  !Get the correct indices corresponding to input field
3892  !Shape of the input diag field
3893  f1=size(locfield,1)
3894  f2=size(locfield,2)
3895  !Save the extents of the original (fine) domain
3896  isv_o=isv;jsv_o=jsv
3897  !Get the shape of the downsampled field and overwrite isv,iev,jsv,jev with them
3898  call downsample_diag_indices_get(f1,f2, dl, diag_cs,isv,iev,jsv,jev)
3899  !Set the non-downsampled mask, it must be associated and initialized
3900  if (present(mask)) then
3901  locmask => mask
3902  elseif (associated(diag%axes%mask2d)) then
3903  locmask => diag%axes%mask2d
3904  else
3905  call mom_error(fatal, "downsample_diag_field_2d: Cannot downsample without a mask!!! ")
3906  endif
3907 
3908  call downsample_field(locfield, locfield_dsamp, dl, diag%xyz_method, locmask, diag_cs,diag, &
3909  isv_o,jsv_o,isv,iev,jsv,jev)
3910 

◆ downsample_diag_field_3d()

subroutine mom_diag_mediator::downsample_diag_field::downsample_diag_field_3d ( real, dimension(:,:,:), pointer  locfield,
real, dimension(:,:,:), intent(inout), allocatable  locfield_dsamp,
integer, intent(in)  dl,
type(diag_ctrl), intent(in)  diag_cs,
type(diag_type), intent(in)  diag,
integer, intent(inout)  isv,
integer, intent(inout)  iev,
integer, intent(inout)  jsv,
integer, intent(inout)  jev,
real, dimension(:,:,:), intent(in), optional, target  mask 
)
private

This subroutine allocates and computes a downsampled array from an input array It also determines the diagnostics-compurte indices for the downsampled array 3d interface.

Parameters
locfieldInput array pointer
[in,out]locfield_dsampOutput (downsampled) array
[in]diag_csStructure used to regulate diagnostic output
[in]diagA structure describing the diagnostic to post
[in]dlLevel of down sampling
[in,out]isvi-start index for diagnostics
[in,out]ievi-end index for diagnostics
[in,out]jsvj-start index for diagnostics
[in,out]jevj-end index for diagnostics
[in]maskIf present, use this real array as the data mask.

Definition at line 3834 of file MOM_diag_mediator.F90.

3835  real, dimension(:,:,:), pointer :: locfield !< Input array pointer
3836  real, dimension(:,:,:), allocatable, intent(inout) :: locfield_dsamp !< Output (downsampled) array
3837  type(diag_ctrl), intent(in) :: diag_CS !< Structure used to regulate diagnostic output
3838  type(diag_type), intent(in) :: diag !< A structure describing the diagnostic to post
3839  integer, intent(in) :: dl !< Level of down sampling
3840  integer, intent(inout) :: isv !< i-start index for diagnostics
3841  integer, intent(inout) :: iev !< i-end index for diagnostics
3842  integer, intent(inout) :: jsv !< j-start index for diagnostics
3843  integer, intent(inout) :: jev !< j-end index for diagnostics
3844  real, optional,target, intent(in) :: mask(:,:,:) !< If present, use this real array as the data mask.
3845  ! Locals
3846  real, dimension(:,:,:), pointer :: locmask
3847  integer :: f1,f2,isv_o,jsv_o
3848 
3849  locmask => null()
3850  !Get the correct indices corresponding to input field
3851  !Shape of the input diag field
3852  f1=size(locfield,1)
3853  f2=size(locfield,2)
3854  !Save the extents of the original (fine) domain
3855  isv_o=isv;jsv_o=jsv
3856  !Get the shape of the downsampled field and overwrite isv,iev,jsv,jev with them
3857  call downsample_diag_indices_get(f1,f2, dl, diag_cs,isv,iev,jsv,jev)
3858  !Set the non-downsampled mask, it must be associated and initialized
3859  if (present(mask)) then
3860  locmask => mask
3861  elseif (associated(diag%axes%mask3d)) then
3862  locmask => diag%axes%mask3d
3863  else
3864  call mom_error(fatal, "downsample_diag_field_3d: Cannot downsample without a mask!!! ")
3865  endif
3866 
3867  call downsample_field(locfield, locfield_dsamp, dl, diag%xyz_method, locmask, diag_cs, diag, &
3868  isv_o,jsv_o,isv,iev,jsv,jev)
3869 

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