Skip to content

Commit

Permalink
Conflicts with main that needed some fix after rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccarouge committed Nov 25, 2024
1 parent a3363e7 commit d4e70df
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 73 deletions.
40 changes: 20 additions & 20 deletions src/offline/cable_surface_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@

MODULE cable_surface_types_mod

IMPLICIT NONE
IMPLICIT NONE

PUBLIC
PUBLIC

! cable_surface_type (nml) Index
INTEGER, PARAMETER :: evergreen_needleleaf = 1
INTEGER, PARAMETER :: evergreen_broadleaf = 2
INTEGER, PARAMETER :: deciduous_needleleaf = 3
INTEGER, PARAMETER :: deciduous_broadleaf = 4
INTEGER, PARAMETER :: shrub_cable = 5
INTEGER, PARAMETER :: c3_grassland = 6
INTEGER, PARAMETER :: c4_grassland = 7
INTEGER, PARAMETER :: tundra = 8
INTEGER, PARAMETER :: c3_cropland = 9
INTEGER, PARAMETER :: c4_cropland = 10
INTEGER, PARAMETER :: wetland = 11
INTEGER, PARAMETER :: empty1 = 12
INTEGER, PARAMETER :: empty2 = 13
INTEGER, PARAMETER :: barren_cable = 14
INTEGER, PARAMETER :: urban_cable = 15
INTEGER, PARAMETER :: lakes_cable = 16
INTEGER, PARAMETER :: ice_cable = 17
! cable_surface_type (nml) Index
INTEGER, PARAMETER :: evergreen_needleleaf = 1
INTEGER, PARAMETER :: evergreen_broadleaf = 2
INTEGER, PARAMETER :: deciduous_needleleaf = 3
INTEGER, PARAMETER :: deciduous_broadleaf = 4
INTEGER, PARAMETER :: shrub_cable = 5
INTEGER, PARAMETER :: c3_grassland = 6
INTEGER, PARAMETER :: c4_grassland = 7
INTEGER, PARAMETER :: tundra = 8
INTEGER, PARAMETER :: c3_cropland = 9
INTEGER, PARAMETER :: c4_cropland = 10
INTEGER, PARAMETER :: wetland = 11
INTEGER, PARAMETER :: empty1 = 12
INTEGER, PARAMETER :: empty2 = 13
INTEGER, PARAMETER :: barren_cable = 14
INTEGER, PARAMETER :: urban_cable = 15
INTEGER, PARAMETER :: lakes_cable = 16
INTEGER, PARAMETER :: ice_cable = 17

END MODULE cable_surface_types_mod

66 changes: 33 additions & 33 deletions src/offline/cbl_model_driver_offline.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,28 @@ SUBROUTINE cbm( ktau,dels, air, bgc, canopy, met,
bal, rad, rough, soil, &
ssnow, sum_flux, veg, climate, xk, c1, rhoch )

USE cable_common_module
USE cable_carbon_module
USE cbl_soil_snow_main_module, ONLY : soil_snow
USE cable_def_types_mod
USE cable_roughness_module, ONLY : ruff_resist
USE cbl_init_radiation_module, ONLY : init_radiation
USE cable_air_module, ONLY : define_air
USE casadimension, ONLY : icycle ! used in casa_cnp
USE cable_common_module
USE cable_carbon_module
USE cbl_soil_snow_main_module, ONLY : soil_snow
USE cable_def_types_mod
USE cable_roughness_module, ONLY : ruff_resist
USE cbl_init_radiation_module, ONLY : init_radiation
USE cable_air_module, ONLY : define_air
USE casadimension, ONLY : icycle ! used in casa_cnp
! physical constants
USE cable_phys_constants_mod, ONLY : CGRAV => GRAV
USE cable_phys_constants_mod, ONLY : CCAPP => CAPP
USE cable_phys_constants_mod, ONLY : CEMLEAF => EMLEAF
USE cable_phys_constants_mod, ONLY : CEMSOIL => EMSOIL
USE cable_phys_constants_mod, ONLY : CSBOLTZ => SBOLTZ
USE cable_phys_constants_mod, ONLY : density_liq
!mrd561
USE cable_gw_hydro_module, ONLY : sli_hydrology,&
soil_snow_gw
USE cable_canopy_module, ONLY : define_canopy
USE cbl_albedo_mod, ONLY : albedo
USE sli_main_mod, ONLY : sli_main
USE snow_aging_mod, ONLY: snow_aging
!mrd561
USE cable_gw_hydro_module, ONLY : sli_hydrology,&
soil_snow_gw
USE cable_canopy_module, ONLY : define_canopy
USE cbl_albedo_mod, ONLY : albedo
USE sli_main_mod, ONLY : sli_main
USE snow_aging_mod, ONLY: snow_aging

