|
| 1 | +!******************************COPYRIGHT******************************************** |
| 2 | +! (c) CSIRO 2022. |
| 3 | +! All rights reserved. |
| 4 | +! |
| 5 | +! This routine has been licensed to the other JULES partners for use and |
| 6 | +! distribution under the JULES collaboration agreement, subject to the terms and |
| 7 | +! conditions set out therein. |
| 8 | +! |
| 9 | +! [Met Office Ref SC0237] |
| 10 | +!******************************COPYRIGHT******************************************** |
| 11 | +MODULE cbl_LAI_canopy_height_mod |
| 12 | + |
| 13 | +!----------------------------------------------------------------------------- |
| 14 | +! Description: |
| 15 | +! Restricts the range of canopy height and LAI inherited from JULES/UM |
| 16 | +! spatial maps |
| 17 | +! |
| 18 | +! This MODULE is USEd by: |
| 19 | +! cable_land_albedo_mod_cbl.F90 |
| 20 | +! |
| 21 | +! This MODULE contains 1 public Subroutine: |
| 22 | +! limit_HGT_LAI |
| 23 | +! |
| 24 | +! Code Owner: Please refer to ModuleLeaders.txt |
| 25 | +! This file belongs in CABLE SCIENCE |
| 26 | +! |
| 27 | +! Code Description: |
| 28 | +! Language: Fortran 90. |
| 29 | +! This code is written to JULES coding standards v1. |
| 30 | +!----------------------------------------------------------------------------- |
| 31 | + |
| 32 | +IMPLICIT NONE |
| 33 | +PUBLIC :: limit_HGT_LAI |
| 34 | +PRIVATE |
| 35 | + |
| 36 | +CONTAINS |
| 37 | + |
| 38 | +SUBROUTINE Limit_HGT_LAI( HGT_pft_temp, LAI_pft_cbl, HGT_pft_cbl, mp, land_pts,& |
| 39 | + ntiles, npft, tile_pts, tile_index, tile_frac, & |
| 40 | + L_tile_pts, LAI_pft, HGT_pft, CLAI_thresh ) |
| 41 | + |
| 42 | +!*## Purpose |
| 43 | +! |
| 44 | +! This SUBROUTINE checks that input values of leaf area and canopy height |
| 45 | +! lie between set values (defined by PFT) and overwrites if necessary. |
| 46 | +! These limits are needed to ensure that the canopy roughness properties of |
| 47 | +! the land point are well behaved (see [[ruff_resist]]). |
| 48 | +! |
| 49 | +! The mapping from grid cells (land_pts,ntiles) to the (mp) structure |
| 50 | +! is also undertaken. |
| 51 | +! |
| 52 | +! **This SUBROUTINE is active when CABLE is run within a coupled model |
| 53 | +! (i.e. ACCESS)** |
| 54 | +! |
| 55 | +!## Method |
| 56 | +! |
| 57 | +! The cell-level input (land_pts,ntile) variables for leaf area `LAI_pft` and |
| 58 | +! canopy height `HGT_pft` are checked for |
| 59 | +! |
| 60 | +! - whether the land_pt has a non-zero fraction of that tile (if zero |
| 61 | +! fraction then LAI and canopy height are set to zero) |
| 62 | +! - whether the LAI lies above a minimum value `CLAI_thresh` |
| 63 | +! - whether the canopy height lies above a minimum value (which is PFT dependent) |
| 64 | +! - whether non-vegetated tiles have a non-zero canopy height. |
| 65 | +! |
| 66 | +! Outputs are `LAI_pft_cbl` and `HGT_pft_cbl` |
| 67 | +! |
| 68 | +! **WARNINGS** |
| 69 | +! |
| 70 | +! - INTENT statements need to be added to the argument lists |
| 71 | +! - hardwired indexing is used throughout. This SUBROUTINE assumes that |
| 72 | +! 1. non-vegetated tiles take indexes 14 and onwards |
| 73 | +! 2. tall vegetation occupies tile indexes 1-4 |
| 74 | +! 3. other vegetation (shrubs/grasses/crops/wetlands) occupy tile indexes |
| 75 | +! 5-13 |
| 76 | +! - the limits on canopy height are hardwired |
| 77 | +! 1. canopy height for tall vegetation is limited to be greater than 1m |
| 78 | +! 2. canopy height for other vegetation is limited to be greater than 0.1m |
| 79 | + |
| 80 | +USE cable_surface_types_mod, ONLY: shrub_cable, evergreen_broadleaf, & |
| 81 | + deciduous_broadleaf, aust_temperate, & |
| 82 | + aust_tropical |
| 83 | + |
| 84 | +IMPLICIT NONE |
| 85 | + |
| 86 | +INTEGER, INTENT(IN) :: land_pts, ntiles, npft !! # land points here |
| 87 | + !! max # of tiles, PFTs |
| 88 | +!! CABLE 1-D vector of length "mp" active tiles |
| 89 | +INTEGER, INTENT(IN) :: mp !! total number of tiles |
| 90 | + |
| 91 | +!! range limited LAI/ canopy height |
| 92 | +REAL, INTENT(OUT) :: HGT_pft_temp(land_pts,ntiles) !! UM dimensions (m) |
| 93 | + |
| 94 | +!! PACKed to CABLE 1-D vector of length mp |
| 95 | +REAL, INTENT(OUT) :: LAI_pft_cbl(mp) !! veg%vlai |
| 96 | +REAL, INTENT(OUT) :: HGT_pft_cbl(mp) !! veg%hc |
| 97 | + |
| 98 | +!! From UM spatial maps via restart or ancillary. |
| 99 | +REAL, INTENT(IN) :: tile_frac(land_pts,ntiles) !! frac. veg/non-veg type |
| 100 | +INTEGER, INTENT(IN) :: tile_pts(ntiles) !! # tiles per PFT type |
| 101 | +INTEGER, INTENT(IN) :: tile_index(land_pts,ntiles) !! land_pt index per tile |
| 102 | +!! updates monthly |
| 103 | +REAL, INTENT(IN) :: LAI_pft(land_pts, npft) !! LAI (m\(^2\)m\(^{-2}\)) |
| 104 | +REAL, INTENT(IN) :: HGT_pft(land_pts, npft) !! canopy height (m) |
| 105 | +!! logical mask. TRUE if tilefrac > 0 0 (OR some threshold) |
| 106 | +LOGICAL, INTENT(IN) :: L_tile_pts(land_pts,ntiles) |
| 107 | + |
| 108 | +!! scalar constant threshold for "cell" to be considred vegetated |
| 109 | +REAL, INTENT(IN) :: Clai_thresh ! minimum LAI threshold |
| 110 | + |
| 111 | +!local vars |
| 112 | +INTEGER :: i,j, n |
| 113 | +REAL :: LAI_pft_temp(land_pts,ntiles) ! needed to filter spatail map |
| 114 | + |
| 115 | +!Retain init where tile_frac=0 |
| 116 | +LAI_pft_temp(:,:) = 0.0 |
| 117 | +HGT_pft_temp(:,:) = 0.0 |
| 118 | + |
| 119 | +!Comensurate with restricted ordering of PFTs in UM. Not generically applicable |
| 120 | +DO n=1,ntiles |
| 121 | + DO j=1,tile_pts(n) |
| 122 | + |
| 123 | + i = tile_index(j,n) ! landpt index |
| 124 | + |
| 125 | + IF( tile_frac(i,n) .GT. 0.0 ) THEN |
| 126 | + |
| 127 | + IF( n < shrub_cable ) THEN ! trees |
| 128 | + |
| 129 | + LAI_pft_temp(i,n) = MAX( 0.99*CLAI_thresh, LAI_pft(i,n) ) |
| 130 | + HGT_pft_temp(i,n) = MAX( 1.0, HGT_pft(i,n) ) |
| 131 | + |
| 132 | + ELSE IF( n >= shrub_cable .AND. n < aust_temperate ) THEN ! shrubs/grass |
| 133 | + |
| 134 | + LAI_pft_temp(i,n) = MAX( 0.99*CLAI_thresh, LAI_pft(i,n) ) |
| 135 | + HGT_pft_temp(i,n) = MAX( 0.1, HGT_pft(i,n) ) |
| 136 | + |
| 137 | + ELSE IF( n == aust_temperate .OR. n == aust_tropical ) THEN ! Aust. trees |
| 138 | + |
| 139 | + LAI_pft_temp(i,n) = MAX( CLAI_thresh, LAI_pft(i,n) ) |
| 140 | + HGT_pft_temp(i,n) = MAX( 1.0, HGT_pft(i,n) ) |
| 141 | + |
| 142 | + ENDIF |
| 143 | + |
| 144 | + ENDIF |
| 145 | + |
| 146 | + ENDDO |
| 147 | +ENDDO |
| 148 | + |
| 149 | +!surface_type = PACK(surface_type_temp, um1%L_TILE_PTS) |
| 150 | +LAI_pft_cbl = PACK(LAI_pft_temp, l_tile_pts) |
| 151 | +HGT_pft_cbl = PACK(HGT_pft_temp, l_tile_pts) |
| 152 | + |
| 153 | +END SUBROUTINE limit_HGT_LAI |
| 154 | + |
| 155 | +END MODULE cbl_LAI_canopy_height_mod |
| 156 | + |
0 commit comments