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

Convert real(kind_phys) vegetation, slope and soil type arrays into integer arrays #730

Merged
merged 13 commits into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from 10 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
172 changes: 82 additions & 90 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
Loading