FMS  2024.03
Flexible Modeling System
amip_interp_mod

Provides observed sea surface temperature and ice mask data sets that have been interpolated onto your model's grid. More...

Data Types

interface  amip_interp_new
 Initializes data needed for the horizontal interpolation between the sst data and model grid. More...
 
type  amip_interp_type
 Contains information needed by the interpolation module (exchange_mod) and buffers data (r4_kind flavor). More...
 
interface  assignment(=)
 Assignment overload to allow native assignment between amip_interp_type variables. More...
 
type  date_type
 Private data type for representing a calendar date. More...
 
interface  operator(/=)
 Private logical inequality overload for amip_interp_type. More...
 
interface  operator(==)
 Private logical equality overload for amip_interp_type. More...
 
interface  operator(>)
 Private logical greater than overload for amip_interp_type. More...
 

Functions/Subroutines

subroutine, public amip_interp_del (Interp)
 Frees data associated with a amip_interp_type variable. Should be used for any variables initialized via amip_interp_new. More...
 
subroutine, public amip_interp_init
 initialize amip_interp_mod for use
 
subroutine amip_interp_type_eq (amip_interp_out, amip_interp_in)
 
logical function date_equals (Left, Right)
 
logical function date_gt (Left, Right)
 
logical function date_not_equals (Left, Right)
 
subroutine get_sst_grid_size (nlon, nlat)
 Returns the size (i.e., number of longitude and latitude points) of the observed data grid. More...
 
subroutine set_sst_grid_edges_amip1
 
subroutine set_sst_grid_edges_oi
 

Variables

integer, dimension(3) amip_date =(/-1,-1,-1/)
 amip date for repeating single day (rsd) option
 
real(r8_kind), parameter big_number = 1.E30_r8_kind
 
