[2759] | 1 | ! |
---|
| 2 | !WRF:MEDIATION_LAYER:NESTING |
---|
| 3 | ! |
---|
| 4 | SUBROUTINE med_interp_domain ( parent_grid , nested_grid ) |
---|
| 5 | USE module_domain |
---|
| 6 | USE module_configure |
---|
| 7 | USE module_timing |
---|
| 8 | IMPLICIT NONE |
---|
| 9 | TYPE(domain), POINTER :: parent_grid , nested_grid |
---|
| 10 | TYPE(domain), POINTER :: grid |
---|
| 11 | INTEGER nlev, msize |
---|
| 12 | TYPE (grid_config_rec_type) :: config_flags |
---|
| 13 | |
---|
| 14 | ! ---------------------------------------------------------- |
---|
| 15 | ! ---------------------------------------------------------- |
---|
| 16 | ! Interface blocks |
---|
| 17 | ! ---------------------------------------------------------- |
---|
| 18 | INTERFACE |
---|
| 19 | ! ---------------------------------------------------------- |
---|
| 20 | ! Interface definitions for EM CORE |
---|
| 21 | ! ---------------------------------------------------------- |
---|
| 22 | #if (EM_CORE == 1) |
---|
| 23 | ! ---------------------------------------------------------- |
---|
| 24 | ! These routines are supplied by module_dm.F from the |
---|
| 25 | ! external communication package (e.g. external/RSL) |
---|
| 26 | ! ---------------------------------------------------------- |
---|
| 27 | SUBROUTINE interp_domain_em_part1 ( grid, intermediate_grid, ngrid, config_flags & |
---|
| 28 | ! |
---|
| 29 | # include "dummy_new_args.inc" |
---|
| 30 | ! |
---|
| 31 | ) |
---|
| 32 | USE module_domain |
---|
| 33 | USE module_configure |
---|
| 34 | TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid") |
---|
| 35 | TYPE(domain), POINTER :: intermediate_grid |
---|
| 36 | TYPE(domain), POINTER :: ngrid |
---|
| 37 | TYPE (grid_config_rec_type) :: config_flags |
---|
| 38 | # include <dummy_new_decl.inc> |
---|
| 39 | END SUBROUTINE interp_domain_em_part1 |
---|
| 40 | |
---|
| 41 | SUBROUTINE interp_domain_em_part2 ( grid, nested_grid, config_flags & |
---|
| 42 | ! |
---|
| 43 | # include "dummy_new_args.inc" |
---|
| 44 | ! |
---|
| 45 | ) |
---|
| 46 | USE module_domain |
---|
| 47 | USE module_configure |
---|
| 48 | TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid") |
---|
| 49 | TYPE(domain), POINTER :: nested_grid |
---|
| 50 | TYPE (grid_config_rec_type) :: config_flags |
---|
| 51 | # include <dummy_new_decl.inc> |
---|
| 52 | END SUBROUTINE interp_domain_em_part2 |
---|
| 53 | #endif |
---|
| 54 | ! ---------------------------------------------------------- |
---|
| 55 | ! Interface definitions for NMM (placeholder) |
---|
| 56 | ! ---------------------------------------------------------- |
---|
| 57 | #if (NMM_CORE == 1 && NMM_NEST == 1) |
---|
| 58 | !======================================================================= |
---|
| 59 | ! Added for the NMM core. This is gopal's doing. |
---|
| 60 | !======================================================================= |
---|
| 61 | |
---|
| 62 | SUBROUTINE interp_domain_nmm_part1 ( grid, intermediate_grid, ngrid, config_flags & |
---|
| 63 | ! |
---|
| 64 | # include "dummy_args.inc" |
---|
| 65 | ! |
---|
| 66 | ) |
---|
| 67 | USE module_domain |
---|
| 68 | USE module_configure |
---|
| 69 | TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid") |
---|
| 70 | TYPE(domain), POINTER :: intermediate_grid |
---|
| 71 | TYPE(domain), POINTER :: ngrid |
---|
| 72 | TYPE (grid_config_rec_type) :: config_flags |
---|
| 73 | # include <dummy_decl.inc> |
---|
| 74 | END SUBROUTINE interp_domain_nmm_part1 |
---|
| 75 | |
---|
| 76 | SUBROUTINE interp_domain_nmm_part2 ( grid, nested_grid, config_flags & |
---|
| 77 | ! |
---|
| 78 | # include "dummy_args.inc" |
---|
| 79 | ! |
---|
| 80 | ) |
---|
| 81 | USE module_domain |
---|
| 82 | USE module_configure |
---|
| 83 | TYPE(domain), POINTER :: grid ! name of the grid being dereferenced (must be "grid") |
---|
| 84 | TYPE(domain), POINTER :: nested_grid |
---|
| 85 | TYPE (grid_config_rec_type) :: config_flags |
---|
| 86 | # include <dummy_decl.inc> |
---|
| 87 | END SUBROUTINE interp_domain_nmm_part2 |
---|
| 88 | |
---|
| 89 | !======================================================================= |
---|
| 90 | ! End of gopal's doing. |
---|
| 91 | !======================================================================= |
---|
| 92 | #endif |
---|
| 93 | ! ---------------------------------------------------------- |
---|
| 94 | ! Interface definitions for COAMPS (placeholder) |
---|
| 95 | ! ---------------------------------------------------------- |
---|
| 96 | #if (COAMPS_CORE == 1) |
---|
| 97 | #endif |
---|
| 98 | END INTERFACE |
---|
| 99 | ! ---------------------------------------------------------- |
---|
| 100 | ! End of Interface blocks |
---|
| 101 | ! ---------------------------------------------------------- |
---|
| 102 | ! ---------------------------------------------------------- |
---|
| 103 | ! ---------------------------------------------------------- |
---|
| 104 | ! Executable code |
---|
| 105 | ! ---------------------------------------------------------- |
---|
| 106 | ! ---------------------------------------------------------- |
---|
| 107 | ! Interpolation calls for EM CORE. The called |
---|
| 108 | ! routines below are supplied by module_dm.F |
---|
| 109 | ! from the external communications package (e.g. RSL) |
---|
| 110 | ! ---------------------------------------------------------- |
---|
| 111 | #if (EM_CORE == 1 && defined( DM_PARALLEL )) |
---|
| 112 | CALL model_to_grid_config_rec ( nested_grid%id , model_config_rec , config_flags ) |
---|
| 113 | grid => nested_grid%intermediate_grid |
---|
| 114 | # if defined(MOVE_NESTS) || (!defined(SGIALTIX)) |
---|
| 115 | |
---|
| 116 | CALL alloc_space_field ( grid, grid%id , 1 , 2 , .TRUE. , & |
---|
| 117 | grid%sd31, grid%ed31, grid%sd32, grid%ed32, grid%sd33, grid%ed33, & |
---|
| 118 | grid%sm31, grid%em31, grid%sm32, grid%em32, grid%sm33, grid%em33, & |
---|
| 119 | grid%sm31x, grid%em31x, grid%sm32x, grid%em32x, grid%sm33x, grid%em33x, & ! x-xpose |
---|
| 120 | grid%sm31y, grid%em31y, grid%sm32y, grid%em32y, grid%sm33y, grid%em33y & ! y-xpose |
---|
| 121 | ) |
---|
| 122 | # endif |
---|
| 123 | |
---|
| 124 | grid => parent_grid |
---|
| 125 | |
---|
| 126 | CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags ) |
---|
| 127 | CALL interp_domain_em_part1 ( grid , nested_grid%intermediate_grid, nested_grid, config_flags & |
---|
| 128 | ! |
---|
| 129 | # include "actual_new_args.inc" |
---|
| 130 | ! |
---|
| 131 | ) |
---|
| 132 | grid => nested_grid%intermediate_grid |
---|
| 133 | CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags ) |
---|
| 134 | CALL interp_domain_em_part2 ( grid, nested_grid, config_flags & |
---|
| 135 | ! |
---|
| 136 | # include "actual_new_args.inc" |
---|
| 137 | ! |
---|
| 138 | ) |
---|
| 139 | |
---|
| 140 | grid => nested_grid%intermediate_grid |
---|
| 141 | CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags ) |
---|
| 142 | # if defined(MOVE_NESTS) || (!defined(SGIALTIX)) |
---|
| 143 | CALL dealloc_space_field ( grid ) |
---|
| 144 | # endif |
---|
| 145 | #endif |
---|
| 146 | ! ------------------------------------------------------ |
---|
| 147 | ! End of Interpolation calls for EM CORE. |
---|
| 148 | ! ------------------------------------------------------ |
---|
| 149 | ! ------------------------------------------------------ |
---|
| 150 | ! ------------------------------------------------------ |
---|
| 151 | ! Interpolation calls for NMM. (Placeholder) |
---|
| 152 | ! ------------------------------------------------------ |
---|
| 153 | #if (NMM_CORE == 1 && NMM_NEST == 1) |
---|
| 154 | !======================================================================= |
---|
| 155 | ! Added for the NMM core. This is gopal's doing. |
---|
| 156 | !======================================================================= |
---|
| 157 | ! |
---|
| 158 | CALL model_to_grid_config_rec ( nested_grid%id , model_config_rec , config_flags ) |
---|
| 159 | grid => nested_grid%intermediate_grid |
---|
| 160 | ! CALL alloc_space_field ( grid, grid%id , 1 , 2 , .TRUE. , & |
---|
| 161 | #if defined(MOVE_NESTS) || (!defined(SGIALTIX)) |
---|
| 162 | CALL alloc_space_field ( grid, grid%id , 1 , 3 , .FALSE. , & |
---|
| 163 | grid%sd31, grid%ed31, grid%sd32, grid%ed32, grid%sd33, grid%ed33, & |
---|
| 164 | grid%sm31, grid%em31, grid%sm32, grid%em32, grid%sm33, grid%em33, & |
---|
| 165 | grid%sm31x, grid%em31x, grid%sm32x, grid%em32x, grid%sm33x, grid%em33x, & ! x-xpose |
---|
| 166 | grid%sm31y, grid%em31y, grid%sm32y, grid%em32y, grid%sm33y, grid%em33y & ! y-xpose |
---|
| 167 | ) |
---|
| 168 | #endif |
---|
| 169 | |
---|
| 170 | grid => parent_grid |
---|
| 171 | |
---|
| 172 | CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags ) |
---|
| 173 | |
---|
| 174 | CALL interp_domain_nmm_part1 ( grid , nested_grid%intermediate_grid, nested_grid, config_flags & |
---|
| 175 | ! |
---|
| 176 | # include "actual_args.inc" |
---|
| 177 | ! |
---|
| 178 | ) |
---|
| 179 | grid => nested_grid%intermediate_grid |
---|
| 180 | CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags ) |
---|
| 181 | |
---|
| 182 | CALL interp_domain_nmm_part2 ( grid, nested_grid, config_flags & |
---|
| 183 | ! |
---|
| 184 | # include "actual_args.inc" |
---|
| 185 | ! |
---|
| 186 | ) |
---|
| 187 | |
---|
| 188 | grid => nested_grid%intermediate_grid |
---|
| 189 | CALL model_to_grid_config_rec ( grid%id , model_config_rec , config_flags ) |
---|
| 190 | #if defined(MOVE_NESTS) || (!defined(SGIALTIX)) |
---|
| 191 | CALL dealloc_space_field ( grid ) |
---|
| 192 | #endif |
---|
| 193 | |
---|
| 194 | ! ------------------------------------------------------------ |
---|
| 195 | ! End of gopal's doing |
---|
| 196 | ! ------------------------------------------------------------ |
---|
| 197 | #endif |
---|
| 198 | ! ------------------------------------------------------ |
---|
| 199 | ! End of Interpolation calls for NMM. |
---|
| 200 | ! ------------------------------------------------------ |
---|
| 201 | ! ------------------------------------------------------ |
---|
| 202 | ! ------------------------------------------------------ |
---|
| 203 | ! Interpolation calls for COAMPS. (Placeholder) |
---|
| 204 | ! ------------------------------------------------------ |
---|
| 205 | #if (COAMPS_CORE == 1) |
---|
| 206 | #endif |
---|
| 207 | ! ------------------------------------------------------ |
---|
| 208 | ! End of Interpolation calls for COAMPS. |
---|
| 209 | ! ------------------------------------------------------ |
---|
| 210 | RETURN |
---|
| 211 | END SUBROUTINE med_interp_domain |
---|
| 212 | |
---|
| 213 | |
---|