diff --git a/CHANGELOG.md b/CHANGELOG.md index 5703e81..5d11b5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed the out_dict for values from GEOSldas_LDAS.rc - Fixed error from MAPL's ApplicationSupport.F90 to init UDUNITS. ### Removed diff --git a/GEOSldas_App/ldas_setup b/GEOSldas_App/ldas_setup index c8d69b5..39164ba 100755 --- a/GEOSldas_App/ldas_setup +++ b/GEOSldas_App/ldas_setup @@ -1823,18 +1823,24 @@ def _produceExeInput(out_dict=None,ladas_cpl=0): # process lines that contain string "use_rc_defaults" if use_rc_defaults in line: line0 = line.split(use_rc_defaults)[1] - # strip out inline comment (if present) - position = line0.find('#') - if position>0: - line0 = line0[:position] - # extract key/value pair and add to dictionary - key, val = line0.split(":",1) - out_dict[key.strip()] = val.strip() - - + lines.append(line0) print () print () + if ladas_cpl > 0: + for line in lines: + line = line.strip() + if not line: + continue + if line.startswith('#'): + continue + # strip out inline comment (if present) + position = line.find('#') + if position>0: + line = line[:position] + # extract key/value pair and add to dictionary + key, val = line.split(":",1) + out_dict[key.strip()] = val.strip() # -----------------------------------------------------------------------------------