/[lmdze]/trunk/libf/phylmd/Mobidic/regr_lat_time_coefoz.f90
ViewVC logotype

Diff of /trunk/libf/phylmd/Mobidic/regr_lat_time_coefoz.f90

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

revision 13 by guez, Fri Jul 25 19:59:34 2008 UTC revision 22 by guez, Fri Jul 31 15:18:47 2009 UTC
# Line 42  contains Line 42  contains
42      use comconst, only: pi      use comconst, only: pi
43      use regr1_step_av_m, only: regr1_step_av      use regr1_step_av_m, only: regr1_step_av
44      use regr3_lint_m, only: regr3_lint      use regr3_lint_m, only: regr3_lint
45      use netcdf95, only: nf95_open, nf95_get_coord, nf95_close, &      use netcdf95, only: nf95_open, nf95_gw_var, nf95_close, &
46           nf95_inq_varid, handle_err, nf95_put_var           nf95_inq_varid, handle_err, nf95_put_var
47      use netcdf, only: nf90_nowrite, nf90_get_var      use netcdf, only: nf90_nowrite, nf90_get_var
48    
# Line 98  contains Line 98  contains
98      ! (name of NetCDF primary variable in the output file)      ! (name of NetCDF primary variable in the output file)
99    
100      integer varid_in(n_o3_param), varid_out(n_o3_param), varid_plev, varid_time      integer varid_in(n_o3_param), varid_out(n_o3_param), varid_plev, varid_time
101      integer ncerr      integer ncerr, varid
102      ! (for NetCDF)      ! (for NetCDF)
103    
104      real, parameter:: tmidmonth(0:13) = (/(-15. + 30. * j, j = 0, 13)/)      real, parameter:: tmidmonth(0:13) = (/(-15. + 30. * j, j = 0, 13)/)
# Line 150  contains Line 150  contains
150      name_in(i_v) = "R_Het"      name_in(i_v) = "R_Het"
151      name_out(i_v) = "R_Het"      name_out(i_v) = "R_Het"
152    
153      call nf95_open("coefoz_v2_3.nc", nf90_nowrite, ncid_in)      call nf95_open("coefoz.nc", nf90_nowrite, ncid_in)
154    
155      ! Get coordinates from the input file:      ! Get coordinates from the input file:
156    
157      call nf95_get_coord(ncid_in, "latitude", latitude)      call nf95_inq_varid(ncid_in, "latitude", varid)
158        call nf95_gw_var(ncid_in, varid, latitude)
159      ! Convert from degrees to rad, because "rlatv" is in rad:      ! Convert from degrees to rad, because "rlatv" is in rad:
160      latitude = latitude / 180. * pi      latitude = latitude / 180. * pi
161      n_lat = size(latitude)      n_lat = size(latitude)
# Line 170  contains Line 171  contains
171      lat_in_edg(n_lat + 1) = pi / 2      lat_in_edg(n_lat + 1) = pi / 2
172      deallocate(latitude) ! pointer      deallocate(latitude) ! pointer
173    
174      call nf95_get_coord(ncid_in, "plev", plev)      call nf95_inq_varid(ncid_in, "plev", varid)
175        call nf95_gw_var(ncid_in, varid, plev)
176      n_plev = size(plev)      n_plev = size(plev)
177      ! (We only need the pressure coordinate to copy it to the output file.)      ! (We only need the pressure coordinate to copy it to the output file.)
178    

Legend:
Removed from v.13  
changed lines
  Added in v.22

  ViewVC Help
Powered by ViewVC 1.1.21