Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

How to change soil_color_o_10level in PaleoToolkit/lnd/mksurfdata_map_src/mksoilMod.F90

Jazz

Jinzhe Zhang
New Member
When I use mksrf_zon_organic.10level.nc as an input, I'll get an output of soiltex and color in 10 level. But at the end of process to complete the land surface dataset. When I make mksurfdata_map to get the final surface dataset, it shows that " nsoicol value of 10 is not currently supported". So I find the problem is from mksurfdata_map_src/src/mksoilMod.F90 which just support the case that the number of levels is 20 or 8.So I add a code at the end of conditional statements as below:
!__________________________________________________________________________________________________________________________
if (nsoicol == 20) then
col(0) = 'no soil '
col(1) = 'class 1: light '
col(2) = 'class 2: '
col(3) = 'class 3: '
col(4) = 'class 4: '
col(5) = 'class 5: '
col(6) = 'class 6: '
col(7) = 'class 7: '
col(8) = 'class 8: '
col(9) = 'class 9: '
col(10) = 'class 10: '
col(11) = 'class 11: '
col(12) = 'class 12: '
col(13) = 'class 13: '
col(14) = 'class 14: '
col(15) = 'class 15: '
col(16) = 'class 16: '
col(17) = 'class 17: '
col(18) = 'class 18: '
col(19) = 'class 19: '
col(20) = 'class 20: dark '
else if (nsoicol == 8) then
col(0) = 'no soil '
col(1) = 'class 1: light '
col(2) = 'class 2: '
col(3) = 'class 3: '
col(4) = 'class 4: '
col(5) = 'class 5: '
col(6) = 'class 6: '
col(7) = 'class 7: '
col(8) = 'class 8: dark '
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++I added
else if (nsoicol == 10) then
col(0) = 'no soil '
col(1) = 'class 1: light '
col(2) = 'class 2: '
col(3) = 'class 3: '
col(4) = 'class 4: '
col(5) = 'class 5: '
col(6) = 'class 6: '
col(7) = 'class 7: '
col(8) = 'class 8: '
col(9) = 'class 9: '
col(10) = 'class 10: dark '
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
else
write(6,*)'nsoicol value of ',nsoicol,' is not currently supported'
call abort()
end if
!______________________________________________________________________________________________________________________


Although the error had passed and I got the final surface dataset, I noticed that there is a adjustment of soil_color_o as below:
!____________________________________________________
! Rank non-zero weights by color type. wsti(1) is the most extensive
! color type.
if (color(no) == 1) then
call mkrank (nsoicol, wst(0:nsoicol,no), miss, wsti, num)
soil_color_o(no) = wsti(1)
end if
! If land but no color, set color to 15 (in older dataset generic
! soil color 4)

if (nsoicol == 8) then
if (soil_color_o(no)==0) soil_color_o(no) = 4
else if (nsoicol == 20) then
if (soil_color_o(no)==0) soil_color_o(no) = 15
end if
!_____________________________________________________
So what should I do if my number of levels is 10?
 
Top