/[lmdze]/trunk/phylmd/Mobidic/regr_pr_o3.f
ViewVC logotype

Diff of /trunk/phylmd/Mobidic/regr_pr_o3.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/libf/phylmd/Mobidic/regr_pr_o3.f90 revision 52 by guez, Fri Sep 23 12:28:01 2011 UTC trunk/Sources/phylmd/Mobidic/regr_pr_o3.f revision 134 by guez, Wed Apr 29 15:47:56 2015 UTC
# Line 4  module regr_pr_o3_m Line 4  module regr_pr_o3_m
4    
5  contains  contains
6    
7    subroutine regr_pr_o3(o3_mob_regr)    subroutine regr_pr_o3(p3d, o3_mob_regr)
8    
9      ! "regr_pr_o3" stands for "regrid pressure ozone".      ! "regr_pr_o3" stands for "regrid pressure ozone".
10      ! This procedure reads Mobidic ozone mole fraction from      ! This procedure reads Mobidic ozone mole fraction from
# Line 22  contains Line 22  contains
22      ! We assume that, in the input file, the pressure levels are in      ! We assume that, in the input file, the pressure levels are in
23      ! hPa and strictly increasing.      ! hPa and strictly increasing.
24    
     use conf_gcm_m, only: dayref  
25      use dimens_m, only: iim, jjm, llm      use dimens_m, only: iim, jjm, llm
26        use dynetat0_m, only: day_ref
27        use grid_change, only: dyn_phy
28        use netcdf, only:  nf90_nowrite, nf90_get_var
29      use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, handle_err, &      use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, handle_err, &
30           nf95_gw_var           nf95_gw_var
     use netcdf, only:  nf90_nowrite, nf90_get_var  
31      use nr_util, only: assert      use nr_util, only: assert
32      use grid_change, only: dyn_phy      use numer_rec_95, only: regr1_step_av
33      use numer_rec, only: regr1_step_av  
34      use pressure_var, only: p3d      REAL, intent(in):: p3d(:, :, :) ! (iim + 1, jjm + 1, llm+1)
35        ! pressure at layer interfaces, in Pa
36        ! ("p3d(i, j, l)" is at longitude "rlonv(i)", latitude "rlatu(j)",
37        ! for interface "l")
38    
39      real, intent(out):: o3_mob_regr(:, :, :) ! (iim + 1, jjm + 1, llm)      real, intent(out):: o3_mob_regr(:, :, :) ! (iim + 1, jjm + 1, llm)
40      ! (ozone mole fraction from Mobidic adapted to the LMDZ grid)      ! (ozone mole fraction from Mobidic adapted to the LMDZ grid)
# Line 51  contains Line 55  contains
55      integer i, j      integer i, j
56    
57      real, allocatable:: r_mob(:, :)! (jjm + 1, n_plev)      real, allocatable:: r_mob(:, :)! (jjm + 1, n_plev)
58      ! (ozone mole fraction from Mobidic at day "dayref")      ! (ozone mole fraction from Mobidic at day "day_ref")
59      ! (r_mob(j, k) is at latitude "rlatu(j)" and pressure level "plev(k)".)      ! (r_mob(j, k) is at latitude "rlatu(j)" and pressure level "plev(k)".)
60    
61      !------------------------------------------------------------      !------------------------------------------------------------
62    
63      print *, "Call sequence information: regr_pr_o3"      print *, "Call sequence information: regr_pr_o3"
64      call assert(shape(o3_mob_regr) == (/iim + 1, jjm + 1, llm/), "regr_pr_o3")  
65        call assert(shape(o3_mob_regr) == (/iim + 1, jjm + 1, llm/), &
66             "regr_pr_o3 o3_mob_regr")
67        call assert(shape(p3d) == (/iim + 1, jjm + 1, llm + 1/), &
68             "regr_pr_o3 p3d")
69    
70      call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid)      call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid)
71    
# Line 82  contains Line 90  contains
90      allocate(r_mob(jjm + 1, n_plev))      allocate(r_mob(jjm + 1, n_plev))
91    
92      ! Get data at the right day from the input file:      ! Get data at the right day from the input file:
93      ncerr = nf90_get_var(ncid, varid, r_mob, start=(/1, 1, dayref/))      ncerr = nf90_get_var(ncid, varid, r_mob, start=(/1, 1, day_ref/))
94      call handle_err("nf90_get_var r_Mob", ncerr)      call handle_err("nf90_get_var r_Mob", ncerr)
95      ! Latitudes are in increasing order in the input file while      ! Latitudes are in increasing order in the input file while
96      ! "rlatu" is in decreasing order so we need to invert order:      ! "rlatu" is in decreasing order so we need to invert order:

Legend:
Removed from v.52  
changed lines
  Added in v.134

  ViewVC Help
Powered by ViewVC 1.1.21