Skip to content

Commit 6e9e361

Browse files
authored
add vegetation_type to the chemistry export (#888)
* add vegetation_type to the chemistry export * more updates for vegtype
1 parent b604f35 commit 6e9e361

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

atmos_model.F90

+9-3
Original file line numberDiff line numberDiff line change
@@ -1342,7 +1342,7 @@ subroutine update_atmos_chemistry(state, rc)
13421342
real(ESMF_KIND_R8), dimension(:,:), pointer :: aod, area, canopy, cmm, &
13431343
dqsfc, dtsfc, fice, flake, focn, fsnow, hpbl, nswsfc, oro, psfc, &
13441344
q2m, rain, rainc, rca, shfsfc, slmsk, stype, swet, t2m, tsfc, &
1345-
u10m, uustar, v10m, vfrac, xlai, zorl
1345+
u10m, uustar, v10m, vfrac, xlai, zorl, vtype
13461346

13471347
! logical, parameter :: diag = .true.
13481348

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

1603+
call cplFieldGet(state,'vegetation_type', farrayPtr2d=vtype, rc=localrc)
1604+
if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, &
1605+
line=__LINE__, file=__FILE__, rcToReturn=rc)) return
1606+
16031607
else
16041608

16051609
call cplFieldGet(state,'inst_liq_nonconv_tendency_levels', &
@@ -1725,6 +1729,7 @@ subroutine update_atmos_chemistry(state, rc)
17251729
! stype(i,j) = real(int( GFS_Data(nb)%Sfcprop%stype(ix)+0.5 ), kind=ESMF_KIND_R8)
17261730
!endif
17271731
stype = real(int(reshape(GFS_Sfcprop%stype, shape(stype))+0.5), kind=ESMF_KIND_R8)
1732+
vtype = real(int(reshape(GFS_Sfcprop%vtype, shape(vtype))+0.5), kind=ESMF_KIND_R8)
17281733
if (GFS_Control%isot == 1) then
17291734
where (slmsk == 2) stype = 16._ESMF_KIND_R8
17301735
else
@@ -1811,6 +1816,7 @@ subroutine update_atmos_chemistry(state, rc)
18111816
write(6,'("update_atmos: vfrac - min/max/avg",3g16.6)') minval(vfrac), maxval(vfrac), sum(vfrac)/size(vfrac)
18121817
write(6,'("update_atmos: xlai - min/max/avg",3g16.6)') minval(xlai), maxval(xlai), sum(xlai)/size(xlai)
18131818
write(6,'("update_atmos: stype - min/max/avg",3g16.6)') minval(stype), maxval(stype), sum(stype)/size(stype)
1819+
write(6,'("update_atmos: vtype - min/max/avg",3g16.6)') minval(vtype), maxval(vtype), sum(vtype)/size(vtype)
18141820
else
18151821
write(6,'("update_atmos: flake - min/max/avg",3g16.6)') minval(flake), maxval(flake), sum(flake)/size(flake)
18161822
write(6,'("update_atmos: focn - min/max/avg",3g16.6)') minval(focn), maxval(focn), sum(focn)/size(focn)
@@ -3344,7 +3350,7 @@ subroutine setup_exportdata(rc)
33443350
!--- Instantaneous quantities
33453351
! Instantaneous mean layer pressure (Pa)
33463352
case ('inst_pres_levels')
3347-
call block_data_copy_or_fill(datar83d, GFS_statein%prsl, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
3353+
call block_data_copy_or_fill(datar83d, GFS_statein%prsl, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
33483354
! Instantaneous geopotential at model layer centers (m2 s-2)
33493355
case ('inst_geop_levels')
33503356
call block_data_copy_or_fill(datar83d, GFS_statein%phil, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
@@ -3356,7 +3362,7 @@ subroutine setup_exportdata(rc)
33563362
call block_data_copy_or_fill(datar83d, GFS_statein%vgrs, zeror8, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
33573363
! Instantaneous surface roughness length (cm)
33583364
case ('inst_surface_roughness')
3359-
call block_data_copy(datar82d, GFS_sfcprop%zorl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
3365+
call block_data_copy(datar82d, GFS_sfcprop%zorl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)
33603366
! Instantaneous u wind (m/s) 10 m above ground
33613367
case ('inst_zonal_wind_height10m')
33623368
call block_data_copy(datar82d, GFS_coupling%u10mi_cpl, Atm_block, nb, offset=GFS_Control%chunk_begin(nb), rc=localrc)

cpl/module_cplfields.F90

+6-1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ module module_cplfields
125125
FieldInfo("inst_temp_height_lowest_from_phys ", "s"), &
126126
FieldInfo("inst_exner_function_height_lowest ", "s"), &
127127
FieldInfo("surface_friction_velocity ", "s"), &
128+
! FieldInfo("fraction_of_vegetation_category ", "s"), &
129+
! FieldInfo("number_of_vegetation_categories ", "s"), &
128130

129131

130132
! For JEDI
@@ -274,7 +276,10 @@ module module_cplfields
274276
"leaf_area_index ", &
275277
"soil_type ", &
276278
"temperature_of_soil_layer ", &
277-
"height " &
279+
"height ", &
280+
"vegetation_type " &
281+
! "number_of_vegetation_categories ", &
282+
! "fraction_of_vegetation_category " &
278283
]
279284

280285
! Methods

0 commit comments

Comments
 (0)