FMS 2025.01-dev
Flexible Modeling System
Loading...
Searching...
No Matches
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.
 
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.
 
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.

Public 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]

Public 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) hintrp2
 
logical i_am_initialized =.false.
 
logical use_annual
 
logical use_climo
 

Private Attributes

type(horiz_interp_type) hintrp
 

Member Data Documentation

◆ data1_r4

real(r4_kind), dimension(:,:), allocatable data1_r4

Definition at line 289 of file amip_interp.F90.

◆ data1_r8

real(r8_kind), dimension(:,:), allocatable data1_r8

Definition at line 290 of file amip_interp.F90.

◆ data2_r4

real(r4_kind), dimension(:,:), allocatable data2_r4

Definition at line 289 of file amip_interp.F90.

◆ data2_r8

real(r8_kind), dimension(:,:), allocatable data2_r8

Definition at line 290 of file amip_interp.F90.

◆ date1

type (date_type) date1

Definition at line 291 of file amip_interp.F90.

◆ date2

type (date_type) date2

Definition at line 291 of file amip_interp.F90.

◆ hintrp

type (horiz_interp_type) hintrp
private

Definition at line 288 of file amip_interp.F90.

◆ hintrp2

type (horiz_interp_type) hintrp2

Definition at line 288 of file amip_interp.F90.

◆ i_am_initialized

logical i_am_initialized =.false.

Definition at line 293 of file amip_interp.F90.

◆ use_annual

logical use_annual

Definition at line 292 of file amip_interp.F90.

◆ use_climo

logical use_climo

Definition at line 292 of file amip_interp.F90.

◆ 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.

Public 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 
)
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]

Public Attributes

integer day
 
integer month
 
integer year
 

Member Data Documentation

◆ day

integer day

Definition at line 183 of file amip_interp.F90.

◆ month

integer month

Definition at line 183 of file amip_interp.F90.

◆ year

integer year

Definition at line 183 of file amip_interp.F90.

◆ 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.

Public 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 
)
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.

Public 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 
)
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.

Public 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 
)
Returns
logical answer

Definition at line 635 of file amip_interp.F90.

Function/Subroutine Documentation

◆ amip_interp_del()

subroutine, public 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_init()

subroutine, public amip_interp_init

initialize amip_interp_mod for use

Definition at line 369 of file amip_interp.F90.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ get_sst_grid_size()

subroutine 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.

◆ set_sst_grid_edges_amip1()

subroutine set_sst_grid_edges_amip1
private

Definition at line 508 of file amip_interp.F90.

◆ set_sst_grid_edges_oi()

subroutine set_sst_grid_edges_oi
private

Definition at line 537 of file amip_interp.F90.

Variable Documentation

◆ amip_date

integer, dimension(3) amip_date =(/-1,-1,-1/)
private

amip date for repeating single day (rsd) option

Definition at line 338 of file amip_interp.F90.

◆ big_number

real(r8_kind), parameter big_number = 1.E30_r8_kind
private

Definition at line 157 of file amip_interp.F90.

◆ curr_date

type (date_type) curr_date = date_type( -99, -99, -99 )
private

Definition at line 310 of file amip_interp.F90.

◆ data_set

character(len=24) data_set = 'amip1'
private

use 'amip1', 'amip2', 'reynolds_eof' 'reynolds_oi', 'hurrell', or 'daily', when "use_daily=.T."

Definition at line 321 of file amip_interp.F90.

◆ date_end

type (date_type) date_end = date_type( -99, -99, -99 )
private

Definition at line 311 of file amip_interp.F90.

◆ date_out_of_range

character(len=16) date_out_of_range = 'fail'
private

use 'fail', 'initclimo', or 'climo'

Definition at line 326 of file amip_interp.F90.

◆ do_sst_pert

logical do_sst_pert = .false.
private

Definition at line 343 of file amip_interp.F90.

◆ file_name_ice

character(len=fms_file_len) file_name_ice
private

Definition at line 307 of file amip_interp.F90.

◆ file_name_sst

character(len=fms_file_len) file_name_sst
private

Definition at line 307 of file amip_interp.F90.

◆ fileobj_ice

type(fmsnetcdffile_t), target fileobj_ice
private

