--- trunk/Sources/phylmd/Mobidic/regr_pr_int.f 2015/07/24 16:54:30 162 +++ trunk/phylmd/Mobidic/regr_pr_int.f 2018/03/20 09:35:59 265 @@ -1,5 +1,7 @@ module regr_pr_int_m + ! Author: Lionel GUEZ + implicit none contains @@ -17,15 +19,14 @@ ! that the input data is already on the LMDZ "rlatu" latitude ! grid. - ! The target vertical LMDZ grid is the grid of mid-layers. - ! The input data does not depend on longitude, but the pressure - ! at LMDZ mid-layers does. - ! Therefore, the values on the LMDZ grid do depend on longitude. - ! Regridding is by linear interpolation. + ! The target vertical LMDZ grid is the grid of mid-layers. The + ! input data does not depend on longitude, but the pressure at + ! LMDZ mid-layers does. Therefore, the values on the LMDZ grid do + ! depend on longitude. Regridding is by linear interpolation. - use dimens_m, only: iim, jjm, llm + use dimensions, only: iim, jjm, llm use dimphy, only: klon - use grid_change, only: dyn_phy + use grid_change, only: gr_dyn_phy use netcdf95, only: nf95_inq_varid, nf95_get_var use nr_util, only: assert use numer_rec_95, only: regr1_lint @@ -57,7 +58,7 @@ ! Field on the "physics" horizontal grid. "v2(i, k >= 1)" is at ! longitude "xlon(i)", latitude "xlat(i)" and pressure "plev(k)".) - integer i, k + integer i !-------------------------------------------- @@ -74,8 +75,7 @@ ! Complete "v1" with the value at 0 pressure: v1(:, 0) = top_value - forall (k = 0:size(plev)) v2(:, k) = pack(spread(v1(:, k), dim = 1, & - ncopies = iim + 1), dyn_phy) + v2 = gr_dyn_phy(spread(v1, dim = 1, ncopies = iim + 1)) ! Regrid in pressure at each horizontal position: do i = 1, klon