SCALE-RM
Functions/Subroutines | Variables
scale_interp_vert Module Reference

module INTERPOLATION vertical More...

Functions/Subroutines

subroutine, public interp_vert_setcoef (KA, KS, KE, IA, IS, IE, JA, JS, JE, TOPO_exist, Xi, Xih, Z, Zh)
 Setup. More...
 
subroutine, public interp_vert_xi2z (KA, KS, KE, IA, IS, IE, JA, JS, JE, Xi, Z, var, var_Z)
 
subroutine, public interp_vert_z2xi (KA, KS, KE, IA, IS, IE, JA, JS, JE, Z, Xi, var, var_Xi)
 
subroutine, public interp_vert_xih2zh (KA, KS, KE, IA, IS, IE, JA, JS, JE, Xih, Zh, var, var_Z)
 
subroutine, public interp_vert_zh2xih (KA, KS, KE, IA, IS, IE, JA, JS, JE, Zh, Xih, var, var_Xi)
 
subroutine, public interp_vert_alloc_pres (Kpres, KA, IA, JA)
 Setup for pressure coordinate. More...
 
subroutine, public interp_vert_dealloc_pres
 Finalize for pressure coordinate. More...
 
subroutine, public interp_vert_setcoef_pres (Kpres, KA, KS, KE, IA, IS, IE, JA, JS, JE, PRES, PRESh, SFC_PRES, Paxis)
 
subroutine, public interp_vert_xi2p (Kpres, KA, KS, KE, IA, IS, IE, JA, JS, JE, var, var_P)
 
subroutine, public interp_vert_xih2p (Kpres, KA, KS, KE, IA, IS, IE, JA, JS, JE, var, var_P)
 
subroutine, public interp_vert_finalize
 Finalize. More...
 

Variables

logical, public interp_available = .false.
 topography exists & vertical interpolation has meaning? More...
 

Detailed Description

module INTERPOLATION vertical

Description
spacial interpolation module, vertical only (xi<->z,xi->pres)
Author
Team SCALE

Function/Subroutine Documentation

◆ interp_vert_setcoef()

subroutine, public scale_interp_vert::interp_vert_setcoef ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
logical, intent(in)  TOPO_exist,
real(rp), dimension ( ka), intent(in)  Xi,
real(rp), dimension(0:ka), intent(in)  Xih,
real(rp), dimension ( ka,ia,ja), intent(in)  Z,
real(rp), dimension (0:ka,ia,ja), intent(in)  Zh 
)

Setup.

Definition at line 88 of file scale_interp_vert.F90.

