- 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_lat_time_climoz_m.F90
r1910 r2408 66 66 ! year. 67 67 68 use mod_grid_phy_lmdz, ONLY : nbp_lat 68 69 use regr1_step_av_m, only: regr1_step_av 69 70 use regr3_lint_m, only: regr3_lint … … 73 74 use netcdf, only: nf90_get_att, nf90_get_var, nf90_noerr, nf90_nowrite 74 75 use assert_m, only: assert 76 use regular_lonlat_mod, only : boundslat_reg, south 77 use nrtype, only: pi 75 78 76 79 integer, intent(in):: read_climoz ! read ozone climatology … … 81 84 82 85 ! Variables local to the procedure: 83 84 include "dimensions.h"85 ! (for "jjm")86 include "paramet.h"87 ! (for the other included files)88 include "comgeom2.h"89 ! (for "rlatv")90 include "comconst.h"91 ! (for "pi")92 86 93 87 integer n_plev ! number of pressure levels in the input data … … 289 283 call nf95_close(ncid_in) 290 284 291 allocate(o3_regr_lat( jjm + 1, n_plev, 0:13, read_climoz))292 allocate(o3_out( jjm + 1, n_plev, 360, read_climoz))285 allocate(o3_regr_lat(nbp_lat, n_plev, 0:13, read_climoz)) 286 allocate(o3_out(nbp_lat, n_plev, 360, read_climoz)) 293 287 294 288 ! Regrid in latitude: … … 298 292 print *, & 299 293 "Found 12 months in ozone climatologies, assuming periodicity..." 300 o3_regr_lat( jjm+1:1:-1, :, 1:12, :) = regr1_step_av(o3_in, &301 xs=sin(lat_in_edg), xt=sin((/- pi / 2, rlatv(jjm:1:-1), pi / 2/)))294 o3_regr_lat(nbp_lat:1:-1, :, 1:12, :) = regr1_step_av(o3_in, & 295 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 302 296 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 303 297 ! in descending order) … … 309 303 else 310 304 print *, "Using 14 months in ozone climatologies..." 311 o3_regr_lat( jjm+1:1:-1, :, :, :) = regr1_step_av(o3_in, &312 xs=sin(lat_in_edg), xt=sin((/- pi / 2, rlatv(jjm:1:-1), pi / 2/)))305 o3_regr_lat(nbp_lat:1:-1, :, :, :) = regr1_step_av(o3_in, & 306 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 313 307 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 314 308 ! in descending order) … … 320 314 ! Write to file: 321 315 do m = 1, read_climoz 322 call nf95_put_var(ncid_out, varid_out(m), o3_out( jjm+1:1:-1, :, :, m))316 call nf95_put_var(ncid_out, varid_out(m), o3_out(nbp_lat:1:-1, :, :, m)) 323 317 ! (The order of "rlatu" is inverted in the output file) 324 318 end do … … 336 330 ! dimensions and variables, and writes one of the coordinate variables. 337 331 332 use mod_grid_phy_lmdz, ONLY : nbp_lat 338 333 use netcdf95, only: nf95_create, nf95_def_dim, nf95_def_var, & 339 334 nf95_put_att, nf95_enddef, nf95_copy_att, nf95_put_var 340 335 use netcdf, only: nf90_clobber, nf90_float, nf90_global 336 use nrtype, only: pi 337 use regular_lonlat_mod, only : lat_reg 341 338 342 339 integer, intent(in):: ncid_in, n_plev … … 349 346 ! Variables local to the procedure: 350 347 351 include "dimensions.h"352 ! (for "jjm")353 include "paramet.h"354 ! (for the other included files)355 include "comgeom2.h"356 ! (for "rlatu")357 include "comconst.h"358 ! (for "pi")359 360 348 integer ncerr 361 349 integer dimid_rlatu, dimid_plev, dimid_time … … 371 359 call nf95_def_dim(ncid_out, "time", 360, dimid_time) 372 360 call nf95_def_dim(ncid_out, "plev", n_plev, dimid_plev) 373 call nf95_def_dim(ncid_out, "rlatu", jjm + 1, dimid_rlatu)361 call nf95_def_dim(ncid_out, "rlatu", nbp_lat, dimid_rlatu) 374 362 375 363 ! Define coordinate variables: … … 432 420 433 421 ! Write one of the coordinate variables: 434 call nf95_put_var(ncid_out, varid_rlatu, rlatu(jjm+1:1:-1) / pi * 180.)422 call nf95_put_var(ncid_out, varid_rlatu, lat_reg(nbp_lat:1:-1) / pi * 180.) 435 423 ! (convert from rad to degrees and sort in ascending order) 436 424
Note: See TracChangeset
for help on using the changeset viewer.