Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/source/ufs_utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ Program execution is controlled via a namelist. The namelist variables are:
* input_snowfree_albedo_file - path/name of input snow-free albedo data
* input_slope_type_file - path/name of input global slope type data
* input_soil_type_file - path/name of input soil type data
* input_soil_color_file - path/name of input soil color data
* input_vegetation_type_file - path/name of vegetation type data
* input_vegetation_greenness_file - path/name of monthly vegetation greenness data
* mosaic_file_mdl - path/name of the model mosaic file
Expand All @@ -524,6 +525,7 @@ The surface climatological data is located here `./fix/fix_sfc_climo <https://no
* Global 2.6 x 1.5-degree soil substrate temperature - substrate_temperature.2.6x1.5.nc
* Global 0.05-degree four component monthly snow-free albedo - snowfree_albedo.4comp.0.05.nc
* Global 1.0-degree categorical slope type - slope_type.1.0.nc
* Global 0.05-degree CLM soil color (Lawrence and Chase, 2007 JGR) - soil_color.clm.0.05.nc
* Categorical STATSGO soil type
* Global 0.05-degree - soil_type.statsgo.0.05.nc
* Global 0.03-degree - soil_type.statsgo.0.03.nc
Expand Down Expand Up @@ -562,6 +564,7 @@ All files with and without halo (all NetCDF).
* Snow free albedo - CRES_snowfree_albedo.tile#.halo#.nc
* Slope type - CRES_slope_type.tile#.halo#.nc
* Soil type - CRES_soil_type.tile#.halo#.nc
* Soil color - CRES_soil_color.tile#.halo#.nc
* Vegetation type - CRES_vegetation_type.tile#.halo#.nc
* Vegetation greenness - CRES_vegetation_greenness.tile#.halo#.nc

Expand Down
10 changes: 10 additions & 0 deletions sorc/sfc_climo_gen.fd/driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ program driver
call source_grid_cleanup
endif

! Soil color

if (trim(input_soil_color_file) /= "NULL") then
call define_source_grid(localpet, npets, input_soil_color_file)
method=ESMF_REGRIDMETHOD_NEAREST_STOD
call interp(localpet, method, input_soil_color_file)
call source_grid_cleanup
endif


! Vegetation greenness

if (trim(input_vegetation_greenness_file) /= "NULL") then
Expand Down
15 changes: 12 additions & 3 deletions sorc/sfc_climo_gen.fd/interp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ subroutine interp(localpet, method, input_file)
! These fields are adjusted at landice.

select case (trim(field_names(n)))
case ('substrate_temperature','vegetation_greenness','leaf_area_index','slope_type','soil_type')
case ('substrate_temperature','vegetation_greenness','leaf_area_index','slope_type','soil_type','soil_color')
if (localpet == 0) then
allocate(vegt_mdl_one_tile(i_mdl,j_mdl))
else
Expand Down Expand Up @@ -219,7 +219,7 @@ subroutine interp(localpet, method, input_file)
call error_handler("IN FieldGather.", rc)

select case (trim(field_names(n)))
case ('substrate_temperature','vegetation_greenness','leaf_area_index','slope_type','soil_type')
case ('substrate_temperature','vegetation_greenness','leaf_area_index','slope_type','soil_type','soil_color')
print*,"- CALL FieldGather FOR MODEL GRID VEG TYPE."
call ESMF_FieldGather(vegt_field_mdl, vegt_mdl_one_tile, rootPet=0, tile=tile, rc=rc)
if(ESMF_logFoundError(rcToCheck=rc,msg=ESMF_LOGERR_PASSTHRU,line=__LINE__,file=__FILE__)) &
Expand All @@ -230,7 +230,7 @@ subroutine interp(localpet, method, input_file)
print*,'- CALL SEARCH FOR TILE ',tile
call search (data_mdl_one_tile, mask_mdl_one_tile, i_mdl, j_mdl, tile, field_names(n))
select case (field_names(n))
case ('substrate_temperature','vegetation_greenness','leaf_area_index','slope_type','soil_type')
case ('substrate_temperature','vegetation_greenness','leaf_area_index','slope_type','soil_type','soil_color')
call adjust_for_landice (data_mdl_one_tile, vegt_mdl_one_tile, i_mdl, j_mdl, field_names(n))
end select
where(mask_mdl_one_tile == 0) data_mdl_one_tile = missing
Expand Down Expand Up @@ -344,6 +344,15 @@ subroutine adjust_for_landice(field, vegt, idim, jdim, field_ch)
endif
enddo
enddo
case ('soil_color') ! soil color
landice_value = 10.0
do j = 1, jdim
do i = 1, idim
if (nint(vegt(i,j)) == landice) then
field(i,j) = landice_value
endif
enddo
enddo
case default
print*,'- FATAL ERROR IN ROUTINE ADJUST_FOR_LANDICE. UNIDENTIFIED FIELD : ', field_ch
call mpi_abort(mpi_comm_world, 57, ierr)
Expand Down
3 changes: 3 additions & 0 deletions sorc/sfc_climo_gen.fd/output.f90
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ subroutine output(data_one_tile, lat_one_tile, lon_one_tile, i_mdl, j_mdl, &
case ('soil_type')
out_file = "./soil_type." // grid_tiles(tile) // ".nc"
out_file_with_halo = "./soil_type." // grid_tiles(tile) // ".halo.nc"
case ('soil_color')
out_file = "./soil_color." // grid_tiles(tile) // ".nc"
out_file_with_halo = "./soil_color." // grid_tiles(tile) // ".halo.nc"
case ('vegetation_type')
out_file = "./vegetation_type." // grid_tiles(tile) // ".nc"
out_file_with_halo = "./vegetation_type." // grid_tiles(tile) // ".halo.nc"
Expand Down
3 changes: 2 additions & 1 deletion sorc/sfc_climo_gen.fd/program_setup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module program_setup
character(len=500), public :: input_snowfree_albedo_file = "NULL" !< File containing input snow-free albedo data.
character(len=500), public :: input_slope_type_file = "NULL" !< File containing input slope type data.
character(len=500), public :: input_soil_type_file = "NULL" !< File containing input soil type data.
character(len=500), public :: input_soil_color_file = "NULL" !< File containing input soil color data.
character(len=500), public :: input_vegetation_type_file = "NULL" !< File containing input vegetation type data.
character(len=500), public :: input_vegetation_greenness_file = "NULL" !< File containing input vegetation greenness data.
character(len=500), public :: mosaic_file_mdl = "NULL" !< Model grid mosaic file.
Expand Down Expand Up @@ -63,7 +64,7 @@ subroutine read_setup_namelist(localpet)

namelist /config/ input_facsf_file, input_substrate_temperature_file, &
input_maximum_snow_albedo_file, input_snowfree_albedo_file, &
input_slope_type_file, input_soil_type_file, &
input_slope_type_file, input_soil_type_file, input_soil_color_file,&
input_leaf_area_index_file, input_vegetation_type_file, &
input_vegetation_greenness_file, mosaic_file_mdl, &
orog_dir_mdl, orog_files_mdl, halo, &
Expand Down
2 changes: 2 additions & 0 deletions sorc/sfc_climo_gen.fd/search.f90
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ subroutine search (field, mask, idim, jdim, tile, field_name)
default_value = float(1)
case ('soil_type') ! soil type
default_value = float(2)
case ('soil_color') ! soil color
default_value = float(4)
case ('vegetation_type') ! vegetation type
default_value = float(3)
case default
Expand Down
1 change: 1 addition & 0 deletions ush/sfc_climo_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ input_maximum_snow_albedo_file="${input_sfc_climo_dir}/maximum_snow_albedo.0.05.
input_snowfree_albedo_file="${input_sfc_climo_dir}/snowfree_albedo.4comp.0.05.nc"
input_slope_type_file="${input_sfc_climo_dir}/slope_type.1.0.nc"
input_soil_type_file="${SOIL_TYPE_FILE}"
input_soil_color_file="${input_sfc_climo_dir}/soil_color.clm.0.05.nc"
input_vegetation_type_file="${VEG_TYPE_FILE}"
input_vegetation_greenness_file="${input_sfc_climo_dir}/vegetation_greenness.0.144.nc"
mosaic_file_mdl="$mosaic_file"
Expand Down