88  use scale_interp, only: &
90  implicit none
91  integer, intent(in) :: KA, KS, KE
92  integer, intent(in) :: IA, IS, IE
93  integer, intent(in) :: JA, JS, JE
94  logical, intent(in) :: TOPO_exist
95  real(RP), intent(in) :: Xi ( KA)
96  real(RP), intent(in) :: Xih(0:KA)
97  real(RP), intent(in) :: Z ( KA,IA,JA)
98  real(RP), intent(in) :: Zh (0:KA,IA,JA)
99 
100  integer :: i, j
101  !---------------------------------------------------------------------------
102 
103  log_newline
104  log_info("INTERP_VERT_setcoef",*) 'Setup'
105  log_info("INTERP_VERT_setcoef",*) 'No namelists.'
106 
107  interp_available = topo_exist
108 
109  log_newline
110  log_info("INTERP_VERT_setcoef",*) 'Topography exists & interpolation has meaning? : ', interp_available
111 
112  ! full level
113 
114  allocate( interp_xi2z_idx(ka,2,ia,ja) )
115  allocate( interp_xi2z_coef(ka, ia,ja) )
116  allocate( interp_z2xi_idx(ka,2,ia,ja) )
117  allocate( interp_z2xi_coef(ka, ia,ja) )
118  !$acc enter data create(INTERP_xi2z_idx, INTERP_xi2z_coef, INTERP_z2xi_idx, INTERP_z2xi_coef)
119 
120  !$acc data copyin(Z, Xi)
121 
122  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
123  !$omp shared(JA,IA,KA,KS,KE,Xi,Z,INTERP_xi2z_idx,INTERP_xi2z_coef)
124  !$acc kernels
125  !$acc loop independent
126  do j = 1, ja
127  !$acc loop independent
128  do i = 1, ia
129  call interp_factor1d( ka, ks, ke, ka, ks, ke, &
130  z(:,i,j), xi(:), & ! (in)
131  interp_xi2z_idx(:,:,i,j), & ! (out)
132  interp_xi2z_coef(:, i,j), & ! (out)
133  flag_extrap = .true. ) ! (in)
134  enddo
135  enddo
136  !$acc end kernels
137 
138  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
139  !$omp shared(JA,IA,KA,KS,KE,Z,Xi,INTERP_z2xi_idx,INTERP_z2xi_coef)
140  !$acc kernels
141  !$acc loop independent
142  do j = 1, ja
143  !$acc loop independent
144  do i = 1, ia
145  call interp_factor1d( ka, ks, ke, ka, ks, ke, &
146  xi(:), z(:,i,j), & ! (in)
147  interp_z2xi_idx(:,:,i,j), & ! (out)
148  interp_z2xi_coef(:, i,j), & ! (out)
149  flag_extrap = .true. ) ! (in)
150  enddo
151  enddo
152  !$acc end kernels
153 
154  !$acc end data
155 
156  ! half level
157 
158  allocate( interp_xih2zh_idx(ka,2,ia,ja) )
159  allocate( interp_xih2zh_coef(ka, ia,ja) )
160  allocate( interp_zh2xih_idx(ka,2,ia,ja) )
161  allocate( interp_zh2xih_coef(ka, ia,ja) )
162  !$acc enter data create(INTERP_xih2zh_idx, INTERP_xih2zh_coef, INTERP_zh2xih_idx, INTERP_zh2xih_coef)
163 
164  !$acc data copyin(Zh, Xih)
165 
166  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
167  !$omp shared(JA,IA,KA,KS,KE,Xih,Zh,INTERP_xih2zh_idx,INTERP_xih2zh_coef)
168  !$acc kernels
169  !$acc loop independent
170  do j = 1, ja
171  !$acc loop independent
172  do i = 1, ia
173  call interp_factor1d( ka, ks-1, ke, ka, ks-1, ke, &
174  zh(1:,i,j), xih(1:), & ! (in)
175  interp_xih2zh_idx(:,:,i,j), & ! (out)
176  interp_xih2zh_coef(:, i,j), & ! (out)
177  flag_extrap = .false. ) ! (in)
178  enddo
179  enddo
180  !$acc end kernels
181 
182  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
183  !$omp shared(JA,IA,KA,KS,KE,Xih,Zh,INTERP_zh2xih_idx,INTERP_zh2xih_coef)
184  !$acc kernels
185  !$acc loop independent
186  do j = 1, ja
187  !$acc loop independent
188  do i = 1, ia
189  call interp_factor1d( ka, ks-1, ke, ka, ks-1, ke, &
190  xih(1:), zh(1:,i,j), & ! (in)
191  interp_zh2xih_idx(:,:,i,j), & ! (out)
192  interp_zh2xih_coef(:, i,j), & ! (out)
193  flag_extrap = .true. ) ! (in)
194  enddo
195  enddo
196  !$acc end kernels
197 
198  !$acc end data
199 
200  return

References interp_available, and scale_interp::interp_factor1d().

Referenced by scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interp_vert_xi2z()

subroutine, public scale_interp_vert::interp_vert_xi2z ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (ka), intent(in)  Xi,
real(rp), dimension (ka,ia,ja), intent(in)  Z,
real(rp), dimension (ka,ia,ja), intent(in)  var,
real(rp), dimension(ka,ia,ja), intent(out)  var_Z 
)

