54 integer,
private,
allocatable :: interp_xi2z_idx (:,:,:,:)
55 real(
rp),
private,
allocatable :: interp_xi2z_coef (:, :,:)
56 integer,
private,
allocatable :: interp_z2xi_idx (:,:,:,:)
57 real(
rp),
private,
allocatable :: interp_z2xi_coef (:, :,:)
59 integer,
private,
allocatable :: interp_xi2p_idx (:,:,:,:)
60 real(
rp),
private,
allocatable :: interp_xi2p_coef (:, :,:)
63 integer,
private,
allocatable :: interp_xih2zh_idx (:,:,:,:)
64 real(
rp),
private,
allocatable :: interp_xih2zh_coef(:, :,:)
65 integer,
private,
allocatable :: interp_zh2xih_idx (:,:,:,:)
66 real(
rp),
private,
allocatable :: interp_zh2xih_coef(:, :,:)
68 integer,
private,
allocatable :: interp_xih2p_idx (:,:,:,:)
69 real(
rp),
private,
allocatable :: interp_xih2p_coef (:, :,:)
72 real(
rp),
private,
allocatable :: lnpres (:,:,:)
73 real(
rp),
private,
allocatable :: lnpresh(:,:,:)
74 real(
rp),
private,
allocatable :: lnpaxis(:)
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)
104 log_info(
"INTERP_VERT_setcoef",*)
'Setup'
105 log_info(
"INTERP_VERT_setcoef",*)
'No namelists.'
110 log_info(
"INTERP_VERT_setcoef",*)
'Topography exists & interpolation has meaning? : ',
interp_available
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) )
131 interp_xi2z_idx(:,:,i,j), &
132 interp_xi2z_coef(:, i,j), &
133 flag_extrap = .true. )
147 interp_z2xi_idx(:,:,i,j), &
148 interp_z2xi_coef(:, i,j), &
149 flag_extrap = .true. )
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) )
174 zh(1:,i,j), xih(1:), &
175 interp_xih2zh_idx(:,:,i,j), &
176 interp_xih2zh_coef(:, i,j), &
177 flag_extrap = .false. )
190 xih(1:), zh(1:,i,j), &
191 interp_zh2xih_idx(:,:,i,j), &
192 interp_zh2xih_coef(:, i,j), &
193 flag_extrap = .true. )
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)
224 real(
rp) :: workr(ka,7)
225 integer :: worki(ka,2)
242 workr(:,:), worki(:,:), &
244 interp_xi2z_idx(:,:,i,j), &
245 interp_xi2z_coef(:, i,j), &
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)
277 real(
rp) :: workr(ka,7)
278 integer :: worki(ka,2)
297 workr(:,:), worki(:,:), &
299 interp_z2xi_idx(:,:,i,j), &
300 interp_z2xi_coef(:, i,j), &
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)
336 real(
rp) :: workr(ka,7)
337 integer :: worki(ka,2)
366 workr(:,:), worki(:,:), &
368 interp_xih2zh_idx(:,:,i,j), &
369 interp_xih2zh_coef(:, i,j), &
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)
405 real(
rp) :: workr(ka,7)
406 integer :: worki(ka,2)
435 workr(:,:), worki(:,:), &
437 interp_zh2xih_idx(:,:,i,j), &
438 interp_zh2xih_coef(:, i,j), &
456 integer,
intent(in) :: kpres
457 integer,
intent(in) :: ka
458 integer,
intent(in) :: ia
459 integer,
intent(in) :: ja
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) )
468 allocate( lnpres(ka,ia,ja) )
469 allocate( lnpresh(ka,ia,ja) )
470 allocate( lnpaxis(kpres) )
483 deallocate( interp_xi2p_idx )
484 deallocate( interp_xi2p_coef )
485 deallocate( interp_xih2p_idx )
486 deallocate( interp_xih2p_coef )
490 deallocate( lnpresh )
491 deallocate( lnpaxis )
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)
515 real(
rp),
intent(in) :: presh (0:ka,ia,ja)
516 real(
rp),
intent(in) :: sfc_pres( ia,ja)
517 real(
rp),
intent(in) :: paxis (kpres)
529 lnpaxis(k) = - log( paxis(k) )
543 lnpres(k,i,j) = - log( pres(k,i,j) )
546 lnpres(:,i,j), lnpaxis(:), &
547 interp_xi2p_idx(:,:,i,j), &
548 interp_xi2p_coef(:, i,j), &
549 flag_extrap = .false. )
564 lnpresh(k,i,j) = - log( presh(k,i,j) )
567 lnpresh(:,i,j), lnpaxis(:), &
568 interp_xih2p_idx(:,:,i,j), &
569 interp_xih2p_coef(:, i,j), &
570 flag_extrap = .false. )
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)
599 real(
rp) :: workr(ka,7)
600 integer :: worki(ka,2)
617 workr(:,:), worki(:,:), &
619 interp_xi2p_idx(:,:,i,j), &
620 interp_xi2p_coef(:, i,j), &
621 lnpres(:,i,j), lnpaxis(:), &
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)
651 real(
rp) :: workr(ka,7)
652 integer :: worki(ka,2)
669 workr(:,:), worki(:,:), &
671 interp_xih2p_idx(:,:,i,j), &
672 interp_xih2p_coef(:, i,j), &
673 lnpresh(:,i,j), lnpaxis(:), &
690 deallocate( interp_xi2z_idx )
691 deallocate( interp_xi2z_coef )
692 deallocate( interp_z2xi_idx )
693 deallocate( interp_z2xi_coef )
696 deallocate( interp_xih2zh_idx )
697 deallocate( interp_xih2zh_coef )
698 deallocate( interp_zh2xih_idx )
699 deallocate( interp_zh2xih_coef )