MAPL_DownbitMod Module


Uses

  • module~~mapl_downbitmod~~UsesGraph module~mapl_downbitmod MAPL_DownbitMod iso_c_binding iso_c_binding module~mapl_downbitmod->iso_c_binding module~mapl_exceptionhandling MAPL_ExceptionHandling module~mapl_downbitmod->module~mapl_exceptionhandling mpi mpi module~mapl_downbitmod->mpi module~mapl_errorhandlingmod MAPL_ErrorHandlingMod module~mapl_exceptionhandling->module~mapl_errorhandlingmod module~mapl_throwmod MAPL_ThrowMod module~mapl_exceptionhandling->module~mapl_throwmod module~mapl_errorhandlingmod->mpi module~mapl_errorhandlingmod->module~mapl_throwmod

Used by

  • module~~mapl_downbitmod~~UsedByGraph module~mapl_downbitmod MAPL_DownbitMod module~mapl_epochswathmod MAPL_EpochSwathMod module~mapl_epochswathmod->module~mapl_downbitmod module~mapl_griddediomod MAPL_GriddedIOMod module~mapl_griddediomod->module~mapl_downbitmod module~mapl_historygridcompmod MAPL_HistoryGridCompMod module~mapl_historygridcompmod->module~mapl_downbitmod module~mapl_historygridcompmod->module~mapl_epochswathmod module~mapl_genericmod MAPL_GenericMod module~mapl_historygridcompmod->module~mapl_genericmod module~mapl_historycollectionmod MAPL_HistoryCollectionMod module~mapl_historygridcompmod->module~mapl_historycollectionmod module~maplshared MaplShared module~maplshared->module~mapl_downbitmod module~extdata_drivergridcompmod ExtData_DriverGridCompMod module~extdata_drivergridcompmod->module~mapl_historygridcompmod module~extdatautroot_gridcompmod ExtDataUtRoot_GridCompMod module~extdatautroot_gridcompmod->module~maplshared module~mapl_capgridcompmod MAPL_CapGridCompMod module~mapl_capgridcompmod->module~mapl_historygridcompmod module~mapl_capgridcompmod->module~mapl_genericmod module~mapl_esmffieldbundleread MAPL_ESMFFieldBundleRead module~mapl_esmffieldbundleread->module~mapl_griddediomod module~mapl_esmffieldbundlewrite MAPL_ESMFFieldBundleWrite module~mapl_esmffieldbundlewrite->module~mapl_griddediomod module~mapl_extdata_iobundlemod MAPL_ExtData_IOBundleMod module~mapl_extdata_iobundlemod->module~mapl_griddediomod module~mapl_extdatang_iobundlemod MAPL_ExtDataNG_IOBundleMod module~mapl_extdatang_iobundlemod->module~mapl_griddediomod module~mapl_genericmod->module~maplshared module~mapl_historycollectionmod->module~mapl_epochswathmod module~mapl_historycollectionmod->module~mapl_griddediomod module~bundletestsupport BundleTestSupport module~bundletestsupport->module~mapl_esmffieldbundleread module~bundletestsupport->module~mapl_esmffieldbundlewrite module~extdatadrivermod ExtDataDriverMod module~extdatadrivermod->module~extdata_drivergridcompmod module~extdatadrivermod->module~extdatautroot_gridcompmod module~mapl MAPL module~mapl->module~mapl_esmffieldbundleread module~mapl->module~mapl_esmffieldbundlewrite module~mapl->module~mapl_genericmod module~mapl_capmod MAPL_CapMod module~mapl_capmod->module~mapl_capgridcompmod module~mapl_extdata_iobundlevectormod MAPL_ExtData_IOBundleVectorMod module~mapl_extdata_iobundlevectormod->module~mapl_extdata_iobundlemod module~mapl_extdatagridcomp2g MAPL_ExtDataGridComp2G module~mapl_extdatagridcomp2g->module~mapl_extdatang_iobundlemod module~mapl_extdatagridcomp2g->module~mapl_genericmod module~mapl_extdatagridcompmod MAPL_ExtDataGridCompMod module~mapl_extdatagridcompmod->module~mapl_extdata_iobundlemod module~mapl_extdatagridcompmod->module~mapl_genericmod module~mapl_extdatang_iobundlevectormod MAPL_ExtDataNG_IOBundleVectorMod module~mapl_extdatang_iobundlevectormod->module~mapl_extdatang_iobundlemod module~mapl_historycollectionvectormod MAPL_HistoryCollectionVectorMod module~mapl_historycollectionvectormod->module~mapl_historycollectionmod module~mapl_orbgridcompmod MAPL_OrbGridCompMod module~mapl_orbgridcompmod->module~mapl_genericmod module~mapl_stringfieldsetmapmod MAPL_StringFieldSetMapMod module~mapl_stringfieldsetmapmod->module~mapl_historycollectionmod program~comp_testing_driver comp_testing_driver program~comp_testing_driver->module~mapl_capgridcompmod program~comp_testing_driver->module~mapl_genericmod program~extdata_driver ExtData_Driver program~extdata_driver->module~extdata_drivergridcompmod program~extdata_driver->module~extdatautroot_gridcompmod program~regrid_util Regrid_Util program~regrid_util->module~mapl_esmffieldbundleread program~regrid_util->module~mapl_esmffieldbundlewrite

