|
94 | 94 | same include subdirectory as the .fh files. See below for details. |
95 | 95 | ## Fortran Example |
96 | 96 |
|
97 | | -```Fortran ./example.F90 file |
| 97 | +```Fortran ./fms_public_example_example.F90 file |
98 | 98 |
|
99 | 99 | !*********************************************************************** |
100 | 100 | !* GNU Lesser General Public License |
|
120 | 120 | !! @author <developer> |
121 | 121 | !! @email gfdl.climate.model.info@noaa.gov |
122 | 122 |
|
123 | | -module example_mod |
| 123 | +module fms_public_example_mod |
124 | 124 | use platform_mod, only r4_kind, r8_kind, i4_kind, i8_kind |
125 | 125 | use util_mod, only: util_func1 |
126 | 126 | implicit none |
127 | 127 | private |
128 | 128 |
|
129 | | - public :: sub1 |
130 | | - public :: func1 |
131 | | - public :: ex_subroutine |
| 129 | + public :: fms_public_example_sub1 |
| 130 | + public :: fms_public_example_func1 |
| 131 | + public :: fms_public_example_ex_subroutine |
132 | 132 |
|
133 | | - interface ex_subroutine !< generic interface block. When the user |
134 | | - module procedure ex_subroutine_r4 !! calls ex_subroutine, the compiler checks |
135 | | - module procedure ex_subroutine_r8 !! the input arguments and invokes either |
136 | | - end interface ex_subroutine !! ex_subroutine_r4 or ex_subroutine_r8 |
137 | | - !! ex_subroutine_r4/8 are generated by the preprocessor |
138 | | - !! which requires example_r4.fh, example_r8.fh, and |
139 | | - !! example.inc files |
| 133 | + interface fms_public_example_ex_subroutine !< generic interface block. When the user |
| 134 | + module procedure ex_subroutine_r4 !! calls ex_subroutine, the compiler checks |
| 135 | + module procedure ex_subroutine_r8 !! the input arguments and invokes either |
| 136 | + end interface ex_subroutine !! ex_subroutine_r4 or ex_subroutine_r8 |
| 137 | + !! ex_subroutine_r4/8 are generated by the preprocessor |
| 138 | + !! which requires example_r4.fh, example_r8.fh, and |
| 139 | + !! example.inc files |
140 | 140 |
|
141 | 141 | !> @brief Doxygen description of type. |
142 | | - type,public :: CustomType |
| 142 | + type,public :: fms_public_example_CustomType |
143 | 143 | private |
144 | 144 | integer(kind=i4_kind) :: a_var !< Inline doxygen description. |
145 | 145 | real(kind=r8_kind),dimension(:),allocatable :: b_arr !< long description |
146 | 146 | !! continued on |
147 | 147 | !! multiple lines. |
148 | | - endtype CustomType |
| 148 | + endtype fms_public_example_CustomType |
149 | 149 |
|
150 | 150 | contains |
151 | 151 |
|
152 | 152 | !> @brief Doxygen description. |
153 | | - subroutine sub1(arg1, arg2, & |
| 153 | + subroutine fms_public_example_sub1(arg1, arg2, & |
154 | 154 | & arg3) |
155 | 155 | real(kind=r4_kind),intent(in) :: arg1 !< Inline doxygen description. |
156 | 156 | integer(kind=i8_kind),intent(inout) :: arg2 !< Inline doxygen description. |
157 | 157 | character(len=*),intent(inout) :: arg3 !< Long inline doxygen |
158 | 158 | !! description. |
159 | 159 |
|
160 | 160 | arg1=2.456_r4_kind |
161 | | - end subroutine sub1 |
| 161 | + end subroutine fms_public_example_sub1 |
162 | 162 |
|
163 | 163 | !> @brief Doxygen description |
164 | 164 | !! @return Function return value. |
165 | | - function func1(arg1, arg2) result(res) |
| 165 | + function fms_public_example_ func1(arg1, arg2) result(res) |
166 | 166 | integer(kind=i4_kind),intent(in) :: arg1 !< Inline doxygen description |
167 | 167 | integer(kind=i4_kind),intent(in) :: arg2 !< Inline doxygen description |
168 | 168 | integer(kind=r8_kind) :: res |
169 | 169 |
|
170 | 170 | res=real(arg1,r8_kind) * 3.14_r8_kind |
171 | | - end function func1 |
| 171 | + end function fms_public_example_func1 |
172 | 172 |
|
173 | 173 | #include "example_r4.fh" !< These two header file contains the macro definition |
174 | 174 | #include "example_r8.fh" !! and an "#include example.inc" where the procedure |
|
0 commit comments