Skip to content

Commit

Permalink
Merge branch 'support/lisf-public-7.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
jvgeiger committed Jan 17, 2025
2 parents 67fdd15 + de85e16 commit 8ea7b40
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 23 deletions.
4 changes: 2 additions & 2 deletions ldt/configs/ldt.config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ Soil texture spatial transform: none

`Soil texture fill value for Antarctica:` indicates which soil texture value to be used if an arbitrary value fill is needed south of 60S. If not specified, value of `Soil texture fill value:` will be used.

`Soil texture force exclusion of water points during fill:` indicates whether to force exclusion of water points when filling soil texture. Required when using STATSGOFAO south of 60S (texture is set to all water) and multiple surface model types are used.
`Soil texture force exclusion of water points during fill:` indicates whether to force exclusion of water points when filling soil texture. Required when using STATSGOFAO, south of 60S (i.e., texture is set to all water), and multiple surface model types (e.g., LSM and Openwater) are used.

[cols="<,<",]
|===
Expand Down Expand Up @@ -1759,7 +1759,7 @@ Curvature number of bands: 1

Topography maps

`Elevation map:` specifies the elevation of the LIS grid. If the elevation map type selected is SRTM_Native, then the elevation file entry is actually just the directory path, which contains the tiled SRTM elevation files.
`Elevation map:` specifies the elevation of the LIS grid. If the elevation map type selected is SRTM_Native, then the elevation file entry is actually just the directory path, which contains the tiled SRTM elevation files. Note: The SRTM tiles only go to 60deg S, and south of that the associated SRTM reader can fill in with GTOPO30 Antarctica tile files.

`Slope map:` specifies the slope of the LIS grid. If the slope map type selected is SRTM_Native, then the file entry is actually just the directory path, which contains the tiled SRTM elevation files.

Expand Down
38 changes: 29 additions & 9 deletions ldt/core/LDT_soilsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ subroutine soils_init_LIS()
enddo

!- Soil texture:
if( check_data) then
if( check_data ) then

do n=1,LDT_rc%nnest
if( INDEX(LDT_LSMparam_struc(n)%texture%source,"STATSGO") > 0 ) then
Expand Down Expand Up @@ -537,9 +537,9 @@ subroutine soils_init_LIS()
end if

! EMK...Allow option to force exclusion of water points when
! filling soil texture. Necessary when using STATSGOFAO south of
! 60S (texture set to all water) and multiple surface model types
! are used.
! filling soil texture. Necessary when using STATSGOFAO, south of
! 60S (i.e., texture set to all water) and multiple surface model types
! (e.g., LSM and Openwater) are used.
! If option not specified, set to false.

