2 use fckit_log_module,
only: fckit_log
25 character(3),
dimension(:),
allocatable :: obstype
26 integer(i_kind) :: n_obstype
27 integer(i_kind) :: n_observations_tracer
28 integer(i_kind) :: date
33 real(r_kind) :: observation_type
34 real(r_kind) :: latitude
35 real(r_kind) :: longitude
36 real(r_kind) :: station_depth
38 real(r_kind) :: observation
39 real(r_kind) :: obs_minus_forecast_adjusted
40 real(r_kind) :: obs_minus_forecast_unadjusted
51 character(120),
intent(in) :: infn
54 logical,
intent(in) :: append_suffix
59 character(len=*),
intent(in) :: infn
67 character(len=*),
intent(in) :: infn
69 integer,
intent(out) :: ierr
70 character(20) :: str, str2
71 integer(i_kind) :: i, itype, fid, nobs
72 real,
allocatable :: obs(:,:,:,:), lon(:), lat(:), depth(:), time(:)
73 integer :: nlon, nlat, ndepth, ntime
74 integer :: ilon, ilat, idepth, itime, cnt, varid
76 call nc_diag_read_init(infn,fid)
78 nlon = nc_diag_read_get_dim(fid,
'lon')
79 nlat = nc_diag_read_get_dim(fid,
'lat')
80 ndepth = nc_diag_read_get_dim(fid,
'depth')
81 ntime = nc_diag_read_get_dim(fid,
'time')
83 nobs=nlon*nlat*ndepth*ntime
85 allocate(tao_tracer(nobs))
88 allocate(obs(nlon,nlat,ndepth,ntime))
89 allocate(time(ntime),lon(nlon),lat(nlat),depth(ndepth))
91 call nc_diag_read_get_var(fid,
"lat", lat )
92 call nc_diag_read_get_var(fid,
"lon", lon )
93 call nc_diag_read_get_var(fid,
"depth", depth )
94 call nc_diag_read_get_var(fid,
"time", time )
96 call nc_diag_read_close(infn)
98 call check( nf90_open(infn, nf90_nowrite, fid) )
99 call check( nf90_inq_varid(fid,
"T_20", varid) )
100 call check( nf90_get_var(fid, varid, obs) )
101 call check( nf90_close(fid) )
107 tao_tracer(cnt)%Latitude = lat(ilat)
108 tao_tracer(cnt)%Longitude = lon(ilon)
109 tao_tracer(cnt)%Station_Depth = depth(idepth)
110 tao_tracer(cnt)%Time = time(1)
112 tao_tracer(cnt)%Observation = obs(ilon,ilat,idepth,1)
118 deallocate(lat,lon,depth,time,obs)
122 subroutine check(status)
125 integer,
intent ( in) :: status
127 if(status /= nf90_noerr)
then 128 print *, trim(nf90_strerror(status))
subroutine, public read_marine_conv_diag_nc_tracer(infn, tao_tracer, ierr)
integer, parameter, public i_kind
subroutine nc_diag_init(filename, append)
integer, parameter maxobstype
subroutine, public write_split_marine_conv_diag_nc(infn, tao_header, tao_tracer, append_suffix)
subroutine nc_diag_read_close(filename, file_ncdr_id, from_pop)
subroutine, public read_marine_conv_diag_nc_header(infn, tao_header)
integer, parameter, public r_double
integer, parameter, public r_single
integer, parameter, public r_kind
subroutine nc_diag_read_init(filename, file_ncdr_id, from_push)