Skip to content

Commit

Permalink
Update usage of JVN_ to be max # J-values rather than exact # of J-va…
Browse files Browse the repository at this point in the history
…lues

Signed-off-by: Lizzie Lundgren <[email protected]>
  • Loading branch information
lizziel committed Sep 4, 2024
1 parent 291a161 commit 26108ec
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ This file documents all notable changes to the Cloud-J repository since the init

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [8.0.1] - TBD
### Added
- Added error handling to exit the model if JVN_ is less than number of entries in FJX_j2j.dat

### Changed
- Updated usage of variable JVN_ to be max # of J-values rather than exact # of J-values

## [8.0.0] - 2024-08-29
### Added
- Added M. Prather's new Cloud-J v8 feature of UV absorption by water (source of differences between v7.7 and v8)
Expand Down
8 changes: 1 addition & 7 deletions src/Core/cldj_cmn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,7 @@ MODULE CLDJ_CMN_MOD
!------------------------------------------------------------------------------

! JVN_ : max # of J-values
#ifdef MODEL_GEOSCHEM
integer, parameter :: JVN_ = 166
#elif MODEL_STANDALONE
integer, parameter :: JVN_ = 101
#else
#error "Invalid model selection: parameters only defined for MODEL_STANDALONE and MODEL_GEOSCHEM. Add parameters for additional models in cldj_cmn_mod.F90."
#endif
integer, parameter :: JVN_ = 200

! AN_ : max # of FJX aerosols in layer (needs NDX for each)
#ifdef MODEL_GEOSCHEM
Expand Down
6 changes: 5 additions & 1 deletion src/Core/cldj_init_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,11 @@ subroutine RD_JS_JX(AMIROOT,NUNIT,NAMFIL,TITLEJX,NJX,RC)
if (AMIROOT) write(6,'(a)') CLINE
do J = 1,JVN_
read (NUNIT,'(i4,1x,a50,4x,f5.3,2x,a6)') JJ,T_REACT,F_FJX,T_FJX
if (JJ .gt. JVN_) exit
if (JJ .eq. 9999 ) exit
if (JJ .gt. JVN_) then
call CLOUDJ_ERROR('JVN_ must be >= number of entries in FJX_j2j.dat!', thisloc, rc)
return
endif
JLABEL(JJ) = T_REACT
JFACTA(JJ) = F_FJX
JVMAP(JJ) = T_FJX
Expand Down

0 comments on commit 26108ec

Please sign in to comment.