Definition at line 212 of file scale_interp_vert.F90.

212  use scale_interp, only: &
214  implicit none
215  integer, intent(in) :: KA, KS, KE
216  integer, intent(in) :: IA, IS, IE
217  integer, intent(in) :: JA, JS, JE
218  real(RP), intent(in) :: Xi (KA)
219  real(RP), intent(in) :: Z (KA,IA,JA)
220  real(RP), intent(in) :: var (KA,IA,JA)
221  real(RP), intent(out) :: var_Z(KA,IA,JA)
222 
223 #ifdef _OPENACC
224  real(RP) :: workr(KA,7)
225  integer :: worki(KA,2)
226 #endif
227 
228  integer :: i, j
229  !---------------------------------------------------------------------------
230 
231  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
232  !$omp shared(KA,KS,KE,IS,IE,JS,JE) &
233  !$omp shared(Xi,Z,var,var_Z) &
234  !$omp shared(INTERP_xi2z_idx,INTERP_xi2z_coef)
235  !$acc kernels copyin(Xi, Z, var) copyout(var_Z)
236  !$acc loop independent
237  do j = js, je
238  !$acc loop independent private(workr,worki)
239  do i = is, ie
240  call interp_interp1d( ka, ks, ke, ka, ks, ke, &
241 #ifdef _OPENACC
242  workr(:,:), worki(:,:), &
243 #endif
244  interp_xi2z_idx(:,:,i,j), & ! (in)
245  interp_xi2z_coef(:, i,j), & ! (in)
246  z(:,i,j), xi(:), & ! (in)
247  var(:,i,j), & ! (in)
248  var_z(:,i,j) ) ! (out)
249  end do
250  end do
251  !$acc end kernels
252 
253  return

References scale_interp::interp_interp1d().

Referenced by scale_atmos_refstate::atmos_refstate_update(), and scale_file_history_cartesc::file_history_cartesc_truncate_3d().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interp_vert_z2xi()

subroutine, public scale_interp_vert::interp_vert_z2xi ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (ka,ia,ja), intent(in)  Z,
real(rp), dimension (ka), intent(in)  Xi,
real(rp), dimension (ka,ia,ja), intent(in)  var,
real(rp), dimension(ka,ia,ja), intent(out)  var_Xi 
)

Definition at line 265 of file scale_interp_vert.F90.

265  use scale_interp, only: &
267  implicit none
268  integer, intent(in) :: KA, KS, KE
269  integer, intent(in) :: IA, IS, IE
270  integer, intent(in) :: JA, JS, JE
271  real(RP), intent(in) :: Z (KA,IA,JA)
272  real(RP), intent(in) :: Xi (KA)
273  real(RP), intent(in) :: var (KA,IA,JA)
274  real(RP), intent(out) :: var_Xi(KA,IA,JA)
275 
276 #ifdef _OPENACC
277  real(RP) :: workr(KA,7)
278  integer :: worki(KA,2)
279 #endif
280 
281  integer :: i, j
282  !---------------------------------------------------------------------------
283 
284  call prof_rapstart('INTERP_interp',3)
285 
286  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
287  !$omp shared(KA,KS,KE,IS,IE,JS,JE) &
288  !$omp shared(Z,Xi,var,var_Xi) &
289  !$omp shared(INTERP_z2xi_idx,INTERP_z2xi_coef)
290  !$acc kernels copyin(Z, Xi, var) copyout(var_Xi)
291  !$acc loop independent
292  do j = js, je
293  !$acc loop independent private(workr,worki)
294  do i = is, ie
295  call interp_interp1d( ka, ks, ke, ka, ks, ke, &
296 #ifdef _OPENACC
297  workr(:,:), worki(:,:), &
298 #endif
299  interp_z2xi_idx(:,:,i,j), & ! (in)
300  interp_z2xi_coef(:, i,j), & ! (in)
301  xi(:), z(:,i,j), & ! (in)
302  var(:,i,j), & ! (in)
303  var_xi(:,i,j) ) ! (out)
304  end do
305  end do
306  !$acc end kernels
307 
308  call prof_rapend ('INTERP_interp',3)
309 
310  return

