!*********************************************************************** !* GNU Lesser General Public License !* !* This file is part of the GFDL Flexible Modeling System (FMS). !* !* FMS is free software: you can redistribute it and/or modify it under !* the terms of the GNU Lesser General Public License as published by !* the Free Software Foundation, either version 3 of the License, or (at !* your option) any later version. !* !* FMS is distributed in the hope that it will be useful, but WITHOUT !* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or !* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License !* for more details. !* !* You should have received a copy of the GNU Lesser General Public !* License along with FMS. If not, see . !*********************************************************************** !> \author William Cooke !! !! \brief interpolator_mod is a module to interpolate climatology data to model the grid. !! !! Modules Included: !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !!
Module NameFunctions Included
mpp_modmpp_error, FATAL, mpp_pe, mpp_init, mpp_exit, mpp_npes, !! WARNING, NOTE, input_nml_file
mpp_io_modmpp_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_modmpp_update_domains, mpp_define_domains, mpp_global_field, !! domain2d, mpp_define_layout, mpp_get_compute_domain
diag_manager_moddiag_manager_init, get_base_time, register_diag_field, !! send_data, diag_axis_init
fms_modopen_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_modhoriz_interp_type, horiz_interp_new, horiz_interp_init, !! horiz_interp, horiz_interp_del
time_manager_modtime_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_modtime_interp, YEAR
constants_modgrav, PI, SECONDS_PER_DAY
module interpolator_mod #include use mpp_mod, only : mpp_error, & FATAL, & mpp_pe, & mpp_init, & mpp_exit, & mpp_npes, & WARNING, & NOTE, & input_nml_file use mpp_io_mod, only : 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 use mpp_domains_mod, only : mpp_domains_init, & mpp_update_domains, & mpp_define_domains, & mpp_global_field, & domain2d, & mpp_define_layout, & mpp_get_compute_domain use diag_manager_mod, only : diag_manager_init, get_base_time, & register_diag_field, send_data, & diag_axis_init use fms_mod, only : lowercase, write_version_number, & fms_init, & file_exist, mpp_root_pe, stdlog, & open_namelist_file, close_file, & check_nml_error use horiz_interp_mod, only : horiz_interp_type, & horiz_interp_new, & horiz_interp_init, & assignment(=), & horiz_interp, & horiz_interp_del use time_manager_mod, only : 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(<), & assignment(=), & decrement_time use time_interp_mod, only : time_interp, YEAR use constants_mod, only : grav, PI, SECONDS_PER_DAY !-------------------------------------------------------------------- implicit none private !--------------------------------------------------------------------- !------- interfaces -------- public interpolator_init, & interpolator, & interpolate_type_eq, & obtain_interpolator_time_slices, & unset_interpolator_time_flag, & interpolator_end, & init_clim_diag, & query_interpolator,& read_data !> \page interpolator interpolator Interface !! !! ~~~~~~~~~~{.f90} !! call interpolator (sulfate, model_time, p_half, model_data, name, is, js, clim_units) !! call interpolator (o3, model_time, p_half, model_data, "ozone", is, js) !! ~~~~~~~~~~ !! !! The first option is used to generate sulfate models. !! !! The sulfate data is set by !! ~~~~~~~~~~{.f90} !! type(interpolate_type), intent(inout) :: sulfate !! ~~~~~~~~~~ !! The name of the model is set by !! ~~~~~~~~~~{.f90} !! character(len=*), intent(in) :: name !! ~~~~~~~~~~ !! The units used in this model are outputted to !! ~~~~~~~~~~{.f90} !! character(len=*), intent(out), optional :: clim_units !! ~~~~~~~~~~ !! !! The second option is generate ozone models. !! !! The ozone data is set by !! ~~~~~~~~~~{.f90} !! type(interpolate_type), intent(inout) :: o3 !! ~~~~~~~~~~ !! !! Both of these options use the following variables in the model. !! !! The time used in the model is set by !! !! ~~~~~~~~~~{.f90} !! type(time_type), intent(in) :: model_time !! ~~~~~~~~~~ !! The model pressure field is set by !! ~~~~~~~~~~{.f90} !! real, intent(in), dimension(:,:,:) :: p_half !! ~~~~~~~~~~ !! !! \param [inout] The interpolate type previously defined by a call to interpolator_init !! \param [in] The name of a field that you wish to interpolate !! \param [in]