FMS  2024.03
Flexible Modeling System
register_unstructured_domain_restart_variable.inc
1 !***********************************************************************
2 !* GNU Lesser General Public License
3 !*
4 !* This file is part of the GFDL Flexible Modeling System (FMS).
5 !*
6 !* FMS is free software: you can redistribute it and/or modify it under
7 !* the terms of the GNU Lesser General Public License as published by
8 !* the Free Software Foundation, either version 3 of the License, or (at
9 !* your option) any later version.
10 !*
11 !* FMS is distributed in the hope that it will be useful, but WITHOUT
12 !* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 !* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 !* for more details.
15 !*
16 !* You should have received a copy of the GNU Lesser General Public
17 !* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
18 !***********************************************************************
19 !> @file
20 !> @brief Adds restart variable for unstructured domains for different dimension to be used in
21 !! the @ref register_restart_field interface
22 
23 !> @addtogroup fms2_io_mod
24 !> @{
25 
26 !> @brief Add a domain decomposed variable.
27 subroutine register_unstructured_domain_restart_variable_0d(fileobj, variable_name, vdata, &
28  dimensions, is_optional, &
29  chunksizes)
30 
31  type(fmsnetcdfunstructureddomainfile_t), intent(inout) :: fileobj !< File object.
32  character(len=*), intent(in) :: variable_name !< Variable name.
33  class(*), intent(in), target :: vdata !< Variable data.
34  character(len=*), dimension(:), intent(in), optional :: dimensions !< Dimension names.
35  logical, intent(in), optional :: is_optional !< Prevent errors in read-only files
36  !! if a variable does not exist.
37  integer, intent(in), optional :: chunksizes(:) !< netcdf chunksize to use for this variable
38  !! This feature is only
39  !! available for netcdf4 files
40 
41  call netcdf_add_restart_variable(fileobj, variable_name, vdata, dimensions, is_optional, &
42  chunksizes=chunksizes)
44 
45 
46 !> @brief Add a domain decomposed variable.
47 subroutine register_unstructured_domain_restart_variable_1d(fileobj, variable_name, vdata, &
48  dimensions, is_optional, &
49  chunksizes)
50 
51  type(fmsnetcdfunstructureddomainfile_t), intent(inout) :: fileobj !< File object.
52  character(len=*), intent(in) :: variable_name !< Variable name.
53  class(*), dimension(:), intent(in), target :: vdata !< Variable data.
54  character(len=*), dimension(:), intent(in), optional :: dimensions !< Dimension names.
55  logical, intent(in), optional :: is_optional !< Prevent errors in read-only files
56  !! if a variable does not exist.
57  integer, intent(in), optional :: chunksizes(:) !< netcdf chunksize to use for this variable
58  !! This feature is only
59  !! available for netcdf4 files
60 
61  call netcdf_add_restart_variable(fileobj, variable_name, vdata, dimensions, is_optional, &
62  chunksizes=chunksizes)
64 
65 
66 !> @brief Add a domain decomposed variable.
67 subroutine register_unstructured_domain_restart_variable_2d(fileobj, variable_name, vdata, &
68  dimensions, is_optional, &
69  chunksizes )
70 
71  type(fmsnetcdfunstructureddomainfile_t), intent(inout) :: fileobj !< File object.
72  character(len=*), intent(in) :: variable_name !< Variable name.
73  class(*), dimension(:,:), intent(in), target :: vdata !< Variable data.
74  character(len=*), dimension(:), intent(in), optional :: dimensions !< Dimension names.
75  logical, intent(in), optional :: is_optional !< Prevent errors in read-only files
76  !! if a variable does not exist.
77  integer, intent(in), optional :: chunksizes(:) !< netcdf chunksize to use for this variable
78  !! This feature is only
79  !! available for netcdf4 files
80 
81  call netcdf_add_restart_variable(fileobj, variable_name, vdata, dimensions, is_optional, &
82  chunksizes=chunksizes)
84 
85 
86 !> @brief Add a domain decomposed variable.
87 subroutine register_unstructured_domain_restart_variable_3d(fileobj, variable_name, vdata, &
88  dimensions, is_optional, &
89  chunksizes)
90 
91  type(fmsnetcdfunstructureddomainfile_t), intent(inout) :: fileobj !< File object.
92  character(len=*), intent(in) :: variable_name !< Variable name.
93  class(*), dimension(:,:,:), intent(in), target :: vdata !< Variable data.
94  character(len=*), dimension(:), intent(in), optional :: dimensions !< Dimension names.
95  logical, intent(in), optional :: is_optional !< Prevent errors in read-only files
96  !! if a variable does not exist.
97  integer, intent(in), optional :: chunksizes(:) !< netcdf chunksize to use for this variable
98  !! This feature is only
99  !! available for netcdf4 files
100 
101  call netcdf_add_restart_variable(fileobj, variable_name, vdata, dimensions, is_optional, &
102  chunksizes=chunksizes)
104 
105 
106 !> @brief Add a domain decomposed variable.
107 subroutine register_unstructured_domain_restart_variable_4d(fileobj, variable_name, vdata, &
108  dimensions, is_optional, &
109  chunksizes)
110 
111  type(fmsnetcdfunstructureddomainfile_t), intent(inout) :: fileobj !< File object.
112  character(len=*), intent(in) :: variable_name !< Variable name.
113  class(*), dimension(:,:,:,:), intent(in), target :: vdata !< Variable data.
114  character(len=*), dimension(:), intent(in), optional :: dimensions !< Dimension names.
115  logical, intent(in), optional :: is_optional !< Prevent errors in read-only files
116  !! if a variable does not exist.
117  integer, intent(in), optional :: chunksizes(:) !< netcdf chunksize to use for this variable
118  !! This feature is only
119  !! available for netcdf4 files
120 
121  call netcdf_add_restart_variable(fileobj, variable_name, vdata, dimensions, is_optional, &
122  chunksizes=chunksizes)
124 
125 
126 !> @brief Add a domain decomposed variable.
127 subroutine register_unstructured_domain_restart_variable_5d(fileobj, variable_name, vdata, &
128  dimensions, is_optional, &
129  chunksizes)
130 
131  type(fmsnetcdfunstructureddomainfile_t), intent(inout) :: fileobj !< File object.
132  character(len=*), intent(in) :: variable_name !< Variable name.
133  class(*), dimension(:,:,:,:,:), intent(in), target :: vdata !< Variable data.
134  character(len=*), dimension(:), intent(in), optional :: dimensions !< Dimension names.
135  logical, intent(in), optional :: is_optional !< Prevent errors in read-only files
136  !! if a variable does not exist.
137  integer, intent(in), optional :: chunksizes(:) !< netcdf chunksize to use for this variable
138  !! This feature is only
139  !! available for netcdf4 files
140 
141  call netcdf_add_restart_variable(fileobj, variable_name, vdata, dimensions, is_optional, &
142  chunksizes=chunksizes)
144 !> @}
subroutine register_unstructured_domain_restart_variable_4d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine register_unstructured_domain_restart_variable_2d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine register_unstructured_domain_restart_variable_3d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine register_unstructured_domain_restart_variable_1d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine register_unstructured_domain_restart_variable_5d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.
subroutine register_unstructured_domain_restart_variable_0d(fileobj, variable_name, vdata, dimensions, is_optional, chunksizes)
Add a domain decomposed variable.