From f154bd815f4d8f7e55d7fc72cee0de06f71b8e3e Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Tue, 24 Jun 2025 16:08:46 -0400 Subject: [PATCH 1/2] fixed default values from GEOSldas_LDAS.rc for ladas --- CHANGELOG.md | 1 + GEOSldas_App/ldas_setup | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) 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..9813945 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() # ----------------------------------------------------------------------------------- From 6ec387229be1c294c1274a09428c4bf74b85424f Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Tue, 24 Jun 2025 16:11:18 -0400 Subject: [PATCH 2/2] typo --- GEOSldas_App/ldas_setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GEOSldas_App/ldas_setup b/GEOSldas_App/ldas_setup index 9813945..39164ba 100755 --- a/GEOSldas_App/ldas_setup +++ b/GEOSldas_App/ldas_setup @@ -1832,15 +1832,15 @@ def _produceExeInput(out_dict=None,ladas_cpl=0): line = line.strip() if not line: continue - if line.startswith('#') + 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() + key, val = line.split(":",1) + out_dict[key.strip()] = val.strip() # -----------------------------------------------------------------------------------