!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! !! !! GNU General Public License !! !! !! !! This file is part of the Flexible Modeling System (FMS). !! !! !! !! FMS is free software; you can redistribute it and/or modify !! !! it and are expected to follow the terms of the GNU General Public !! !! License as published by the Free Software Foundation. !! !! !! !! 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 General Public License !! !! along with FMS; if not, write to: !! !! Free Software Foundation, Inc. !! !! 59 Temple Place, Suite 330 !! !! Boston, MA 02111-1307 USA !! !! or see: !! !! http://www.gnu.org/licenses/gpl.txt !! !! !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! module soil_mod use time_manager_mod, only : time_type IMPLICIT NONE public send_averaged_data ! sends tile-averaged data to diagnostics manager ! ---- interface to tile-averaged diagnostic routines ------------------------ interface send_averaged_data module procedure send_averaged_data2d module procedure send_averaged_data3d end interface contains ! ============================================================================ function send_averaged_data2d ( id, field, area, time, mask ) ! ============================================================================ ! average the data over tiles and send then to diagnostics ! --- return value --------------------------------------------------------- logical :: send_averaged_data2d ! --- arguments ------------------------------------------------------------ integer, intent(in) :: id ! id od the diagnostic field real, intent(in) :: field(:,:,:) ! field to average and send real, intent(in) :: area (:,:,:) ! area of tiles (== averaging ! weights), arbitrary units type(time_type), intent(in) :: time ! current time logical, intent(in),optional :: mask (:,:,:) ! land mask ! --- local vars ----------------------------------------------------------- send_averaged_data2d = .false. end function send_averaged_data2d ! ============================================================================ function send_averaged_data3d( id, field, area, time, mask ) ! ============================================================================ ! average the data over tiles and send then to diagnostics ! --- return value --------------------------------------------------------- logical :: send_averaged_data3d ! --- arguments ------------------------------------------------------------ integer, intent(in) :: id ! id of the diagnostic field real, intent(in) :: field(:,:,:,:) ! (lon, lat, tile, lev) field ! to average and send real, intent(in) :: area (:,:,:) ! (lon, lat, tile) tile areas ! ( == averaging weights), ! arbitrary units type(time_type), intent(in) :: time ! current time logical, intent(in),optional :: mask (:,:,:) ! (lon, lat, tile) land mask ! --- local vars ----------------------------------------------------------- send_averaged_data3d = .false. end function send_averaged_data3d end module soil_mod