Skip to content

Commit

Permalink
return empty array instead of None type to prevent error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Sep 8, 2023
1 parent c1a3e7f commit 62fa9ae
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
18 changes: 9 additions & 9 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Documentation @ https://imi.readthedocs.io/en/latest/getting-started/imi-config-file.html

## General
RunName: "Test_Permian_1week"
RunName: "Test_Permian_1week_true"
isAWS: true
UseSlurm: true
SafeMode: true
Expand Down Expand Up @@ -84,18 +84,18 @@ Met: "geosfp"
## Setup modules
## Turn on/off different steps in setting up the inversion
SetupTemplateRundir: true
SetupSpinupRun: false
SetupJacobianRuns: false
SetupInversion: false
SetupPosteriorRun: false
SetupSpinupRun: true
SetupJacobianRuns: true
SetupInversion: true
SetupPosteriorRun: true

## Run modules
## Turn on/off different steps in performing the inversion
RunSetup: true
DoSpinup: false
DoJacobian: false
DoInversion: false
DoPosterior: false
DoSpinup: true
DoJacobian: true
DoInversion: true
DoPosterior: true

## IMI preview
DoPreview: true
Expand Down
5 changes: 3 additions & 2 deletions src/components/template_component/template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ setup_template() {

# Modify HISTORY.rc
sed -i -e "s:'CH4':#'CH4':g" \
-e "s:'Metrics:#'Metrics:g" HISTORY.rc

-e "s:'Metrics:#'Metrics:g" \
-e "s:'StateMet:#'StateMet:g" HISTORY.rc

# If turned on, save out hourly CH4 concentrations to daily files
if "$HourlyCH4"; then
sed -i -e 's/SpeciesConc.frequency: 00000100 000000/SpeciesConc.frequency: 00000000 010000/g' \
Expand Down
2 changes: 1 addition & 1 deletion src/inversion_scripts/point_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def SRON_plumes(config):
startDate = datetime.datetime.strptime(str(config["StartDate"]), "%Y%m%d")
endDate = datetime.datetime.strptime(str(config["EndDate"]), "%Y%m%d")
if endDate.year < 2023: # SRON plumes are only available beginning in 2023
return None
return []
custom_vectorfile = not config["CreateAutomaticRectilinearStateVectorFile"]
LatMax = config["LatMax"]
LatMin = config["LatMin"]
Expand Down

0 comments on commit 62fa9ae

Please sign in to comment.