References scale_interp::interp_interp1d(), scale_prof::prof_rapend(), and scale_prof::prof_rapstart().

Referenced by scale_atmos_refstate::atmos_refstate_calc3d().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interp_vert_xih2zh()

subroutine, public scale_interp_vert::interp_vert_xih2zh ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (0:ka), intent(in)  Xih,
real(rp), dimension (0:ka,ia,ja), intent(in)  Zh,
real(rp), dimension (ka,ia,ja), intent(in)  var,
real(rp), dimension(ka,ia,ja), intent(out)  var_Z 
)

Definition at line 322 of file scale_interp_vert.F90.

322  use scale_interp, only: &
324  implicit none
325  integer, intent(in) :: KA, KS, KE
326  integer, intent(in) :: IA, IS, IE
327  integer, intent(in) :: JA, JS, JE
328  real(RP), intent(in) :: Xih (0:KA)
329  real(RP), intent(in) :: Zh (0:KA,IA,JA)
330  real(RP), intent(in) :: var (KA,IA,JA)
331  real(RP), intent(out) :: var_Z(KA,IA,JA)
332 
333  real(RP) :: Zht(KA)
334  real(RP) :: Xiht(KA)
335 #ifdef _OPENACC
336  real(RP) :: workr(KA,7)
337  integer :: worki(KA,2)
338 #endif
339 
340  integer :: i, j, k
341  !---------------------------------------------------------------------------
342 
343  !$acc data copyin(Zh, var) copyout(var_Z) create(Xiht)
344 
345  !$kernels
346  do k = ks-1, ke
347  xiht(k) = xih(k)
348  end do
349  !$end kernels
350 
351  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
352  !$omp shared(KA,KS,KE,IS,IE,JS,JE) &
353  !$omp shared(Xih,Xiht,Zh,var,var_Z) &
354  !$omp shared(INTERP_xih2zh_idx,INTERP_xih2zh_coef) &
355  !$omp private(Zht)
356  !$acc kernels
357  !$acc loop independent
358  do j = js, je
359  !$acc loop independent private(workr,worki,Zht)
360  do i = is, ie
361  do k = ks-1, ke
362  zht(k) = zh(k,i,j)
363  end do
364  call interp_interp1d( ka, ks-1, ke, ka, ks-1, ke, &
365 #ifdef _OPENACC
366  workr(:,:), worki(:,:), &
367 #endif
368  interp_xih2zh_idx(:,:,i,j), & ! (in)
369  interp_xih2zh_coef(:, i,j), & ! (in)
370  zht(:), xiht(:), & ! (in)
371  var(:,i,j), & ! (in)
372  var_z(:,i,j) ) ! (out)
373  enddo
374  enddo
375  !$acc end kernels
376 
377  !$acc end data
378 
379  return

References scale_interp::interp_interp1d().

Referenced by scale_file_history_cartesc::file_history_cartesc_truncate_3d().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interp_vert_zh2xih()

subroutine, public scale_interp_vert::interp_vert_zh2xih ( integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (0:ka,ia,ja), intent(in)  Zh,
real(rp), dimension (0:ka), intent(in)  Xih,
real(rp), dimension (ka,ia,ja), intent(in)  var,
real(rp), dimension(ka,ia,ja), intent(out)  var_Xi 
)

Definition at line 391 of file scale_interp_vert.F90.

