Skip to content

Commit

Permalink
use centralized version of climate type (#533)
Browse files Browse the repository at this point in the history
# CABLE

Thank you for submitting a pull request to the CABLE Project.

## Description

Please include a brief summary of the change and list the issues that
are fixed.
Please also include relevant motivation and context.

You can link issues by using a supported keyword in the pull request's
description or in a commit message:

Fixes #(issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix
- [ ] New or updated documentation

## Checklist

- [ ] The new content is accessible and located in the appropriate
section
- [ ] I have checked that links are valid and point to the intended
content
- [ ] I have checked my code/text and corrected any misspellings

## Testing

- [x] Are the changes bitwise-compatible with the main branch? If
working on an optional feature, are the results bitwise-compatible when
this feature is off? If yes, copy benchcab output showing successful
completion of the bitwise compatibility tests or equivalent results
below this line.

2025-01-17 13:27:09,851 - INFO - comparison.comparison.py:73 - Success:
files US-Whs_2008-2014_FLUXNET2015_Met_R0_S0_out.nc
US-Whs_2008-2014_FLUXNET2015_Met_R1_S0_out.nc are identical
2025-01-17 13:27:10,097 - INFO - comparison.comparison.py:73 - Success:
files US-Whs_2008-2014_FLUXNET2015_Met_R0_S1_out.nc
US-Whs_2008-2014_FLUXNET2015_Met_R1_S1_out.nc are identical
2025-01-17 13:27:11,436 - INFO - comparison.comparison.py:73 - Success:
files AU-Tum_2002-2017_OzFlux_Met_R0_S3_out.nc
AU-Tum_2002-2017_OzFlux_Met_R1_S3_out.nc are identical
2025-01-17 13:27:11,524 - INFO - comparison.comparison.py:73 - Success:
files AU-Tum_2002-2017_OzFlux_Met_R0_S1_out.nc
AU-Tum_2002-2017_OzFlux_Met_R1_S1_out.nc are identical
2025-01-17 13:27:11,554 - INFO - comparison.comparison.py:73 - Success:
files AU-Tum_2002-2017_OzFlux_Met_R0_S2_out.nc
AU-Tum_2002-2017_OzFlux_Met_R1_S2_out.nc are identical
2025-01-17 13:27:11,585 - INFO - comparison.comparison.py:73 - Success:
files AU-Tum_2002-2017_OzFlux_Met_R0_S0_out.nc
AU-Tum_2002-2017_OzFlux_Met_R1_S0_out.nc are identical
2025-01-17 13:27:21,206 - INFO - comparison.comparison.py:73 - Success:
files US-Var_2001-2014_FLUXNET2015_Met_R0_S3_out.nc
US-Var_2001-2014_FLUXNET2015_Met_R1_S3_out.nc are identical
2025-01-17 13:27:21,216 - INFO - comparison.comparison.py:73 - Success:
files US-Var_2001-2014_FLUXNET2015_Met_R0_S0_out.nc
US-Var_2001-2014_FLUXNET2015_Met_R1_S0_out.nc are identical
2025-01-17 13:27:21,437 - INFO - comparison.comparison.py:73 - Success:
files US-Var_2001-2014_FLUXNET2015_Met_R0_S2_out.nc
US-Var_2001-2014_FLUXNET2015_Met_R1_S2_out.nc are identical
2025-01-17 13:27:21,453 - INFO - comparison.comparison.py:73 - Success:
files US-Whs_2008-2014_FLUXNET2015_Met_R0_S3_out.nc
US-Whs_2008-2014_FLUXNET2015_Met_R1_S3_out.nc are identical
2025-01-17 13:27:21,460 - INFO - comparison.comparison.py:73 - Success:
files US-Whs_2008-2014_FLUXNET2015_Met_R0_S2_out.nc
US-Whs_2008-2014_FLUXNET2015_Met_R1_S2_out.nc are identical
2025-01-17 13:27:21,755 - INFO - comparison.comparison.py:73 - Success:
files US-Var_2001-2014_FLUXNET2015_Met_R0_S1_out.nc
US-Var_2001-2014_FLUXNET2015_Met_R1_S1_out.nc are identical
2025-01-17 13:27:22,925 - INFO - comparison.comparison.py:73 - Success:
files AU-How_2003-2017_OzFlux_Met_R0_S2_out.nc
AU-How_2003-2017_OzFlux_Met_R1_S2_out.nc are identical
2025-01-17 13:27:22,926 - INFO - comparison.comparison.py:73 - Success:
files AU-How_2003-2017_OzFlux_Met_R0_S1_out.nc
AU-How_2003-2017_OzFlux_Met_R1_S1_out.nc are identical
2025-01-17 13:27:22,967 - INFO - comparison.comparison.py:73 - Success:
files AU-How_2003-2017_OzFlux_Met_R0_S3_out.nc
AU-How_2003-2017_OzFlux_Met_R1_S3_out.nc are identical
2025-01-17 13:27:23,231 - INFO - comparison.comparison.py:73 - Success:
files AU-How_2003-2017_OzFlux_Met_R0_S0_out.nc
AU-How_2003-2017_OzFlux_Met_R1_S0_out.nc are identical
2025-01-17 13:27:29,439 - INFO - comparison.comparison.py:73 - Success:
files FI-Hyy_1996-2014_FLUXNET2015_Met_R0_S3_out.nc
FI-Hyy_1996-2014_FLUXNET2015_Met_R1_S3_out.nc are identical
2025-01-17 13:27:29,465 - INFO - comparison.comparison.py:73 - Success:
files FI-Hyy_1996-2014_FLUXNET2015_Met_R0_S1_out.nc
FI-Hyy_1996-2014_FLUXNET2015_Met_R1_S1_out.nc are identical
2025-01-17 13:27:29,634 - INFO - comparison.comparison.py:73 - Success:
files FI-Hyy_1996-2014_FLUXNET2015_Met_R0_S2_out.nc
FI-Hyy_1996-2014_FLUXNET2015_Met_R1_S2_out.nc are identical
2025-01-17 13:27:29,649 - INFO - comparison.comparison.py:73 - Success:
files FI-Hyy_1996-2014_FLUXNET2015_Met_R0_S0_out.nc
FI-Hyy_1996-2014_FLUXNET2015_Met_R1_S0_out.nc are identical
2025-01-17 13:27:29,673 - INFO - benchcab.benchcab.py:391 - 0 failed, 20
passed

- [ ] Are the changes non bitwise-compatible with the main branch
because of a bug fix or a feature being newly implemented or improved?
If yes, add the link to the modelevaluation.org analysis versus the main
branch or equivalent results below this line.

Please add a reviewer when ready for review.


<!-- readthedocs-preview cable start -->
----
📚 Documentation preview 📚:
https://cable--533.org.readthedocs.build/en/533/

<!-- readthedocs-preview cable end -->

---------

Co-authored-by: Claire Carouge <[email protected]>
  • Loading branch information
JhanSrbinovsky and ccarouge authored Jan 20, 2025
1 parent 8e72012 commit 4882c1c
Show file tree
Hide file tree
Showing 2 changed files with 397 additions and 92 deletions.
51 changes: 2 additions & 49 deletions src/offline/cable_define_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
!#define UM_BUILD yes
MODULE cable_def_types_mod

USE cable_climate_type_mod, ONLY: climate_type

! Contains all variables which are not subroutine-internal

IMPLICIT NONE
Expand Down Expand Up @@ -668,55 +670,6 @@ MODULE cable_def_types_mod

! .............................................................................

! Climate data:
TYPE climate_type

INTEGER :: nyear_average = 20
INTEGER :: nday_average = 31
! INTEGER, POINTER :: &
INTEGER :: &
nyears, & ! number of years in climate record
doy ! day of year

INTEGER, DIMENSION(:), POINTER :: &
chilldays, & ! length of chilling period (period with T<5deg)
iveg, & ! potential vegetation type based on climatic constraints
biome

REAL, DIMENSION(:), POINTER :: &
dtemp, & ! daily temperature
dmoist, & ! daily moisture availability
mtemp, & ! mean temperature over the last 31 days
qtemp, & ! mean temperature over the last 91 days
mmoist, & ! monthly moisture availability
mtemp_min, & ! minimum monthly temperature
mtemp_max, & ! maximum monhtly temperature
qtemp_max, & ! mean temperature of the warmest quarter (so far this year)
qtemp_max_last_year, & ! mean temperature of the warmest quarter (last calendar year)
mtemp_min20, & ! minimum monthly temperature, averaged over 20 y
mtemp_max20, & ! maximum monhtly temperature, averaged over 20 y
atemp_mean, & ! annual average temperature
AGDD5, &
GDD5, & ! growing degree day sum relative to 5deg base temperature
AGDD0, & !
GDD0, & ! growing degree day sum relative to 0deg base temperature
alpha_PT, & ! ratio of annual evap to annual PT evap
evap_PT, & ! annual PT evap [mm]
aevap , & ! annual evap [mm]
alpha_PT20

REAL, DIMENSION(:,:), POINTER :: &
mtemp_min_20, & ! mimimum monthly temperatures for the last 20 y
mtemp_max_20, & ! maximum monthly temperatures for the last 20 y
dtemp_31 , & ! daily temperature for the last 31 days
dmoist_31 , & ! daily moisture availability for the last 31 days
alpha_PT_20, & ! priestley Taylor Coefft for last 20 y
dtemp_91 ! daily temperature for the last 91 days

END TYPE climate_type

! .............................................................................

! Cumulative flux variables:
TYPE sum_flux_type

Expand Down
Loading

0 comments on commit 4882c1c

Please sign in to comment.