FV3 Bundle
interpolator_mod Module Reference

interpolator_mod is a module to interpolate climatology data to model the grid. More...

Data Types

interface  assignment(=)
 
interface  interp_weighted_scalar
 
type  interpolate_type
 Redundant climatology data between fields. More...
 
interface  interpolator
 

Functions/Subroutines

subroutine, public interpolate_type_eq (Out, In)
 interpolator_type_eq receives the variable In and Out as input and returns Out. More...
 
subroutine, public interpolator_init (clim_type, file_name, lonb_mod, latb_mod, data_names, data_out_of_bounds, vert_interp, clim_units, single_year_file)
 interpolator_init receives various data as input in order to initialize interpolating. More...
 
subroutine cell_center2 (q1, q2, q3, q4, e2)
 cell_center2 receives the variables q1, q2, q3, and q4 as inputs and returns e2. More...
 
subroutine cart_to_latlon (np, q, xs, ys)
 car_to_latlon receives the variables np, q, xs, and ys as inputs and returns q, xs, and ys. More...
 
subroutine latlon2xyz (p, e)
 latlon2xyz receives the variable p as input and returns e as output in order to map (lon, lat) to (x,y,z). More...
 
integer function check_climo_units (units)
 check_climo_units checks the units that the climatology data is using. This is needed to allow for conversion of datasets to mixing ratios which is what the vertical interpolation scheme requires. The default is to assume no conversion is needed. If the units are those of a column burden (kg/m2) then conversion to mixing ratio is flagged. More...
 
subroutine, public init_clim_diag (clim_type, mod_axes, init_time)
 init_clim_diag is a routine to register diagnostic fields for the climatology file. This routine calculates the domain decompostion of the climatology fields for later export through send_data. The ids created here are for column burdens that will diagnose the vertical interpolation routine. More...
 
subroutine, public obtain_interpolator_time_slices (clim_type, Time)
 obtain_interpolator_time_slices makes sure that the appropriate time slices are available for interpolation on this time step. More...
 
subroutine, public unset_interpolator_time_flag (clim_type)
 unset_interpolator_time_flag sets a flag in clim_type to false. More...
 
subroutine interpolator_4d (clim_type, Time, phalf, interp_data, field_name, is, js, clim_units)
 interpolator_4D receives a field name as input and interpolates the field to model a 4D grid and time axis. More...
 
subroutine interpolator_3d (clim_type, Time, phalf, interp_data, field_name, is, js, clim_units)
 interpolator_3D receives a field name as input and interpolates the field to model a 3D grid and time axis. More...
 
subroutine interpolator_2d (clim_type, Time, interp_data, field_name, is, js, clim_units)
 interpolator_2D receives a field name as input and interpolates the field to model a 2D grid and time axis. More...
 
subroutine interpolator_4d_no_time_axis (clim_type, phalf, interp_data, field_name, is, js, clim_units)
 interpolator_4D_no_time_axis receives a field name as input and interpolates the field to model a 4D grid. More...
 
subroutine interpolator_3d_no_time_axis (clim_type, phalf, interp_data, field_name, is, js, clim_units)
 interpolator_3D_no_time_axis receives a field name as input and interpolates the field to model a 3D grid. More...
 
subroutine interpolator_2d_no_time_axis (clim_type, interp_data, field_name, is, js, clim_units)
 interpolator_2D_no_time_axis receives a field name as input and interpolates the field to model a 2D grid. More...
 
subroutine, public interpolator_end (clim_type)
 interpolator_end receives interpolate data as input and deallocates its memory. More...
 
subroutine, public read_data (clim_type, src_field, hdata, nt, i, Time)
 read_data receives various climate data as inputs and returns a horizontally interpolated climatology field. More...
 
subroutine read_data_no_time_axis (clim_type, src_field, hdata, i)
 read_data_no_time_axis receives various climate data as inputs and returns a horizontally interpolated climatology field without the time axis. More...
 
subroutine diag_read_data (clim_type, model_data, i, Time)
 diag_read_data receives the data read in by read_data as inputs and runs a diagnosis. More...
 
subroutine, public query_interpolator (clim_type, nfields, field_names)
 query_interpolator receives an interpolate type as input and returns the number of fields and field names. More...
 
character(len=64) function chomp (string)
 chomp receives a string from NetCDF files and removes CHAR(0) from the end of this string. More...
 
subroutine interp_weighted_scalar_2d (grdin, grdout, datin, datout)
 interp_weighted_scalar_2D receives the variables grdin, grdout, and datin as inputs and returns datout. More...
 
