Skip to content

Commit

Permalink
Set seed for Cellular Automata
Browse files Browse the repository at this point in the history
The seed for the CA is now set in the same manner as the stochastic
physics components. Because the CA seed is only 32-bit (in contrast
to the 64-bit seed used for SP), a modulus is taken to ensure the
number stays in-bounds.

Refs: NOAA-EMC#386
  • Loading branch information
WalterKolczynski-NOAA committed Aug 3, 2021
1 parent dbff5e9 commit 68f75dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ FV3_GFS_postdet(){
ISEED_SKEB=$((CDATE*1000 + MEMBER*10 + 1))
ISEED_SHUM=$((CDATE*1000 + MEMBER*10 + 2))
ISEED_SPPT=$((CDATE*1000 + MEMBER*10 + 3))
# CA Seed is only 32-bit
ISEED_CA=$(( (CDATE*1000 + MEMBER*10 + 4) % 2147483647 ))
else
ISEED=${ISEED:-0}
fi
Expand Down
2 changes: 1 addition & 1 deletion ush/parsing_namelists_FV3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ if [ ${DO_CA:-"YES"} = "YES" ]; then
rcell = ${rcell:-"0.72"}
ca_trigger = ${ca_trigger:-".True."}
nspinup = ${nspinup:-"1"}
iseed_ca = ${iseed_ca:-"12345"}
iseed_ca = ${ISEED_CA:-"12345"}
EOF
fi

Expand Down

0 comments on commit 68f75dd

Please sign in to comment.