Skip to content

Commit

Permalink
Fix ISRIC soil texture water point index value in LDT
Browse files Browse the repository at this point in the history
This pull request fixes the water point index values when using
the ISRIC soil texture maps in LDT.  LDT re-maps the ISRIC soil
texture map onto the STATSGO soil classification index.  However,
the water points were incorrectly assigned a value of 13, when it
should be 14 in the STATSGO soil texture classification.

Resolves: NASA-LIS#1406
  • Loading branch information
dmocko committed Sep 7, 2023
1 parent af716b0 commit e27c778
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ldt/core/LDT_paramOptCheckMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ subroutine LDT_soilsOptChecks( n, param_name, soil_class, spatial_transform )
endif

case( "ISRIC")
if (nt.ne.13) then
write(LDT_logunit,*) "Param_Check: ISRIC has 13 types (includes water) for tiling."
if (nt.ne.16) then
write(LDT_logunit,*) "Param_Check: ISRIC has 16 types (includes water) for tiling."
write(LDT_logunit,*) " The current value is: ",nt
write(LDT_logunit,*) " Stopping ..."
call LDT_endrun
Expand Down
8 changes: 4 additions & 4 deletions ldt/core/LDT_soilsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ subroutine soils_init_LIS()
elseif(INDEX(LDT_LSMparam_struc(n)%texture%source,"ZOBLER") >0) then
soiltext%watervalue = 1.0
elseif(INDEX(LDT_LSMparam_struc(n)%texture%source,"ISRIC") >0) then
soiltext%watervalue = 13.
soiltext%watervalue = 14.
else
soiltext%watervalue = LDT_rc%udef
endif
Expand Down Expand Up @@ -1484,7 +1484,7 @@ subroutine soils_init_LISHydro(flag)
elseif(INDEX(LDT_LSMparam_struc(n)%texture%source,"ZOBLER") >0) then
soiltext%watervalue = 1.0
elseif(INDEX(LDT_LSMparam_struc(n)%texture%source,"ISRIC") >0) then
soiltext%watervalue = 13.
soiltext%watervalue = 14.
else
soiltext%watervalue = LDT_rc%udef
endif
Expand Down Expand Up @@ -1814,7 +1814,7 @@ subroutine soils_writeHeader_LIS(n,ftn,dimID)
14))
elseif( LDT_rc%soil_classification(1) == "ISRIC" ) then
call LDT_verify(nf90_put_att(ftn,NF90_GLOBAL,"NUMBER_SOILTYPES", &
13))
19))
else
call LDT_verify(nf90_put_att(ftn,NF90_GLOBAL,"NUMBER_SOILTYPES", &
19))
Expand Down Expand Up @@ -1972,7 +1972,7 @@ subroutine soils_writeHeader_LISHydro(n,ftn,dimID,flag)
14))
elseif( LDT_rc%soil_classification(1) == "ISRIC" ) then
call LDT_verify(nf90_put_att(ftn,NF90_GLOBAL,"NUMBER_SOILTYPES", &
13))
19))
else
call LDT_verify(nf90_put_att(ftn,NF90_GLOBAL,"NUMBER_SOILTYPES", &
19))
Expand Down
2 changes: 1 addition & 1 deletion ldt/params/soils/read_ISRIC_texture.F90
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ subroutine read_ISRIC_texture( n, num_bins, fgrd, texture_layers )

! ___________________________________________________________________

water_class = 13 ! Water class for ISRIC soil texture class
water_class = 14 ! Water class for ISRIC soil texture class

temp = LDT_rc%udef
gridcnt = 0.
Expand Down
2 changes: 1 addition & 1 deletion ldt/params/soils/set_ISRIC_texture_attribs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ subroutine set_ISRIC_texture_attribs()
! \end{description}
!EOP
!
LDT_LSMparam_struc(:)%texture%num_bins = 13
LDT_LSMparam_struc(:)%texture%num_bins = 16
LDT_LSMparam_struc(:)%texture%vlevels = 1

LDT_soils_struc(:)%texture_nlyrs%num_bins = 1
Expand Down

0 comments on commit e27c778

Please sign in to comment.