subroutine interp_weighted_scalar_1d (grdin, grdout, datin, datout)
 interp_weighted_scalar_1D receives the variables grdin, grdout, and datin as inputs and returns datout. More...
 
subroutine interp_linear (grdin, grdout, datin, datout)
 interp_linear receives the variables grdin, grdout, and datin as inputs and returns a linear interpolation. More...
 

Variables

logical module_is_initialized = .false.
 
logical clim_diag_initialized = .false.
 
integer ndim
 No description. More...
 
integer nvar
 No description. More...
 
integer natt
 No description. More...
 
integer ntime
 No description. More...
 
integer nlat
 No description. More...
 
integer nlatb
 No description. More...
 
integer nlon
 No description. More...
 
integer nlonb
 No description. More...
 
integer nlev
 No description. More...
 
integer nlevh
 No description. More...
 
integer len
 
integer ntime_in
 
integer num_fields
 No description. More...
 
type(axistype), dimension(:), allocatable axes
 No description. More...
 
type(axistype), save time_axis
 No description. More...
 
type(fieldtype), dimension(:), allocatable varfields
 No description. More...
 
character(len=32) name
 
character(len=32) units
 No description. More...
 
integer sense
 No description. More...
 
integer, parameter max_diag_fields = 30
 No description. More...
 
integer, parameter increasing_downward = 1
 
integer, parameter increasing_upward = -1
 Flags to indicate direction of vertical axis in data file. More...
 
integer, parameter linear = 1
 
integer, parameter seasonal = 2
 
integer, parameter bilinear = 3
 
integer, parameter notime = 4
 Flags to indicate whether the time interpolation should be linear or some other scheme for seasonal data. NOTIME indicates that data file has no time axis. More...
 
integer, parameter pressure = 1
 
integer, parameter sigma = 2
 Flags to indicate where climatology pressure levels are pressure or sigma levels. More...
 
integer, parameter no_conv = 1
 
integer, parameter kg_m2 = 2
 Flags to indicate whether the climatology units are mixing ratio (kg/kg) or column integral (kg/m2). Vertical interpolation scheme requires mixing ratio at this time. More...
 
integer, parameter, public constant = 1
 
integer, parameter, public zero = 2
 Flags to indicate what to do when the model surface pressure exceeds the climatology surface pressure level. More...
 
integer, parameter, public interp_weighted_p = 10
 
integer, parameter, public interp_linear_p = 20
 
integer, parameter, public interp_log_p = 30
 Flags to indicate the type of vertical interpolation. More...
 
integer num_clim_diag = 0
 No description. More...
 