391  use scale_interp, only: &
393  implicit none
394  integer, intent(in) :: KA, KS, KE
395  integer, intent(in) :: IA, IS, IE
396  integer, intent(in) :: JA, JS, JE
397  real(RP), intent(in) :: Zh (0:KA,IA,JA)
398  real(RP), intent(in) :: Xih (0:KA)
399  real(RP), intent(in) :: var (KA,IA,JA)
400  real(RP), intent(out) :: var_Xi(KA,IA,JA)
401 
402  real(RP) :: Zht(KA)
403  real(RP) :: Xiht(KA)
404 #ifdef _OPENACC
405  real(RP) :: workr(KA,7)
406  integer :: worki(KA,2)
407 #endif
408 
409  integer :: k, i, j
410  !---------------------------------------------------------------------------
411 
412  !$acc data copyin(Zh, Xih, var) copyout(var_Xi) create(Xih)
413 
414  !$kernels
415  do k = ks-1, ke
416  xiht(k) = xih(k)
417  end do
418  !$end kernels
419 
420  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
421  !$omp shared(KA,KS,KE,IS,IE,JS,JE) &
422  !$omp shared(Zh,Xih,Xiht,var,var_Xi) &
423  !$omp shared(INTERP_zh2xih_idx,INTERP_zh2xih_coef) &
424  !$omp private(Zht)
425  !$acc kernels
426  !$acc loop independent
427  do j = js, je
428  !$acc loop independent private(workr,worki,Zht)
429  do i = is, ie
430  do k = ks-1, ke
431  zht(k) = zh(k,i,j)
432  end do
433  call interp_interp1d( ka, ks-1, ke, ka, ks-1, ke, &
434 #ifdef _OPENACC
435  workr(:,:), worki(:,:), &
436 #endif
437  interp_zh2xih_idx(:,:,i,j), & ! (in)
438  interp_zh2xih_coef(:, i,j), & ! (in)
439  xiht(:), zht(:), & ! (in)
440  var(:,i,j), & ! (in)
441  var_xi(:,i,j) ) ! (out)
442  enddo
443  enddo
444  !$acc end kernels
445 
446  !$acc end data
447 
448  return

References scale_interp::interp_interp1d().

Here is the call graph for this function:

◆ interp_vert_alloc_pres()

subroutine, public scale_interp_vert::interp_vert_alloc_pres ( integer, intent(in)  Kpres,
integer, intent(in)  KA,
integer, intent(in)  IA,
integer, intent(in)  JA 
)

Setup for pressure coordinate.

Definition at line 455 of file scale_interp_vert.F90.

455  implicit none
456  integer, intent(in) :: Kpres
457  integer, intent(in) :: KA
458  integer, intent(in) :: IA
459  integer, intent(in) :: JA
460  !---------------------------------------------------------------------------
461 
462  allocate( interp_xi2p_idx(kpres,2,ia,ja) )
463  allocate( interp_xi2p_coef(kpres, ia,ja) )
464  allocate( interp_xih2p_idx(kpres,2,ia,ja) )
465  allocate( interp_xih2p_coef(kpres, ia,ja) )
466  !$acc enter data create(INTERP_xi2p_idx, INTERP_xi2p_coef, INTERP_xih2p_idx, INTERP_xih2p_coef)
467 
468  allocate( lnpres(ka,ia,ja) )
469  allocate( lnpresh(ka,ia,ja) )
470  allocate( lnpaxis(kpres) )
471  !$acc enter data create(LnPRES, LnPRESh, LnPaxis)
472 
473  return

Referenced by scale_file_history_cartesc::file_history_cartesc_setup().

Here is the caller graph for this function:

◆ interp_vert_dealloc_pres()

subroutine, public scale_interp_vert::interp_vert_dealloc_pres

Finalize for pressure coordinate.

Definition at line 479 of file scale_interp_vert.F90.

