!***********************************************************************
!* GNU Lesser General Public License
!*
!* This file is part of the FV3 dynamical core.
!*
!* The FV3 dynamical core 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.
!*
!* The FV3 dynamical core is distributed in the hope that it will be
!* useful, but WITHOUT ANYWARRANTY; 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 the FV3 dynamical core.
!* If not, see .
!***********************************************************************
#ifdef OVERLOAD_R4
#define _GET_VAR1 get_var1_real
#else
#define _GET_VAR1 get_var1_double
#endif
!>@brief The module 'external_ic_mod' contains routines that read in and
!! remap initial conditions.
module external_ic_mod
!
!
! Module Name |
! Functions Included |
!
!
! constants_mod |
! pi=>pi_8, omega, grav, kappa, rdgas, rvgas, cp_air |
!
!
! external_sst_mod |
! i_sst, j_sst, sst_ncep |
!
!
! field_manager_mod |
! MODEL_ATMOS |
!
!
! fms_mod |
! write_version_number, check_nml_error |
!
!
! fms2_io_mod |
! file_exists, open_file, close_file, read_data, variable_exists,
! get_variable_size, get_global_attribute, global_att_exists,
! FmsNetcdfFile_t, FmsNetcdfDomainFile_t, read_restart,
! register_restart_field, register_axis, get_dimension_size
! get_variable_dimension_names, get_variable_num_dimensions |
!
!
! fv_arrays_mod |
! fv_atmos_type, fv_grid_type, fv_grid_bounds_type, R_GRID |
!
!
! fv_control_mod |
! fv_init, fv_end, ngrids |
!
!
! fv_diagnostics_mod |
! prt_maxmin, prt_gb_nh_sh, prt_height |
!
!
! fv_eta_mod |
! set_eta, set_external_eta |
!
!
! fv_fill_mod |
! fillz |
!
!
! fv_grid_utils_mod |
! ptop_min, g_sum,mid_pt_sphere,get_unit_vect2,
! get_latlon_vector,inner_prod |
!
!
! fv_io_mod |
! fv_io_read_tracers |
!
!
! fv_mp_mod |
! ng, is_master, fill_corners, YDir, mp_reduce_min, mp_reduce_max |
!
!
! fv_mapz_mod |
! mappm |
!
!
! fv_nwp_nudge_mod |
! T_is_Tv |
!
!
! fv_surf_map_mod |
! surfdrv, FV3_zs_filter,sgh_g, oro_g,del2_cubed_sphere, del4_cubed_sphere |
!
!
! fv_timing_mod |
! timing_on, timing_off |
!
!
! fv_update_phys_mod |
! fv_update_phys |
!
!
! init_hydro_mod |
! p_var |
!
!
! mpp_mod |
! mpp_error, FATAL, NOTE, mpp_pe, mpp_root_pe,stdlog, input_nml_file |
!
!
! mpp_domains_mod |
! mpp_get_tile_id, domain2d, mpp_update_domains, NORTH, EAST |
!
!
! mpp_parameter_mod |
! AGRID_PARAM=>AGRID |
!
!
! sim_nc_mod |
! open_ncfile, close_ncfile, get_ncdim1, get_var1_double, get_var2_real,
! get_var3_r4, get_var2_r4, get_var1_real, get_var_att_double |
!
!
! tracer_manager_mod |
! get_tracer_names, get_number_tracers, get_tracer_index, set_tracer_profile |
!
!
! test_cases_mod |
! checker_tracers |
!
!
use netcdf
use external_sst_mod, only: i_sst, j_sst, sst_ncep
use fms_mod, only: write_version_number, check_nml_error
use fms2_io_mod, only: file_exists, open_file, close_file, read_data, variable_exists, &
get_variable_size, get_global_attribute, global_att_exists, &
FmsNetcdfFile_t, FmsNetcdfDomainFile_t, read_restart, &
register_restart_field, register_axis, get_dimension_size, &
get_variable_dimension_names, get_variable_num_dimensions
use mpp_mod, only: mpp_error, FATAL, NOTE, mpp_pe, mpp_root_pe
use mpp_mod, only: stdlog, input_nml_file, mpp_npes, mpp_get_current_pelist
use mpp_parameter_mod, only: AGRID_PARAM=>AGRID
use mpp_domains_mod, only: mpp_get_tile_id, domain2d, mpp_update_domains, NORTH, EAST
use tracer_manager_mod, only: get_tracer_names, get_number_tracers, get_tracer_index
use tracer_manager_mod, only: set_tracer_profile
use field_manager_mod, only: MODEL_ATMOS
use platform_mod, only: r4_kind, r8_kind
#ifdef OVERLOAD_R4
use constantsR4_mod, only: pi=>pi_8, omega, grav, kappa, rdgas, rvgas, cp_air
#else
use constants_mod, only: pi=>pi_8, omega, grav, kappa, rdgas, rvgas, cp_air
#endif
use fv_arrays_mod, only: fv_atmos_type, fv_grid_type, fv_grid_bounds_type, R_GRID
use fv_diagnostics_mod,only: prt_maxmin, prt_gb_nh_sh, prt_height
use fv_grid_utils_mod, only: ptop_min, g_sum,mid_pt_sphere,get_unit_vect2,get_latlon_vector,inner_prod
use fv_io_mod, only: fv_io_read_tracers
use fv_mapz_mod, only: mappm
use fv_regional_mod, only: dump_field, H_STAGGER, U_STAGGER, V_STAGGER, get_data_source
use fv_mp_mod, only: is_master, fill_corners, YDir, mp_reduce_min, mp_reduce_max
use fv_regional_mod, only: start_regional_cold_start
use fv_surf_map_mod, only: surfdrv, FV3_zs_filter
use fv_surf_map_mod, only: sgh_g, oro_g
use fv_surf_map_mod, only: del2_cubed_sphere, del4_cubed_sphere
use fv_timing_mod, only: timing_on, timing_off
use init_hydro_mod, only: p_var
use fv_fill_mod, only: fillz
use fv_eta_mod, only: set_eta, set_external_eta
use sim_nc_mod, only: open_ncfile, close_ncfile, get_ncdim1, get_var1_double, get_var2_real, &
get_var3_r4, get_var2_r4, get_var1_real, get_var_att_double
use fv_nwp_nudge_mod, only: T_is_Tv
use test_cases_mod, only: checker_tracers
! The "T" field in NCEP analysis is actually virtual temperature (Larry H. post processing)
! BEFORE 20051201
use boundary_mod, only: nested_grid_BC, extrapolation_BC
use mpp_domains_mod, only: mpp_get_data_domain, mpp_get_global_domain, mpp_get_compute_domain
#ifdef MULTI_GASES
use multi_gases_mod, only: virq, virqd, vicpqd
#endif
implicit none
private
real, parameter:: zvir = rvgas/rdgas - 1.
real(kind=R_GRID), parameter :: cnst_0p20=0.20d0
real, parameter :: deg2rad = pi/180.
logical :: data_source_fv3gfs
! version number of this module
! Include variable "version" to be written to log file.
#include