!***********************************************************************
!* 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 .
!***********************************************************************
!>@brief The module 'fv_io' contains restart facilities for FV core.
!>@details This module writes and reads restart files for the FV core. Additionally
!! it provides setup and calls routines necessary to provide a complete restart
!! for the model.
!>@note NOTE: Merging in the seasonal forecast initialization code
!! has proven problematic in the past, since many conflicts
!! occur. Leaving this for now --- lmh 10aug15
module fv_io_mod
!
!
! Module Name |
! Functions Included |
!
!
! external_sst_mod |
! sst_ncep, sst_anom, use_ncep_sst |
!
!
! field_manager_mod |
! MODEL_ATMOS |
!
!
! fms_mod |
! file_exist |
!
!
! fms_io_mod |
! fms_io_exit, get_tile_string,restart_file_type,
! register_restart_field, save_restart, restore_state,
! set_domain, nullify_domain, set_filename_appendix,
! get_mosaic_tile_file, get_instance_filename,
! save_restart_border, restore_state_border,
! free_restart_type,field_exist |
!
!
! fv_arrays_mod |
! fv_atmos_type, fv_nest_BC_type_3D |
!
!
! fv_eta_mod |
! set_external_eta |
!
!
! fv_mp_mod |
! ng, mp_gather, is_master |
!
!
! mpp_mod |
! mpp_error, FATAL, NOTE, WARNING, mpp_root_pe,
! mpp_sync, mpp_pe, mpp_declare_pelist |
!
!
! mpp_domains_mod |
! domain2d, EAST, WEST, NORTH, CENTER, SOUTH, CORNER,
! mpp_get_compute_domain, mpp_get_data_domain,
! mpp_get_layout, mpp_get_ntile_count,mpp_get_global_domain |
!
!
! tracer_manager_mod |
! tr_get_tracer_names=>get_tracer_names,
! get_tracer_names, get_number_tracers,
! set_tracer_profile, get_tracer_index |
!
!
use fms2_io_mod, only: FmsNetcdfFile_t, FmsNetcdfDomainFile_t, &
register_restart_field, register_axis, unlimited, &
open_file, read_restart, read_restart_bc, write_restart, &
write_restart_bc, close_file, register_field, write_data, &
get_global_io_domain_indices, register_variable_attribute, &
variable_exists, read_data, set_filename_appendix
use mpp_mod, only: mpp_error, FATAL, NOTE, WARNING, mpp_root_pe, &
mpp_sync, mpp_pe, mpp_declare_pelist, mpp_get_current_pelist, &
mpp_npes
use mpp_domains_mod, only: domain2d, EAST, WEST, NORTH, CENTER, SOUTH, CORNER, &
mpp_get_compute_domain, mpp_get_data_domain, &
mpp_get_layout, mpp_get_ntile_count, &
mpp_get_global_domain
use tracer_manager_mod, only: tr_get_tracer_names=>get_tracer_names, &
get_tracer_names, get_number_tracers, &
set_tracer_profile, &
get_tracer_index
use field_manager_mod, only: MODEL_ATMOS
use external_sst_mod, only: sst_ncep, sst_anom, use_ncep_sst
use fv_arrays_mod, only: fv_atmos_type, fv_nest_BC_type_3D
use fv_eta_mod, only: set_external_eta
use fv_mp_mod, only: mp_gather, is_master
use fv_treat_da_inc_mod, only: read_da_inc
implicit none
private
public :: fv_io_init, fv_io_exit, fv_io_read_restart, remap_restart, fv_io_write_restart
public :: fv_io_read_tracers, fv_io_register_restart, fv_io_register_nudge_restart
public :: fv_io_register_restart_BCs
public :: fv_io_write_BCs, fv_io_read_BCs
public :: fv_io_register_axis
logical :: module_is_initialized = .FALSE.
integer ::grid_xtdimid, grid_ytdimid, haloid, pfullid !For writing BCs
integer ::grid_xtstagdimid, grid_ytstagdimid, oneid
contains
!>@brief Initialize the fv core restart facilities
subroutine fv_io_init()
module_is_initialized = .TRUE.
end subroutine fv_io_init
!>@brief Close the fv core restart facilities
subroutine fv_io_exit
module_is_initialized = .FALSE.
end subroutine fv_io_exit
!#####################################################################
!