diff --git a/documentation/docs/user_guide/inputs/meteorological_forcing.md b/documentation/docs/user_guide/inputs/meteorological_forcing.md index 8231a24e0..64bcf4e65 100644 --- a/documentation/docs/user_guide/inputs/meteorological_forcing.md +++ b/documentation/docs/user_guide/inputs/meteorological_forcing.md @@ -127,5 +127,6 @@ CABLE’s time step size is calculated from the first two values of the time var ## Checking ranges -It is possible to check that the ranges of the meteorological variables are physically possible using `check%ranges=.TRUE.` in the `cable.nml` namelist variable. +It is possible to check that the ranges of the meteorological variables are physically possible using `check%ranges=1` or`check%ranges=2` (see [explanation][nml_desc]) in the `cable.nml` namelist variable. +[nml_desc]: cable_nml.md#list-of-namelist-variables diff --git a/documentation/docs/user_guide/inputs/pft_params_nml.md b/documentation/docs/user_guide/inputs/pft_params_nml.md index b57cdea96..30502a515 100644 --- a/documentation/docs/user_guide/inputs/pft_params_nml.md +++ b/documentation/docs/user_guide/inputs/pft_params_nml.md @@ -156,7 +156,8 @@ The CABLE default values of the vegetation parameters in Table 2 for the vegetat The CABLE distribution provides the default vegetation parameter values from Table 3 in the namelist file pft_params.nml, including the vegetation types from Table 1 in the top part. -The chosen parameter values in offline cases can be checked against the pre-defined realistic parameter value ranges using the CABLE namelist variable check%ranges=.true. in cable.nml. +The chosen parameter values in offline cases can be checked against the pre-defined realistic parameter value ranges using the CABLE namelist variable [`check%ranges`][nml_desc] in cable.nml. + ## Example pft_params.nml file !!! Note "Namelist file format explanation" @@ -243,3 +244,4 @@ vegin%zr=1.800000,3.000000,2.000000,2.000000,2.500000,5*0.500000,1.800000,3.1000 | vegin%wai | real | 0.0 – 5.0 | 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | Wood area index (stem+branches+twigs) (not used) \( (-) \) | | vegin%xalbnir | real | 0.0 – 1.5 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ? (not used) | +[nml_desc]: cable_nml.md#list-of-namelist-variables \ No newline at end of file diff --git a/src/offline/cable.nml b/src/offline/cable.nml index a1b8dc260..8461e014a 100644 --- a/src/offline/cable.nml +++ b/src/offline/cable.nml @@ -23,7 +23,7 @@ output%params = .TRUE. ! input parameters used to produce run output%patch = .TRUE. ! write per patch output%balances = .TRUE. ! energy and water balances - check%ranges = .FALSE. ! variable ranges, input and output + check%ranges = 0 ! variable ranges, input and output check%energy_bal = .TRUE. ! energy balance check%mass_bal = .TRUE. ! water/mass balance verbose = .TRUE. ! write details of every grid cell init and params to log? diff --git a/src/offline/cable_checks.F90 b/src/offline/cable_checks.F90 index c3c50b5ae..c0b159b43 100644 --- a/src/offline/cable_checks.F90 +++ b/src/offline/cable_checks.F90 @@ -225,7 +225,7 @@ SUBROUTINE check_range_d1(vname, parameter_r1, parameter_range, ktau, met) DO index = 1, SIZE(parameter_r1) IF (parameter_r1(index) < parameter_range(1) .OR. parameter_r1(index) > parameter_range(2)) THEN - CALL range_abort(vname, ktau, met, parameter_r1(index), \ + CALL range_abort(vname, ktau, met, parameter_r1(index), & parameter_range, index, patch(index)%latitude, patch(index)%longitude) END IF END DO diff --git a/src/offline/cable_driver.F90 b/src/offline/cable_driver.F90 index 52bb1bfaa..f786ede8e 100644 --- a/src/offline/cable_driver.F90 +++ b/src/offline/cable_driver.F90 @@ -63,7 +63,8 @@ PROGRAM cable_offline_driver USE cable_IO_vars_module, ONLY: logn,gswpfile,ncciy,leaps, & verbose, fixedCO2,output,check,patchout, & patch_type,landpt,soilparmnew,& - defaultLAI, sdoy, smoy, syear, timeunits, exists, calendar, set_group_output_values + defaultLAI, sdoy, smoy, syear, timeunits, exists, calendar, set_group_output_values, & + NO_CHECK USE casa_ncdf_module, ONLY: is_casa_time USE cable_common_module, ONLY: ktau_gl, kend_gl, knode_gl, cable_user, & cable_runtime, filename, myhome, & @@ -621,7 +622,7 @@ PROGRAM cable_offline_driver casamet, casabal, phen, POP, spinup, & CEMSOIL, CTFRZ, LUC_EXPT, POPLUC ) - IF (check%ranges) THEN + IF (check%ranges /= NO_CHECK) THEN WRITE (*, *) "Checking parameter ranges" CALL constant_check_range(soil, veg, 0, met) END IF diff --git a/src/offline/cable_input.F90 b/src/offline/cable_input.F90 index 901045ae7..6fe79b6d9 100644 --- a/src/offline/cable_input.F90 +++ b/src/offline/cable_input.F90 @@ -2481,7 +2481,7 @@ SUBROUTINE get_met_data(spinup,spinConv,met,soil,rad, & ! initialise within canopy air temp met%tvair = met%tk met%tvrad = met%tk - IF(check%ranges) THEN + IF(check%ranges /= NO_CHECK) THEN ! Check ranges are okay: CALL check_range("SWdown", met%fsd, ranges%SWdown, 0, met) CALL check_range("LWdown", met%fld, ranges%LWdown, 0, met)