character(len=64), dimension(max_diag_fieldsclimo_diag_name
 No description. More...
 
integer, dimension(max_diag_fieldsclimo_diag_id
 
integer, dimension(max_diag_fieldshinterp_id
 No description. More...
 
real missing_value = -1.e10
 No description. More...
 
integer, parameter f_p = selected_real_kind(20)
 Higher precision (kind=16) for grid geometrical factors. More...
 
logical read_all_on_init = .false.
 No description. More...
 
integer verbose = 0
 No description. More...
 
logical conservative_interp = .true.
 No description. More...
 
logical retain_cm3_bug = .true.
 No description. More...
 

Detailed Description

interpolator_mod is a module to interpolate climatology data to model the grid.

Author
William Cooke Willi.nosp@m.am.C.nosp@m.ooke@.nosp@m.noaa.nosp@m..gov

Modules Included:

Module Name Functions Included
mpp_mod mpp_error, FATAL, mpp_pe, mpp_init, mpp_exit, mpp_npes, WARNING, NOTE, input_nml_file
mpp_io_mod mpp_open, mpp_close, mpp_get_times, mpp_get_atts, mpp_get_info, mpp_read, mpp_get_axes, mpp_get_axis_data, mpp_get_fields, fieldtype, atttype, axistype, MPP_RDONLY, MPP_NETCDF, MPP_MULTI, MPP_APPEND, MPP_SINGLE
mpp_domains_mod mpp_update_domains, mpp_define_domains, mpp_global_field, domain2d, mpp_define_layout, mpp_get_compute_domain
diag_manager_mod diag_manager_init, get_base_time, register_diag_field, send_data, diag_axis_init
fms_mod open_namelist_file, fms_init, mpp_pe, mpp_root_pe, stdlog, file_exist, write_version_number, check_nml_error, error_mesg, FATAL, NOTE, WARNING, close_file
horiz_interp_mod horiz_interp_type, horiz_interp_new, horiz_interp_init, horiz_interp, horiz_interp_del
time_manager_mod time_type, set_time, set_date, get_date, get_calendar_type, JULIAN, NOLEAP, get_date_julian, set_date_no_leap, set_date_julian, get_date_no_leap, print_date, operator(+), operator(-), operator(*), operator(>), operator(<), decrement_time
time_interp_mod time_interp, YEAR
constants_mod grav, PI, SECONDS_PER_DAY

Function/Subroutine Documentation

◆ cart_to_latlon()

subroutine interpolator_mod::cart_to_latlon ( integer, intent(in)  np,
real, dimension(3,np), intent(inout)  q,
real, dimension(np), intent(inout)  xs,
real, dimension(np), intent(inout)  ys 
)
private

car_to_latlon receives the variables np, q, xs, and ys as inputs and returns q, xs, and ys.

Parameters
[in]<np>No description
[in,out]<q>No description
[in,out]<xs>No description
[in,out]<ys>No description

Definition at line 1312 of file interpolator.F90.

Here is the caller graph for this function:

◆ cell_center2()

subroutine interpolator_mod::cell_center2 ( real, dimension(2), intent(in)  q1,
real, dimension(2), intent(in)  q2,
real, dimension(2), intent(in)  q3,
real, dimension(2), intent(in)  q4,
real, dimension(2), intent(out)  e2 
)
private

cell_center2 receives the variables q1, q2, q3, and q4 as inputs and returns e2.

Parameters
[in]<q1>No description
[in]<q2>No description
[in]<q3>No description
[in]<q4>No description
[out]<e2>No description

Definition at line 1277 of file interpolator.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_climo_units()

integer function interpolator_mod::check_climo_units ( character(len=*), intent(in)  units)
private

check_climo_units checks the units that the climatology data is using. This is needed to allow for conversion of datasets to mixing ratios which is what the vertical interpolation scheme requires. The default is to assume no conversion is needed. If the units are those of a column burden (kg/m2) then conversion to mixing ratio is flagged.

Parameters
[in]<units>The units which you will be checking

Definition at line 1396 of file interpolator.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ chomp()

character(len=64) function interpolator_mod::chomp ( character(len=*), intent(in)  string)
private

chomp receives a string from NetCDF files and removes CHAR(0) from the end of this string.

Parameters
[in]<string>The string from the NetCDF file

Definition at line 3716 of file interpolator.F90.

Here is the caller graph for this function:

◆ diag_read_data()

subroutine interpolator_mod::diag_read_data ( type(interpolate_type), intent(in)  clim_type,
real, dimension(:,:,:), intent(in)  model_data,
integer, intent(in)  i,
type(time_type), intent(in)  Time 
)
private

diag_read_data receives the data read in by read_data as inputs and runs a diagnosis.

Parameters
[in]<clim_type>The interpolate type which contains the data
[in]<model_data>The data read in from file that is being diagnosed
[in]<i>The index of the field name that you are diagnosing
[in]<Time>The model time.

Definition at line 3642 of file interpolator.F90.

Here is the caller graph for this function:

◆ init_clim_diag()

subroutine, public interpolator_mod::init_clim_diag ( type(interpolate_type), intent(inout)  clim_type,
integer, dimension(:), intent(in)  mod_axes,
type(time_type), intent(in)  init_time 
)

init_clim_diag is a routine to register diagnostic fields for the climatology file. This routine calculates the domain decompostion of the climatology fields for later export through send_data. The ids created here are for column burdens that will diagnose the vertical interpolation routine.

Parameters
[in,out]<clim_type>The interpolate type containing the names of the fields in the climatology file
[in]<mod_axes>The axes of the model
[in]<init_time>The model initialization time
Exceptions
FATAL,init_clim_diag : You must call interpolator_init before calling init_clim_diag
FATAL,init_clim_diag : Trying to set up too many diagnostic fields for the climatology data

Definition at line 1436 of file interpolator.F90.

Here is the caller graph for this function:

◆ interp_linear()

subroutine interpolator_mod::interp_linear ( real, dimension(:), intent(in)  grdin,
real, dimension(:), intent(in)  grdout,
real, dimension(:), intent(in)  datin,
real, dimension(:), intent(out)  datout 
)
private

interp_linear receives the variables grdin, grdout, and datin as inputs and returns a linear interpolation.

Parameters
[in]<grdin>No description
[in]<grdout>No description
[in]<datin>No description
[out]<datout>No description

Definition at line 3871 of file interpolator.F90.

Here is the caller graph for this function:

◆ interp_weighted_scalar_1d()

subroutine interpolator_mod::interp_weighted_scalar_1d ( real, dimension(:), intent(in)  grdin,
real, dimension(:), intent(in)  grdout,
real, dimension(:), intent(in)  datin,
real, dimension(:), intent(out)  datout 
)
private

interp_weighted_scalar_1D receives the variables grdin, grdout, and datin as inputs and returns datout.

Parameters
[in]<grdin>No description
[in]<grdout>No description
[in]<datin>No description
[out]<datout>No description

Definition at line 3812 of file interpolator.F90.

◆ interp_weighted_scalar_2d()

subroutine interpolator_mod::interp_weighted_scalar_2d ( real, dimension(:), intent(in)  grdin,
real, dimension(:), intent(in)  grdout,
real, dimension(:,:), intent(in)  datin,
real, dimension(:,:), intent(out)  datout 
)
private

interp_weighted_scalar_2D receives the variables grdin, grdout, and datin as inputs and returns datout.

Parameters
[in]<grdin>No description
[in]<grdout>No description
[in]<datin>No description
[out]<datout>No description

Definition at line 3743 of file interpolator.F90.

◆ interpolate_type_eq()

subroutine, public interpolator_mod::interpolate_type_eq ( type(interpolate_type), intent(inout)  Out,
type(interpolate_type), intent(in)  In 
)

interpolator_type_eq receives the variable In and Out as input and returns Out.

Parameters
[in]<In>No description
[in,out]<Out>No description

Definition at line 392 of file interpolator.F90.

◆ interpolator_2d()

subroutine interpolator_mod::interpolator_2d ( type(interpolate_type), intent(inout)  clim_type,
type(time_type), intent(in)  Time,
real, dimension(:,:), intent(out)  interp_data,
character(len=*), intent(in)  field_name,
integer, intent(in), optional  is,
integer, intent(in), optional  js,
character(len=*), intent(out), optional  clim_units 
)
private

interpolator_2D receives a field name as input and interpolates the field to model a 2D grid and time axis.

Parameters
[in,out]<clim_type>The interpolate type previously defined by a call to interpolator_init
[in]<field_name>The name of a field that you wish to interpolate
[in]<Time>The model time that you wish to interpolate to
[in]<is>OPTIONAL: Index for the physics window
[in]<js>OPTIONAL: Index for the physics window
[out]<interp_data>The model fields with the interpolated climatology data
[out]<clim_units>OPTIONAL: The units of field_name
Exceptions
FATAL"interpolator_2D : You must call interpolator_init before calling interpolator"
FATAL"interpolator_2D 1: file="
FATAL"interpolator_2D 2: file="
FATAL"interpolator_2D 3: file="
FATAL"interpolator_2D 4: file="
FATAL"interpolator_2D 5: file="
FATAL"interpolator_2D : No data from the previous climatology time but we have the next time. How did this happen?"
FATAL"Interpolator: the field name is not contained in this intepolate_type: "

Definition at line 2712 of file interpolator.F90.

Here is the call graph for this function:

◆ interpolator_2d_no_time_axis()

subroutine interpolator_mod::interpolator_2d_no_time_axis ( type(interpolate_type), intent(inout)  clim_type,
real, dimension(:,:), intent(out)  interp_data,
character(len=*), intent(in)  field_name,
integer, intent(in), optional  is,
integer, intent(in), optional  js,
character(len=*), intent(out), optional  clim_units 
)
private

interpolator_2D_no_time_axis receives a field name as input and interpolates the field to model a 2D grid.

Parameters
[in,out]<clim_type>The interpolate type previously defined by a call to interpolator_init
[in]<field_name>The name of a field that you wish to interpolate
[in]<is>OPTIONAL: Index for the physics window
[in]<js>OPTIONAL: Index for the physics window
[out]<interp_data>The model fields with the interpolated climatology data
[out]<clim_units>OPTIONAL: The units of field_name
Exceptions
FATAL"interpolator_2D_no_time_axis : You must call interpolator_init before calling interpolator"
FATAL"Interpolator: the field name is not contained in this intepolate_type: "

Definition at line 3390 of file interpolator.F90.

Here is the call graph for this function:

◆ interpolator_3d()

subroutine interpolator_mod::interpolator_3d ( type(interpolate_type), intent(inout)  clim_type,
type(time_type), intent(in)  Time,
real, dimension(:,:,:), intent(in)  phalf,
real, dimension(:,:,:), intent(out)  interp_data,
character(len=*), intent(in)  field_name,
integer, intent(in), optional  is,
integer, intent(in), optional  js,
character(len=*), intent(out), optional  clim_units 
)
private

interpolator_3D receives a field name as input and interpolates the field to model a 3D grid and time axis.

Parameters
[in,out]<clim_type>The interpolate type previously defined by a call to interpolator_init
[in]<field_name>The name of a field that you wish to interpolate
[in]<Time>The model time that you wish to interpolate to
[in]<phalf>The half level model pressure field
[in]<is>OPTIONAL: Index for the physics window
[in]<js>OPTIONAL: Index for the physics window
[out]<interp_data>The model fields with the interpolated climatology data
[out]<clim_units>OPTIONAL: The units of field_name
Exceptions
FATAL"interpolator_3D : You must call interpolator_init before calling interpolator"
FATAL"interpolator_3D 1: file="
FATAL"interpolator_3D 2: file="
FATAL"interpolator_3D 3: file="
FATAL"interpolator_3D 4: file="
FATAL"interpolator_3D 5: file="
FATAL"interpolator_3D : No data from the previous climatology time but we have the next time. How did this happen?"
NOTE"Interpolator: model surface pressure is greater than climatology surface pressure for "
NOTE"Interpolator: model top pressure is less than climatology top pressure for "
FATAL"Interpolator: the field name is not contained in this intepolate_type: "

Definition at line 2288 of file interpolator.F90.

Here is the call graph for this function:

◆ interpolator_3d_no_time_axis()

subroutine interpolator_mod::interpolator_3d_no_time_axis ( type(interpolate_type), intent(inout)  clim_type,
real, dimension(:,:,:), intent(in)  phalf,
real, dimension(:,:,:), intent(out)  interp_data,
character(len=*), intent(in)  field_name,
integer, intent(in), optional  is,
integer, intent(in), optional  js,
character(len=*), intent(out), optional  clim_units 
)
private

interpolator_3D_no_time_axis receives a field name as input and interpolates the field to model a 3D grid.

Parameters
[in,out]<clim_type>The interpolate type previously defined by a call to interpolator_init
[in]<field_name>The name of a field that you wish to interpolate
[in]<phalf>The half level model pressure field
[in]<is>OPTIONAL: Index for the physics window
[in]<js>OPTIONAL: Index for the physics window
[out]<interp_data>The model fields with the interpolated climatology data
[out]<clim_units>OPTIONAL: The units of field_name
Exceptions
FATAL"interpolator_3D_no_time_axis : You must call interpolator_init before calling interpolator"
FATAL"interpolator_mod: cannot use 4D interface to interpolator for this file"
NOTE"Interpolator: model surface pressure is greater than climatology surface pressure for "
NOTE"Interpolator: model top pressure is less than climatology top pressure for "
FATAL"Interpolator: the field name is not contained in this intepolate_type: "

Definition at line 3253 of file interpolator.F90.

Here is the call graph for this function:

◆ interpolator_4d()

subroutine interpolator_mod::interpolator_4d ( type(interpolate_type), intent(inout)  clim_type,
type(time_type), intent(in)  Time,
real, dimension(:,:,:), intent(in)  phalf,
real, dimension(:,:,:,:), intent(out)  interp_data,
character(len=*), intent(in)  field_name,
integer, intent(in), optional  is,
integer, intent(in), optional  js,
character(len=*), intent(out), optional  clim_units 
)
private

interpolator_4D receives a field name as input and interpolates the field to model a 4D grid and time axis.

Parameters
[in,out]<clim_type>The interpolate type previously defined by a call to interpolator_init
[in]<field_name>The name of a field that you wish to interpolate
[in]<Time>The model time that you wish to interpolate to
[in]<phalf>The half level model pressure field
[in]<is>OPTIONAL: Index for the physics window
[in]<js>OPTIONAL: Index for the physics window
[out]<interp_data>The model fields with the interpolated climatology data
[out]<clim_units>OPTIONAL: The units of field_name
Exceptions
FATAL"interpolator_4D : You must call interpolator_init before calling interpolator"
FATAL"interpolator_mod: cannot use 4D interface to interpolator for this file"
FATAL"interpolator_4D 1: file="
FATAL"interpolator_4D 2: file="
FATAL"interpolator_4D 3: file="
FATAL"interpolator_4D 4: file="
FATAL"interpolator_4D 5: file="
FATAL"interpolator_3D : No data from the previous climatology time but we have the next time. How did this happen?"
NOTE"Interpolator: model surface pressure is greater than climatology surface pressure for "
NOTE"Interpolator: model top pressure is less than climatology top pressure for "
FATAL"Interpolator: the field name is not contained in this intepolate_type: "

Definition at line 1814 of file interpolator.F90.

Here is the call graph for this function:

◆ interpolator_4d_no_time_axis()

subroutine interpolator_mod::interpolator_4d_no_time_axis ( type(interpolate_type), intent(inout)  clim_type,
real, dimension(:,:,:), intent(in)  phalf,
real, dimension(:,:,:,:), intent(out)  interp_data,
character(len=*), intent(in)  field_name,
integer, intent(in), optional  is,
integer, intent(in), optional  js,
character(len=*), intent(out), optional  clim_units 
)
private

interpolator_4D_no_time_axis receives a field name as input and interpolates the field to model a 4D grid.

Parameters
[in,out]<clim_type>The interpolate type previously defined by a call to interpolator_init
[in]<field_name>The name of a field that you wish to interpolate
[in]<phalf>The half level model pressure field
[in]<is>OPTIONAL: Index for the physics window
[in]<js>OPTIONAL: Index for the physics window
[out]<interp_data>The model fields with the interpolated climatology data
[out]<clim_units>OPTIONAL: The units of field_name
Exceptions
FATAL"interpolator_4D_no_time_axis : You must call interpolator_init before calling interpolator"
FATAL"interpolator_mod: cannot use 4D interface to interpolator for this file"
NOTE"Interpolator: model surface pressure is greater than surface pressure of input data for "
NOTE"Interpolator: model top pressure is less than surface pressure of input data for "
FATAL"Interpolator: the field name is not contained in this intepolate_type: "

Definition at line 3085 of file interpolator.F90.

Here is the call graph for this function:

◆ interpolator_end()

subroutine, public interpolator_mod::interpolator_end ( type(interpolate_type), intent(inout)  clim_type)

interpolator_end receives interpolate data as input and deallocates its memory.

Parameters
[in,out]<clim_type>The interpolate type whose components will be deallocated

Definition at line 3461 of file interpolator.F90.

Here is the caller graph for this function:

◆ interpolator_init()

subroutine, public interpolator_mod::interpolator_init ( type(interpolate_type), intent(inout)  clim_type,
character(len=*), intent(in)  file_name,
real, dimension(:,:), intent(in)  lonb_mod,
real, dimension(:,:), intent(in)  latb_mod,
character(len=*), dimension(:), intent(in), optional  data_names,
integer, dimension(:), intent(in)  data_out_of_bounds,
integer, dimension(:), intent(in), optional  vert_interp,
character(len=*), dimension(:), intent(out), optional  clim_units,
logical, intent(out), optional  single_year_file 
)

interpolator_init receives various data as input in order to initialize interpolating.

Parameters
[in,out]<clim_type>An interpolate type containing the necessary file and field data to be passed to the interpolator routine
[in]<file_name>Climatology filename
[in]<lonb_mod>The corners of the model grid-box longitudes
[in]<latb_mod>The corners of the model grid_box latitudes
[in]<data_names>OPTIONAL: A list of the names of components within the climatology file which you wish to read
[in]<data_out_of_bounds>A list of the flags that are to be used in determining what to do if the pressure levels in the model go out of bounds from those of the climatology
[in]<vert_interp>OPTIONAL: Flag to determine type of vertical interpolation
[out]<clim_units>OPTIONAL: A list of the units for the components listed in data_names
[out]<single_year_file>OPTIONAL: No description

Definition at line 468 of file interpolator.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ latlon2xyz()

subroutine interpolator_mod::latlon2xyz ( real, dimension(2), intent(in)  p,
real, dimension(3), intent(out)  e 
)
private

latlon2xyz receives the variable p as input and returns e as output in order to map (lon, lat) to (x,y,z).

Parameters
[in]<p>No description
[out]<e>No description

Definition at line 1357 of file interpolator.F90.

Here is the caller graph for this function:

◆ obtain_interpolator_time_slices()

subroutine, public interpolator_mod::obtain_interpolator_time_slices ( type(interpolate_type), intent(inout)  clim_type,
type(time_type), intent(in)  Time 
)

obtain_interpolator_time_slices makes sure that the appropriate time slices are available for interpolation on this time step.

Parameters
[in,out]<clim_type>The interpolate type previously defined by a call to interpolator_init
[in]<Time>The model time that you wish to interpolate to
Exceptions
FATAL"interpolator_timeslice 1: file="
FATAL"interpolator_timeslice 2: file="
FATAL"interpolator_timeslice 3: file="
FATAL"interpolator_timeslice 4: file="
FATAL"interpolator_timeslice 5: file="
FATAL"interpolator_timeslice : No data from the previous climatology time but we have the next time. How did this happen?"

Definition at line 1519 of file interpolator.F90.

Here is the call graph for this function:

◆ query_interpolator()

subroutine, public interpolator_mod::query_interpolator ( type(interpolate_type), intent(in)  clim_type,
integer, intent(out), optional  nfields,
character(len=*), dimension(:), intent(out), optional  field_names 
)

query_interpolator receives an interpolate type as input and returns the number of fields and field names.

Parameters
[in]<clim_type>The interpolate type which contains the data
[out]<nfields>OPTIONAL: No description
[out]<field_names>OPTIONAL: No description

Definition at line 3695 of file interpolator.F90.

◆ read_data()

subroutine, public interpolator_mod::read_data ( type(interpolate_type), intent(in)  clim_type,
type(fieldtype), intent(in)  src_field,
real, dimension(:,:,:), intent(out)  hdata,
integer, intent(in)  nt,
integer, intent(in), optional  i,
type(time_type), intent(in), optional  Time 
)

read_data receives various climate data as inputs and returns a horizontally interpolated climatology field.

Parameters
[in]<clim_type>The interpolate type which contains the data
[in]<src_field>The field type
[in]<nt>The index of the time slice of the climatology that you wish to read
[in]<i>OPTIONAL: The index of the field name that you are trying to read
[in]<Time>OPTIONAL: The model time. Used for diagnostic purposes only
[out]<hdata>The horizontally interpolated climatology field. This

Definition at line 3522 of file interpolator.F90.

Here is the call graph for this function:

◆ read_data_no_time_axis()

subroutine interpolator_mod::read_data_no_time_axis ( type(interpolate_type), intent(in)  clim_type,
type(fieldtype), intent(in)  src_field,
real, dimension(:,:,:), intent(out)  hdata,
integer, intent(in), optional  i 
)
private

read_data_no_time_axis receives various climate data as inputs and returns a horizontally interpolated climatology field without the time axis.

Parameters
[in]<clim_type>The interpolate type which contains the data
[in]<src_field>The field type
[in]<i>OPTIONAL: The index of the field name that you are trying to read
[out]<hdata>The horizontally interpolated climatology field. This

Definition at line 3587 of file interpolator.F90.

Here is the caller graph for this function:

◆ unset_interpolator_time_flag()

subroutine, public interpolator_mod::unset_interpolator_time_flag ( type(interpolate_type), intent(inout)  clim_type)

unset_interpolator_time_flag sets a flag in clim_type to false.

Parameters
[in,out]<clim_type>The interpolate type containing the names of the fields in the climatology file

Definition at line 1770 of file interpolator.F90.

Variable Documentation

◆ axes

type(axistype), dimension(:), allocatable interpolator_mod::axes
private

No description.

Definition at line 322 of file interpolator.F90.

◆ bilinear

integer, parameter interpolator_mod::bilinear = 3
private

Definition at line 339 of file interpolator.F90.

◆ clim_diag_initialized

logical interpolator_mod::clim_diag_initialized = .false.
private

Definition at line 257 of file interpolator.F90.

◆ climo_diag_id

integer, dimension(max_diag_fields) interpolator_mod::climo_diag_id
private

Definition at line 361 of file interpolator.F90.

◆ climo_diag_name

character(len=64), dimension(max_diag_fields) interpolator_mod::climo_diag_name
private

No description.

Definition at line 360 of file interpolator.F90.

◆ conservative_interp

logical interpolator_mod::conservative_interp = .true.
private

No description.

Definition at line 375 of file interpolator.F90.

◆ constant

integer, parameter, public interpolator_mod::constant = 1

Definition at line 352 of file interpolator.F90.

◆ f_p

integer, parameter interpolator_mod::f_p = selected_real_kind(20)
private

Higher precision (kind=16) for grid geometrical factors.

Definition at line 370 of file interpolator.F90.

◆ hinterp_id

integer, dimension(max_diag_fields) interpolator_mod::hinterp_id
private

No description.

Definition at line 361 of file interpolator.F90.

◆ increasing_downward

integer, parameter interpolator_mod::increasing_downward = 1
private

Definition at line 335 of file interpolator.F90.

◆ increasing_upward

integer, parameter interpolator_mod::increasing_upward = -1
private

Flags to indicate direction of vertical axis in data file.

Definition at line 335 of file interpolator.F90.

◆ interp_linear_p

integer, parameter, public interpolator_mod::interp_linear_p = 20

Definition at line 356 of file interpolator.F90.

◆ interp_log_p

integer, parameter, public interpolator_mod::interp_log_p = 30

Flags to indicate the type of vertical interpolation.

Definition at line 356 of file interpolator.F90.

◆ interp_weighted_p

integer, parameter, public interpolator_mod::interp_weighted_p = 10

Definition at line 356 of file interpolator.F90.

◆ kg_m2

integer, parameter interpolator_mod::kg_m2 = 2
private

Flags to indicate whether the climatology units are mixing ratio (kg/kg) or column integral (kg/m2). Vertical interpolation scheme requires mixing ratio at this time.

Definition at line 348 of file interpolator.F90.

◆ len

integer interpolator_mod::len
private

Definition at line 321 of file interpolator.F90.

◆ linear

integer, parameter interpolator_mod::linear = 1
private

Definition at line 339 of file interpolator.F90.

◆ max_diag_fields

integer, parameter interpolator_mod::max_diag_fields = 30
private

No description.

Definition at line 332 of file interpolator.F90.

◆ missing_value

real interpolator_mod::missing_value = -1.e10
private

No description.

Definition at line 362 of file interpolator.F90.

◆ module_is_initialized

logical interpolator_mod::module_is_initialized = .false.
private

Definition at line 256 of file interpolator.F90.

◆ name

character(len=32) interpolator_mod::name
private

Definition at line 329 of file interpolator.F90.

◆ natt

integer interpolator_mod::natt
private

No description.

Definition at line 313 of file interpolator.F90.

◆ ndim

integer interpolator_mod::ndim

No description.

Definition at line 311 of file interpolator.F90.

◆ nlat

integer interpolator_mod::nlat
private

No description.

Definition at line 315 of file interpolator.F90.

◆ nlatb

integer interpolator_mod::nlatb
private

No description.

Definition at line 316 of file interpolator.F90.

◆ nlev

integer interpolator_mod::nlev
private

No description.

Definition at line 319 of file interpolator.F90.

◆ nlevh

integer interpolator_mod::nlevh
private

No description.

Definition at line 320 of file interpolator.F90.

◆ nlon

integer interpolator_mod::nlon
private

No description.

Definition at line 317 of file interpolator.F90.

◆ nlonb

integer interpolator_mod::nlonb
private

No description.

Definition at line 318 of file interpolator.F90.

◆ no_conv

integer, parameter interpolator_mod::no_conv = 1
private

Definition at line 348 of file interpolator.F90.

◆ notime

integer, parameter interpolator_mod::notime = 4
private

Flags to indicate whether the time interpolation should be linear or some other scheme for seasonal data. NOTIME indicates that data file has no time axis.

Definition at line 339 of file interpolator.F90.

◆ ntime

integer interpolator_mod::ntime
private

No description.

Definition at line 314 of file interpolator.F90.

◆ ntime_in

integer interpolator_mod::ntime_in
private

Definition at line 321 of file interpolator.F90.

◆ num_clim_diag

integer interpolator_mod::num_clim_diag = 0
private

No description.

Definition at line 359 of file interpolator.F90.

◆ num_fields

integer interpolator_mod::num_fields
private

No description.

Definition at line 321 of file interpolator.F90.

◆ nvar

integer interpolator_mod::nvar
private

No description.

Definition at line 312 of file interpolator.F90.

◆ pressure

integer, parameter interpolator_mod::pressure = 1
private

Definition at line 344 of file interpolator.F90.

◆ read_all_on_init

logical interpolator_mod::read_all_on_init = .false.
private

No description.

Definition at line 373 of file interpolator.F90.

◆ retain_cm3_bug

logical interpolator_mod::retain_cm3_bug = .true.
private

No description.

Definition at line 376 of file interpolator.F90.

◆ seasonal

integer, parameter interpolator_mod::seasonal = 2
private

Definition at line 339 of file interpolator.F90.

◆ sense

integer interpolator_mod::sense
private

No description.

Definition at line 330 of file interpolator.F90.

◆ sigma

integer, parameter interpolator_mod::sigma = 2
private

Flags to indicate where climatology pressure levels are pressure or sigma levels.

Definition at line 344 of file interpolator.F90.

◆ time_axis

type(axistype), save interpolator_mod::time_axis
private

No description.

Definition at line 323 of file interpolator.F90.

◆ units

character(len=32) interpolator_mod::units
private

No description.

Definition at line 329 of file interpolator.F90.

◆ varfields

type(fieldtype), dimension(:), allocatable interpolator_mod::varfields
private

No description.

Definition at line 324 of file interpolator.F90.

◆ verbose

integer interpolator_mod::verbose = 0
private

No description.

Definition at line 374 of file interpolator.F90.

◆ zero

integer, parameter, public interpolator_mod::zero = 2

Flags to indicate what to do when the model surface pressure exceeds the climatology surface pressure level.

Definition at line 352 of file interpolator.F90.