Skip to content

Commit

Permalink
Merge pull request #730 from climbfuji/vegetation_soil_slope_type_int…
Browse files Browse the repository at this point in the history
…eger

Convert real(kind_phys) vegetation, slope and soil type arrays into integer arrays
  • Loading branch information
climbfuji authored Oct 4, 2021
2 parents 3c23577 + 71832db commit 2ececb0
Show file tree
Hide file tree
Showing 23 changed files with 600 additions and 326 deletions.
180 changes: 86 additions & 94 deletions physics/GFS_debug.F90

Large diffs are not rendered by default.

37 changes: 5 additions & 32 deletions physics/GFS_debug.meta
Original file line number Diff line number Diff line change
Expand Up @@ -604,51 +604,24 @@
intent = in
optional = F
[stype]
standard_name = soil_type_classification_real
long_name = soil type for lsm
units = index
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[vtype]
standard_name = vegetation_type_classification_real
long_name = vegetation type for lsm
units = index
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[slope]
standard_name = surface_slope_classification_real
long_name = sfc slope type for lsm
units = index
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[soiltyp]
standard_name = soil_type_classification
long_name = soil type at each grid cell
long_name = soil type for lsm
units = index
dimensions = (horizontal_loop_extent)
type = integer
intent = in
optional = F
[vegtype]
[vtype]
standard_name = vegetation_type_classification
long_name = vegetation type at each grid cell
long_name = vegetation type for lsm
units = index
dimensions = (horizontal_loop_extent)
type = integer
intent = in
optional = F
[slopetyp]
[slope]
standard_name = surface_slope_classification
long_name = surface slope type at each grid cell
long_name = sfc slope type for lsm
units = index
dimensions = (horizontal_loop_extent)
type = integer
Expand Down
11 changes: 6 additions & 5 deletions physics/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ subroutine GFS_phys_time_vary_init (

integer, intent(in) :: isot, ivegsrc, nlunit
real(kind_phys), intent(inout) :: sncovr(:), sncovr_ice(:)
integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc
integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc, vtype(:)
real(kind_phys), intent(in) :: min_seaice, fice(:)
real(kind_phys), intent(in) :: landfrac(:), vtype(:)
real(kind_phys), intent(in) :: landfrac(:)
real(kind_phys), intent(inout) :: weasd(:)

! NoahMP - only allocated when NoahMP is used
Expand Down Expand Up @@ -165,7 +165,7 @@ subroutine GFS_phys_time_vary_init (
real(kind_phys), intent(in) :: snowd(:)
real(kind_phys), intent(in) :: canopy(:)
real(kind_phys), intent(in) :: tg3(:)
real(kind_phys), intent(in) :: stype(:)
integer, intent(in) :: stype(:)
real(kind_phys), intent(in) :: con_t0c

integer, intent(in) :: nthrds
Expand Down Expand Up @@ -765,9 +765,10 @@ subroutine GFS_phys_time_vary_timestep_init (
tslb(:,:), tiice(:,:), tg3(:), tref(:), &
tsfc(:), tsfco(:), tisfc(:), hice(:), fice(:), &
facsf(:), facwf(:), alvsf(:), alvwf(:), alnsf(:), alnwf(:), &
zorli(:), zorll(:), zorlo(:), weasd(:), slope(:), snoalb(:), &
canopy(:), vfrac(:), vtype(:), stype(:), shdmin(:), shdmax(:), &
zorli(:), zorll(:), zorlo(:), weasd(:), snoalb(:), &
canopy(:), vfrac(:), shdmin(:), shdmax(:), &
snowd(:), cv(:), cvb(:), cvt(:), oro(:), oro_uf(:), slmsk(:)
integer, intent(inout) :: vtype(:), stype(:), slope(:)

character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg
Expand Down
25 changes: 10 additions & 15 deletions physics/GFS_phys_time_vary.fv3.meta
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,11 @@
intent = in
optional = F
[vtype]
standard_name = vegetation_type_classification_real
standard_name = vegetation_type_classification
long_name = vegetation type for lsm
units = index
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
type = integer
intent = in
optional = F
[weasd]
Expand Down Expand Up @@ -963,12 +962,11 @@
intent = in
optional = F
[stype]
standard_name = soil_type_classification_real
standard_name = soil_type_classification
long_name = soil type for lsm
units = index
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
type = integer
intent = in
optional = F
[con_t0c]
Expand Down Expand Up @@ -1863,12 +1861,11 @@
intent = inout
optional = F
[slope]
standard_name = surface_slope_classification_real
standard_name = surface_slope_classification
long_name = sfc slope type for lsm
units = index
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
type = integer
intent = inout
optional = F
[snoalb]
Expand Down Expand Up @@ -1899,21 +1896,19 @@
intent = inout
optional = F
[vtype]
standard_name = vegetation_type_classification_real
standard_name = vegetation_type_classification
long_name = vegetation type for lsm
units = index
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
type = integer
intent = inout
optional = F
[stype]
standard_name = soil_type_classification_real
standard_name = soil_type_classification
long_name = soil type for lsm
units = index
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
type = integer
intent = inout
optional = F
[shdmin]
Expand Down
5 changes: 3 additions & 2 deletions physics/GFS_phys_time_vary.scm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ subroutine GFS_phys_time_vary_init (
real(kind_phys), intent(inout) :: sncovr(:), sncovr_ice(:)
integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc
real(kind_phys), intent(in) :: min_seaice, fice(:)
real(kind_phys), intent(in) :: landfrac(:), vtype(:)
real(kind_phys), intent(in) :: landfrac(:)
integer, intent(in) :: vtype(:)
real(kind_phys), intent(inout) :: weasd(:)

! NoahMP - only allocated when NoahMP is used
Expand Down Expand Up @@ -159,7 +160,7 @@ subroutine GFS_phys_time_vary_init (
real(kind_phys), intent(in) :: snowd(:)
real(kind_phys), intent(in) :: canopy(:)
real(kind_phys), intent(in) :: tg3(:)
real(kind_phys), intent(in) :: stype(:)
integer, intent(in) :: stype(:)
real(kind_phys), intent(in) :: con_t0c

integer, intent(in) :: nthrds
Expand Down
10 changes: 4 additions & 6 deletions physics/GFS_phys_time_vary.scm.meta
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,11 @@
intent = in
optional = F
[vtype]
standard_name = vegetation_type_classification_real
standard_name = vegetation_type_classification
long_name = vegetation type for lsm
units = index
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
type = integer
intent = in
optional = F
[weasd]
Expand Down Expand Up @@ -963,12 +962,11 @@
intent = in
optional = F
[stype]
standard_name = soil_type_classification_real
standard_name = soil_type_classification
long_name = soil type for lsm
units = index
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
type = integer
intent = in
optional = F
[con_t0c]
Expand Down
8 changes: 4 additions & 4 deletions physics/GFS_radiation_surface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ end subroutine GFS_radiation_surface_init
!!
subroutine GFS_radiation_surface_run ( &
im, frac_grid, lslwr, lsswr, lsm, lsm_noahmp, lsm_ruc, &
vtype, xlat, xlon, slmsk, lndp_type, n_var_lndp, sfc_alb_pert, &
xlat, xlon, slmsk, lndp_type, n_var_lndp, sfc_alb_pert, &
lndp_var_list, lndp_prt_list, landfrac, snowd, sncovr, &
sncovr_ice, fice, zorl, hprime, tsfg, tsfa, tisfc, coszen, &
min_seaice, min_lakeice, lakefrac, &
Expand All @@ -78,9 +78,9 @@ subroutine GFS_radiation_surface_run ( &
integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc, lndp_type, n_var_lndp
real(kind=kind_phys), intent(in) :: min_seaice, min_lakeice

real(kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, vtype, slmsk, &
real(kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, slmsk, &
sfc_alb_pert, lndp_prt_list, &
landfrac, lakefrac, &
landfrac, lakefrac, &
snowd, sncovr, &
sncovr_ice, fice, zorl, &
hprime, tsfg, tsfa, tisfc, &
Expand Down Expand Up @@ -158,7 +158,7 @@ subroutine GFS_radiation_surface_run ( &
if (lslwr) then
!> - Call module_radiation_surface::setemis(),to set up surface
!! emissivity for LW radiation.
call setemis (lsm, lsm_noahmp, lsm_ruc, vtype, &
call setemis (lsm, lsm_noahmp, lsm_ruc, &
frac_grid, xlon, xlat, slmsk, &
! frac_grid, min_seaice, xlon, xlat, slmsk, &
snowd, sncovr, sncovr_ice, zorl, tsfg, tsfa, &
Expand Down
9 changes: 0 additions & 9 deletions physics/GFS_radiation_surface.meta
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,6 @@
type = integer
intent = in
optional = F
[vtype]
standard_name = vegetation_type_classification_real
long_name = vegetation type for lsm
units = index
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[xlat]
standard_name = latitude
long_name = latitude
Expand Down
2 changes: 1 addition & 1 deletion physics/GFS_rrtmgp_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = GFS_rrtmgp_pre
type = scheme
dependencies = funcphys.f90,iounitdef.f,machine.F,module_bfmicrophysics.f,physcons.F90,physparam.f,radcons.f90,radiation_aerosols.f
dependencies = radiation_astronomy.f,radiation_clouds.f,module_mp_thompson.F90,radiation_gases.f,radiation_surface.f,radiation_tools.F90,rrtmg_lw_cloud_optics.F90
dependencies = radiation_astronomy.f,radiation_clouds.f,radiation_gases.f,radiation_tools.F90,rrtmg_lw_cloud_optics.F90

########################################################################
[ccpp-arg-table]
Expand Down
Loading

0 comments on commit 2ececb0

Please sign in to comment.