Skip to content

Commit 43c565b

Browse files
committed
Introduce diagnostic variables for CABLE outputs
Note that some biogeophysics diagnostic variables overlap with CASA-CNP diagnostic variables, e.g. `canopy%fgpp` and `canopy%fnpp`. When CASA-CNP is enabled, these diagnostic variables are re-calculated using CASA-CNP variables before writing the diagnostic variables to the output file. The overriding of diagnostic variables is done to match the current behaviour of the output module - there may be scope to enable both CASA and non-CASA variants of these diagnostics in the future.
1 parent e887aa2 commit 43c565b

15 files changed

Lines changed: 406 additions & 101 deletions

src/offline/cable_define_types.F90

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ MODULE cable_def_types_mod
261261
qssrf, & ! sublimation
262262
snage, & ! snow age
263263
snowd, & ! snow depth (liquid water)
264+
totsdepth, & ! total snow depth (m)
264265
smelt, & ! snow melt
265266
ssdnn, & ! average snow density
266267
tss, & ! surface temperature (weighted soil, snow)
@@ -450,12 +451,18 @@ MODULE cable_def_types_mod
450451
frpw, & ! plant respiration (woody component) (g C m-2 s-1)
451452
frpr, & ! plant respiration (root component) (g C m-2 s-1)
452453
frs, & ! soil respiration (g C m-2 s-1)
454+
fra, & ! autotrophic respiration (g C m-2 s-1)
453455
fnee, & ! net carbon flux (g C m-2 s-1)
454456
frday, & ! daytime leaf resp
455457
fnv, & ! net rad. avail. to canopy (W/m2)
456458
fev, & ! latent hf from canopy (W/m2)
457459
epot, & ! total potential evaporation
460+
et, & ! total evapotranspiration (kg/m2/s)
461+
eint, & ! interception evaporation from wet canopy (kg/m2/s)
462+
tveg, & ! vegation transpiration (kg/m2/s)
463+
esoil, & ! soil evaporation (kg/m2/s)
458464
fnpp, & ! npp flux
465+
fgpp, & ! gpp flux
459466
fevw_pot,& ! potential lat heat from canopy
460467
gswx_T, & ! ! stom cond for water
461468
cdtq, & ! drag coefficient for momentum
@@ -471,6 +478,7 @@ MODULE cable_def_types_mod
471478
ghflux, & ! ground heat flux (W/m2) ???
472479
precis, & ! throughfall to soil, after snow (mm)
473480
qscrn, & ! specific humudity at screen height (g/g)
481+
qmom, & ! surface momentum flux
474482
rnet, & ! net radiation absorbed by surface (W/m2)
475483
rniso, & !isothermal net radiation absorbed by surface (W/m2)
476484
segg, & ! latent heatfl from soil mm
@@ -550,6 +558,9 @@ MODULE cable_def_types_mod
550558
latitude,& ! latitude
551559
lwabv, & ! long wave absorbed by vegetation
552560
qssabs, & ! absorbed short-wave radiation for soil
561+
swnet, & ! net shortwave radiation absorbed by surface (W/m^2)
562+
lwnet, & ! net longwave radiation absorbed by surface (W/m^2)
563+
rnet, & ! net radiation absorbed by surface (W/m^2)
553564
transd, & ! frac SW diffuse transmitted through canopy
554565
trad, & ! radiative temperature (soil and veg)
555566
otrad ! radiative temperature on previous timestep (ACCESS)
@@ -914,6 +925,7 @@ SUBROUTINE alloc_soil_snow_type(var, mp)
914925
ALLOCATE( var% smass(mp,msn) )
915926
ALLOCATE( var% snage(mp) )
916927
ALLOCATE( var% snowd(mp) )
928+
ALLOCATE( var% totsdepth(mp) )
917929
ALLOCATE( var% smelt(mp) )
918930
ALLOCATE( var% ssdn(mp,msn) )
919931
ALLOCATE( var% ssdnn(mp) )
@@ -1119,6 +1131,7 @@ SUBROUTINE alloc_canopy_type(var, mp)
11191131
ALLOCATE( var% frpw(mp) )
11201132
ALLOCATE( var% frpr(mp) )
11211133
ALLOCATE( var% frs(mp) )
1134+
ALLOCATE( var% fra(mp) )
11221135
ALLOCATE( var% fnee(mp) )
11231136
ALLOCATE( var% frday(mp) )
11241137
ALLOCATE( var% fnv(mp) )
@@ -1132,6 +1145,7 @@ SUBROUTINE alloc_canopy_type(var, mp)
11321145
ALLOCATE( var% ghflux(mp) )
11331146
ALLOCATE( var% precis(mp) )
11341147
ALLOCATE( var% qscrn(mp) )
1148+
ALLOCATE( var% qmom(mp) )
11351149
ALLOCATE( var% rnet(mp) )
11361150
ALLOCATE( var% rniso(mp) )
11371151
ALLOCATE( var% segg(mp) )
@@ -1151,7 +1165,12 @@ SUBROUTINE alloc_canopy_type(var, mp)
11511165
ALLOCATE( var% ga_cor(mp) ) !REV_CORR variable
11521166
ALLOCATE ( var % evapfbl(mp,ms) )
11531167
ALLOCATE( var% epot(mp) )
1168+
ALLOCATE( var% et(mp) )
1169+
ALLOCATE( var% eint(mp) )
1170+
ALLOCATE( var% tveg(mp) )
1171+
ALLOCATE( var% esoil(mp) )
11541172
ALLOCATE( var% fnpp(mp) )
1173+
ALLOCATE( var% fgpp(mp) )
11551174
ALLOCATE( var% fevw_pot(mp) )
11561175
ALLOCATE( var% gswx_T(mp) )
11571176
ALLOCATE( var% cdtq(mp) )
@@ -1202,6 +1221,9 @@ SUBROUTINE alloc_radiation_type(var, mp)
12021221
ALLOCATE( var% lwabv(mp) )
12031222
ALLOCATE( var% qcan(mp,mf,nrb) )
12041223
ALLOCATE( var% qssabs(mp) )
1224+
ALLOCATE( var% swnet(mp) )
1225+
ALLOCATE( var% lwnet(mp) )
1226+
ALLOCATE( var% rnet(mp) )
12051227
ALLOCATE( var% rhocdf(mp,nrb) )
12061228
ALLOCATE( var% rniso(mp,mf) )
12071229
ALLOCATE( var% scalex(mp,mf) )
@@ -1562,6 +1584,7 @@ SUBROUTINE dealloc_soil_snow_type(var)
15621584
DEALLOCATE( var% smass )
15631585
DEALLOCATE( var% snage )
15641586
DEALLOCATE( var% snowd )
1587+
DEALLOCATE( var% totsdepth )
15651588
DEALLOCATE( var% smelt )
15661589
DEALLOCATE( var% ssdn )
15671590
DEALLOCATE( var% ssdnn )
@@ -1753,6 +1776,7 @@ SUBROUTINE dealloc_canopy_type(var)
17531776
DEALLOCATE( var% frpw )
17541777
DEALLOCATE( var% frpr )
17551778
DEALLOCATE( var% frs )
1779+
DEALLOCATE( var% fra )
17561780
DEALLOCATE( var% fnee )
17571781
DEALLOCATE( var% frday )
17581782
DEALLOCATE( var% fnv )
@@ -1766,6 +1790,7 @@ SUBROUTINE dealloc_canopy_type(var)
17661790
DEALLOCATE( var% ghflux )
17671791
DEALLOCATE( var% precis )
17681792
DEALLOCATE( var% qscrn )
1793+
DEALLOCATE( var% qmom )
17691794
DEALLOCATE( var% rnet )
17701795
DEALLOCATE( var% rniso )
17711796
DEALLOCATE( var% segg )
@@ -1785,7 +1810,12 @@ SUBROUTINE dealloc_canopy_type(var)
17851810
DEALLOCATE( var% ga_cor ) !REV_CORR variable
17861811
DEALLOCATE ( var % evapfbl )
17871812
DEALLOCATE( var% epot )
1813+
DEALLOCATE( var% et )
1814+
DEALLOCATE( var% eint )
1815+
DEALLOCATE( var% tveg )
1816+
DEALLOCATE( var% esoil )
17881817
DEALLOCATE( var% fnpp )
1818+
DEALLOCATE( var% fgpp )
17891819
DEALLOCATE( var% fevw_pot )
17901820
DEALLOCATE( var% gswx_T )
17911821
DEALLOCATE( var% cdtq )
@@ -1826,6 +1856,9 @@ SUBROUTINE dealloc_radiation_type(var)
18261856
DEALLOCATE( var% lwabv )
18271857
DEALLOCATE( var% qcan )
18281858
DEALLOCATE( var% qssabs )
1859+
DEALLOCATE( var% swnet )
1860+
DEALLOCATE( var% lwnet )
1861+
DEALLOCATE( var% rnet )
18291862
DEALLOCATE( var% rhocdf )
18301863
DEALLOCATE( var% rniso )
18311864
DEALLOCATE( var% scalex )