479  implicit none
480  !---------------------------------------------------------------------------
481 
482  !$acc exit data delete(INTERP_xi2p_idx, INTERP_xi2p_coef, INTERP_xih2p_idx, INTERP_xih2p_coef)
483  deallocate( interp_xi2p_idx )
484  deallocate( interp_xi2p_coef )
485  deallocate( interp_xih2p_idx )
486  deallocate( interp_xih2p_coef )
487 
488  !$acc exit data delete(LnPRES, LnPRESh, LnPaxis)
489  deallocate( lnpres )
490  deallocate( lnpresh )
491  deallocate( lnpaxis )
492 
493  return

Referenced by scale_file_history_cartesc::file_history_cartesc_finalize().

Here is the caller graph for this function:

◆ interp_vert_setcoef_pres()

subroutine, public scale_interp_vert::interp_vert_setcoef_pres ( integer, intent(in)  Kpres,
integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension ( ka,ia,ja), intent(in)  PRES,
real(rp), dimension (0:ka,ia,ja), intent(in)  PRESh,
real(rp), dimension( ia,ja), intent(in)  SFC_PRES,
real(rp), dimension (kpres), intent(in)  Paxis 
)

Definition at line 506 of file scale_interp_vert.F90.

506  use scale_interp, only: &
508  implicit none
509 
510  integer, intent(in) :: Kpres
511  integer, intent(in) :: KA, KS, KE
512  integer, intent(in) :: IA, IS, IE
513  integer, intent(in) :: JA, JS, JE
514  real(RP), intent(in) :: PRES ( KA,IA,JA) ! pressure in Xi coordinate [Pa]
515  real(RP), intent(in) :: PRESh (0:KA,IA,JA) ! pressure in Xi coordinate [Pa], layer interface
516  real(RP), intent(in) :: SFC_PRES( IA,JA) ! surface pressure [Pa]
517  real(RP), intent(in) :: Paxis (Kpres) ! pressure level to output [Pa]
518 
519  integer :: k, i, j
520  !---------------------------------------------------------------------------
521 
522  !$acc data copyin(PRES, PRESh, SFC_PRES, Paxis)
523 
524  ! full level
525 
526 !OCL SERIAL
527  !$acc kernels
528  do k = 1, kpres
529  lnpaxis(k) = - log( paxis(k) )
530  end do
531  !$acc end kernels
532 
533  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
534  !$omp shared(KA,KS,KE,Kpres,IS,IE,JS,JE) &
535  !$omp shared(PRES,LnPRES,LnPaxis) &
536  !$omp shared(INTERP_xi2p_idx,INTERP_xi2p_coef)
537  !$acc kernels
538  !$acc loop independent
539  do j = js, je
540  !$acc loop independent
541  do i = is, ie
542  do k = ks, ke
543  lnpres(k,i,j) = - log( pres(k,i,j) )
544  end do
545  call interp_factor1d( ka, ks, ke, kpres, 1, kpres, &
546  lnpres(:,i,j), lnpaxis(:), & ! (in)
547  interp_xi2p_idx(:,:,i,j), & ! (out)
548  interp_xi2p_coef(:, i,j), & ! (out)
549  flag_extrap = .false. ) ! (in)
550  enddo
551  enddo
552  !$acc end kernels
553 
554  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
555  !$omp shared(KA,KS,KE,Kpres,IS,IE,JS,JE) &
556  !$omp shared(PRESh,LnPRESh,LnPaxis) &
557  !$omp shared(INTERP_xih2p_idx,INTERP_xih2p_coef)
558  !$acc kernels
559  !$acc loop independent
560  do j = js, je
561  !$acc loop independent
562  do i = is, ie
563  do k = ks-1, ke
564  lnpresh(k,i,j) = - log( presh(k,i,j) )
565  end do
566  call interp_factor1d( ka, ks-1, ke, kpres, 1, kpres, &
567  lnpresh(:,i,j), lnpaxis(:), & ! (in)
568  interp_xih2p_idx(:,:,i,j), & ! (out)
569  interp_xih2p_coef(:, i,j), & ! (out)
570  flag_extrap = .false. ) ! (in)
571  enddo
572  enddo
573  !$acc end kernels
574 
575  !$acc end data
576 
577  return