Interfaces

public interface DownBit

  • private subroutine DownBit1D(x, xr, nbits_to_keep, undef, flops, mpi_comm, rc)

    Arguments

    Type IntentOptional Attributes Name
    real, intent(in), target :: x(:)
    real, intent(inout), target :: xr(:)
    integer, intent(in) :: nbits_to_keep
    real, intent(in), optional :: undef
    logical, intent(in), optional :: flops
    integer, intent(in), optional :: mpi_comm
    integer, intent(out), optional :: rc
  • private subroutine DownBit2D(x, xr, nbits_to_keep, undef, flops, mpi_comm, rc)

    This routine returns a lower precision version of the input array x which retains nbits_to_keep of precision. Two algorithms are implemented: 1) a fast one writen in C which downgrades precision by shifting xbits = 24 - nbits_to_keep bits of the mantissa, and 2) a slower float point based algorithm which is the same algorithm as GRIB with fixed number of bits packing. Notice that as in GRIB the scaling factor is forced to be a power of 2 rather than a generic float. Using this power of 2 binary scaling has the advantage of improving the GZIP compression rates.

    This routine returns an array of the same type and kind as the input array, so no data compression has taken place. The goal here is to reduce the entropy in the input array, thereby improving compression rates by the lossless algorithms implemented internally by HDF-4/5 when writing these data to a file. In fact, these GZIP’ed and pre-conditioned files have sizes comparable to the equivalent GRIB file, while being a bonafide self-describing HDF/NetCDF file.

    @note Todo Perhaps implement GRIB decimal scaling (variable number of bits).

    History

    • 06Dec2006 da Silva Initial version.

    Arguments

    Type IntentOptional Attributes Name
    real, intent(in) :: x(:,:)

    input array

    real, intent(out) :: xr(:,:)

    precision reduced array; can share storage with input array if it has same kind

    integer, intent(in) :: nbits_to_keep

    number of bits per word to retain

    real, intent(in), optional :: undef

    missing value

    logical, intent(in), optional :: flops

    if true, uses slower float point based algorithm

    integer, intent(in), optional :: mpi_comm
    integer, intent(out), optional :: rc

    error code = 0 - all is well /= 0 - something went wrong

  • private subroutine DownBit3D(x, xr, nbits_to_keep, undef, flops, mpi_comm, rc)

    The routine DownBit3D returns a lower precision version of the input array x which retains nbits_to_keep of precision. See routine ESMF_CFIODownBit2D or additional details. This version for rank 3 arrays, calls ESMF_CFIODownBit2D() for each vertical level.

    History

    • 06Dec2006 da Silva Initial version.

    Arguments

    Type IntentOptional Attributes Name
    real, intent(in) :: x(:,:,:)

    input array

    real, intent(out) :: xr(:,:,:)

    precision reduced array; can share storage with input array if it has same kind

    integer, intent(in) :: nbits_to_keep

    number of bits per word to retain - no action if nbits_to_keep<1

    real, intent(in), optional :: undef

    missing value

    logical, intent(in), optional :: flops

    if true, uses slower float point based algorithm

    integer, intent(in), optional :: mpi_comm
    integer, intent(out), optional :: rc

    error code = 0 - all is well /= 0 - something went wrong