The "long_name" attribute associated with each variable on the restart file will supply the meaning of the variable. For example, the long_name for cols1d_ityplun says "column landunit type (see global attributes)". So this is the landunit type associated with this column. The global attributes can be obtained by doing an ncdump -h on the restart file. For example, ncdump -h on one of my files gives the global attributes shown below. So, if cols1d_ityplun was "1" for a column, then the column is associated with a "vegetated_or_bare_soil" landunit (see ilun_vegetated_or_bare_soil below).
:Conventions = "CF-1.0" ;
:history = "created on 12/13/23 07:17:36" ;
:username = "oleson" ;
:host = "cheyenne" ;
:version = "unknown" ;
:source = "Community Terrestrial Systems Model" ;
:revision_id = "$Id: restFileMod.F90 41292 2012-10-26 13:51:45Z erik $" ;
:case_title = "ctsm51_ctsm51d150_ne30pg3ne30pg3mg17_GSWP3V1_ABCDE_blk_ABCDE_1850AD" ;
:case_id = "ctsm51_ctsm51d150_ne30pg3ne30pg3mg17_GSWP3V1_ABCDE_blk_ABCDE_1850AD" ;
:surface_dataset = "/glade/work/slevis/git/mksurfdata_toolchain/tools/mksurfdata_esmf/surfdata_ne30
np4.pg3_SSP5-8.5_78pfts_CMIP6_1850-2100_c230227.nc" ;
:flanduse_timeseries = "" ;
:title = "CLM Restart information" ;
:create_crop_landunit = "true" ;
:irrigate = "false" ;
:created_glacier_mec_landunits = "true" ;
:ipft_not_vegetated = 0 ;
:ipft_needleleaf_evergreen_temperate_tree = 1 ;
:ipft_needleleaf_evergreen_boreal_tree = 2 ;
:ipft_needleleaf_deciduous_boreal_tree = 3 ;
:ipft_broadleaf_evergreen_tropical_tree = 4 ;
:ipft_broadleaf_evergreen_temperate_tree = 5 ;
:ipft_broadleaf_deciduous_tropical_tree = 6 ;
:ipft_broadleaf_deciduous_temperate_tree = 7 ;
:ipft_broadleaf_deciduous_boreal_tree = 8 ;
:ipft_broadleaf_evergreen_shrub = 9 ;
:ipft_broadleaf_deciduous_temperate_shrub = 10 ;
:ipft_broadleaf_deciduous_boreal_shrub = 11 ;
:ipft_c3_arctic_grass = 12 ;
:ipft_c3_non-arctic_grass = 13 ;
:ipft_c4_grass = 14 ;
:ipft_c3_crop = 15 ;
:ipft_c3_irrigated = 16 ;
:ipft_temperate_corn = 17 ;
:ipft_irrigated_temperate_corn = 18 ;
:ipft_spring_wheat = 19 ;
:ipft_irrigated_spring_wheat = 20 ;
:ipft_winter_wheat = 21 ;
:ipft_irrigated_winter_wheat = 22 ;
:ipft_temperate_soybean = 23 ;
:ipft_irrigated_temperate_soybean = 24 ;
:ipft_barley = 25 ;
:ipft_irrigated_barley = 26 ;
:ipft_winter_barley = 27 ;
:ipft_irrigated_winter_barley = 28 ;
:ipft_rye = 29 ;
:ipft_irrigated_rye = 30 ;
:ipft_winter_rye = 31 ;
:ipft_irrigated_winter_rye = 32 ;
:ipft_cassava = 33 ;
:ipft_irrigated_cassava = 34 ;
:ipft_citrus = 35 ;
:ipft_irrigated_citrus = 36 ;
:ipft_cocoa = 37 ;
:ipft_irrigated_cocoa = 38 ;
:ipft_coffee = 39 ;
:ipft_irrigated_coffee = 40 ;
:ipft_cotton = 41 ;
:ipft_irrigated_cotton = 42 ;
:ipft_datepalm = 43 ;
:ipft_irrigated_datepalm = 44 ;
:ipft_foddergrass = 45 ;
:ipft_irrigated_foddergrass = 46 ;
:ipft_grapes = 47 ;
:ipft_irrigated_grapes = 48 ;
:ipft_groundnuts = 49 ;
:ipft_irrigated_groundnuts = 50 ;
:ipft_millet = 51 ;
:ipft_irrigated_millet = 52 ;
:ipft_oilpalm = 53 ;
:ipft_irrigated_oilpalm = 54 ;
:ipft_potatoes = 55 ;
:ipft_irrigated_potatoes = 56 ;
:ipft_pulses = 57 ;
:ipft_irrigated_pulses = 58 ;
:ipft_rapeseed = 59 ;
:ipft_irrigated_rapeseed = 60 ;
:ipft_rice = 61 ;
:ipft_irrigated_rice = 62 ;
:ipft_sorghum = 63 ;
:ipft_irrigated_sorghum = 64 ;
:ipft_sugarbeet = 65 ;
:ipft_irrigated_sugarbeet = 66 ;
:ipft_sugarcane = 67 ;
:ipft_irrigated_sugarcane = 68 ;
:ipft_sunflower = 69 ;
:ipft_irrigated_sunflower = 70 ;
:ipft_miscanthus = 71 ;
:ipft_irrigated_miscanthus = 72 ;
:ipft_switchgrass = 73 ;
:ipft_irrigated_switchgrass = 74 ;
:ipft_tropical_corn = 75 ;
:ipft_irrigated_tropical_corn = 76 ;
:ipft_tropical_soybean = 77 ;
:ipft_irrigated_tropical_soybean = 78 ;
:cft_lb = 15 ;
:cft_ub = 78 ;
:icol_vegetated_or_bare_soil = 1 ;
:icol_crop = 2 ;
:icol_crop_noncompete = "2*100+m, m=cft_lb,cft_ub" ;
:icol_landice = "4*100+m, m=1,glcnec" ;
:icol_deep_lake = 5 ;
:icol_wetland = 6 ;
:icol_urban_roof = 71 ;
:icol_urban_sunwall = 72 ;
:icol_urban_shadewall = 73 ;
:icol_urban_impervious_road = 74 ;
:icol_urban_pervious_road = 75 ;
:ilun_vegetated_or_bare_soil = 1 ;
:ilun_crop = 2 ;
:ilun_UNUSED = 3 ;
:ilun_landice = 4 ;
:ilun_deep_lake = 5 ;
:ilun_wetland = 6 ;
:ilun_urban_tbd = 7 ;
:ilun_urban_hd = 8 ;
:ilun_urban_md = 9 ;
:issue_fixed_783 = 1 ;
:issue_fixed_1140 = 1 ;
I appreciate for your help, that is exactly the what I wanted to see.
Actually, I wanted to know information about '
cols1d_landunit_index'.
Because I found a python script for converting lon-lat grid file to column format which using landunit index.
It is from '
Soil Moisture Data Set — prescribeSM 0 documentation'
Even though it is for CLM4, I think the method will be similar.
I think
cols1d_landunit_index in CLM5 is same with
cols1d_itype_lunit in CLM4.
In the file
clm_col_to_xy_example.py,
cols1d_itype_lunit is identified and used.
If the value of the
cols1d_itype_lunit is 1, it seems like that the point is considered as soil.
But when I checked, 2 means crop, 6 means wetland, 7 to 9 means urban regions.
:ltype_vegetated_or_bare_soil = 1 ;
:ltype_crop = 2 ;
:ltype_UNUSED = 3 ;
:ltype_landice = 4 ;
:ltype_deep_lake = 5 ;
:ltype_wetland = 6 ;
:ltype_urban_tbd = 7 ;
:ltype_urban_hd = 8 ;
:ltype_urban_md = 9 ;
I'm confusing why the script only uses value of 1.
In my guess, 2, 6, 7, 8, 9 should be also considered because there can be also soil moisture data.
If I use the script, do you think I should follow the script with converting the data only where cols1d_itype_lunit is 1 ?
Or will it be better to consider the points for crop, wetland, urban together ?
Below is a part of python code for converting.
with nc.Dataset(fN_3D_in) as ncf:
# get indices
cols1d_ixy = ncf.variables['cols1d_ixy'][:]
cols1d_jxy = ncf.variables['cols1d_jxy'][:]
cols1d_itype_lunit = ncf.variables['cols1d_itype_lunit'][:]
istsoil = 1
# not all the points in SOILLIQ and SOILICE are SM
sel_soil = cols1d_itype_lunit == istsoil
# python uses 0 based indexing
col = cols1d_ixy[sel_soil] - 1
row = cols1d_jxy[sel_soil] - 1