References scale_interp::interp_factor1d().

Referenced by scale_file_history_cartesc::file_history_cartesc_set_pres().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interp_vert_xi2p()

subroutine, public scale_interp_vert::interp_vert_xi2p ( integer, intent(in)  Kpres,
integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (ka ,ia,ja), intent(in)  var,
real(rp), dimension(kpres,ia,ja), intent(out)  var_P 
)

Definition at line 588 of file scale_interp_vert.F90.

588  use scale_interp, only: &
590  implicit none
591  integer, intent(in) :: Kpres
592  integer, intent(in) :: KA, KS, KE
593  integer, intent(in) :: IA, IS, IE
594  integer, intent(in) :: JA, JS, JE
595  real(RP), intent(in) :: var (KA ,IA,JA)
596  real(RP), intent(out) :: var_P(Kpres,IA,JA)
597 
598 #ifdef _OPENACC
599  real(RP) :: workr(KA,7)
600  integer :: worki(KA,2)
601 #endif
602 
603  integer :: i, j
604  !---------------------------------------------------------------------------
605 
606  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
607  !$omp shared(KA,KS,KE,Kpres,IS,IE,JS,JE) &
608  !$omp shared(LnPRES,LnPaxis,var,var_P) &
609  !$omp shared(INTERP_xi2p_idx,INTERP_xi2p_coef)
610  !$acc kernels copyin(var) copyout(var_P)
611  !$acc loop independent
612  do j = js, je
613  !$acc loop independent private(workr,worki)
614  do i = is, ie
615  call interp_interp1d( ka, ks, ke, kpres, 1, kpres, &
616 #ifdef _OPENACC
617  workr(:,:), worki(:,:), &
618 #endif
619  interp_xi2p_idx(:,:,i,j), & ! (in)
620  interp_xi2p_coef(:, i,j), & ! (in)
621  lnpres(:,i,j), lnpaxis(:), & ! (in)
622  var(:,i,j), & ! (in)
623  var_p(:,i,j) ) ! (out)
624  enddo
625  enddo
626  !$acc end kernels
627 
628  return

References scale_interp::interp_interp1d().

Referenced by scale_file_history_cartesc::file_history_cartesc_truncate_3d().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interp_vert_xih2p()

subroutine, public scale_interp_vert::interp_vert_xih2p ( integer, intent(in)  Kpres,
integer, intent(in)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
real(rp), dimension (ka ,ia,ja), intent(in)  var,
real(rp), dimension(kpres,ia,ja), intent(out)  var_P 
)

Definition at line 639 of file scale_interp_vert.F90.

639  use scale_interp, only: &
641  implicit none
642 
643  integer, intent(in) :: Kpres
644  integer, intent(in) :: KA, KS, KE
645  integer, intent(in) :: IA, IS, IE
646  integer, intent(in) :: JA, JS, JE
647  real(RP), intent(in) :: var (KA ,IA,JA)
648  real(RP), intent(out) :: var_P(Kpres,IA,JA)
649 
650 #ifdef _OPENACC
651  real(RP) :: workr(KA,7)
652  integer :: worki(KA,2)
653 #endif
654 
655  integer :: k, i, j
656  !---------------------------------------------------------------------------
657 
658  !$omp parallel do default(none) OMP_SCHEDULE_ collapse(2) &
659  !$omp shared(KA,KS,KE,Kpres,IS,IE,JS,JE) &
660  !$omp shared(LnPRESh,LnPaxis,var,var_P) &
661  !$omp shared(INTERP_xih2p_idx,INTERP_xih2p_coef)
662  !$acc kernels copyin(var) copyout(var_P)
663  !$acc loop independent
664  do j = js, je
665  !$acc loop independent private(workr,worki)
666  do i = is, ie
667  call interp_interp1d( ka, ks-1, ke, kpres, 1, kpres, &
668 #ifdef _OPENACC
669  workr(:,:), worki(:,:), &
670 #endif
671  interp_xih2p_idx(:,:,i,j), & ! (in)
672  interp_xih2p_coef(:, i,j), & ! (in)
673  lnpresh(:,i,j), lnpaxis(:), & ! (in)
674  var(:,i,j), & ! (in)
675  var_p(:,i,j) ) ! (out)
676  enddo
677  enddo
678  !$acc end kernels
679 
680  return

