Go to the documentation of this file.
22 include
'newaottbl90.inc'
24 character(*),
intent (in) :: lut_file
25 integer,
intent (out) :: status
26 integer,
dimension (2) :: start, edge, stride
28 integer :: number_type, nattrs
29 integer :: sds_id,sds_index,attr_index, hdfid
30 character(len=255) :: sds_name
31 character(len=255) :: dset_name
32 character(len=255) :: attr_name
33 character(len=255) :: group_name
41 edge = (/ 3600,1800 /)
44 status = nf90_open(lut_file, nf90_nowrite, nc_id)
45 if (status /= nf90_noerr)
then
46 print *,
"ERROR: Failed to open deepblue lut_nc4 file: ", status
50 group_name =
'LANDCOVER'
51 status = nf90_inq_ncid(nc_id, group_name, grp_id)
52 if (status /= nf90_noerr)
then
53 print *,
"ERROR: Failed to get ID of group "//
trim(group_name)//
": ", status
58 status = nf90_inq_varid(grp_id, dset_name, dset_id)
59 if (status /= nf90_noerr)
then
60 print *,
"ERROR: Failed to get ID of dataset "//
trim(dset_name)//
": ", status
63 status = nf90_get_var(grp_id, dset_id, xlcvr_2, start=start, &
64 stride=stride, count=edge)
65 if (status /= nf90_noerr)
then
66 print *,
"ERROR: Failed to read dataset "//
trim(dset_name)//
": ", status
70 dset_name =
'REGION_INDEX'
71 status = nf90_inq_varid(grp_id, dset_name, dset_id)
72 if (status /= nf90_noerr)
then
73 print *,
"ERROR: Failed to get ID of dataset "//
trim(dset_name)//
": ", status
76 status = nf90_get_var(grp_id, dset_id, regid_2, start=start, &
77 stride=stride, count=edge)
78 if (status /= nf90_noerr)
then
79 print *,
"ERROR: Failed to read dataset "//
trim(dset_name)//
": ", status
83 status = nf90_close(nc_id)
84 if (status /= nf90_noerr)
then
85 print *,
"ERROR: Failed to close lut_nc4 file: ", status
string & trim(string &s, const string &delimiters)
subroutine get_lut_igbp_land_cover(lut_file, status)