[81] | 1 | MODULE physics_mod |
---|
[714] | 2 | USE icosa |
---|
[196] | 3 | USE field_mod |
---|
[714] | 4 | USE physics_interface_mod |
---|
| 5 | USE omp_para |
---|
| 6 | IMPLICIT NONE |
---|
[196] | 7 | PRIVATE |
---|
| 8 | |
---|
[739] | 9 | INTEGER, PARAMETER :: phys_none=0, phys_column=1, & |
---|
| 10 | phys_HS94=3, phys_LB2012=4, & |
---|
| 11 | phys_DCMIP=11, phys_DCMIP2016=12, & |
---|
| 12 | phys_lmdz_generic=21, phys_external=22 |
---|
[213] | 13 | INTEGER :: phys_type |
---|
[481] | 14 | TYPE(t_field),POINTER,SAVE :: f_dulon(:), f_dulat(:) |
---|
| 15 | TYPE(t_field),POINTER,SAVE :: f_ulon(:), f_ulat(:) |
---|
| 16 | TYPE(t_field),POINTER,SAVE :: f_p(:), f_pk(:) |
---|
| 17 | TYPE(t_field),POINTER,SAVE :: f_temp(:) |
---|
[714] | 18 | TYPE(t_field),POINTER,SAVE :: f_du_phys(:) |
---|
[196] | 19 | |
---|
[481] | 20 | CHARACTER(LEN=255),SAVE :: physics_type |
---|
[186] | 21 | !$OMP THREADPRIVATE(physics_type) |
---|
[81] | 22 | |
---|
[714] | 23 | PUBLIC :: physics, init_physics, zero_du_phys |
---|
[213] | 24 | |
---|
[81] | 25 | CONTAINS |
---|
| 26 | |
---|
[98] | 27 | SUBROUTINE init_physics |
---|
[178] | 28 | USE mpipara |
---|
| 29 | USE etat0_mod |
---|
[739] | 30 | USE etat0_venus_mod, ONLY : init_phys_venus=>init_physics |
---|
[215] | 31 | USE physics_dcmip_mod, ONLY : init_physics_dcmip=>init_physics |
---|
[381] | 32 | USE physics_dcmip2016_mod, ONLY : init_physics_dcmip2016=>init_physics |
---|
[327] | 33 | USE physics_lmdz_generic_mod, ONLY : init_physics_lmdz_generic=>init_physics |
---|
[347] | 34 | USE physics_external_mod, ONLY : init_physics_external=>init_physics |
---|
[739] | 35 | LOGICAL :: done |
---|
| 36 | physics_inout%dt_phys = dt*itau_physics |
---|
| 37 | !$OMP PARALLEL |
---|
| 38 | CALL allocate_field(f_du_phys,field_u,type_real,llm, name='du_phys') |
---|
[170] | 39 | |
---|
[217] | 40 | physics_type='none' |
---|
[81] | 41 | CALL getin("physics",physics_type) |
---|
[739] | 42 | ! below, flag done is set to .FALSE. if the CALL to init_XXX must be done outside any OMP PARALLEL region |
---|
| 43 | done=.TRUE. |
---|
| 44 | phys_type=phys_column |
---|
[81] | 45 | SELECT CASE(TRIM(physics_type)) |
---|
[217] | 46 | CASE ('none') |
---|
| 47 | IF(is_mpi_root) PRINT*,"NO PHYSICAL PACKAGE USED" |
---|
| 48 | phys_type = phys_none |
---|
| 49 | CASE ('held_suarez') |
---|
| 50 | phys_type = phys_HS94 |
---|
[327] | 51 | CASE ('phys_lmdz_generic') |
---|
| 52 | phys_type=phys_lmdz_generic |
---|
[739] | 53 | done = .FALSE. |
---|
[347] | 54 | CASE ('phys_external') |
---|
| 55 | phys_type=phys_external |
---|
[739] | 56 | done = .FALSE. |
---|
| 57 | END SELECT |
---|
[726] | 58 | |
---|
[739] | 59 | IF(phys_type == phys_column) THEN |
---|
[217] | 60 | CALL allocate_field(f_dulon,field_t,type_real,llm, name='dulon') |
---|
| 61 | CALL allocate_field(f_dulat,field_t,type_real,llm, name='dulat') |
---|
[295] | 62 | CALL allocate_field(f_temp,field_t,type_real,llm, name='temp') |
---|
[481] | 63 | CALL allocate_field(f_ulon,field_t,type_real,llm, name='ulon') |
---|
| 64 | CALL allocate_field(f_ulat,field_t,type_real,llm, name='ulat') |
---|
| 65 | CALL allocate_field(f_p,field_t,type_real,llm+1, name='p') |
---|
| 66 | CALL allocate_field(f_pk,field_t,type_real,llm, name='pk') |
---|
[217] | 67 | CALL init_pack_before ! Compute physics_inout%ngrid and offsets used by pack/unpack |
---|
[739] | 68 | CALL init_pack_after ! Defines Ai, lon, lat in physics_inout |
---|
| 69 | |
---|
| 70 | SELECT CASE(TRIM(physics_type)) |
---|
| 71 | CASE ('dcmip') |
---|
| 72 | phys_type = phys_DCMIP |
---|
| 73 | CALL init_physics_dcmip |
---|
| 74 | CASE ('dcmip2016') |
---|
| 75 | phys_type = phys_DCMIP2016 |
---|
| 76 | CALL init_physics_dcmip2016 |
---|
[741] | 77 | CASE ('Lebonnois2012') |
---|
| 78 | phys_type = phys_LB2012 |
---|
| 79 | CALL init_phys_venus |
---|
[739] | 80 | CASE DEFAULT |
---|
| 81 | IF(is_mpi_root) PRINT*, 'init_physics : Bad selector for variable physics <',& |
---|
| 82 | TRIM(physics_type), '> options are <none>, <held_suarez>, <Lebonnois2012>,', & |
---|
| 83 | '<dcmip>, <dcmip2016>, <phys_lmdz_generic>, <phys_external>' |
---|
| 84 | STOP |
---|
| 85 | END SELECT |
---|
| 86 | |
---|
| 87 | END IF |
---|
[726] | 88 | !$OMP END PARALLEL |
---|
| 89 | |
---|
[739] | 90 | IF(done==.FALSE.) THEN |
---|
| 91 | SELECT CASE(phys_type) |
---|
| 92 | CASE(phys_external) |
---|
| 93 | CALL init_physics_external |
---|
| 94 | CASE(phys_lmdz_generic) |
---|
| 95 | CALL init_physics_lmdz_generic |
---|
| 96 | END SELECT |
---|
| 97 | END IF |
---|
[726] | 98 | |
---|
[739] | 99 | IF(is_mpi_root) PRINT *, 'phys_type = ',phys_type |
---|
[726] | 100 | |
---|
[81] | 101 | END SUBROUTINE init_physics |
---|
| 102 | |
---|
[714] | 103 | SUBROUTINE zero_du_phys() |
---|
| 104 | REAL(rstd), DIMENSION(:,:), POINTER :: du |
---|
| 105 | INTEGER :: ind |
---|
| 106 | DO ind=1,ndomain |
---|
| 107 | IF (.NOT. assigned_domain(ind)) CYCLE |
---|
| 108 | CALL swap_dimensions(ind) |
---|
| 109 | CALL swap_geometry(ind) |
---|
| 110 | du=f_du_phys(ind) |
---|
| 111 | du(:,ll_begin:ll_end) = 0. |
---|
| 112 | END DO |
---|
| 113 | END SUBROUTINE zero_du_phys |
---|
| 114 | |
---|
| 115 | SUBROUTINE add_du_phys(coef, f_u) |
---|
| 116 | REAL(rstd), INTENT(IN) :: coef ! -1 before physics, +1 after physics |
---|
| 117 | TYPE(t_field),POINTER :: f_u(:) ! velocity field before/after call to physics |
---|
| 118 | REAL(rstd), DIMENSION(:,:), POINTER :: u, du |
---|
| 119 | INTEGER :: ind |
---|
| 120 | DO ind=1,ndomain |
---|
| 121 | IF (.NOT. assigned_domain(ind)) CYCLE |
---|
| 122 | CALL swap_dimensions(ind) |
---|
| 123 | CALL swap_geometry(ind) |
---|
| 124 | du=f_du_phys(ind) |
---|
| 125 | u=f_u(ind) |
---|
| 126 | du(:,ll_begin:ll_end) = du(:,ll_begin:ll_end) + coef*u(:,ll_begin:ll_end) |
---|
| 127 | END DO |
---|
| 128 | END SUBROUTINE add_du_phys |
---|
| 129 | |
---|
[741] | 130 | SUBROUTINE physics(it,f_phis, f_geopot, f_ps, f_theta_rhodz, f_ue, f_wflux, f_q) |
---|
[327] | 131 | USE physics_lmdz_generic_mod, ONLY : physics_lmdz_generic => physics |
---|
[347] | 132 | USE physics_external_mod, ONLY : physics_external => physics |
---|
[213] | 133 | USE physics_dcmip_mod, ONLY : write_physics_dcmip => write_physics |
---|
[381] | 134 | USE physics_dcmip2016_mod, ONLY : write_physics_dcmip2016 => write_physics |
---|
[170] | 135 | USE etat0_heldsz_mod |
---|
[99] | 136 | INTEGER, INTENT(IN) :: it |
---|
[81] | 137 | TYPE(t_field),POINTER :: f_phis(:) |
---|
[741] | 138 | TYPE(t_field),POINTER :: f_geopot(:) |
---|
[81] | 139 | TYPE(t_field),POINTER :: f_ps(:) |
---|
| 140 | TYPE(t_field),POINTER :: f_theta_rhodz(:) |
---|
| 141 | TYPE(t_field),POINTER :: f_ue(:) |
---|
[327] | 142 | TYPE(t_field),POINTER :: f_wflux(:) |
---|
[81] | 143 | TYPE(t_field),POINTER :: f_q(:) |
---|
[196] | 144 | |
---|
[149] | 145 | LOGICAL:: firstcall,lastcall |
---|
[196] | 146 | INTEGER :: ind |
---|
[213] | 147 | TYPE(t_physics_inout) :: args |
---|
[170] | 148 | |
---|
[714] | 149 | IF(MOD(it,itau_physics)==0 .AND. phys_type/=phys_none) THEN |
---|
| 150 | |
---|
| 151 | ! as a result of the the two calls to add_du_phys, |
---|
| 152 | ! du_phys increases by u(after physics) - u (before physics) |
---|
| 153 | CALL add_du_phys(-1., f_ue) |
---|
| 154 | |
---|
[213] | 155 | SELECT CASE(phys_type) |
---|
| 156 | CASE(phys_HS94) |
---|
| 157 | CALL held_suarez(f_ps,f_theta_rhodz,f_ue) |
---|
[327] | 158 | CASE (phys_lmdz_generic) |
---|
| 159 | CALL physics_lmdz_generic(it ,f_phis, f_ps, f_theta_rhodz, f_ue, f_wflux, f_q) |
---|
[347] | 160 | CASE (phys_external) |
---|
| 161 | CALL physics_external(it ,f_phis, f_ps, f_theta_rhodz, f_ue, f_wflux, f_q) |
---|
[213] | 162 | CASE DEFAULT |
---|
[741] | 163 | CALL physics_column(it, f_phis, f_geopot, f_ps, f_theta_rhodz, f_ue, f_q) |
---|
[213] | 164 | END SELECT |
---|
[149] | 165 | |
---|
[213] | 166 | CALL transfert_request(f_theta_rhodz,req_i0) |
---|
| 167 | CALL transfert_request(f_ue,req_e0_vect) |
---|
| 168 | CALL transfert_request(f_q,req_i0) |
---|
[714] | 169 | |
---|
| 170 | CALL add_du_phys(1., f_ue) |
---|
[213] | 171 | END IF |
---|
[149] | 172 | |
---|
[213] | 173 | IF (mod(it,itau_out)==0 ) THEN |
---|
[714] | 174 | CALL write_physics_tendencies |
---|
| 175 | CALL zero_du_phys |
---|
[213] | 176 | SELECT CASE(phys_type) |
---|
| 177 | CASE (phys_DCMIP) |
---|
| 178 | CALL write_physics_dcmip |
---|
[381] | 179 | CASE (phys_DCMIP2016) |
---|
| 180 | CALL write_physics_dcmip2016 |
---|
[213] | 181 | END SELECT |
---|
| 182 | END IF |
---|
| 183 | |
---|
| 184 | END SUBROUTINE physics |
---|
| 185 | |
---|
[714] | 186 | SUBROUTINE write_physics_tendencies |
---|
| 187 | USE observable_mod, ONLY : f_buf_ulon, f_buf_ulat |
---|
| 188 | USE wind_mod |
---|
| 189 | USE output_field_mod |
---|
| 190 | CALL transfert_request(f_du_phys,req_e1_vect) |
---|
| 191 | CALL un2ulonlat(f_du_phys, f_buf_ulon, f_buf_ulat, (1./(dt*itau_out))) |
---|
| 192 | CALL output_field("dulon_phys",f_buf_ulon) |
---|
| 193 | CALL output_field("dulat_phys",f_buf_ulat) |
---|
| 194 | END SUBROUTINE write_physics_tendencies |
---|
| 195 | |
---|
[741] | 196 | SUBROUTINE physics_column(it, f_phis, f_geopot, f_ps, f_theta_rhodz, f_ue, f_q) |
---|
[213] | 197 | USE physics_dcmip_mod, ONLY : full_physics_dcmip => full_physics |
---|
[381] | 198 | USE physics_dcmip2016_mod, ONLY : full_physics_dcmip2016 => full_physics |
---|
[741] | 199 | USE etat0_venus_mod, ONLY : full_physics_venus=>full_physics |
---|
[295] | 200 | USE theta2theta_rhodz_mod |
---|
[281] | 201 | USE mpipara |
---|
[481] | 202 | USE checksum_mod |
---|
[213] | 203 | TYPE(t_field),POINTER :: f_phis(:) |
---|
[741] | 204 | TYPE(t_field),POINTER :: f_geopot(:) |
---|
[213] | 205 | TYPE(t_field),POINTER :: f_ps(:) |
---|
| 206 | TYPE(t_field),POINTER :: f_theta_rhodz(:) |
---|
| 207 | TYPE(t_field),POINTER :: f_ue(:) |
---|
| 208 | TYPE(t_field),POINTER :: f_q(:) |
---|
| 209 | REAL(rstd),POINTER :: phis(:) |
---|
[741] | 210 | REAL(rstd),POINTER :: geopot(:,:) |
---|
[213] | 211 | REAL(rstd),POINTER :: ps(:) |
---|
[295] | 212 | REAL(rstd),POINTER :: temp(:,:) |
---|
[213] | 213 | REAL(rstd),POINTER :: ue(:,:) |
---|
| 214 | REAL(rstd),POINTER :: dulon(:,:) |
---|
| 215 | REAL(rstd),POINTER :: dulat(:,:) |
---|
| 216 | REAL(rstd),POINTER :: q(:,:,:) |
---|
[481] | 217 | REAL(rstd),POINTER :: p(:,:) |
---|
| 218 | REAL(rstd),POINTER :: pk(:,:) |
---|
| 219 | REAL(rstd),POINTER :: ulon(:,:) |
---|
| 220 | REAL(rstd),POINTER :: ulat(:,:) |
---|
[213] | 221 | INTEGER :: it, ind |
---|
| 222 | |
---|
[295] | 223 | CALL theta_rhodz2temperature(f_ps,f_theta_rhodz,f_temp) |
---|
[381] | 224 | |
---|
[213] | 225 | DO ind=1,ndomain |
---|
| 226 | IF (.NOT. assigned_domain(ind)) CYCLE |
---|
| 227 | CALL swap_dimensions(ind) |
---|
| 228 | CALL swap_geometry(ind) |
---|
| 229 | phis=f_phis(ind) |
---|
[741] | 230 | geopot=f_geopot(ind) |
---|
[213] | 231 | ps=f_ps(ind) |
---|
[295] | 232 | temp=f_temp(ind) |
---|
[213] | 233 | ue=f_ue(ind) |
---|
| 234 | q=f_q(ind) |
---|
[481] | 235 | p=f_p(ind) |
---|
| 236 | pk=f_pk(ind) |
---|
| 237 | ulon=f_ulon(ind) |
---|
| 238 | ulat=f_ulat(ind) |
---|
[741] | 239 | CALL pack_physics(pack_info(ind), phis, geopot, ps, temp, ue, q, p, pk, ulon, ulat) |
---|
[213] | 240 | END DO |
---|
| 241 | |
---|
| 242 | SELECT CASE(phys_type) |
---|
| 243 | CASE (phys_DCMIP) |
---|
[481] | 244 | IF (is_omp_level_master) CALL full_physics_dcmip |
---|
[381] | 245 | CASE (phys_DCMIP2016) |
---|
[481] | 246 | IF (is_omp_level_master) CALL full_physics_dcmip2016 |
---|
[741] | 247 | CASE(phys_LB2012) |
---|
| 248 | IF (is_omp_level_master) CALL full_physics_venus |
---|
[281] | 249 | CASE DEFAULT |
---|
[481] | 250 | IF(is_master) PRINT *,'Internal error : illegal value of phys_type', phys_type |
---|
[281] | 251 | STOP |
---|
[196] | 252 | END SELECT |
---|
[170] | 253 | |
---|
[213] | 254 | DO ind=1,ndomain |
---|
| 255 | IF (.NOT. assigned_domain(ind)) CYCLE |
---|
| 256 | CALL swap_dimensions(ind) |
---|
| 257 | CALL swap_geometry(ind) |
---|
| 258 | ps=f_ps(ind) |
---|
[295] | 259 | temp=f_temp(ind) |
---|
[213] | 260 | q=f_q(ind) |
---|
| 261 | dulon=f_dulon(ind) |
---|
| 262 | dulat=f_dulat(ind) |
---|
[295] | 263 | CALL unpack_physics(pack_info(ind), ps, temp, q, dulon, dulat) |
---|
[213] | 264 | END DO |
---|
[481] | 265 | |
---|
[295] | 266 | CALL temperature2theta_rhodz(f_ps,f_temp,f_theta_rhodz) |
---|
[170] | 267 | |
---|
[213] | 268 | ! Transfer dulon, dulat |
---|
| 269 | CALL transfert_request(f_dulon,req_i0) |
---|
| 270 | CALL transfert_request(f_dulat,req_i0) |
---|
| 271 | |
---|
| 272 | DO ind=1,ndomain |
---|
| 273 | IF (.NOT. assigned_domain(ind)) CYCLE |
---|
| 274 | CALL swap_dimensions(ind) |
---|
| 275 | CALL swap_geometry(ind) |
---|
| 276 | ue=f_ue(ind) |
---|
| 277 | dulon=f_dulon(ind) |
---|
| 278 | dulat=f_dulat(ind) |
---|
| 279 | CALL compute_update_velocity(dulon, dulat, ue) |
---|
| 280 | END DO |
---|
| 281 | |
---|
[214] | 282 | END SUBROUTINE physics_column |
---|
[213] | 283 | |
---|
[741] | 284 | SUBROUTINE pack_physics(info, phis, geopot, ps, temp, ue, q, p, pk, ulon, ulat ) |
---|
[213] | 285 | USE wind_mod |
---|
| 286 | USE pression_mod |
---|
| 287 | USE theta2theta_rhodz_mod |
---|
[381] | 288 | USE exner_mod |
---|
[213] | 289 | TYPE(t_pack_info) :: info |
---|
| 290 | REAL(rstd) :: phis(iim*jjm) |
---|
[741] | 291 | REAL(rstd) :: geopot(iim*jjm,llm+1) |
---|
[213] | 292 | REAL(rstd) :: ps(iim*jjm) |
---|
[295] | 293 | REAL(rstd) :: temp(iim*jjm,llm) |
---|
[381] | 294 | REAL(rstd) :: pks(iim*jjm) |
---|
| 295 | REAL(rstd) :: pk(iim*jjm,llm) |
---|
[213] | 296 | REAL(rstd) :: ue(3*iim*jjm,llm) |
---|
| 297 | REAL(rstd) :: q(iim*jjm,llm,nqtot) |
---|
| 298 | |
---|
| 299 | REAL(rstd) :: p(iim*jjm,llm+1) |
---|
[584] | 300 | REAL(rstd) :: uc(iim*jjm,llm,3) |
---|
[213] | 301 | REAL(rstd) :: ulon(iim*jjm,llm) |
---|
| 302 | REAL(rstd) :: ulat(iim*jjm,llm) |
---|
| 303 | |
---|
[295] | 304 | !$OMP BARRIER |
---|
[213] | 305 | CALL compute_pression(ps,p,0) |
---|
[295] | 306 | !$OMP BARRIER |
---|
[381] | 307 | CALL compute_exner(ps,p,pks,pk,0) |
---|
| 308 | !$OMP BARRIER |
---|
[213] | 309 | CALL compute_wind_centered(ue,uc) |
---|
| 310 | CALL compute_wind_centered_lonlat_compound(uc, ulon, ulat) |
---|
[481] | 311 | !$OMP BARRIER |
---|
| 312 | IF (is_omp_level_master) THEN |
---|
| 313 | CALL pack_domain(info, phis, physics_inout%phis) |
---|
[741] | 314 | CALL pack_domain(info, geopot, physics_inout%geopot) |
---|
[481] | 315 | CALL pack_domain(info, p, physics_inout%p) |
---|
| 316 | CALL pack_domain(info, pk, physics_inout%pk) |
---|
| 317 | CALL pack_domain(info, Temp, physics_inout%Temp) |
---|
| 318 | CALL pack_domain(info, ulon, physics_inout%ulon) |
---|
| 319 | CALL pack_domain(info, ulat, physics_inout%ulat) |
---|
| 320 | CALL pack_domain(info, q, physics_inout%q) |
---|
| 321 | ENDIF |
---|
| 322 | !$OMP BARRIER |
---|
[213] | 323 | END SUBROUTINE pack_physics |
---|
| 324 | |
---|
[295] | 325 | SUBROUTINE unpack_physics(info, ps,temp, q, dulon, dulat) |
---|
[213] | 326 | USE theta2theta_rhodz_mod |
---|
| 327 | TYPE(t_pack_info) :: info |
---|
| 328 | REAL(rstd) :: ps(iim*jjm) |
---|
[295] | 329 | REAL(rstd) :: temp(iim*jjm,llm) |
---|
[213] | 330 | REAL(rstd) :: q(iim*jjm,llm,nqtot) |
---|
| 331 | REAL(rstd) :: dulon(iim*jjm,llm) |
---|
| 332 | REAL(rstd) :: dulat(iim*jjm,llm) |
---|
| 333 | |
---|
| 334 | REAL(rstd) :: dq(iim*jjm,llm,nqtot) |
---|
| 335 | REAL(rstd) :: dTemp(iim*jjm,llm) |
---|
[481] | 336 | |
---|
| 337 | !$OMP BARRIER |
---|
| 338 | IF (is_omp_level_master) THEN |
---|
| 339 | CALL unpack_domain(info, dulon, physics_inout%dulon) |
---|
| 340 | CALL unpack_domain(info, dulat, physics_inout%dulat) |
---|
| 341 | CALL unpack_domain(info, dq, physics_inout%dq) |
---|
| 342 | CALL unpack_domain(info, Temp, physics_inout%Temp) |
---|
| 343 | CALL unpack_domain(info, dTemp, physics_inout%dTemp) |
---|
| 344 | q = q + physics_inout%dt_phys * dq |
---|
| 345 | Temp = Temp + physics_inout%dt_phys * dTemp |
---|
| 346 | ENDIF |
---|
| 347 | !$OMP BARRIER |
---|
| 348 | |
---|
[295] | 349 | ! CALL compute_temperature2theta_rhodz(ps,Temp,theta_rhodz,0) |
---|
[213] | 350 | END SUBROUTINE unpack_physics |
---|
| 351 | |
---|
| 352 | SUBROUTINE compute_update_velocity(dulon, dulat, ue) |
---|
| 353 | USE wind_mod |
---|
| 354 | REAL(rstd) :: dulon(iim*jjm,llm) |
---|
| 355 | REAL(rstd) :: dulat(iim*jjm,llm) |
---|
| 356 | REAL(rstd) :: ue(3*iim*jjm,llm) |
---|
[584] | 357 | REAL(rstd) :: duc(iim*jjm,llm,3) |
---|
[213] | 358 | REAL(rstd) :: dt2, due |
---|
| 359 | INTEGER :: i,j,ij,l |
---|
| 360 | ! Reconstruct wind tendencies at edges and add to normal wind |
---|
| 361 | CALL compute_wind_centered_from_lonlat_compound(dulon,dulat,duc) |
---|
| 362 | dt2=.5*physics_inout%dt_phys |
---|
[481] | 363 | DO l=ll_begin,ll_end |
---|
[213] | 364 | DO j=jj_begin,jj_end |
---|
| 365 | DO i=ii_begin,ii_end |
---|
| 366 | ij=(j-1)*iim+i |
---|
[584] | 367 | due = sum( (duc(ij,l,:) + duc(ij+t_right,l,:))*ep_e(ij+u_right,:) ) |
---|
[213] | 368 | ue(ij+u_right,l) = ue(ij+u_right,l) + dt2*due |
---|
| 369 | |
---|
[584] | 370 | due = sum( (duc(ij,l,:) + duc(ij+t_lup,l,:))*ep_e(ij+u_lup,:) ) |
---|
[213] | 371 | ue(ij+u_lup,l)=ue(ij+u_lup,l) + dt2*due |
---|
| 372 | |
---|
[584] | 373 | due = sum( (duc(ij,l,:) + duc(ij+t_ldown,l,:))*ep_e(ij+u_ldown,:) ) |
---|
[213] | 374 | ue(ij+u_ldown,l)=ue(ij+u_ldown,l) + dt2*due |
---|
| 375 | ENDDO |
---|
| 376 | ENDDO |
---|
| 377 | ENDDO |
---|
| 378 | END SUBROUTINE compute_update_velocity |
---|
| 379 | |
---|
[81] | 380 | END MODULE physics_mod |
---|