References scale_interp::interp_interp1d().

Referenced by scale_file_history_cartesc::file_history_cartesc_truncate_3d().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interp_vert_finalize()

subroutine, public scale_interp_vert::interp_vert_finalize

Finalize.

Definition at line 686 of file scale_interp_vert.F90.

686  implicit none
687  !---------------------------------------------------------------------------
688 
689  !$acc exit data delete(INTERP_xi2z_idx, INTERP_xi2z_coef, INTERP_z2xi_idx, INTERP_z2xi_coef)
690  deallocate( interp_xi2z_idx )
691  deallocate( interp_xi2z_coef )
692  deallocate( interp_z2xi_idx )
693  deallocate( interp_z2xi_coef )
694 
695  !$acc exit data delete(INTERP_xih2zh_idx, INTERP_xih2zh_coef, INTERP_zh2xih_idx, INTERP_zh2xih_coef)
696  deallocate( interp_xih2zh_idx )
697  deallocate( interp_xih2zh_coef )
698  deallocate( interp_zh2xih_idx )
699  deallocate( interp_zh2xih_coef )
700 
701  return

Referenced by scale_atmos_grid_cartesc_real::atmos_grid_cartesc_real_finalize().

Here is the caller graph for this function:

Variable Documentation

◆ interp_available

logical, public scale_interp_vert::interp_available = .false.

topography exists & vertical interpolation has meaning?

Definition at line 43 of file scale_interp_vert.F90.

43  logical, public :: INTERP_available = .false.

Referenced by scale_file_history_cartesc::file_history_cartesc_truncate_3d(), and interp_vert_setcoef().

scale_atmos_grid_cartesc_index::ke
integer, public ke
end point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:52
scale_atmos_grid_cartesc_index::ka
integer, public ka
Definition: scale_atmos_grid_cartesC_index.F90:47
scale_interp
module INTERPOLATION
Definition: scale_interp.F90:12
scale_interp::interp_factor1d
subroutine, public interp_factor1d(KA_ref, KS_ref, KE_ref, KA, KS, KE, hgt_ref, hgt, idx_k, vfact, flag_extrap)
Definition: scale_interp.F90:256
scale_atmos_grid_cartesc_index::ie
integer, public ie
end point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:54
scale_atmos_grid_cartesc_index::ia
integer, public ia
Definition: scale_atmos_grid_cartesC_index.F90:48
scale_interp_vert::interp_available
logical, public interp_available
topography exists & vertical interpolation has meaning?
Definition: scale_interp_vert.F90:43
scale_interp::interp_interp1d
subroutine, public interp_interp1d(KA_ref, KS_ref, KE_ref, KA, KS, KE, idx_k, vfact, hgt_ref, hgt, val_ref, val, spline, logwgt)
Definition: scale_interp.F90:1263
scale_atmos_grid_cartesc_index::is
integer, public is
start point of inner domain: x, local
Definition: scale_atmos_grid_cartesC_index.F90:53
scale_atmos_grid_cartesc_index::ja
integer, public ja
Definition: scale_atmos_grid_cartesC_index.F90:49
scale_atmos_grid_cartesc_index::ks
integer, public ks
start point of inner domain: z, local
Definition: scale_atmos_grid_cartesC_index.F90:51
scale_atmos_grid_cartesc_index::js
integer, public js
start point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:55
scale_atmos_grid_cartesc_index::je
integer, public je
end point of inner domain: y, local
Definition: scale_atmos_grid_cartesC_index.F90:56