Regrid_Functions_Mod Module

MODULE: regrid_functions_mod

Author: GMAO SI-Team

The module regrid_functions_mod contains functions for regridding.

History

  • 09 Jan 2017 - S. D. Eastham - Initial version

Uses

  • module~~regrid_functions_mod~~UsesGraph module~regrid_functions_mod Regrid_Functions_Mod iso_fortran_env iso_fortran_env module~regrid_functions_mod->iso_fortran_env netcdf netcdf module~regrid_functions_mod->netcdf

Used by

  • module~~regrid_functions_mod~~UsedByGraph module~regrid_functions_mod Regrid_Functions_Mod module~mapl_tilingregriddermod MAPL_TilingRegridderMod module~mapl_tilingregriddermod->module~regrid_functions_mod module~mapl_conservativeregriddermod MAPL_ConservativeRegridderMod module~mapl_conservativeregriddermod->module~mapl_tilingregriddermod module~mapl_fractionalregriddermod MAPL_FractionalRegridderMod module~mapl_fractionalregriddermod->module~mapl_tilingregriddermod module~mapl_votingregriddermod MAPL_VotingRegridderMod module~mapl_votingregriddermod->module~mapl_tilingregriddermod

Variables

Type Visibility Attributes Name Initial
integer(kind=INT64), public, Allocatable :: II_In(:)
integer(kind=INT64), public, Allocatable :: II_Out(:)
integer(kind=INT64), public, Allocatable :: JJ_In(:)
integer(kind=INT64), public, Allocatable :: JJ_Out(:)
real(kind=sp), public, Allocatable :: W(:)

Subroutines

public subroutine Assert(RC, CallRoutine, CallMsg, ncID)

The subroutine Assert checks if the output value is valid.

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: RC
character(len=*), intent(in) :: CallRoutine
character(len=*), intent(in), optional :: CallMsg
integer, intent(in), optional :: ncID

public subroutine Cleanup(RC)

The routine Cleanup closes any remaining open files.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, optional :: RC

public subroutine GetLUN(LUN, RC)

The routine GetLUN finds a valid logical unit number in the range 1-100. IMPORTANT: This is the minimal-effort version of this routine, and extremely slow!

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: LUN
integer, optional :: RC

public subroutine ReadInput(resOut, fNameIn, fNameOut, reverseLev, isCSOut, isPCOut, isDEOut, RC)

The routine ReadInput reads the input options file.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: resOut(2)
character(len=255), intent(out) :: fNameIn
character(len=255), intent(out) :: fNameOut
logical, intent(out) :: reverseLev
logical, intent(out) :: isCSOut
logical, intent(out) :: isPCOut
logical, intent(out) :: isDEOut
integer, optional :: RC

public subroutine Set_fID(fIDIn, fIDOut, RC)

The subroutine Set_fID sets the file ID shadow variables.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in), optional :: fIDIn
integer, intent(in), optional :: fIDOut
integer, optional :: RC

public subroutine genGridName(nX, nY, gridName, xVec, yVec, isCS, isPC, isDE, RC)

The routine genGridName returns the name of a grid based on certain parameters. This mimics the MAPL behavior.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nX
integer, intent(in) :: nY
character(len=255), intent(out) :: gridName
real(kind=sp), intent(in), optional :: xVec(:)
real(kind=sp), intent(in), optional :: yVec(:)
logical, intent(out), optional :: isCS
logical, intent(out), optional :: isPC
logical, intent(out), optional :: isDE
integer, optional :: RC

public subroutine nXYtoVec(xVec, yVec, isCS, isPC, isDE, RC)

The routine nXYtoVec estimate the X/Y mid-point vectors based on as little data as possible.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(inout) :: xVec(:)
real(kind=sp), intent(inout) :: yVec(:)
logical, intent(in) :: isCS
logical, intent(in) :: isPC
logical, intent(in) :: isDE
integer, optional :: RC

public subroutine parseGridName(gridName, nX, nY, isCS, isDE, isPC)

The routine parseGridName determines a grid specification based on a string. The string can either be a standardized MAPL grid name (eg DE0180xPC0091, CF0024x6C) or a small number of shorthand options:

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=255), intent(in) :: gridName
integer, intent(out) :: nX
integer, intent(out) :: nY
logical, intent(out), optional :: isCS
logical, intent(out), optional :: isDE
logical, intent(out), optional :: isPC

public subroutine readTileFile(TFDir, gridIn, gridOut, RC)

The routine readTileFile reads a tile file and stores the relevant data in module variables for later use.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: TFDir
character(len=*), intent(in) :: gridIn
character(len=*), intent(in) :: gridOut
integer, optional :: RC

public subroutine readTileFileNC(TFDir, gridIn, gridOut, RC)

The routine readTileFileNC reads a Tempest NetCDF tile file and stores the relevant data in module variables for later use.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: TFDir
character(len=*), intent(in) :: gridIn
character(len=*), intent(in) :: gridOut
integer, optional :: RC

public subroutine readTileFileNC_file(fName, rc)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fName
integer, optional :: rc

public subroutine regridData(in2D, out2D, RC)

The routine regridData regrids from lat-lon to cubed-sphere, using tile file data already read in.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: in2D(:,:)
real(kind=sp), intent(inout) :: out2D(:,:)
integer, optional :: RC