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

Feature/vegtype export #888

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
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
12 changes: 9 additions & 3 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ subroutine update_atmos_chemistry(state, rc)
real(ESMF_KIND_R8), dimension(:,:), pointer :: aod, area, canopy, cmm, &
dqsfc, dtsfc, fice, flake, focn, fsnow, hpbl, nswsfc, oro, psfc, &
q2m, rain, rainc, rca, shfsfc, slmsk, stype, swet, t2m, tsfc, &
u10m, uustar, v10m, vfrac, xlai, zorl
u10m, uustar, v10m, vfrac, xlai, zorl, vtype

! logical, parameter :: diag = .true.

Expand Down Expand Up @@ -1600,6 +1600,10 @@ subroutine update_atmos_chemistry(state, rc)
if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, file=__FILE__, rcToReturn=rc)) return

call cplFieldGet(state,'vegetation_type', farrayPtr2d=vtype, rc=localrc)
if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, file=__FILE__, rcToReturn=rc)) return

else

call cplFieldGet(state,'inst_liq_nonconv_tendency_levels', &
Expand Down Expand Up @@ -1725,6 +1729,7 @@ subroutine update_atmos_chemistry(state, rc)
! stype(i,j) = real(int( GFS_Data(nb)%Sfcprop%stype(ix)+0.5 ), kind=ESMF_KIND_R8)
!endif
stype = real(int(reshape(GFS_Sfcprop%stype, shape(stype))+0.5), kind=ESMF_KIND_R8)
vtype = real(int(reshape(GFS_Sfcprop%vtype, shape(vtype))+0.5), kind=ESMF_KIND_R8)
if (GFS_Control%isot == 1) then
where (slmsk == 2) stype = 16._ESMF_KIND_R8
else
Expand Down Expand Up @@ -1811,6 +1816,7 @@ subroutine update_atmos_chemistry(state, rc)
write(6,'("update_atmos: vfrac - min/max/avg",3g16.6)') minval(vfrac), maxval(vfrac), sum(vfrac)/size(vfrac)
write(6,'("update_atmos: xlai - min/max/avg",3g16.6)') minval(xlai), maxval(xlai), sum(xlai)/size(xlai)
write(6,'("update_atmos: stype - min/max/avg",3g16.6)') minval(stype), maxval(stype), sum(stype)/size(stype)
write(6,'("update_atmos: vtype - min/max/avg",3g16.6)') minval(vtype), maxval(vtype), sum(vtype)/size(vtype)
else
write(6,'("update_atmos: flake - min/max/avg",3g16.6)') minval(flake), maxval(flake), sum(flake)/size(flake)
write(6,'("update_atmos: focn - min/max/avg",3g16.6)') minval(focn), maxval(focn), sum(focn)/size(focn)
Expand Down Expand Up @@ -3344,7 +3350,7 @@ subroutine setup_exportdata(rc)
!--- Instantaneous quantities
! Instantaneous mean layer pressure (Pa)
case ('inst_pres_levels')
call block_data_copy_or_fill(datar83d, GFS_statein%prsl, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
call block_data_copy_or_fill(datar83d, GFS_statein%prsl, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! Instantaneous geopotential at model layer centers (m2 s-2)
case ('inst_geop_levels')
call block_data_copy_or_fill(datar83d, GFS_statein%phil, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
Expand All @@ -3356,7 +3362,7 @@ subroutine setup_exportdata(rc)
call block_data_copy_or_fill(datar83d, GFS_statein%vgrs, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! Instantaneous surface roughness length (cm)
case ('inst_surface_roughness')
call block_data_copy(datar82d, GFS_sfcprop%zorl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
call block_data_copy(datar82d, GFS_sfcprop%zorl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
! Instantaneous u wind (m/s) 10 m above ground
case ('inst_zonal_wind_height10m')
call block_data_copy(datar82d, GFS_coupling%u10mi_cpl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
Expand Down
7 changes: 6 additions & 1 deletion cpl/module_cplfields.F90
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ module module_cplfields
FieldInfo("inst_temp_height_lowest_from_phys ", "s"), &
FieldInfo("inst_exner_function_height_lowest ", "s"), &
FieldInfo("surface_friction_velocity ", "s"), &
! FieldInfo("fraction_of_vegetation_category ", "s"), &
! FieldInfo("number_of_vegetation_categories ", "s"), &


! For JEDI
Expand Down Expand Up @@ -274,7 +276,10 @@ module module_cplfields
"leaf_area_index ", &
"soil_type ", &
"temperature_of_soil_layer ", &
"height " &
"height ", &
"vegetation_type " &
! "number_of_vegetation_categories ", &
! "fraction_of_vegetation_category " &
]

! Methods
Expand Down
Loading