Skip to content

Commit

Permalink
fixes #1657
Browse files Browse the repository at this point in the history
  • Loading branch information
bena-nasa committed Sep 6, 2022
1 parent f3b0f6c commit b924ac6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed bug that required a /dev/null ExtData entry to still have a file variable name

### Added

### Changed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Exports:
VAR2D: {variable: VAR2D, collection: "/dev/null", linear_transformation: [17.0,0.0]}
VAR2D: {collection: "/dev/null", linear_transformation: [17.0,0.0]}
14 changes: 7 additions & 7 deletions gridcomps/ExtData2G/ExtDataRule.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function new_ExtDataRule(config,sample_map,key,unusable,multi_rule,rc) result(ru
integer, optional, intent(out) :: rc

type(ExtDataRule) :: rule
logical :: is_present
logical :: collection_present, variable_present
integer :: status
class(YAML_Node), pointer ::config1
character(len=:), allocatable :: tempc
Expand All @@ -56,20 +56,20 @@ function new_ExtDataRule(config,sample_map,key,unusable,multi_rule,rc) result(ru
end if

if (allocated(tempc)) deallocate(tempc)
is_present = config%has("collection")
_ASSERT(is_present,"no collection present in ExtData export")
collection_present = config%has("collection")
_ASSERT(collection_present,"no collection present in ExtData export")
rule%collection = config%of("collection")

if (allocated(tempc)) deallocate(tempc)
is_present = config%has("variable")
variable_present = config%has("variable")
if (index(rule%collection,"/dev/null")==0) then
_ASSERT(is_present,"no variable present in ExtData export")
_ASSERT(variable_present,"no variable present in ExtData export")
end if
if (is_present) then
if (variable_present) then
tempc = config%of("variable")
rule%file_var=tempc
else
_FAIL("no variable name in rule")
rule%file_var='null'
end if

if (config%has("sample")) then
Expand Down

0 comments on commit b924ac6

Please sign in to comment.