Definition at line 308 of file amip_interp.F90.

◆ fileobj_sst

type(fmsnetcdffile_t), target fileobj_sst
private

Definition at line 308 of file amip_interp.F90.

◆ forecast_mode

logical, public forecast_mode = .false.

Definition at line 158 of file amip_interp.F90.

◆ ice_crit

integer(i2_kind) ice_crit
private

Definition at line 314 of file amip_interp.F90.

◆ interp_oi_sst

logical interp_oi_sst = .false.
private

changed to false for regular runs

Definition at line 351 of file amip_interp.F90.

◆ iunit

integer iunit
private

Definition at line 306 of file amip_interp.F90.

◆ j_sst

integer, public j_sst = 600

Definition at line 156 of file amip_interp.F90.

◆ lat_bnd

real(r8_kind), dimension(:), allocatable lat_bnd
private

Definition at line 302 of file amip_interp.F90.

◆ lon_bnd

real(r8_kind), dimension(:), allocatable lon_bnd
private

Definition at line 302 of file amip_interp.F90.

◆ mobs

integer mobs
private

Definition at line 301 of file amip_interp.F90.

◆ module_is_initialized

logical module_is_initialized = .false.
private

Definition at line 316 of file amip_interp.F90.

◆ no_anom_sst

logical no_anom_sst = .true.
private

SJL: During nudging: use_ncep_sst = .T.; no_anom_sst = .T. during forecast: use_ncep_sst = .T.; no_anom_sst = .F.

Definition at line 348 of file amip_interp.F90.

◆ nobs

integer nobs
private

Definition at line 301 of file amip_interp.F90.

◆ sst_anom

real(r8_kind), dimension(:,:), allocatable, public sst_anom

Definition at line 159 of file amip_interp.F90.

◆ sst_ncep

real(r8_kind), dimension(:,:), allocatable, public sst_ncep

Definition at line 159 of file amip_interp.F90.

◆ sst_pert

real(r8_kind) sst_pert = 0._r8_kind
private

global temperature perturbation used for sensitivity experiments

Definition at line 340 of file amip_interp.F90.

◆ sst_pert_type

character(len=6) sst_pert_type = 'fixed'
private

use 'random' or 'fixed'

Definition at line 342 of file amip_interp.F90.

◆ tann

real(r8_kind) tann = 20._r8_kind
private

parameters for prescribed zonal sst option

Definition at line 334 of file amip_interp.F90.

◆ tdif

real(r8_kind) tdif = 50._r8_kind
private

parameters for prescribed zonal sst option

Definition at line 333 of file amip_interp.F90.

◆ tempamip

real(r8_kind), dimension(:,:), allocatable tempamip
private

Definition at line 172 of file amip_interp.F90.

◆ teq

real(r8_kind) teq = 305._r8_kind
private

parameters for prescribed zonal sst option

Definition at line 332 of file amip_interp.F90.

◆ tice_crit

real(r8_kind) tice_crit = -1.80_r8_kind
private

in degC or degK

Definition at line 328 of file amip_interp.F90.

◆ tice_crit_k

real(r8_kind) tice_crit_k
private

Definition at line 313 of file amip_interp.F90.

◆ tlag

real(r8_kind) tlag = 0.875_r8_kind
private

parameters for prescribed zonal sst option

Definition at line 335 of file amip_interp.F90.

◆ use_daily

logical use_daily = .false.
private

if '.true.', give 'data_set = 'daily''

Definition at line 344 of file amip_interp.F90.

◆ use_mpp_io

logical use_mpp_io = .false.
private

Set to .true. to use mpp_io, otherwise fms2io is used.

Definition at line 352 of file amip_interp.F90.

◆ use_ncep_ice

logical use_ncep_ice = .false.
private

For seasonal forecast: use_ncep_ice = .F.

Definition at line 350 of file amip_interp.F90.

◆ use_ncep_sst

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.

Definition at line 346 of file amip_interp.F90.

◆ use_zonal

logical use_zonal = .false.
private

parameters for prescribed zonal sst option

Definition at line 331 of file amip_interp.F90.

◆ verbose

integer verbose = 0
private

0 <= verbose <= 3

Definition at line 329 of file amip_interp.F90.