You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're currently utilizing the code to compute the number of state vector elements in multiple locations, but we should move it into run_imi.sh to compute it just once. The code:
nElements=$(ncmax StateVector ${RunDirs}/StateVector.nc)
if "$OptimizeBCs"; then
nElements=$((nElements+4))
fi
if "$OptimizeOH";then
nElements=$((nElements+1))
fi
can be found in:
Routine setup_imi within src/components/setup_component/setup.sh
Routine setup_kf within src/components/kalman_component/kalman.sh
Routine reduce_dimension within components/statevector_component/statevector.sh
Routine run_posterior within components/posterior_component/posterior.sh
However, to compute nElements, the state vector file is needed. When creating the state vector file within the IMI, it is currently created by calling create_statevector from within setup_imi. Moving the code for determining nElements out of setup.sh into run_imi.sh right after setup_imi is called would cause issues for routine setup_jacobian which uses nElements to determine how many run directories to create. One way around this is to remove the generation of the state vector file from setup_imi and into run_imi.sh. There may be other potential conflicts too, so we should think about how to do this more carefully.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days it will be closed. You can add the "never stale" tag to prevent the issue from closing this issue.
Name and Institution (Required)
Name: Melissa Sulprizio
Institution: Harvard
New IMI feature or discussion
We're currently utilizing the code to compute the number of state vector elements in multiple locations, but we should move it into
run_imi.sh
to compute it just once. The code:can be found in:
However, to compute nElements, the state vector file is needed. When creating the state vector file within the IMI, it is currently created by calling
create_statevector
from withinsetup_imi
. Moving the code for determiningnElements
out ofsetup.sh
intorun_imi.sh
right aftersetup_imi
is called would cause issues for routinesetup_jacobian
which usesnElements
to determine how many run directories to create. One way around this is to remove the generation of the state vector file fromsetup_imi
and intorun_imi.sh
. There may be other potential conflicts too, so we should think about how to do this more carefully.The text was updated successfully, but these errors were encountered: