regrid_functions_modAuthor: GMAO SI-Team
The module regrid_functions_mod contains functions for regridding.
| 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(:) |
The subroutine Assert checks if the output value is valid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer | :: | RC | ||||
| character(len=*), | intent(in) | :: | CallRoutine | |||
| character(len=*), | intent(in), | optional | :: | CallMsg | ||
| integer, | intent(in), | optional | :: | ncID |
The routine Cleanup closes any remaining open files.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | optional | :: | 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!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(out) | :: | LUN | |||
| integer, | optional | :: | RC |
The routine ReadInput reads the input options file.
| Type | Intent | Optional | 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 |
The subroutine Set_fID sets the file ID shadow variables.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | optional | :: | fIDIn | ||
| integer, | intent(in), | optional | :: | fIDOut | ||
| integer, | optional | :: | RC |
The routine genGridName returns the name of a grid based on
certain parameters. This mimics the MAPL behavior.
| Type | Intent | Optional | 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 |
The routine nXYtoVec estimate the X/Y mid-point vectors
based on as little data as possible.
| Type | Intent | Optional | 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 |
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:
| Type | Intent | Optional | 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 |
The routine readTileFile reads a tile file and stores the
relevant data in module variables for later use.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | TFDir | |||
| character(len=*), | intent(in) | :: | gridIn | |||
| character(len=*), | intent(in) | :: | gridOut | |||
| integer, | optional | :: | RC |
The routine readTileFileNC reads a Tempest NetCDF tile file
and stores the relevant data in module variables for later use.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | TFDir | |||
| character(len=*), | intent(in) | :: | gridIn | |||
| character(len=*), | intent(in) | :: | gridOut | |||
| integer, | optional | :: | RC |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | fName | |||
| integer, | optional | :: | rc |
The routine regridData regrids from lat-lon to cubed-sphere,
using tile file data already read in.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | in2D(:,:) | |||
| real(kind=sp), | intent(inout) | :: | out2D(:,:) | |||
| integer, | optional | :: | RC |