src/offline/cable_mpicommon.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ MODULE cable_mpicommon
2929

3030
! base number of input fields: must correspond to CALLS to
3131
! MPI_address (field ) in *_mpimaster/ *_mpiworker
32-
INTEGER, PARAMETER :: nparam = 341
32+
INTEGER, PARAMETER :: nparam = 352
3333

3434
! MPI: extra params sent only if nsoilparmnew is true
3535
INTEGER, PARAMETER :: nsoilnew = 1
3636

3737
! MPI: number of casa parameters sent to workers as
3838
! start up parameters
3939
! MPI: added casapool fields ratioNCsoilnew, ratioNCsoilmin and ratioNCsoilmax
40-
INTEGER, PARAMETER :: ncasaparam = 213 ! YPW to account for 3 aditional woodproduct pools
40+
INTEGER, PARAMETER :: ncasaparam = 219
4141
! MPI: base number of casa_init parameters sent to the workers
4242
INTEGER, PARAMETER :: ncinit = 18
4343

@@ -94,12 +94,12 @@ MODULE cable_mpicommon
9494
! vh sli nvec + 6 162 -> 168
9595
! INTEGER, PARAMETER :: nvec = 172! 168
9696
! INH REV_CORR +3 (SSEB +2 will be needed)
97-
INTEGER, PARAMETER :: nvec = 175
97+
INTEGER, PARAMETER :: nvec = 187
9898

9999
! MPI: number of final casa result matrices and vectors to receive
100100
! by the master for casa_poolout and casa_fluxout
101101
INTEGER, PARAMETER :: ncasa_mat = 37 ! add three more wood product variables
102-
INTEGER, PARAMETER :: ncasa_vec = 66
102+
INTEGER, PARAMETER :: ncasa_vec = 72
103103
! MPI: number of fields included in restart_t type for data
104104
! that is returned only for creating a restart file at the end of the run
105105
! MPI: gol124: canopy%rwater removed when Bernard ported to CABLE_r491

0 commit comments

Comments
 (0)