Changeset 2408 for LMDZ5/branches/testing/libf/phylmd/regr_pr_int_m.F90
- Timestamp:
- Dec 14, 2015, 11:43:09 AM (9 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2293-2295,2297,2299-2302,2305-2313,2315,2317-2380,2382-2396
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/regr_pr_int_m.F90
r1910 r2408 30 30 use regr1_lint_m, only: regr1_lint 31 31 use mod_phys_lmdz_mpi_data, only: is_mpi_root 32 32 use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, nbp_lev 33 33 use mod_phys_lmdz_transfert_para, only: scatter2d 34 34 ! (pack to the LMDZ horizontal "physics" grid and scatter) … … 41 41 ! (pressure level of input data, in Pa, in strictly ascending order) 42 42 43 real, intent(in):: pplay(:, :) ! (klon, llm)43 real, intent(in):: pplay(:, :) ! (klon, nbp_lev) 44 44 ! (pression pour le mileu de chaque couche, en Pa) 45 45 … … 47 47 ! (extra value of field at 0 pressure) 48 48 49 real, intent(out):: v3(:, :) ! (klon, llm)49 real, intent(out):: v3(:, :) ! (klon, nbp_lev) 50 50 ! (regridded field on the partial "physics" grid) 51 51 ! ("v3(i, k)" is at longitude "xlon(i)", latitude … … 54 54 ! Variables local to the procedure: 55 55 56 include "dimensions.h"57 56 integer varid, ncerr ! for NetCDF 58 57 59 real v1( iim, jjm + 1, 0:size(plev))58 real v1(nbp_lon, nbp_lat, 0:size(plev)) 60 59 ! (input field at day "julien", on the global "dynamics" horizontal grid) 61 60 ! (First dimension is for longitude. … … 72 71 !-------------------------------------------- 73 72 74 call assert(shape(v3) == (/klon, llm/), "regr_pr_int v3")75 call assert(shape(pplay) == (/klon, llm/), "regr_pr_int pplay")73 call assert(shape(v3) == (/klon, nbp_lev/), "regr_pr_int v3") 74 call assert(shape(pplay) == (/klon, nbp_lev/), "regr_pr_int pplay") 76 75 77 76 !$omp master … … 84 83 ! Latitudes are in ascending order in the input file while 85 84 ! "rlatu" is in descending order so we need to invert order: 86 v1(1, :, 1:) = v1(1, jjm+1:1:-1, 1:)85 v1(1, :, 1:) = v1(1, nbp_lat:1:-1, 1:) 87 86 88 87 ! Complete "v1" with the value at 0 pressure: … … 90 89 91 90 ! Duplicate on all longitudes: 92 v1(2:, :, :) = spread(v1(1, :, :), dim=1, ncopies= iim-1)91 v1(2:, :, :) = spread(v1(1, :, :), dim=1, ncopies=nbp_lon-1) 93 92 end if 94 93 !$omp end master … … 98 97 ! Regrid in pressure at each horizontal position: 99 98 do i = 1, klon 100 v3(i, llm:1:-1) = regr1_lint(v2(i, :), (/0., plev/), pplay(i, llm:1:-1))99 v3(i, nbp_lev:1:-1) = regr1_lint(v2(i, :), (/0., plev/), pplay(i, nbp_lev:1:-1)) 101 100 ! (invert order of indices because "pplay" is in descending order) 102 101 end do
Note: See TracChangeset
for help on using the changeset viewer.