1 |
module regr_pr_int_m |
module regr_pr_int_m |
2 |
|
|
3 |
|
! Author: Lionel GUEZ |
4 |
|
|
5 |
implicit none |
implicit none |
6 |
|
|
7 |
contains |
contains |
27 |
|
|
28 |
use dimens_m, only: iim, jjm, llm |
use dimens_m, only: iim, jjm, llm |
29 |
use dimphy, only: klon |
use dimphy, only: klon |
30 |
use grid_change, only: dyn_phy |
use grid_change, only: gr_dyn_phy |
31 |
use netcdf95, only: nf95_inq_varid, nf95_get_var |
use netcdf95, only: nf95_inq_varid, nf95_get_var |
32 |
use nr_util, only: assert |
use nr_util, only: assert |
33 |
use numer_rec_95, only: regr1_lint |
use numer_rec_95, only: regr1_lint |
59 |
! Field on the "physics" horizontal grid. "v2(i, k >= 1)" is at |
! Field on the "physics" horizontal grid. "v2(i, k >= 1)" is at |
60 |
! longitude "xlon(i)", latitude "xlat(i)" and pressure "plev(k)".) |
! longitude "xlon(i)", latitude "xlat(i)" and pressure "plev(k)".) |
61 |
|
|
62 |
integer i, k |
integer i |
63 |
|
|
64 |
!-------------------------------------------- |
!-------------------------------------------- |
65 |
|
|
76 |
! Complete "v1" with the value at 0 pressure: |
! Complete "v1" with the value at 0 pressure: |
77 |
v1(:, 0) = top_value |
v1(:, 0) = top_value |
78 |
|
|
79 |
forall (k = 0:size(plev)) v2(:, k) = pack(spread(v1(:, k), dim = 1, & |
v2 = gr_dyn_phy(spread(v1, dim = 1, ncopies = iim + 1)) |
|
ncopies = iim + 1), dyn_phy) |
|
80 |
|
|
81 |
! Regrid in pressure at each horizontal position: |
! Regrid in pressure at each horizontal position: |
82 |
do i = 1, klon |
do i = 1, klon |