Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of the new static information: BNU soil types and 15" MODIS landuse #1252

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
2 changes: 2 additions & 0 deletions src/core_atmosphere/physics/mpas_atmphys_landuse.F
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ subroutine landuse_init_forMPAS(dminfo,julday,mesh,configs,diag_physics,sfc_inpu
isurban = 1
case('MODIFIED_IGBP_MODIS_NOAH')
isurban = 13
case('MODIFIED_IGBP_MODIS_NOAH_15s')
isurban = 13
case('SiB')
isurban = 11
case('LW12')
Expand Down
17 changes: 16 additions & 1 deletion src/core_init_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@
description="The number of months in a year"
possible_values="Positive integer values"/>

<nml_option name="config_nsoilcat" type="integer" default_value="16"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like config_nsoilcat is used anywhere, so it seems like we could remove it from this PR branch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mgduda Mike, this variable will be used in the following PRs that will compute the fractional content of soil types in each grid cell. And the 3-d array of fractional soil types will be dimensioned as nsoilcat.

units='-'
description="The number of soil categories used by the LSM."
possible_values="16"/>

</nml_record>

<nml_record name="data_sources" in_defaults="true">
Expand Down Expand Up @@ -166,6 +171,11 @@
description="The land use classification to use (case 7 only)"
possible_values="`USGS' or `MODIFIED_IGBP_MODIS_NOAH'"/>

<nml_option name="config_soilcat_data" type="character" default_value="STATSGO"
units="-"
description="The soil category classification to use"
possible_values="`STATSGO' or `BNU'"/>

<nml_option name="config_topo_data" type="character" default_value="GMTED2010"
units="-"
description="The topography dataset to use for the model terrain and for GWDO static fields (case 7 only)"
Expand All @@ -191,9 +201,14 @@
description="The supersampling factor to be used for MODIS maximum snow albedo and monthly albedo datasets (case 7 only)"
possible_values="Positive integer values"/>

<nml_option name="config_lu_supersample_factor" type="integer" default_value="1"
units="-"
description="The supersampling factor to be used for 30s or 15s MODIS land use (case 7 only)"
possible_values="Positive integer values"/>

<nml_option name="config_30s_supersample_factor" type="integer" default_value="1"
units="-"
description="The supersampling factor to be used for 30s terrain, MODIS land use, soil category, and MODIS FPAR monthly vegetation fraction (case 7 only)"
description="The supersampling factor to be used for 30s terrain, soil category, and MODIS FPAR monthly vegetation fraction (case 7 only)"
possible_values="Positive integer values"/>

<nml_option name="config_use_spechumd" type="logical" default_value="false"
Expand Down
29 changes: 27 additions & 2 deletions src/core_init_atmosphere/mpas_init_atm_static.F
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ subroutine init_atm_static(mesh, dims, configs)
character(len=StrKIND), pointer :: config_vegfrac_data
character(len=StrKIND), pointer :: config_albedo_data
character(len=StrKIND), pointer :: config_maxsnowalbedo_data
character(len=StrKIND), pointer :: config_soilcat_data
character(len=StrKIND+1) :: geog_data_path ! same as config_geog_data_path, but guaranteed to have a trailing slash
character(len=StrKIND+1) :: geog_sub_path ! subdirectory names in config_geog_data_path, with trailing slash

Expand All @@ -143,6 +144,7 @@ subroutine init_atm_static(mesh, dims, configs)
type(c_ptr) :: rarray_ptr

integer, pointer :: supersample_fac
integer, pointer :: supersample_fac_lu
integer, pointer :: supersample_fac_30s

real(kind=RKIND):: lat,lon,x,y
Expand Down Expand Up @@ -213,11 +215,13 @@ subroutine init_atm_static(mesh, dims, configs)

call mpas_pool_get_config(configs, 'config_geog_data_path', config_geog_data_path)
call mpas_pool_get_config(configs, 'config_landuse_data', config_landuse_data)
call mpas_pool_get_config(configs, 'config_soilcat_data', config_soilcat_data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the definition of config_soilcat_data is missing from the Registry.xml file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mike, sorry about that. I added config_soilcat_data to the Registry.xml

call mpas_pool_get_config(configs, 'config_topo_data', config_topo_data)
call mpas_pool_get_config(configs, 'config_vegfrac_data', config_vegfrac_data)
call mpas_pool_get_config(configs, 'config_albedo_data', config_albedo_data)
call mpas_pool_get_config(configs, 'config_maxsnowalbedo_data', config_maxsnowalbedo_data)
call mpas_pool_get_config(configs, 'config_supersample_factor', supersample_fac)
call mpas_pool_get_config(configs, 'config_supersample_fac_lu', supersample_fac_lu)
call mpas_pool_get_config(configs, 'config_30s_supersample_factor', supersample_fac_30s)

write(geog_data_path, '(a)') config_geog_data_path
Expand Down Expand Up @@ -350,11 +354,14 @@ subroutine init_atm_static(mesh, dims, configs)
write(mminlu,'(a)') 'USGS'
case('MODIFIED_IGBP_MODIS_NOAH')
write(mminlu,'(a)') 'MODIFIED_IGBP_MODIS_NOAH'
case('MODIFIED_IGBP_MODIS_NOAH_15s')
write(mminlu,'(a)') 'MODIFIED_IGBP_MODIS_NOAH_15s'
case default
call mpas_log_write('*****************************************************************', messageType=MPAS_LOG_ERR)
call mpas_log_write('Invalid land use dataset '''//trim(config_landuse_data) &
//''' selected for config_landuse_data', messageType=MPAS_LOG_ERR)
call mpas_log_write(' Possible options are: ''USGS'', ''MODIFIED_IGBP_MODIS_NOAH''', messageType=MPAS_LOG_ERR)
call mpas_log_write(' '' MODIFIED_IGBP_MODIS_NOAH_15s''', messageType=MPAS_LOG_ERR)
call mpas_log_write('*****************************************************************', messageType=MPAS_LOG_ERR)
call mpas_log_write('Please correct the namelist.', messageType=MPAS_LOG_CRIT)
end select surface_input_select0
Expand Down Expand Up @@ -394,24 +401,42 @@ subroutine init_atm_static(mesh, dims, configs)
case('MODIFIED_IGBP_MODIS_NOAH')
call mpas_log_write('Using 20-class MODIS 30-arc-second land cover dataset')
geog_sub_path = 'modis_landuse_20class_30s/'
case('MODIFIED_IGBP_MODIS_NOAH_15s')
call mpas_log_write('Using 20-class MODIS 15-arc-second land cover dataset')
geog_sub_path = 'modis_landuse_20class_15s/'
case default
call mpas_log_write('*****************************************************************', messageType=MPAS_LOG_ERR)
call mpas_log_write('Invalid land use dataset '''//trim(config_landuse_data) &
//''' selected for config_landuse_data', messageType=MPAS_LOG_ERR)
call mpas_log_write(' Possible options are: ''USGS'', ''MODIFIED_IGBP_MODIS_NOAH''', messageType=MPAS_LOG_ERR)
call mpas_log_write(' '' MODIFIED_IGBP_MODIS_NOAH_15s''', messageType=MPAS_LOG_ERR)
call mpas_log_write('*****************************************************************', messageType=MPAS_LOG_ERR)
call mpas_log_write('Please correct the namelist.', messageType=MPAS_LOG_CRIT)
end select surface_input_select1

call mpas_log_write('--- start interpolate LU_INDEX')
call interp_landuse(mesh, tree, trim(geog_data_path)//trim(geog_sub_path), isice_lu, iswater_lu, &
supersample_fac=supersample_fac_30s)
supersample_fac=supersample_fac_lu)
call mpas_log_write('--- end interpolate LU_INDEX')

!
! Interpolate SOILCAT_TOP
select case(trim(config_soilcat_data))
case('STASGO')
call mpas_log_write('Using STATSGO 30-arc-second soil type dataset')
geog_sub_path = 'soiltype_top_30s/'
case('BNU')
call mpas_log_write('Using BNU 30-arc-second soil type dataset')
geog_sub_path = 'bnu_soiltype_top/'
case default
call mpas_log_write('*****************************************************************',messageType=MPAS_LOG_ERR)
call mpas_log_write('Invalid soil type dataset'''//trim(config_soilcat_data) &
//''' selected for config_soilcat_data', messageType=MPAS_LOG_ERR)
call mpas_log_write(' Possible options are: ''STASGO'',''BNU''', messageType=MPAS_LOG_ERR)
call mpas_log_write('*****************************************************************',messageType=MPAS_LOG_ERR)
call mpas_log_write('Please correct the namelist.', messageType=MPAS_LOG_CRIT)
end select
!
geog_sub_path = 'soiltype_top_30s/'

call mpas_log_write('--- start interpolate SOILCAT_TOP')
call interp_soilcat(mesh, tree, trim(geog_data_path)//trim(geog_sub_path), iswater_soil, &
Expand Down