Skip to content

Commit

Permalink
Merge pull request NASA-LIS#1407 from dmocko/fix/isric-water-value
Browse files Browse the repository at this point in the history
Fix ISRIC soil texture water point index value in LDT
  • Loading branch information
emkemp authored Sep 14, 2023
2 parents af716b0 + e27c778 commit d6878aa
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 d6878aa

Please sign in to comment.