type(date_typecurr_date = date_type( -99, -99, -99 )
 
character(len=24) data_set = 'amip1'
 use 'amip1', 'amip2', 'reynolds_eof' 'reynolds_oi', 'hurrell', or 'daily', when "use_daily=.T."
 
type(date_typedate_end = date_type( -99, -99, -99 )
 
character(len=16) date_out_of_range = 'fail'
 use 'fail', 'initclimo', or 'climo'
 
logical do_sst_pert = .false.
 
character(len=fms_file_len) file_name_ice
 
character(len=fms_file_len) file_name_sst
 
type(fmsnetcdffile_t), target fileobj_ice
 
type(fmsnetcdffile_t), target fileobj_sst
 
logical, public forecast_mode = .false.
 
integer(i2_kind) ice_crit
 
logical interp_oi_sst = .false.
 changed to false for regular runs
 
integer iunit
 
integer, public j_sst = 600
 
real(r8_kind), dimension(:), allocatable lat_bnd
 
real(r8_kind), dimension(:), allocatable lon_bnd
 
integer mobs
 
logical module_is_initialized = .false.
 
logical no_anom_sst = .true.
 SJL: During nudging: use_ncep_sst = .T.; no_anom_sst = .T. during forecast: use_ncep_sst = .T.; no_anom_sst = .F.
 
integer nobs
 
real(r8_kind), dimension(:,:), allocatable, public sst_anom
 
real(r8_kind), dimension(:,:), allocatable, public sst_ncep
 
real(r8_kind) sst_pert = 0._r8_kind
 global temperature perturbation used for sensitivity experiments
 
character(len=6) sst_pert_type = 'fixed'
 use 'random' or 'fixed'
 
real(r8_kind) tann = 20._r8_kind
 parameters for prescribed zonal sst option
 
real(r8_kind) tdif = 50._r8_kind
 parameters for prescribed zonal sst option
 
real(r8_kind), dimension(:,:), allocatable tempamip
 
real(r8_kind) teq = 305._r8_kind
 parameters for prescribed zonal sst option
 
real(r8_kind) tice_crit = -1.80_r8_kind
 in degC or degK
 
real(r8_kind) tice_crit_k
 
real(r8_kind) tlag = 0.875_r8_kind
 parameters for prescribed zonal sst option
 
logical use_daily = .false.
 if '.true.', give 'data_set = 'daily''
 
logical use_mpp_io = .false.
 Set to .true. to use mpp_io, otherwise fms2io is used.
 
logical use_ncep_ice = .false.
 For seasonal forecast: use_ncep_ice = .F.
 
logical, public use_ncep_sst = .false.
 SJL: During nudging: use_ncep_sst = .T.; no_anom_sst = .T. during forecast: use_ncep_sst = .T.; no_anom_sst = .F.
 
logical use_zonal = .false.
 parameters for prescribed zonal sst option
 
integer verbose = 0
 0 <= verbose <= 3
 

Detailed Description

Provides observed sea surface temperature and ice mask data sets that have been interpolated onto your model's grid.

Author
Bruce Wyman

When using these routines three possible data sets are available:

  1. AMIP http://www.pcmdi.github.io/mips/amip from Jan 1979 to Jan 1989 (2 deg x 2 deg)
  2. Reynolds OI amip_interp.rey_oi.txt from Nov 1981 to Jan 1999 (1 deg x 1 deg)
  3. Reynolds EOF podaac.jpl.nasa.gov/ from Jan 1950 to Dec 1998 (2 deg x 2 deg)

All original data are observed monthly means. This module interpolates linearly in time between pairs of monthly means. Horizontal interpolation is done using the horiz_interp module.

When a requested date falls outside the range of dates available a namelist option allows for use of the climatological monthly mean values which are computed from all of the data in a particular data set.

AMIP 1:
from Jan 1979 to Jan 1989 (2 deg x 2 deg).

Reynolds OI:
from Nov 1981 to Jan 1999 (1 deg x 1 deg)
The analysis uses in situ and satellite SST's plus SST's simulated by sea-ice cover.

Reynold's EOF:
from Jan 1950 to Dec 1998 (2 deg x 2 deg)
NCEP Reynolds Historical Reconstructed Sea Surface Temperature The analysis uses both in-situ SSTs and satellite derived SSTs from the NOAA Advanced Very High Resolution Radiometer. In-situ data is used from 1950 to 1981, while both AVHRR derived satellite SSTs and in-situ data are used from 1981 to the end of 1998.

Note
The data set used by this module have been reformatted as 32-bit IEEE. The data values are packed into 16-bit integers.

The data sets are read from the following files:

  amip1           INPUT/amip1_sst.data
  reynolds_io     INPUT/reyoi_sst.data
  reynolds_eof    INPUT/reynolds_sst.data

Data Type Documentation

◆ amip_interp_mod::amip_interp_new

interface amip_interp_mod::amip_interp_new

Initializes data needed for the horizontal interpolation between the sst data and model grid.

The returned variable of type amip_interp_type is needed when calling get_amip_sst and get_amip_ice.

Parameters
lonLongitude in radians of the model's grid box edges (1d lat/lon grid case) or at grid box mid-point (2d case for arbitrary grids).
latLatitude in radians of the model's grid box edges (1d lat/lon grid case) or at grid box mid-point (2d case for arbitrary grids).
maskA mask for the model grid.
use_climoFlag the specifies that monthly mean climatological values will be used.
use_annualFlag the specifies that the annual mean climatological will be used. If both use_annual = use_climo = true, then use_annual = true will be used.
interp_methodspecify the horiz_interp scheme. = "conservative" means conservative scheme, = "bilinear" means bilinear interpolation.
Returns
interp, a defined data type variable needed when calling get_amip_sst and get_amip_ice.


Example usage:

            Interp = amip_interp_new ( lon, lat, mask, use_climo, use_annual, interp_method )

This function may be called to initialize multiple variables of type amip_interp_type. However, there currently is no call to release the storage used by this variable.

The size of input augment mask must be a function of the size of input augments lon and lat. The first and second dimensions of mask must equal (size(lon,1)-1, size(lat,2)-1).

Exceptions
FATAL: the value of the namelist parameter DATA_SET being used is not allowedCheck the value of namelist variable DATA_SET.
FATAL: requested input data set does not existThe data set requested is valid but the data does not exist in the INPUT subdirectory. You may have requested amip2 data which has not been officially set up. See the section on DATA SETS to properly set the data up.
FATAL: use_climo mismatchThe namelist variable date_out_of_range = 'fail' and the amip_interp_new argument use_climo = true. This combination is not allowed.
FATAL: use_annual(climo) mismatchThe namelist variable date_out_of_range = 'fail' and the amip_interp_new argument use_annual = true. This combination is not allowed.

Definition at line 276 of file amip_interp.F90.

Private Member Functions

 amip_interp_new_1d_r4
 
 amip_interp_new_1d_r8
 
 amip_interp_new_2d_r4
 
 amip_interp_new_2d_r8
 

◆ amip_interp_mod::amip_interp_type

type amip_interp_mod::amip_interp_type

Contains information needed by the interpolation module (exchange_mod) and buffers data (r4_kind flavor).

Definition at line 286 of file amip_interp.F90.

Collaboration diagram for amip_interp_type:
[legend]

Private Attributes

real(r4_kind), dimension(:,:), allocatable data1_r4
 
real(r8_kind), dimension(:,:), allocatable data1_r8
 
real(r4_kind), dimension(:,:), allocatable data2_r4
 
real(r8_kind), dimension(:,:), allocatable data2_r8
 
type(date_typedate1
 
type(date_typedate2
 
type(horiz_interp_type) hintrp
 
type(horiz_interp_type) hintrp2
 
logical i_am_initialized =.false.
 
logical use_annual
 
logical use_climo
 

◆ amip_interp_mod::assignment(=)

interface amip_interp_mod::assignment(=)

Assignment overload to allow native assignment between amip_interp_type variables.

Definition at line 188 of file amip_interp.F90.

Private Member Functions

subroutine amip_interp_type_eq (amip_interp_out, amip_interp_in)
 

Member Function/Subroutine Documentation

◆ amip_interp_type_eq()

subroutine amip_interp_type_eq ( type(amip_interp_type), intent(inout)  amip_interp_out,
type(amip_interp_type), intent(in)  amip_interp_in 
)
private
Parameters
[in]amip_interp_inmissing assignment statement; added by GPP

Definition at line 654 of file amip_interp.F90.

◆ amip_interp_mod::date_type

type amip_interp_mod::date_type

Private data type for representing a calendar date.

Definition at line 181 of file amip_interp.F90.

Collaboration diagram for date_type:
[legend]

Private Attributes

integer day
 
integer month
 
integer year
 

◆ amip_interp_mod::operator(/=)

interface amip_interp_mod::operator(/=)

Private logical inequality overload for amip_interp_type.

Definition at line 200 of file amip_interp.F90.

Private Member Functions

logical function date_not_equals (Left, Right)
 

Member Function/Subroutine Documentation

◆ date_not_equals()

logical function date_not_equals ( type (date_type), intent(in)  Left,
type (date_type), intent(in)  Right 
)
private
Returns
logical answer

Definition at line 621 of file amip_interp.F90.

◆ amip_interp_mod::operator(==)

interface amip_interp_mod::operator(==)

Private logical equality overload for amip_interp_type.

Definition at line 194 of file amip_interp.F90.

Private Member Functions

logical function date_equals (Left, Right)
 

Member Function/Subroutine Documentation

◆ date_equals()

logical function date_equals ( type (date_type), intent(in)  Left,
type (date_type), intent(in)  Right 
)
private
Returns
logical answer

Definition at line 607 of file amip_interp.F90.

◆ amip_interp_mod::operator(>)

interface amip_interp_mod::operator(>)

Private logical greater than overload for amip_interp_type.

Definition at line 206 of file amip_interp.F90.

Private Member Functions

logical function date_gt (Left, Right)
 

Member Function/Subroutine Documentation

◆ date_gt()

logical function date_gt ( type (date_type), intent(in)  Left,
type (date_type), intent(in)  Right 
)
private
Returns
logical answer

Definition at line 635 of file amip_interp.F90.

Function/Subroutine Documentation

◆ amip_interp_del()

subroutine, public amip_interp_mod::amip_interp_del ( type (amip_interp_type), intent(inout)  Interp)

Frees data associated with a amip_interp_type variable. Should be used for any variables initialized via amip_interp_new.

Parameters
[in,out]InterpA defined data type variable initialized by amip_interp_new and used when calling get_amip_sst and get_amip_ice.

Definition at line 575 of file amip_interp.F90.

◆ amip_interp_type_eq()

subroutine amip_interp_mod::amip_interp_type_eq ( type(amip_interp_type), intent(inout)  amip_interp_out,
type(amip_interp_type), intent(in)  amip_interp_in 
)
private
Parameters
[in]amip_interp_inmissing assignment statement; added by GPP

Definition at line 654 of file amip_interp.F90.

◆ date_equals()

logical function amip_interp_mod::date_equals ( type (date_type), intent(in)  Left,
type (date_type), intent(in)  Right 
)
private
Returns
logical answer

Definition at line 607 of file amip_interp.F90.

◆ date_gt()

logical function amip_interp_mod::date_gt ( type (date_type), intent(in)  Left,
type (date_type), intent(in)  Right 
)
private
Returns
logical answer

Definition at line 635 of file amip_interp.F90.

◆ date_not_equals()

logical function amip_interp_mod::date_not_equals ( type (date_type), intent(in)  Left,
type (date_type), intent(in)  Right 
)
private
Returns
logical answer

Definition at line 621 of file amip_interp.F90.

◆ get_sst_grid_size()

subroutine amip_interp_mod::get_sst_grid_size ( integer, intent(out)  nlon,
integer, intent(out)  nlat 
)
private

Returns the size (i.e., number of longitude and latitude points) of the observed data grid.

Exceptions
FATALhave not called amip_interp_new Must call amip_interp_new before get_sst_grid_size.

Definition at line 595 of file amip_interp.F90.