1 |
module regr_lat_time_coefoz_m |
module regr_lat_time_coefoz_m |
2 |
|
|
|
! This module is clean: no C preprocessor directive, no include line. |
|
3 |
! Author: Lionel GUEZ |
! Author: Lionel GUEZ |
4 |
|
|
5 |
implicit none |
implicit none |
37 |
! not use values of the input time coordinate). |
! not use values of the input time coordinate). |
38 |
|
|
39 |
use dimens_m, only: jjm |
use dimens_m, only: jjm |
40 |
use comgeom, only: rlatv |
use dynetat0_m, only: rlatv |
41 |
use comconst, only: pi |
use nr_util, only: pi |
42 |
use regr1_step_av_m, only: regr1_step_av |
use numer_rec_95, only: regr3_lint, regr1_conserv, slopes |
|
use regr3_lint_m, only: regr3_lint |
|
43 |
use netcdf95, only: nf95_open, nf95_gw_var, nf95_close, & |
use netcdf95, only: nf95_open, nf95_gw_var, nf95_close, & |
44 |
nf95_inq_varid, handle_err, nf95_put_var |
nf95_inq_varid, handle_err, nf95_put_var |
45 |
use netcdf, only: nf90_nowrite, nf90_get_var |
use netcdf, only: nf90_nowrite, nf90_get_var |
125 |
name_out(i_v) = "a2" |
name_out(i_v) = "a2" |
126 |
|
|
127 |
i_v = i_v + 1 |
i_v = i_v + 1 |
128 |
name_in(i_v) = "r" |
name_in(i_v) = "tro3" |
129 |
name_out(i_v) = "r_Mob" |
name_out(i_v) = "r_Mob" |
130 |
|
|
131 |
i_v = i_v + 1 |
i_v = i_v + 1 |
204 |
! Regrid in latitude: |
! Regrid in latitude: |
205 |
! We average with respect to sine of latitude, which is |
! We average with respect to sine of latitude, which is |
206 |
! equivalent to weighting by cosine of latitude: |
! equivalent to weighting by cosine of latitude: |
207 |
v_regr_lat(jjm+1:1:-1, :, 1:12) = regr1_step_av(o3_par_in, & |
call regr1_conserv(o3_par_in, & |
208 |
xs=sin(lat_in_edg), xt=sin((/- pi / 2, rlatv(jjm:1:-1), pi / 2/))) |
xs = sin(lat_in_edg), xt = (/- 1., sin(rlatv(jjm:1:-1)), 1./), & |
209 |
|
slope = slopes(o3_par_in, sin(lat_in_edg)), & |
210 |
|
vt = v_regr_lat(jjm + 1:1:- 1, :, 1:12)) |
211 |
! (invert order of indices in "v_regr_lat" because "rlatu" is |
! (invert order of indices in "v_regr_lat" because "rlatu" is |
212 |
! decreasing) |
! decreasing) |
213 |
|
|
239 |
! dimensions and variables, and writes one of the coordinate variables. |
! dimensions and variables, and writes one of the coordinate variables. |
240 |
|
|
241 |
use dimens_m, only: jjm |
use dimens_m, only: jjm |
242 |
use comgeom, only: rlatu |
use dynetat0_m, only: rlatu |
243 |
use comconst, only: pi |
use netcdf, only: nf90_clobber, nf90_float, nf90_copy_att, nf90_global |
|
use numer_rec, only: assert_eq |
|
|
|
|
244 |
use netcdf95, only: nf95_create, nf95_def_dim, nf95_def_var, & |
use netcdf95, only: nf95_create, nf95_def_dim, nf95_def_var, & |
245 |
nf95_put_att, nf95_enddef, nf95_copy_att, nf95_put_var |
nf95_put_att, nf95_enddef, nf95_copy_att, nf95_put_var |
246 |
use netcdf, only: nf90_clobber, nf90_float, nf90_copy_att, nf90_global |
use nr_util, only: assert_eq, pi |
247 |
|
|
248 |
integer, intent(in):: ncid_in, varid_in(:), n_plev |
integer, intent(in):: ncid_in, varid_in(:), n_plev |
249 |
character(len=*), intent(in):: name_out(:) ! of NetCDF variables |
character(len=*), intent(in):: name_out(:) ! of NetCDF variables |