call ESMF_ConfigFindLabel(LDT_config, &
Expand All @@ -549,7 +549,17 @@ subroutine soils_init_LIS()
call ESMF_ConfigGetAttribute(LDT_config, soiltext%force_exclude_water, &
label="Soil texture force exclusion of water points during fill:",rc=rc)
else
soiltext%force_exclude_water = .false.
if(( INDEX(LDT_LSMparam_struc(1)%texture%source,"STATSGO") > 0 ) .and. &
( LDT_rc%nsf_model_types > 1 )) then
write(LDT_logunit,*) "[INFO] Setting 'Soil texture force exclusion of water points during fill:'"
write(LDT_logunit,*) " to '.true.', since STATSGOFAO and surface model types > 1 in ldt.config file."
soiltext%force_exclude_water = .true.
else
write(LDT_logunit,*) "[INFO] Setting 'Soil texture force exclusion of water points during fill:'"
write(LDT_logunit,*) " to '.false.', since it is not specified in the ldt.config file and "
write(LDT_logunit,*) " STATSGOFAO is not present nor surface model types > 1."
soiltext%force_exclude_water = .false.
endif
end if

elseif( soiltext%filltype == "none" ) then
Expand Down Expand Up @@ -1239,9 +1249,9 @@ subroutine soils_init_LISHydro(flag)
end if

! EMK...Allow option to force exclusion of water points when
! filling soil texture. Necessary when using STATSGOFAO south of
! 60S (texture set to all water) and multiple surface model types
! are used.
! filling soil texture. Necessary when using STATSGOFAO, south of
! 60S (i.e., texture set to all water) and multiple surface model types
! (e.g., LSM and Openwater) are used.
! If option not specified, set to false.

call ESMF_ConfigFindLabel(LDT_config, &
Expand All @@ -1251,7 +1261,17 @@ subroutine soils_init_LISHydro(flag)
call ESMF_ConfigGetAttribute(LDT_config, soiltext%force_exclude_water, &
label="Soil texture force exclusion of water points during fill:",rc=rc)
else
soiltext%force_exclude_water = .false.
if(( INDEX(LDT_LSMparam_struc(1)%texture%source,"STATSGO") > 0 ) .and. &
( LDT_rc%nsf_model_types > 1 )) then
write(LDT_logunit,*) "[INFO] Setting 'Soil texture force exclusion of water points during fill:'"
write(LDT_logunit,*) " to '.true.', since STATSGOFAO and surface model types > 1 in ldt.config file."
soiltext%force_exclude_water = .true.
else
write(LDT_logunit,*) "[INFO] Setting 'Soil texture force exclusion of water points during fill:'"
write(LDT_logunit,*) " to '.false.', since it is not specified in the ldt.config file and "
write(LDT_logunit,*) " STATSGOFAO is not present nor surface model types > 1."
soiltext%force_exclude_water = .false.
endif
end if

elseif( soiltext%filltype == "none" ) then
Expand Down
4 changes: 4 additions & 0 deletions ldt/params/topo/read_SRTM_Native_aspect.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ subroutine read_SRTM_Native_aspect( n, num_bins, fgrd, aspectave )
! This subroutine retrieves static elevation data from the SRTM source
! and reprojects it to the latlon projection.
!
! NOTE: SRTM "Native" ~1km files do not include areas south of 60degS.
! GTOPO30 elevation tiles can be read in, since they include points
! south of 60degS (Antarctica).
!
! Source information:
! http://dds.cr.usgs.gov/srtm/version2_1/SRTM30/
!
Expand Down
4 changes: 4 additions & 0 deletions ldt/params/topo/read_SRTM_Native_elev.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ subroutine read_SRTM_Native_elev( n, num_bins, fgrd, elevave )
! This subroutine retrieves static elevation data from the SRTM source
! and reprojects it to the latlon projection.
!
! NOTE: SRTM "Native" ~1km files do not include areas south of 60degS.
! GTOPO30 elevation tiles can be read in, since they include points
! south of 60degS (Antarctica).
!
! Source information:
! http://dds.cr.usgs.gov/srtm/version2_1/SRTM30/
!
Expand Down
4 changes: 4 additions & 0 deletions ldt/params/topo/read_SRTM_Native_slope.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ subroutine read_SRTM_Native_slope( n, num_bins, fgrd, slopeave )
! This subroutine retrieves static elevation data from the SRTM source
! and reprojects it to the latlon projection.
!
! NOTE: SRTM "Native" ~1km files do not include areas south of 60degS.
! GTOPO30 elevation tiles can be read in, since they include points
! south of 60degS (Antarctica).
!
! Source information:
! http://dds.cr.usgs.gov/srtm/version2_1/SRTM30/
!
Expand Down
2 changes: 1 addition & 1 deletion lis/core/LIS_domainMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2979,7 +2979,7 @@ subroutine readDomainInput()
deallocate(locallon)

else
write(LIS_logunit,*) '[ERR] ',LIS_rc%paramfile(n), ' does not exist'
write(LIS_logunit,*) '[ERR] ',trim(LIS_rc%paramfile(n)), ' does not exist'
write(LIS_logunit,*) '[ERR] program stopping ...'
call LIS_endrun
endif
Expand Down
2 changes: 1 addition & 1 deletion lis/core/LIS_historyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7295,7 +7295,7 @@ subroutine writeroutingvar_netcdf_real(ftn,ftn_stats, n, var,varid, mvar,&
var1_ens(i,m) = -9999.0
else
var1_ens(i,m) = &
var(t)*LIS_domain(n)%tile(t)%fgrd
var(t)*LIS_routing(n)%tile(t)%fgrd
endif
enddo
enddo
Expand Down
5 changes: 5 additions & 0 deletions lis/core/LIS_surfaceModelMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
! All Rights Reserved.
!-------------------------END NOTICE -- DO NOT EDIT-----------------------
#include "LIS_misc.h"
#include "LIS_plugins.h"
! Macros for tracing - Requires ESMF 7_1_0+
#ifdef ESMF_TRACE
#define TRACE_ENTER(region) call ESMF_TraceRegionEnter(region)
Expand Down Expand Up @@ -1171,12 +1172,15 @@ end subroutine LIS_surfaceModel_reset
!
! !INTERFACE:
subroutine surfaceModel_setexport_noesmf(n)
#if (defined RM_WRF_COUPLING)
! !USES:
use LIS_LMLCMod
use LISWRFGridCompMod, only : LISWRF_export
use LIS_historyMod, only : LIS_tile2grid
#endif
! !ARGUMENTS:
integer, intent(in) :: n
#if (defined RM_WRF_COUPLING)
! !DESCRIPTION:
!
!EOP
Expand Down Expand Up @@ -1237,6 +1241,7 @@ subroutine surfaceModel_setexport_noesmf(n)
call LIS_tile2grid(n,LISWRF_export(n)%xland,LISWRF_export(n)%xland_t)
TRACE_EXIT("sf_setexp")

#endif
end subroutine surfaceModel_setexport_noesmf

end module LIS_surfaceModelMod
12 changes: 7 additions & 5 deletions lis/make/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1215,12 +1215,13 @@ path: surfacemodels/land/clm2,
surfacemodels/land/clm2/main,
surfacemodels/land/clm2/biogeophys,
surfacemodels/land/clm2/ecosysdyn,
surfacemodels/land/clm2/csm_share,
surfacemodels/land/clm2/cpl_wrf_noesmf
dependent_comps: virtual_da
surfacemodels/land/clm2/csm_share
dependent_comps: virtual_da,
WRF coupling
virtual_da path: surfacemodels/land/clm2/da_lst,
surfacemodels/land/clm2/da_snow,
surfacemodels/land/clm2/da_soilm
WRF coupling path: surfacemodels/land/clm2/cpl_wrf_noesmf

[VIC.4.1.1]
enabled: True
Expand Down Expand Up @@ -1692,8 +1693,9 @@ virtual_da path: surfacemodels/land/jules.5.x/da_soilm,
enabled: True
macro: SM_CABLE
path: surfacemodels/land/cable,
surfacemodels/land/cable/physics,
surfacemodels/land/cable/cpl_wrf_noesmf
surfacemodels/land/cable/physics
dependent_comps: WRF coupling
WRF coupling path: surfacemodels/land/cable/cpl_wrf_noesmf

[FASST]
enabled: False
Expand Down
2 changes: 1 addition & 1 deletion lis/metforcing/genMetForc/get_metForcGenerated.F90
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ subroutine get_metForcGenerated(n, findex)
LIS_rc%rstflag(n) == 1 ) then
LIS_rc%rstflag(n) = 0
retrieve_file2 = .true.
write(LIS_logunit,*)" [ERR] Currently Forcing 1 File is NOT opened in first timestep ..."
write(LIS_logunit,*)" [INFO] Forcing 1 file is NOT opened in first timestep ..."
endif

!- Retrieve LDT-generated Forcing File 2:
Expand Down
10 changes: 6 additions & 4 deletions lis/surfacemodels/land/template/template_f2t.F90
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@ subroutine template_f2t(n)
if(LIS_FORC_Psurf%selectOpt.eq.1) then
template_struc(n)%template(t)%psurf=psurf(tid)
endif
if(pcp(tid).ne.LIS_rc%udef) then
template_struc(n)%template(t)%rainf=pcp(tid)
else
template_struc(n)%template(t)%rainf=0.0
if(LIS_FORC_Rainf%selectOpt.eq.1) then
if(pcp(tid).ne.LIS_rc%udef) then
template_struc(n)%template(t)%rainf=pcp(tid)
else
template_struc(n)%template(t)%rainf=0.0
endif
endif
if(LIS_FORC_CRainf%selectOpt.eq.1) then
if(cpcp(tid).ne.LIS_rc%udef) then
Expand Down

0 comments on commit 8ea7b40

Please sign in to comment.