! scalar data USEd through modules
USE cable_other_constants_mod, ONLY: CLAI_THRESH => lai_thresh
Expand All @@ -73,24 +73,24 @@ SUBROUTINE cbm( ktau,dels, air, bgc, canopy, met,
USE cable_surface_types_mod, ONLY: lakes_cable
USE grid_constants_mod_cbl, ONLY: ICE_SoilType

! CABLE model variables
TYPE (air_type), INTENT(INOUT) :: air
TYPE (bgc_pool_type), INTENT(INOUT) :: bgc
TYPE (canopy_type), INTENT(INOUT) :: canopy
TYPE (met_type), INTENT(INOUT) :: met
TYPE (balances_type), INTENT(INOUT) :: bal
TYPE (radiation_type), INTENT(INOUT) :: rad
TYPE (roughness_type), INTENT(INOUT) :: rough
TYPE (soil_snow_type), INTENT(INOUT) :: ssnow
TYPE (sum_flux_type), INTENT(INOUT) :: sum_flux
TYPE (climate_type), INTENT(IN) :: climate

TYPE (soil_parameter_type), INTENT(INOUT) :: soil
TYPE (veg_parameter_type), INTENT(INOUT) :: veg

REAL, INTENT(IN) :: dels ! time setp size (s)
INTEGER, INTENT(IN) :: ktau
INTEGER :: k,kk,j
! CABLE model variables
TYPE (air_type), INTENT(INOUT) :: air
TYPE (bgc_pool_type), INTENT(INOUT) :: bgc
TYPE (canopy_type), INTENT(INOUT) :: canopy
TYPE (met_type), INTENT(INOUT) :: met
TYPE (balances_type), INTENT(INOUT) :: bal
TYPE (radiation_type), INTENT(INOUT) :: rad
TYPE (roughness_type), INTENT(INOUT) :: rough
TYPE (soil_snow_type), INTENT(INOUT) :: ssnow
TYPE (sum_flux_type), INTENT(INOUT) :: sum_flux
TYPE (climate_type), INTENT(IN) :: climate

TYPE (soil_parameter_type), INTENT(INOUT) :: soil
TYPE (veg_parameter_type), INTENT(INOUT) :: veg

REAL, INTENT(IN) :: dels ! time setp size (s)
INTEGER, INTENT(IN) :: ktau
INTEGER :: k,kk,j

LOGICAL :: veg_mask(mp), sunlit_mask(mp), sunlit_veg_mask(mp)

Expand Down
6 changes: 3 additions & 3 deletions src/params/grid_constants_cbl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ MODULE grid_constants_mod_cbl
INTEGER, PARAMETER :: nsCs = 2 ! # soil carbon stores
INTEGER, PARAMETER :: nvCs = 3 ! # vegetation carbon stores
INTEGER, PARAMETER :: ICE_SoilType = 9 ! SoilType Index (soilparm_cable.nml JAC)
INTEGER, PARAMETER :: mf = 2 ! # leaves (sunlit, shaded)
INTEGER, PARAMETER :: niter = 4 ! number of iterations for za/L
INTEGER, PARAMETER :: swb = 2 ! # SW bands (VIS+NIR) - CM3 alloc TYPEs
INTEGER, PARAMETER :: mf = 2 ! # leaves (sunlit, shaded)
INTEGER, PARAMETER :: niter = 4 ! number of iterations for za/L
INTEGER, PARAMETER :: swb = 2 ! # SW bands (VIS+NIR) - CM3 alloc TYPEs

! Strictly NOT a constant. # of active tiles, length of CABLE working vectors
INTEGER :: mp
Expand Down
34 changes: 18 additions & 16 deletions src/science/canopy/cbl_SurfaceWetness.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,31 @@ MODULE cbl_SurfaceWetness_module

SUBROUTINE Surf_wetness_fact( cansat, canopy, ssnow,veg, met, soil, dels )

USE cable_common_module
USE cable_def_types_mod
! physical constants
USE cable_phys_constants_mod, ONLY : CTFRZ => TFRZ
!H!USE cable_gw_hydro_module, ONLY : calc_srf_wet_fraction
USE cable_common_module
USE cable_def_types_mod
! data
USE cable_surface_types_mod, ONLY: lakes_cable
USE cable_phys_constants_mod, ONLY: CTFRZ => TFRZ

!H!USE cable_gw_hydro_module, ONLY : calc_srf_wet_fraction

use cable_init_wetfac_mod, ONLY: initialize_wetfac

TYPE (veg_parameter_type), INTENT(INOUT) :: veg
TYPE (soil_snow_type), INTENT(inout):: ssnow
TYPE (soil_parameter_type), INTENT(inout) :: soil
TYPE (canopy_type), INTENT(INOUT) :: canopy
TYPE (met_type), INTENT(INOUT) :: met
use cable_init_wetfac_mod, ONLY: initialize_wetfac

REAL, INTENT(IN) :: dels ! integration time setp (s)
TYPE (veg_parameter_type), INTENT(INOUT) :: veg
TYPE (soil_snow_type), INTENT(inout):: ssnow
TYPE (soil_parameter_type), INTENT(inout) :: soil
TYPE (canopy_type), INTENT(INOUT) :: canopy
TYPE (met_type), INTENT(INOUT) :: met

REAL,INTENT(IN), DIMENSION(:) :: cansat ! max canopy intercept. (mm)
REAL, INTENT(IN) :: dels ! integration time setp (s)

!local variables
REAL, DIMENSION(mp) :: lower_limit, upper_limit,ftemp
REAL,INTENT(IN), DIMENSION(:) :: cansat ! max canopy intercept. (mm)

INTEGER :: j, i
!local variables
REAL, DIMENSION(mp) :: lower_limit, upper_limit,ftemp

INTEGER :: j, i

! Rainfall variable is limited so canopy interception is limited,
! used to stabilise latent fluxes.
Expand Down
2 changes: 1 addition & 1 deletion src/science/soilsnow/cbl_surfbv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ MODULE surfbv_mod
SUBROUTINE surfbv (dels, met, ssnow, soil, veg, canopy )

USE smoisturev_mod, ONLY: smoisturev
USE cable_common_module
! data
USE cable_surface_types_mod, ONLY: lakes_cable
USE cable_common_module

IMPLICIT NONE

Expand Down

0 comments on commit d4e70df

Please sign in to comment.