From 3f4dcba02dc6cfd330bf7acfcf50493731ba3b96 Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Wed, 15 May 2024 09:20:10 -0400 Subject: [PATCH 01/21] initial commit --- GEOSldas_App/ldas_setup | 4 +++- GEOSldas_App/process_hist.csh | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/GEOSldas_App/ldas_setup b/GEOSldas_App/ldas_setup index a49cf5e8..cbb191f8 100755 --- a/GEOSldas_App/ldas_setup +++ b/GEOSldas_App/ldas_setup @@ -347,8 +347,10 @@ class LDASsetup: self.catch = 'catch' if int(self.rqdExeInp['LSM_CHOICE']) == 2 : self.catch = 'catchcnclm40' + if int(self.rqdExeInp['LSM_CHOICE']) == 4 : + self.catch = 'catchcnclm51' - assert int(self.rqdExeInp['LSM_CHOICE']) <= 2, "\nLSM_CHOICE=3 (Catchment-CN4.5) is no longer supported. Please set LSM_CHOICE to 1 (Catchment) or 2 (Catchment-CN4.0)" + assert int(self.rqdExeInp['LSM_CHOICE']) <= 2 or int(self.rqdExeInp['LSM_CHOICE']) == 4, "\nLSM_CHOICE=3 (Catchment-CN4.5) is no longer supported. Please set LSM_CHOICE to 1 (Catchment), 2 (Catchment-CN4.0), or 4 (Catchment-CN5.1)" if 'POSTPROC_HIST' not in self.rqdExeInp: self.rqdExeInp['POSTPROC_HIST'] = 0 diff --git a/GEOSldas_App/process_hist.csh b/GEOSldas_App/process_hist.csh index 73d3b421..4ef88f1e 100755 --- a/GEOSldas_App/process_hist.csh +++ b/GEOSldas_App/process_hist.csh @@ -51,6 +51,12 @@ if($LSM_CHOICE == 3) then sed -i 's/>>>HIST_CATCHCNCLM45<<>>HIST_CATCHCN<<>>HIST_CATCHCNCLM51<< 1) then set GridComp = ENSAVG sed -i 's|VEGDYN|'VEGDYN_e0000'|g' $HISTRC From 8a57cdb432c9af9493f8548fb804415e3f78c47f Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Wed, 15 May 2024 09:30:31 -0400 Subject: [PATCH 02/21] group LSM_CHOICE 3 and 4 --- GEOSldas_App/process_hist.csh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/GEOSldas_App/process_hist.csh b/GEOSldas_App/process_hist.csh index 4ef88f1e..cf98a63d 100755 --- a/GEOSldas_App/process_hist.csh +++ b/GEOSldas_App/process_hist.csh @@ -45,18 +45,12 @@ if($LSM_CHOICE == 2) then sed -i 's/>>>HIST_CATCHCN<<= 3) then set GridComp = CATCHCN sed -i 's/>>>HIST_CATCHCN<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCN<<>>HIST_CATCHCNCLM51<< 1) then set GridComp = ENSAVG sed -i 's|VEGDYN|'VEGDYN_e0000'|g' $HISTRC From b5f480678df8d74297e4aa9b8b63ace475c0a41a Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Fri, 23 Aug 2024 16:13:46 -0400 Subject: [PATCH 03/21] adding autotrophic and heterotrophic respiration as outputs --- GEOSens_GridComp/GEOS_EnsGridComp.F90 | 30 +++++++++++++++++++++++++++ GEOSldas_App/GEOSldas_HIST.rc | 4 ++++ GEOSldas_App/tile_bin2nc4.F90 | 3 +++ 3 files changed, 37 insertions(+) diff --git a/GEOSens_GridComp/GEOS_EnsGridComp.F90 b/GEOSens_GridComp/GEOS_EnsGridComp.F90 index 40f8170d..6a85364c 100644 --- a/GEOSens_GridComp/GEOS_EnsGridComp.F90 +++ b/GEOSens_GridComp/GEOS_EnsGridComp.F90 @@ -1596,6 +1596,24 @@ subroutine SetServices(gc, rc) RC=STATUS ) VERIFY_(STATUS) + call MAPL_AddExportSpec(GC ,& + LONG_NAME = 'CN_autotrophic_respiration' ,& + UNITS = 'kg m-2 s-1' ,& + SHORT_NAME = 'CNAR' ,& + DIMS = MAPL_DimsTileOnly ,& + VLOCATION = MAPL_VLocationNone ,& + RC=STATUS ) + VERIFY_(STATUS) + + call MAPL_AddExportSpec(GC ,& + LONG_NAME = 'CN_heterotrophic_respiration' ,& + UNITS = 'kg m-2 s-1' ,& + SHORT_NAME = 'CNHR' ,& + DIMS = MAPL_DimsTileOnly ,& + VLOCATION = MAPL_VLocationNone ,& + RC=STATUS ) + VERIFY_(STATUS) + call MAPL_AddExportSpec(GC ,& LONG_NAME = 'CN_net_ecosystem_exchange' ,& UNITS = 'kg m-2 s-1' ,& @@ -2435,6 +2453,8 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) real, dimension(:), pointer :: CNNPP, CNNPP_enavg real, dimension(:), pointer :: CNGPP, CNGPP_enavg real, dimension(:), pointer :: CNSR, CNSR_enavg + real, dimension(:), pointer :: CNAR, CNAR_enavg + real, dimension(:), pointer :: CNHR, CNHR_enavg real, dimension(:), pointer :: CNNEE, CNNEE_enavg real, dimension(:), pointer :: CNXSMR, CNXSMR_enavg real, dimension(:), pointer :: CNADD, CNADD_enavg @@ -2807,6 +2827,8 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) call MAPL_GetPointer(import, CNNPP , 'CNNPP' , notFoundOK=.true., _RC) call MAPL_GetPointer(import, CNGPP , 'CNGPP' , notFoundOK=.true., _RC) call MAPL_GetPointer(import, CNSR , 'CNSR' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNAR , 'CNAR' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNHR , 'CNHR' , notFoundOK=.true., _RC) call MAPL_GetPointer(import, CNNEE , 'CNNEE' , notFoundOK=.true., _RC) call MAPL_GetPointer(import, CNXSMR , 'CNXSMR', notFoundOK=.true., _RC) call MAPL_GetPointer(import, CNADD , 'CNADD' , notFoundOK=.true., _RC) @@ -3107,6 +3129,8 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) call MAPL_GetPointer(export, CNNPP_enavg , 'CNNPP' , _RC) call MAPL_GetPointer(export, CNGPP_enavg , 'CNGPP' , _RC) call MAPL_GetPointer(export, CNSR_enavg , 'CNSR' , _RC) + call MAPL_GetPointer(export, CNAR_enavg , 'CNAR' , _RC) + call MAPL_GetPointer(export, CNHR_enavg , 'CNHR' , _RC) call MAPL_GetPointer(export, CNNEE_enavg , 'CNNEE' , _RC) call MAPL_GetPointer(export, CNXSMR_enavg , 'CNXSMR', _RC) call MAPL_GetPointer(export, CNADD_enavg , 'CNADD' , _RC) @@ -3270,6 +3294,8 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) if(associated( CNNPP_enavg)) CNNPP_enavg = 0.0 if(associated( CNGPP_enavg)) CNGPP_enavg = 0.0 if(associated( CNSR_enavg)) CNSR_enavg = 0.0 + if(associated( CNAR_enavg)) CNAR_enavg = 0.0 + if(associated( CNHR_enavg)) CNHR_enavg = 0.0 if(associated( CNNEE_enavg)) CNNEE_enavg = 0.0 if(associated( CNXSMR_enavg)) CNXSMR_enavg = 0.0 if(associated( CNADD_enavg)) CNADD_enavg = 0.0 @@ -3567,6 +3593,8 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) if(associated( CNNPP_enavg) .and. associated( CNNPP)) CNNPP_enavg = CNNPP_enavg + CNNPP if(associated( CNGPP_enavg) .and. associated( CNGPP)) CNGPP_enavg = CNGPP_enavg + CNGPP if(associated( CNSR_enavg) .and. associated( CNSR)) CNSR_enavg = CNSR_enavg + CNSR + if(associated( CNAR_enavg) .and. associated( CNAR)) CNAR_enavg = CNAR_enavg + CNAR + if(associated( CNHR_enavg) .and. associated( CNHR)) CNHR_enavg = CNHR_enavg + CNHR if(associated( CNNEE_enavg) .and. associated( CNNEE)) CNNEE_enavg = CNNEE_enavg + CNNEE if(associated( CNXSMR_enavg).and. associated( CNXSMR))CNXSMR_enavg = CNXSMR_enavg+ CNXSMR if(associated( CNADD_enavg) .and. associated( CNADD)) CNADD_enavg = CNADD_enavg + CNADD @@ -3795,6 +3823,8 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) if(associated( CNNPP_enavg)) CNNPP_enavg = CNNPP_enavg/NUM_ENSEMBLE if(associated( CNGPP_enavg)) CNGPP_enavg = CNGPP_enavg/NUM_ENSEMBLE if(associated( CNSR_enavg)) CNSR_enavg = CNSR_enavg/NUM_ENSEMBLE + if(associated( CNAR_enavg)) CNAR_enavg = CNAR_enavg/NUM_ENSEMBLE + if(associated( CNHR_enavg)) CNHR_enavg = CNHR_enavg/NUM_ENSEMBLE if(associated( CNNEE_enavg)) CNNEE_enavg = CNNEE_enavg/NUM_ENSEMBLE if(associated( CNXSMR_enavg)) CNXSMR_enavg = CNXSMR_enavg/NUM_ENSEMBLE if(associated( CNADD_enavg)) CNADD_enavg = CNADD_enavg/NUM_ENSEMBLE diff --git a/GEOSldas_App/GEOSldas_HIST.rc b/GEOSldas_App/GEOSldas_HIST.rc index adb52654..5bfa1e64 100644 --- a/GEOSldas_App/GEOSldas_HIST.rc +++ b/GEOSldas_App/GEOSldas_HIST.rc @@ -183,6 +183,8 @@ COLLECTIONS: >>>HIST_CATCHCN<<< 'CNNPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNGPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNSR' , 'GridComp' , +>>>HIST_CATCHCNCLM45<<< 'CNAR' , 'GridComp' , +>>>HIST_CATCHCNCLM45<<< 'CNHR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNEE' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNXSMR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNADD' , 'GridComp' , @@ -285,6 +287,8 @@ COLLECTIONS: >>>HIST_CATCHCN<<< 'CNNPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNGPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNSR' , 'GridComp' , +>>>HIST_CATCHCNCLM45<<< 'CNAR' , 'GridComp' , +>>>HIST_CATCHCNCLM45<<< 'CNHR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNEE' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNXSMR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNADD' , 'GridComp' , diff --git a/GEOSldas_App/tile_bin2nc4.F90 b/GEOSldas_App/tile_bin2nc4.F90 index df52c8be..0218be5e 100644 --- a/GEOSldas_App/tile_bin2nc4.F90 +++ b/GEOSldas_App/tile_bin2nc4.F90 @@ -352,9 +352,12 @@ FUNCTION getAttribute (SHORT_NAME, LNAME, UNT) result (str_atr) case ('CNTOTC'); LONG_NAME = 'CN_total_carbon'; UNITS = 'kg m-2' case ('CNVEGC'); LONG_NAME = 'CN_total_vegetation_carbon'; UNITS = 'kg m-2' case ('CNROOT'); LONG_NAME = 'CN_total_root_carbon'; UNITS = 'kg m-2' + case ('CNFROOTC'); LONG_NAME = 'CN_fine_root_carbon'; UNITS = 'kg m-2' case ('CNNPP'); LONG_NAME = 'CN_net_primary_production'; UNITS = 'kg m-2 s-1' case ('CNGPP'); LONG_NAME = 'CN_gross_primary_production'; UNITS = 'kg m-2 s-1' case ('CNSR'); LONG_NAME = 'CN_total_soil_respiration'; UNITS = 'kg m-2 s-1' + case ('CNAR'); LONG_NAME = 'CN_autotrophic_respiration'; UNITS = 'kg m-2 s-1' + case ('CNHR'); LONG_NAME = 'CN_heterotrophic_respiration'; UNITS = 'kg m-2 s-1' case ('CNNEE'); LONG_NAME = 'CN_net_ecosystem_exchange'; UNITS = 'kg m-2 s-1' case ('CNXSMR'); LONG_NAME = 'abstract_C_pool_to_meet_excess_MR_demand'; UNITS = 'kg m-2' case ('CNADD'); LONG_NAME = 'CN_added_to_maintain_positive_C'; UNITS = 'kg m-2 s-1' From 5b5b1530f5141f62f74c39539e3f2d6e560fdb2c Mon Sep 17 00:00:00 2001 From: Rolf Reichle Date: Tue, 1 Jul 2025 12:59:58 -0400 Subject: [PATCH 04/21] minor bug fix and cleanup for CatchCN51 (ldas_setup, GEOSldas_HIST.rc, process_hist.csh, tile_bin2nc4.F90) --- GEOSldas_App/GEOSldas_HIST.rc | 8 ++++---- GEOSldas_App/ldas_setup | 4 +++- GEOSldas_App/process_hist.csh | 12 +++++++++++- GEOSldas_App/tile_bin2nc4.F90 | 4 ++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/GEOSldas_App/GEOSldas_HIST.rc b/GEOSldas_App/GEOSldas_HIST.rc index 81c88b6c..55d3a093 100644 --- a/GEOSldas_App/GEOSldas_HIST.rc +++ b/GEOSldas_App/GEOSldas_HIST.rc @@ -206,8 +206,8 @@ EASEv2_M36.LM: 1 >>>HIST_CATCHCN<<< 'CNNPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNGPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNSR' , 'GridComp' , ->>>HIST_CATCHCNCLM45<<< 'CNAR' , 'GridComp' , ->>>HIST_CATCHCNCLM45<<< 'CNHR' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNAR' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNHR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNEE' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNXSMR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNADD' , 'GridComp' , @@ -314,8 +314,8 @@ EASEv2_M36.LM: 1 >>>HIST_CATCHCN<<< 'CNNPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNGPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNSR' , 'GridComp' , ->>>HIST_CATCHCNCLM45<<< 'CNAR' , 'GridComp' , ->>>HIST_CATCHCNCLM45<<< 'CNHR' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNAR' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNHR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNEE' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNXSMR' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNADD' , 'GridComp' , diff --git a/GEOSldas_App/ldas_setup b/GEOSldas_App/ldas_setup index 1ed9febc..4f1f3f4b 100755 --- a/GEOSldas_App/ldas_setup +++ b/GEOSldas_App/ldas_setup @@ -483,7 +483,9 @@ class LDASsetup: if int(self.rqdExeInp['LSM_CHOICE']) == 4 : self.catch = 'catchcnclm51' - assert int(self.rqdExeInp['LSM_CHOICE']) <= 2 or int(self.rqdExeInp['LSM_CHOICE']) == 4, "\nLSM_CHOICE=3 (Catchment-CN4.5) is no longer supported. Please set LSM_CHOICE to 1 (Catchment), 2 (Catchment-CN4.0), or 4 (Catchment-CN5.1)" + if self.with_land: + assert int(self.rqdExeInp['LSM_CHOICE']) <= 2 or int(self.rqdExeInp['LSM_CHOICE']) == 4, \ + "\nLSM_CHOICE=3 (Catchment-CN4.5) is no longer supported. Please set LSM_CHOICE to 1 (Catchment), 2 (Catchment-CN4.0), or 4 (Catchment-CN5.1)." if 'POSTPROC_HIST' not in self.rqdExeInp: self.rqdExeInp['POSTPROC_HIST'] = 0 diff --git a/GEOSldas_App/process_hist.csh b/GEOSldas_App/process_hist.csh index 1ad780b4..34b9c5f8 100644 --- a/GEOSldas_App/process_hist.csh +++ b/GEOSldas_App/process_hist.csh @@ -41,20 +41,30 @@ if($LSM_CHOICE == 1) then set GridComp = CATCH sed -i '/^>>>HIST_CATCHCN<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCNCLM51<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCNCLM51<<>>HIST_CATCHCN<<= 3) then +if($LSM_CHOICE == 3) then set GridComp = CATCHCN + sed -i '/^>>>HIST_CATCHCNCLM51<<>>HIST_CATCHCN<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCN<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCNCLM51<<>>HIST_AEROSOL<< Date: Tue, 1 Jul 2025 13:07:40 -0400 Subject: [PATCH 05/21] updated CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69f0ea67..653625fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Support for CatchmentCNCLM51. + ### Changed ### Fixed From c6bdeb6262576eab0b5e7d14c1a44cea3d5b8983 Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Mon, 7 Jul 2025 09:28:53 -0400 Subject: [PATCH 06/21] move CN_CLM51 namelist file to run directory --- GEOSldas_App/ldas_setup | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/GEOSldas_App/ldas_setup b/GEOSldas_App/ldas_setup index 4f1f3f4b..ab6d4094 100755 --- a/GEOSldas_App/ldas_setup +++ b/GEOSldas_App/ldas_setup @@ -1246,6 +1246,12 @@ class LDASsetup: # edit resolution info in ensupd nml file sp.run(['sed', '-i', 's//'+self.agcm_res+'/g', self.rundir+'/LDASsa_SPECIAL_inputs_ensupd.nml']) + #CN_CLM51 nml + cnclm51_nml = glob.glob(etcdir+'/CN_CLM51.nml') + for nmlfile in cnclm51_nml: + shortfile=self.rundir+'/'+nmlfile.split('/')[-1] + shutil.copy2(nmlfile, shortfile) + # get optimzed NX and IMS optimized_distribution_file = tempfile.NamedTemporaryFile(delete=False) print ("Optimizing... decomposition of processes.... \n") @@ -1259,7 +1265,6 @@ class LDASsetup: self.rqdRmInp['ntasks_model']=optinxny['NY'] print ('adjust ntasks_model %d for cubed-sphere grid' % int(self.rqdRmInp['ntasks_model'])) - #os.remove(optimized_distribution_file.name) # DEFAULT rc files From 0b5f9e3e92ea9c4ae2c73bc952b89d76b70eef5f Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Fri, 11 Jul 2025 10:17:38 -0400 Subject: [PATCH 07/21] add processing of CN_CLM51 parameter file --- GEOSldas_App/ldas_setup | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GEOSldas_App/ldas_setup b/GEOSldas_App/ldas_setup index ab6d4094..60e622aa 100755 --- a/GEOSldas_App/ldas_setup +++ b/GEOSldas_App/ldas_setup @@ -939,6 +939,10 @@ class LDASsetup: os.symlink(self.bcs_dir_landshared + 'CO2_MonthlyMean_DiurnalCycle.nc4', \ self.inpdir+'/CO2_MonthlyMean_DiurnalCycle.nc4') + if ("catchcn" in self.catch): + os.symlink(self.bcs_dir_landshared + 'ctsm51_params.c210923_forCNCLM.nc', \ + self.inpdir+'/ctsm51_params.c210923_forCNCLM.nc') + # create and link restart print ("Creating and linking restart...") _start = self.begDates[0] @@ -1376,6 +1380,7 @@ class LDASsetup: ldasrcInp[keyn]= valn if('catchcn' in self.catch): ldasrcInp['CO2_MonthlyMean_DiurnalCycle_FILE']= '../input/CO2_MonthlyMean_DiurnalCycle.nc4' + ldasrcInp['ctsm51_params.c210923_forCNCLM_FILE']= '../input/ctsm51_params.c210923_forCNCLM.nc' else: # remove catchcn-specific entries that do not apply to catch model ldasrcInp.pop('DTCN',None) From 4e8782eff267b56b5cd769386e374750613cd5ce Mon Sep 17 00:00:00 2001 From: Rolf Reichle <54944691+gmao-rreichle@users.noreply.github.com> Date: Fri, 11 Jul 2025 10:32:09 -0400 Subject: [PATCH 08/21] removed redundant if statement (ldas_setup) --- GEOSldas_App/ldas_setup | 2 -- 1 file changed, 2 deletions(-) diff --git a/GEOSldas_App/ldas_setup b/GEOSldas_App/ldas_setup index 60e622aa..f3c59335 100755 --- a/GEOSldas_App/ldas_setup +++ b/GEOSldas_App/ldas_setup @@ -938,8 +938,6 @@ class LDASsetup: if ("catchcn" in self.catch): os.symlink(self.bcs_dir_landshared + 'CO2_MonthlyMean_DiurnalCycle.nc4', \ self.inpdir+'/CO2_MonthlyMean_DiurnalCycle.nc4') - - if ("catchcn" in self.catch): os.symlink(self.bcs_dir_landshared + 'ctsm51_params.c210923_forCNCLM.nc', \ self.inpdir+'/ctsm51_params.c210923_forCNCLM.nc') From 1d714da94498a471bfb1532be35707c40ec01caf Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Fri, 11 Jul 2025 12:00:31 -0400 Subject: [PATCH 09/21] update comment --- GEOSldas_App/setup_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GEOSldas_App/setup_utils.py b/GEOSldas_App/setup_utils.py index e5c650d8..353607e5 100644 --- a/GEOSldas_App/setup_utils.py +++ b/GEOSldas_App/setup_utils.py @@ -9,7 +9,8 @@ def generate_echo(inpfile, ladas_cpl = 0): """ - Echo generator of inpfile, ignore line starts with "## " + Echo generator of inpfile + Remove the sepcial string according to defaults then return the line """ if ladas_cpl == 0 : use_rc_defaults = 'GEOSldas=>' # use defaults for LDAS From c85771627d85680eac204768d00183d013e4918c Mon Sep 17 00:00:00 2001 From: Rolf Reichle <54944691+gmao-rreichle@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:08:17 -0400 Subject: [PATCH 10/21] Updated comment (setup_utils.py) --- GEOSldas_App/setup_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GEOSldas_App/setup_utils.py b/GEOSldas_App/setup_utils.py index 353607e5..8a856efc 100644 --- a/GEOSldas_App/setup_utils.py +++ b/GEOSldas_App/setup_utils.py @@ -10,7 +10,7 @@ def generate_echo(inpfile, ladas_cpl = 0): """ Echo generator of inpfile - Remove the sepcial string according to defaults then return the line + Pick default values from GEOS_SurfaceGridComp.rc via special string "GEOS[xxxx]=>". """ if ladas_cpl == 0 : use_rc_defaults = 'GEOSldas=>' # use defaults for LDAS From 93c95fccc6c274d7a6ac3c1bb4f9312219f5f0a7 Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Fri, 11 Jul 2025 12:18:31 -0400 Subject: [PATCH 11/21] make CNCLM51 related tasks conditional on running CNCLM51 --- GEOSldas_App/ldas.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/GEOSldas_App/ldas.py b/GEOSldas_App/ldas.py index 7f9c7e19..3ac1d454 100644 --- a/GEOSldas_App/ldas.py +++ b/GEOSldas_App/ldas.py @@ -798,6 +798,7 @@ def createLnRstBc(self) : if ("catchcn" in self.catch): os.symlink(self.bcs_dir_landshared + 'CO2_MonthlyMean_DiurnalCycle.nc4', \ self.inpdir+'/CO2_MonthlyMean_DiurnalCycle.nc4') + if (self.catch=="catchcnclm51'"): os.symlink(self.bcs_dir_landshared + 'ctsm51_params.c210923_forCNCLM.nc', \ self.inpdir+'/ctsm51_params.c210923_forCNCLM.nc') @@ -1109,10 +1110,11 @@ def createRCFiles(self): sp.run(['sed', '-i', 's//'+self.agcm_res+'/g', self.rundir+'/LDASsa_SPECIAL_inputs_ensupd.nml']) #CN_CLM51 nml - cnclm51_nml = glob.glob(etcdir+'/CN_CLM51.nml') - for nmlfile in cnclm51_nml: - shortfile=self.rundir+'/'+nmlfile.split('/')[-1] - shutil.copy2(nmlfile, shortfile) + if (self.catch=="catchcnclm51'"): + cnclm51_nml = glob.glob(etcdir+'/CN_CLM51.nml') + for nmlfile in cnclm51_nml: + shortfile=self.rundir+'/'+nmlfile.split('/')[-1] + shutil.copy2(nmlfile, shortfile) # get optimzed NX and IMS optimized_distribution_file = tempfile.NamedTemporaryFile(delete=False) @@ -1239,7 +1241,8 @@ def createRCFiles(self): ldasrcInp[keyn]= valn if('catchcn' in self.catch): ldasrcInp['CO2_MonthlyMean_DiurnalCycle_FILE']= '../input/CO2_MonthlyMean_DiurnalCycle.nc4' - ldasrcInp['ctsm51_params.c210923_forCNCLM_FILE']= '../input/ctsm51_params.c210923_forCNCLM.nc' + if (self.catch=="catchcnclm51'"): + ldasrcInp['ctsm51_params.c210923_forCNCLM_FILE']= '../input/ctsm51_params.c210923_forCNCLM.nc' else: # remove catchcn-specific entries that do not apply to catch model ldasrcInp.pop('DTCN',None) From 9f6eafc92f691eb48bdfd23955ef7200ae98956a Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Fri, 11 Jul 2025 12:23:42 -0400 Subject: [PATCH 12/21] typo fix --- GEOSldas_App/ldas.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GEOSldas_App/ldas.py b/GEOSldas_App/ldas.py index 3ac1d454..fe139cb6 100644 --- a/GEOSldas_App/ldas.py +++ b/GEOSldas_App/ldas.py @@ -798,7 +798,7 @@ def createLnRstBc(self) : if ("catchcn" in self.catch): os.symlink(self.bcs_dir_landshared + 'CO2_MonthlyMean_DiurnalCycle.nc4', \ self.inpdir+'/CO2_MonthlyMean_DiurnalCycle.nc4') - if (self.catch=="catchcnclm51'"): + if (self.catch=="catchcnclm51"): os.symlink(self.bcs_dir_landshared + 'ctsm51_params.c210923_forCNCLM.nc', \ self.inpdir+'/ctsm51_params.c210923_forCNCLM.nc') @@ -1110,7 +1110,7 @@ def createRCFiles(self): sp.run(['sed', '-i', 's//'+self.agcm_res+'/g', self.rundir+'/LDASsa_SPECIAL_inputs_ensupd.nml']) #CN_CLM51 nml - if (self.catch=="catchcnclm51'"): + if (self.catch=="catchcnclm51"): cnclm51_nml = glob.glob(etcdir+'/CN_CLM51.nml') for nmlfile in cnclm51_nml: shortfile=self.rundir+'/'+nmlfile.split('/')[-1] @@ -1241,7 +1241,7 @@ def createRCFiles(self): ldasrcInp[keyn]= valn if('catchcn' in self.catch): ldasrcInp['CO2_MonthlyMean_DiurnalCycle_FILE']= '../input/CO2_MonthlyMean_DiurnalCycle.nc4' - if (self.catch=="catchcnclm51'"): + if (self.catch=="catchcnclm51"): ldasrcInp['ctsm51_params.c210923_forCNCLM_FILE']= '../input/ctsm51_params.c210923_forCNCLM.nc' else: # remove catchcn-specific entries that do not apply to catch model From 6198d5abcd45ab2faa65854a74aad6eededb0e3e Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Fri, 11 Jul 2025 15:18:52 -0400 Subject: [PATCH 13/21] rename file variable for CNCLM51 parameters --- GEOSldas_App/ldas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GEOSldas_App/ldas.py b/GEOSldas_App/ldas.py index fe139cb6..b2cb32b8 100644 --- a/GEOSldas_App/ldas.py +++ b/GEOSldas_App/ldas.py @@ -1242,7 +1242,7 @@ def createRCFiles(self): if('catchcn' in self.catch): ldasrcInp['CO2_MonthlyMean_DiurnalCycle_FILE']= '../input/CO2_MonthlyMean_DiurnalCycle.nc4' if (self.catch=="catchcnclm51"): - ldasrcInp['ctsm51_params.c210923_forCNCLM_FILE']= '../input/ctsm51_params.c210923_forCNCLM.nc' + ldasrcInp['CNCLM51_PARAM_FILE']= '../input/ctsm51_params.c210923_forCNCLM.nc' else: # remove catchcn-specific entries that do not apply to catch model ldasrcInp.pop('DTCN',None) From 7e717363c763e07ac13d2807133970078012deb9 Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Tue, 15 Jul 2025 13:20:42 -0400 Subject: [PATCH 14/21] fixing input variable name --- GEOSldas_App/ldas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GEOSldas_App/ldas.py b/GEOSldas_App/ldas.py index b2cb32b8..206d7773 100644 --- a/GEOSldas_App/ldas.py +++ b/GEOSldas_App/ldas.py @@ -374,7 +374,7 @@ def __init__(self, cmdLineArgs): self.in_tilefile =os.path.realpath(in_tilefiles_[0]) if self.with_land: - assert int(self.rqdExeInp['LSM_CHOICE']) <= 2 or int(self.rqdExeInp['LSM_CHOICE']) == 4, \ + assert int(self.ExeInputs['LSM_CHOICE']) <= 2 or int(self.ExeInputs['LSM_CHOICE']) == 4, \ "\nLSM_CHOICE=3 (Catchment-CN4.5) is no longer supported. Please set LSM_CHOICE to 1 (Catchment), 2 (Catchment-CN4.0), or 4 (Catchment-CN5.1)." if RESTART_str in ['1', '2']: y4m2='Y%4d/M%02d' % (self.begDates[0].year, self.begDates[0].month) From 108eb75e128738f2c7a763ca9032c58377007bec Mon Sep 17 00:00:00 2001 From: gmao-jkolassa Date: Thu, 17 Jul 2025 14:35:57 -0400 Subject: [PATCH 15/21] change long name of CNHR and CNAR --- GEOSens_GridComp/GEOS_EnsGridComp.F90 | 4 ++-- GEOSldas_App/tile_bin2nc4.F90 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GEOSens_GridComp/GEOS_EnsGridComp.F90 b/GEOSens_GridComp/GEOS_EnsGridComp.F90 index 738e3aa0..07e41569 100644 --- a/GEOSens_GridComp/GEOS_EnsGridComp.F90 +++ b/GEOSens_GridComp/GEOS_EnsGridComp.F90 @@ -1605,7 +1605,7 @@ subroutine SetServices(gc, rc) VERIFY_(STATUS) call MAPL_AddExportSpec(GC ,& - LONG_NAME = 'CN_autotrophic_respiration' ,& + LONG_NAME = 'CN_total_autotrophic_respiration' ,& UNITS = 'kg m-2 s-1' ,& SHORT_NAME = 'CNAR' ,& DIMS = MAPL_DimsTileOnly ,& @@ -1614,7 +1614,7 @@ subroutine SetServices(gc, rc) VERIFY_(STATUS) call MAPL_AddExportSpec(GC ,& - LONG_NAME = 'CN_heterotrophic_respiration' ,& + LONG_NAME = 'CN_total_heterotrophic_respiration' ,& UNITS = 'kg m-2 s-1' ,& SHORT_NAME = 'CNHR' ,& DIMS = MAPL_DimsTileOnly ,& diff --git a/GEOSldas_App/tile_bin2nc4.F90 b/GEOSldas_App/tile_bin2nc4.F90 index e528075e..a79e6490 100644 --- a/GEOSldas_App/tile_bin2nc4.F90 +++ b/GEOSldas_App/tile_bin2nc4.F90 @@ -365,8 +365,8 @@ FUNCTION getAttribute (SHORT_NAME, LNAME, UNT) result (str_atr) case ('CNNPP'); LONG_NAME = 'CN_net_primary_production'; UNITS = 'kg m-2 s-1' case ('CNGPP'); LONG_NAME = 'CN_gross_primary_production'; UNITS = 'kg m-2 s-1' case ('CNSR'); LONG_NAME = 'CN_total_soil_respiration'; UNITS = 'kg m-2 s-1' - case ('CNAR'); LONG_NAME = 'CN_autotrophic_respiration'; UNITS = 'kg m-2 s-1' - case ('CNHR'); LONG_NAME = 'CN_heterotrophic_respiration'; UNITS = 'kg m-2 s-1' + case ('CNAR'); LONG_NAME = 'CN_total_autotrophic_respiration'; UNITS = 'kg m-2 s-1' + case ('CNHR'); LONG_NAME = 'CN_total_heterotrophic_respiration'; UNITS = 'kg m-2 s-1' case ('CNNEE'); LONG_NAME = 'CN_net_ecosystem_exchange'; UNITS = 'kg m-2 s-1' case ('CNXSMR'); LONG_NAME = 'abstract_C_pool_to_meet_excess_MR_demand'; UNITS = 'kg m-2' case ('CNADD'); LONG_NAME = 'CN_added_to_maintain_positive_C'; UNITS = 'kg m-2 s-1' From f28284fece0c24c23e527c26bbe99ba7bb533078 Mon Sep 17 00:00:00 2001 From: Rolf Reichle Date: Wed, 6 Aug 2025 11:52:04 -0400 Subject: [PATCH 16/21] removed Catchment-CN4.5 code; improved vertical alignment (GEOS_EnsGridComp.F90, ldas.py, process_hist.csh, GEOSldas_HIST.rc) --- GEOSens_GridComp/GEOS_EnsGridComp.F90 | 244 +++++++++++++------------- GEOSldas_App/GEOSldas_HIST.rc | 4 +- GEOSldas_App/ldas.py | 2 - GEOSldas_App/process_hist.csh | 10 -- 4 files changed, 124 insertions(+), 136 deletions(-) diff --git a/GEOSens_GridComp/GEOS_EnsGridComp.F90 b/GEOSens_GridComp/GEOS_EnsGridComp.F90 index 07e41569..d2a81253 100644 --- a/GEOSens_GridComp/GEOS_EnsGridComp.F90 +++ b/GEOSens_GridComp/GEOS_EnsGridComp.F90 @@ -2456,30 +2456,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) real, dimension(:),pointer :: PEATCLSM_WATERLEVEL,PEATCLSM_WATERLEVEL_enavg real, dimension(:),pointer :: PEATCLSM_FSWCHANGE, PEATCLSM_FSWCHANGE_enavg - real, dimension(:), pointer :: CNLAI, CNLAI_enavg - real, dimension(:), pointer :: CNTLAI, CNTLAI_enavg - real, dimension(:), pointer :: CNSAI, CNSAI_enavg - real, dimension(:), pointer :: CNTOTC, CNTOTC_enavg - real, dimension(:), pointer :: CNVEGC, CNVEGC_enavg - real, dimension(:), pointer :: CNROOT, CNROOT_enavg - real, dimension(:), pointer :: CNFROOTC, CNFROOTC_enavg - real, dimension(:), pointer :: CNNPP, CNNPP_enavg - real, dimension(:), pointer :: CNGPP, CNGPP_enavg - real, dimension(:), pointer :: CNSR, CNSR_enavg - real, dimension(:), pointer :: CNAR, CNAR_enavg - real, dimension(:), pointer :: CNHR, CNHR_enavg - real, dimension(:), pointer :: CNNEE, CNNEE_enavg - real, dimension(:), pointer :: CNXSMR, CNXSMR_enavg - real, dimension(:), pointer :: CNADD, CNADD_enavg - real, dimension(:), pointer :: PARABS, PARABS_enavg - real, dimension(:), pointer :: PARINC, PARINC_enavg - real, dimension(:), pointer :: SCSAT, SCSAT_enavg - real, dimension(:), pointer :: SCUNS, SCUNS_enavg - real, dimension(:), pointer :: BTRANT, BTRANT_enavg - real, dimension(:), pointer :: SIF, SIF_enavg - real, dimension(:), pointer :: CNLOSS, CNLOSS_enavg - real, dimension(:), pointer :: CNBURN, CNBURN_enavg - real, dimension(:), pointer :: CNFSEL, CNFSEL_enavg + real, dimension(:), pointer :: CNLAI, CNLAI_enavg + real, dimension(:), pointer :: CNTLAI, CNTLAI_enavg + real, dimension(:), pointer :: CNSAI, CNSAI_enavg + real, dimension(:), pointer :: CNTOTC, CNTOTC_enavg + real, dimension(:), pointer :: CNVEGC, CNVEGC_enavg + real, dimension(:), pointer :: CNROOT, CNROOT_enavg + real, dimension(:), pointer :: CNFROOTC, CNFROOTC_enavg + real, dimension(:), pointer :: CNNPP, CNNPP_enavg + real, dimension(:), pointer :: CNGPP, CNGPP_enavg + real, dimension(:), pointer :: CNSR, CNSR_enavg + real, dimension(:), pointer :: CNAR, CNAR_enavg + real, dimension(:), pointer :: CNHR, CNHR_enavg + real, dimension(:), pointer :: CNNEE, CNNEE_enavg + real, dimension(:), pointer :: CNXSMR, CNXSMR_enavg + real, dimension(:), pointer :: CNADD, CNADD_enavg + real, dimension(:), pointer :: PARABS, PARABS_enavg + real, dimension(:), pointer :: PARINC, PARINC_enavg + real, dimension(:), pointer :: SCSAT, SCSAT_enavg + real, dimension(:), pointer :: SCUNS, SCUNS_enavg + real, dimension(:), pointer :: BTRANT, BTRANT_enavg + real, dimension(:), pointer :: SIF, SIF_enavg + real, dimension(:), pointer :: CNLOSS, CNLOSS_enavg + real, dimension(:), pointer :: CNBURN, CNBURN_enavg + real, dimension(:), pointer :: CNFSEL, CNFSEL_enavg real :: Nm1, NdivNm1 @@ -2831,30 +2831,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) ! CatchCN-specific variables (not available in standard Catch) - call MAPL_GetPointer(import, CNLAI , 'CNLAI' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNTLAI , 'CNTLAI', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNSAI , 'CNSAI' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNTOTC , 'CNTOTC', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNVEGC , 'CNVEGC', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNROOT , 'CNROOT', notFoundOK=.true., _RC) ! CatchCNCLM45 only - call MAPL_GetPointer(import, CNFROOTC , 'CNFROOTC', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNNPP , 'CNNPP' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNGPP , 'CNGPP' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNSR , 'CNSR' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNAR , 'CNAR' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNHR , 'CNHR' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNNEE , 'CNNEE' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNXSMR , 'CNXSMR', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNADD , 'CNADD' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, PARABS , 'PARABS', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, PARINC , 'PARINC', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, SCSAT , 'SCSAT' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, SCUNS , 'SCUNS' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, BTRANT , 'BTRANT', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, SIF , 'SIF' , notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNLOSS , 'CNLOSS', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNBURN , 'CNBURN', notFoundOK=.true., _RC) - call MAPL_GetPointer(import, CNFSEL , 'CNFSEL', notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNLAI , 'CNLAI' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNTLAI , 'CNTLAI' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNSAI , 'CNSAI' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNTOTC , 'CNTOTC' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNVEGC , 'CNVEGC' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNROOT , 'CNROOT' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNFROOTC , 'CNFROOTC', notFoundOK=.true., _RC) ! CatchCNCLM51 only + call MAPL_GetPointer(import, CNNPP , 'CNNPP' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNGPP , 'CNGPP' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNSR , 'CNSR' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNAR , 'CNAR' , notFoundOK=.true., _RC) ! CatchCNCLM51 only + call MAPL_GetPointer(import, CNHR , 'CNHR' , notFoundOK=.true., _RC) ! CatchCNCLM51 only + call MAPL_GetPointer(import, CNNEE , 'CNNEE' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNXSMR , 'CNXSMR' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNADD , 'CNADD' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, PARABS , 'PARABS' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, PARINC , 'PARINC' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, SCSAT , 'SCSAT' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, SCUNS , 'SCUNS' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, BTRANT , 'BTRANT' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, SIF , 'SIF' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNLOSS , 'CNLOSS' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNBURN , 'CNBURN' , notFoundOK=.true., _RC) + call MAPL_GetPointer(import, CNFSEL , 'CNFSEL' , notFoundOK=.true., _RC) @@ -3135,30 +3135,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) call MAPL_GetPointer(export, out_lai, 'LAI' , alloc=.true., rc=status) VERIFY_(status) - call MAPL_GetPointer(export, CNLAI_enavg , 'CNLAI' , _RC) - call MAPL_GetPointer(export, CNTLAI_enavg , 'CNTLAI', _RC) - call MAPL_GetPointer(export, CNSAI_enavg , 'CNSAI' , _RC) - call MAPL_GetPointer(export, CNTOTC_enavg , 'CNTOTC', _RC) - call MAPL_GetPointer(export, CNVEGC_enavg , 'CNVEGC', _RC) - call MAPL_GetPointer(export, CNROOT_enavg , 'CNROOT', _RC) - call MAPL_GetPointer(export, CNFROOTC_enavg, 'CNFROOTC', _RC) - call MAPL_GetPointer(export, CNNPP_enavg , 'CNNPP' , _RC) - call MAPL_GetPointer(export, CNGPP_enavg , 'CNGPP' , _RC) - call MAPL_GetPointer(export, CNSR_enavg , 'CNSR' , _RC) - call MAPL_GetPointer(export, CNAR_enavg , 'CNAR' , _RC) - call MAPL_GetPointer(export, CNHR_enavg , 'CNHR' , _RC) - call MAPL_GetPointer(export, CNNEE_enavg , 'CNNEE' , _RC) - call MAPL_GetPointer(export, CNXSMR_enavg , 'CNXSMR', _RC) - call MAPL_GetPointer(export, CNADD_enavg , 'CNADD' , _RC) - call MAPL_GetPointer(export, PARABS_enavg , 'PARABS', _RC) - call MAPL_GetPointer(export, PARINC_enavg , 'PARINC', _RC) - call MAPL_GetPointer(export, SCSAT_enavg , 'SCSAT' , _RC) - call MAPL_GetPointer(export, SCUNS_enavg , 'SCUNS' , _RC) - call MAPL_GetPointer(export, BTRANT_enavg , 'BTRANT', _RC) - call MAPL_GetPointer(export, SIF_enavg , 'SIF' , _RC) - call MAPL_GetPointer(export, CNLOSS_enavg , 'CNLOSS', _RC) - call MAPL_GetPointer(export, CNBURN_enavg , 'CNBURN', _RC) - call MAPL_GetPointer(export, CNFSEL_enavg , 'CNFSEL', _RC) + call MAPL_GetPointer(export, CNLAI_enavg , 'CNLAI' , _RC) + call MAPL_GetPointer(export, CNTLAI_enavg , 'CNTLAI' , _RC) + call MAPL_GetPointer(export, CNSAI_enavg , 'CNSAI' , _RC) + call MAPL_GetPointer(export, CNTOTC_enavg , 'CNTOTC' , _RC) + call MAPL_GetPointer(export, CNVEGC_enavg , 'CNVEGC' , _RC) + call MAPL_GetPointer(export, CNROOT_enavg , 'CNROOT' , _RC) + call MAPL_GetPointer(export, CNFROOTC_enavg , 'CNFROOTC', _RC) + call MAPL_GetPointer(export, CNNPP_enavg , 'CNNPP' , _RC) + call MAPL_GetPointer(export, CNGPP_enavg , 'CNGPP' , _RC) + call MAPL_GetPointer(export, CNSR_enavg , 'CNSR' , _RC) + call MAPL_GetPointer(export, CNAR_enavg , 'CNAR' , _RC) + call MAPL_GetPointer(export, CNHR_enavg , 'CNHR' , _RC) + call MAPL_GetPointer(export, CNNEE_enavg , 'CNNEE' , _RC) + call MAPL_GetPointer(export, CNXSMR_enavg , 'CNXSMR' , _RC) + call MAPL_GetPointer(export, CNADD_enavg , 'CNADD' , _RC) + call MAPL_GetPointer(export, PARABS_enavg , 'PARABS' , _RC) + call MAPL_GetPointer(export, PARINC_enavg , 'PARINC' , _RC) + call MAPL_GetPointer(export, SCSAT_enavg , 'SCSAT' , _RC) + call MAPL_GetPointer(export, SCUNS_enavg , 'SCUNS' , _RC) + call MAPL_GetPointer(export, BTRANT_enavg , 'BTRANT' , _RC) + call MAPL_GetPointer(export, SIF_enavg , 'SIF' , _RC) + call MAPL_GetPointer(export, CNLOSS_enavg , 'CNLOSS' , _RC) + call MAPL_GetPointer(export, CNBURN_enavg , 'CNBURN' , _RC) + call MAPL_GetPointer(export, CNFSEL_enavg , 'CNFSEL' , _RC) out_lai = in_lai if (collect_land_counter == 0) then @@ -3307,14 +3307,14 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) if(associated( CNTOTC_enavg)) CNTOTC_enavg = 0.0 if(associated( CNVEGC_enavg)) CNVEGC_enavg = 0.0 if(associated( CNROOT_enavg)) CNROOT_enavg = 0.0 - if(associated( CNFROOTC_enavg)) CNFROOTC_enavg = 0.0 + if(associated( CNFROOTC_enavg)) CNFROOTC_enavg = 0.0 if(associated( CNNPP_enavg)) CNNPP_enavg = 0.0 if(associated( CNGPP_enavg)) CNGPP_enavg = 0.0 if(associated( CNSR_enavg)) CNSR_enavg = 0.0 if(associated( CNAR_enavg)) CNAR_enavg = 0.0 if(associated( CNHR_enavg)) CNHR_enavg = 0.0 if(associated( CNNEE_enavg)) CNNEE_enavg = 0.0 - if(associated( CNXSMR_enavg)) CNXSMR_enavg = 0.0 + if(associated( CNXSMR_enavg)) CNXSMR_enavg = 0.0 if(associated( CNADD_enavg)) CNADD_enavg = 0.0 if(associated( PARABS_enavg)) PARABS_enavg = 0.0 if(associated( PARINC_enavg)) PARINC_enavg = 0.0 @@ -3602,30 +3602,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) if(associated(PEATCLSM_FSWCHANGE_enavg) .and. associated(PEATCLSM_FSWCHANGE)) & PEATCLSM_FSWCHANGE_enavg = PEATCLSM_FSWCHANGE_enavg + PEATCLSM_FSWCHANGE - if(associated( CNLAI_enavg) .and. associated( CNLAI)) CNLAI_enavg = CNLAI_enavg + CNLAI - if(associated( CNTLAI_enavg) .and. associated(CNTLAI)) CNTLAI_enavg = CNTLAI_enavg + CNTLAI - if(associated( CNSAI_enavg) .and. associated( CNSAI)) CNSAI_enavg = CNSAI_enavg + CNSAI - if(associated( CNTOTC_enavg) .and. associated(CNTOTC)) CNTOTC_enavg = CNTOTC_enavg + CNTOTC - if(associated( CNVEGC_enavg) .and. associated(CNVEGC)) CNVEGC_enavg = CNVEGC_enavg + CNVEGC - if(associated( CNROOT_enavg) .and. associated(CNROOT)) CNROOT_enavg = CNROOT_enavg + CNROOT - if(associated( CNFROOTC_enavg) .and. associated(CNFROOTC)) CNFROOTC_enavg = CNFROOTC_enavg + CNFROOTC - if(associated( CNNPP_enavg) .and. associated( CNNPP)) CNNPP_enavg = CNNPP_enavg + CNNPP - if(associated( CNGPP_enavg) .and. associated( CNGPP)) CNGPP_enavg = CNGPP_enavg + CNGPP - if(associated( CNSR_enavg) .and. associated( CNSR)) CNSR_enavg = CNSR_enavg + CNSR - if(associated( CNAR_enavg) .and. associated( CNAR)) CNAR_enavg = CNAR_enavg + CNAR - if(associated( CNHR_enavg) .and. associated( CNHR)) CNHR_enavg = CNHR_enavg + CNHR - if(associated( CNNEE_enavg) .and. associated( CNNEE)) CNNEE_enavg = CNNEE_enavg + CNNEE - if(associated( CNXSMR_enavg).and. associated( CNXSMR))CNXSMR_enavg = CNXSMR_enavg+ CNXSMR - if(associated( CNADD_enavg) .and. associated( CNADD)) CNADD_enavg = CNADD_enavg + CNADD - if(associated( PARABS_enavg) .and. associated(PARABS)) PARABS_enavg = PARABS_enavg + PARABS - if(associated( PARINC_enavg) .and. associated(PARINC)) PARINC_enavg = PARINC_enavg + PARINC - if(associated( SCSAT_enavg) .and. associated( SCSAT)) SCSAT_enavg = SCSAT_enavg + SCSAT - if(associated( SCUNS_enavg) .and. associated( SCUNS)) SCUNS_enavg = SCUNS_enavg + SCUNS - if(associated( BTRANT_enavg) .and. associated(BTRANT)) BTRANT_enavg = BTRANT_enavg + BTRANT - if(associated( SIF_enavg) .and. associated( SIF)) SIF_enavg = SIF_enavg + SIF - if(associated( CNLOSS_enavg) .and. associated(CNLOSS)) CNLOSS_enavg = CNLOSS_enavg + CNLOSS - if(associated( CNBURN_enavg) .and. associated(CNBURN)) CNBURN_enavg = CNBURN_enavg + CNBURN - if(associated( CNFSEL_enavg) .and. associated(CNFSEL)) CNFSEL_enavg = CNFSEL_enavg + CNFSEL + if(associated( CNLAI_enavg) .and. associated( CNLAI)) CNLAI_enavg = CNLAI_enavg + CNLAI + if(associated( CNTLAI_enavg) .and. associated( CNTLAI)) CNTLAI_enavg = CNTLAI_enavg + CNTLAI + if(associated( CNSAI_enavg) .and. associated( CNSAI)) CNSAI_enavg = CNSAI_enavg + CNSAI + if(associated( CNTOTC_enavg) .and. associated( CNTOTC)) CNTOTC_enavg = CNTOTC_enavg + CNTOTC + if(associated( CNVEGC_enavg) .and. associated( CNVEGC)) CNVEGC_enavg = CNVEGC_enavg + CNVEGC + if(associated( CNROOT_enavg) .and. associated( CNROOT)) CNROOT_enavg = CNROOT_enavg + CNROOT + if(associated( CNFROOTC_enavg) .and. associated( CNFROOTC)) CNFROOTC_enavg = CNFROOTC_enavg + CNFROOTC + if(associated( CNNPP_enavg) .and. associated( CNNPP)) CNNPP_enavg = CNNPP_enavg + CNNPP + if(associated( CNGPP_enavg) .and. associated( CNGPP)) CNGPP_enavg = CNGPP_enavg + CNGPP + if(associated( CNSR_enavg) .and. associated( CNSR)) CNSR_enavg = CNSR_enavg + CNSR + if(associated( CNAR_enavg) .and. associated( CNAR)) CNAR_enavg = CNAR_enavg + CNAR + if(associated( CNHR_enavg) .and. associated( CNHR)) CNHR_enavg = CNHR_enavg + CNHR + if(associated( CNNEE_enavg) .and. associated( CNNEE)) CNNEE_enavg = CNNEE_enavg + CNNEE + if(associated( CNXSMR_enavg) .and. associated( CNXSMR)) CNXSMR_enavg = CNXSMR_enavg + CNXSMR + if(associated( CNADD_enavg) .and. associated( CNADD)) CNADD_enavg = CNADD_enavg + CNADD + if(associated( PARABS_enavg) .and. associated( PARABS)) PARABS_enavg = PARABS_enavg + PARABS + if(associated( PARINC_enavg) .and. associated( PARINC)) PARINC_enavg = PARINC_enavg + PARINC + if(associated( SCSAT_enavg) .and. associated( SCSAT)) SCSAT_enavg = SCSAT_enavg + SCSAT + if(associated( SCUNS_enavg) .and. associated( SCUNS)) SCUNS_enavg = SCUNS_enavg + SCUNS + if(associated( BTRANT_enavg) .and. associated( BTRANT)) BTRANT_enavg = BTRANT_enavg + BTRANT + if(associated( SIF_enavg) .and. associated( SIF)) SIF_enavg = SIF_enavg + SIF + if(associated( CNLOSS_enavg) .and. associated( CNLOSS)) CNLOSS_enavg = CNLOSS_enavg + CNLOSS + if(associated( CNBURN_enavg) .and. associated( CNBURN)) CNBURN_enavg = CNBURN_enavg + CNBURN + if(associated( CNFSEL_enavg) .and. associated( CNFSEL)) CNFSEL_enavg = CNFSEL_enavg + CNFSEL ! This counter is relative to ens_id collect_land_counter = collect_land_counter + 1 @@ -3841,30 +3841,30 @@ subroutine Collect_land_ens(gc, import, export, clock, rc) if(associated(PEATCLSM_WATERLEVEL_enavg)) PEATCLSM_WATERLEVEL_enavg = PEATCLSM_WATERLEVEL_enavg/NUM_ENSEMBLE if(associated(PEATCLSM_FSWCHANGE_enavg)) PEATCLSM_FSWCHANGE_enavg = PEATCLSM_FSWCHANGE_enavg /NUM_ENSEMBLE - if(associated( CNLAI_enavg)) CNLAI_enavg = CNLAI_enavg/NUM_ENSEMBLE - if(associated( CNTLAI_enavg)) CNTLAI_enavg = CNTLAI_enavg/NUM_ENSEMBLE - if(associated( CNSAI_enavg)) CNSAI_enavg = CNSAI_enavg/NUM_ENSEMBLE - if(associated( CNTOTC_enavg)) CNTOTC_enavg = CNTOTC_enavg/NUM_ENSEMBLE - if(associated( CNVEGC_enavg)) CNVEGC_enavg = CNVEGC_enavg/NUM_ENSEMBLE - if(associated( CNROOT_enavg)) CNROOT_enavg = CNROOT_enavg/NUM_ENSEMBLE - if(associated( CNFROOTC_enavg)) CNFROOTC_enavg = CNFROOTC_enavg/NUM_ENSEMBLE - if(associated( CNNPP_enavg)) CNNPP_enavg = CNNPP_enavg/NUM_ENSEMBLE - if(associated( CNGPP_enavg)) CNGPP_enavg = CNGPP_enavg/NUM_ENSEMBLE - if(associated( CNSR_enavg)) CNSR_enavg = CNSR_enavg/NUM_ENSEMBLE - if(associated( CNAR_enavg)) CNAR_enavg = CNAR_enavg/NUM_ENSEMBLE - if(associated( CNHR_enavg)) CNHR_enavg = CNHR_enavg/NUM_ENSEMBLE - if(associated( CNNEE_enavg)) CNNEE_enavg = CNNEE_enavg/NUM_ENSEMBLE - if(associated( CNXSMR_enavg)) CNXSMR_enavg = CNXSMR_enavg/NUM_ENSEMBLE - if(associated( CNADD_enavg)) CNADD_enavg = CNADD_enavg/NUM_ENSEMBLE - if(associated( PARABS_enavg)) PARABS_enavg = PARABS_enavg/NUM_ENSEMBLE - if(associated( PARINC_enavg)) PARINC_enavg = PARINC_enavg/NUM_ENSEMBLE - if(associated( SCSAT_enavg)) SCSAT_enavg = SCSAT_enavg/NUM_ENSEMBLE - if(associated( SCUNS_enavg)) SCUNS_enavg = SCUNS_enavg/NUM_ENSEMBLE - if(associated( BTRANT_enavg)) BTRANT_enavg = BTRANT_enavg/NUM_ENSEMBLE - if(associated( SIF_enavg)) SIF_enavg = SIF_enavg/NUM_ENSEMBLE - if(associated( CNLOSS_enavg)) CNLOSS_enavg = CNLOSS_enavg/NUM_ENSEMBLE - if(associated( CNBURN_enavg)) CNBURN_enavg = CNBURN_enavg/NUM_ENSEMBLE - if(associated( CNFSEL_enavg)) CNFSEL_enavg = CNFSEL_enavg/NUM_ENSEMBLE + if(associated( CNLAI_enavg)) CNLAI_enavg = CNLAI_enavg/NUM_ENSEMBLE + if(associated( CNTLAI_enavg)) CNTLAI_enavg = CNTLAI_enavg/NUM_ENSEMBLE + if(associated( CNSAI_enavg)) CNSAI_enavg = CNSAI_enavg/NUM_ENSEMBLE + if(associated( CNTOTC_enavg)) CNTOTC_enavg = CNTOTC_enavg/NUM_ENSEMBLE + if(associated( CNVEGC_enavg)) CNVEGC_enavg = CNVEGC_enavg/NUM_ENSEMBLE + if(associated( CNROOT_enavg)) CNROOT_enavg = CNROOT_enavg/NUM_ENSEMBLE + if(associated( CNFROOTC_enavg)) CNFROOTC_enavg = CNFROOTC_enavg/NUM_ENSEMBLE + if(associated( CNNPP_enavg)) CNNPP_enavg = CNNPP_enavg/NUM_ENSEMBLE + if(associated( CNGPP_enavg)) CNGPP_enavg = CNGPP_enavg/NUM_ENSEMBLE + if(associated( CNSR_enavg)) CNSR_enavg = CNSR_enavg/NUM_ENSEMBLE + if(associated( CNAR_enavg)) CNAR_enavg = CNAR_enavg/NUM_ENSEMBLE + if(associated( CNHR_enavg)) CNHR_enavg = CNHR_enavg/NUM_ENSEMBLE + if(associated( CNNEE_enavg)) CNNEE_enavg = CNNEE_enavg/NUM_ENSEMBLE + if(associated( CNXSMR_enavg)) CNXSMR_enavg = CNXSMR_enavg/NUM_ENSEMBLE + if(associated( CNADD_enavg)) CNADD_enavg = CNADD_enavg/NUM_ENSEMBLE + if(associated( PARABS_enavg)) PARABS_enavg = PARABS_enavg/NUM_ENSEMBLE + if(associated( PARINC_enavg)) PARINC_enavg = PARINC_enavg/NUM_ENSEMBLE + if(associated( SCSAT_enavg)) SCSAT_enavg = SCSAT_enavg/NUM_ENSEMBLE + if(associated( SCUNS_enavg)) SCUNS_enavg = SCUNS_enavg/NUM_ENSEMBLE + if(associated( BTRANT_enavg)) BTRANT_enavg = BTRANT_enavg/NUM_ENSEMBLE + if(associated( SIF_enavg)) SIF_enavg = SIF_enavg/NUM_ENSEMBLE + if(associated( CNLOSS_enavg)) CNLOSS_enavg = CNLOSS_enavg/NUM_ENSEMBLE + if(associated( CNBURN_enavg)) CNBURN_enavg = CNBURN_enavg/NUM_ENSEMBLE + if(associated( CNFSEL_enavg)) CNFSEL_enavg = CNFSEL_enavg/NUM_ENSEMBLE ! Deal with no-data-values ! diff --git a/GEOSldas_App/GEOSldas_HIST.rc b/GEOSldas_App/GEOSldas_HIST.rc index 55d3a093..db96cdcb 100644 --- a/GEOSldas_App/GEOSldas_HIST.rc +++ b/GEOSldas_App/GEOSldas_HIST.rc @@ -202,7 +202,7 @@ EASEv2_M36.LM: 1 >>>HIST_CATCHCN<<< 'CNTOTC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNVEGC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNROOT' , 'GridComp' , ->>>HIST_CATCHCNCLM45<<< 'CNFROOTC' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNFROOTC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNGPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNSR' , 'GridComp' , @@ -310,7 +310,7 @@ EASEv2_M36.LM: 1 >>>HIST_CATCHCN<<< 'CNTOTC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNVEGC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNROOT' , 'GridComp' , ->>>HIST_CATCHCNCLM45<<< 'CNFROOTC' , 'GridComp' , +>>>HIST_CATCHCNCLM51<<< 'CNFROOTC' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNNPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNGPP' , 'GridComp' , >>>HIST_CATCHCN<<< 'CNSR' , 'GridComp' , diff --git a/GEOSldas_App/ldas.py b/GEOSldas_App/ldas.py index 206d7773..f7a46e1c 100644 --- a/GEOSldas_App/ldas.py +++ b/GEOSldas_App/ldas.py @@ -222,8 +222,6 @@ def __init__(self, cmdLineArgs): self.catch = 'catch' elif _lsm_choice_int == 2 : self.catch = 'catchcnclm40' - #elif _lsm_choice_int == 3 : - # self.catch = 'catchcnclm45' elif _lsm_choice_int == 4 : self.catch = 'catchcnclm51' _lsm_choice_int = None diff --git a/GEOSldas_App/process_hist.csh b/GEOSldas_App/process_hist.csh index 34b9c5f8..22fa9926 100644 --- a/GEOSldas_App/process_hist.csh +++ b/GEOSldas_App/process_hist.csh @@ -40,28 +40,18 @@ sed -i -e s/\'GRIDNAME\'/$GRIDNAME/g $HISTRC if($LSM_CHOICE == 1) then set GridComp = CATCH sed -i '/^>>>HIST_CATCHCN<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCNCLM51<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCNCLM51<<>>HIST_CATCHCN<<>>HIST_CATCHCNCLM51<<>>HIST_CATCHCN<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCN<<>>HIST_CATCHCNCLM45<<>>HIST_CATCHCNCLM51<< Date: Wed, 6 Aug 2025 12:16:58 -0400 Subject: [PATCH 17/21] RESTART=0 option: removed Catchment-CN4.5 code and disabled for Catchment-CN5.1 (ldas.py) --- GEOSldas_App/ldas.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/GEOSldas_App/ldas.py b/GEOSldas_App/ldas.py index f7a46e1c..1bd1d481 100644 --- a/GEOSldas_App/ldas.py +++ b/GEOSldas_App/ldas.py @@ -411,12 +411,10 @@ def __init__(self, cmdLineArgs): self.in_rstfile = '/discover/nobackup/projects/gmao/ssd/land/l_data/LandRestarts_for_Regridding' \ '/CatchCN/M36/20150301_0000/catchcnclm40_internal_dummy' self.in_tilefile = '/discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Heracles-NL/SMAP_EASEv2_M36/SMAP_EASEv2_M36_964x406.til' - elif (self.catch == 'catchcnclm45'): - self.in_rstfile = '/discover/nobackup/projects/gmao/ssd/land/l_data/LandRestarts_for_Regridding' \ - '/CatchCN/M36/19800101_0000/catchcnclm45_internal_dummy' - self.in_tilefile = '/discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Icarus-NLv3/Icarus-NLv3_EASE/SMAP_EASEv2_M36/SMAP_EASEv2_M36_964x406.til' + elif (self.catch == 'catchcnclm51'): + sys.exit('Error. RESTART=0 not (yet) available for Catchment-CN5.1.\n') else: - sys.exit('need to provide at least dummy files') + sys.exit('Error. Unknown model version.') # DEAL WITH mwRTM input from exec self.assim = True if self.ExeInputs.get('LAND_ASSIM', 'NO').upper() == 'YES' and self.with_land else False From a1724390fa4abfe13dbd6ff06d4bf8ba03e6a29d Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Fri, 8 Aug 2025 11:13:51 -0400 Subject: [PATCH 18/21] fix zoom value --- CHANGELOG.md | 1 + GEOSldas_App/ldas.py | 16 ++-------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f1a7245..2e9ac48b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed zoom value when there is landice. It will be determined by input tilefile - Fixed Restart = 1 when the domain is not global ### Removed diff --git a/GEOSldas_App/ldas.py b/GEOSldas_App/ldas.py index e49b395a..61cb7a4d 100644 --- a/GEOSldas_App/ldas.py +++ b/GEOSldas_App/ldas.py @@ -3,7 +3,6 @@ import os import sys import glob -import linecache import shutil import fileinput import time @@ -312,18 +311,7 @@ def __init__(self, cmdLineArgs): inpgeom_= None # assigning Gridname if 'GRIDNAME' not in self.ExeInputs : - tmptile = os.path.realpath(self.ExeInputs['TILING_FILE']) - extension = os.path.splitext(tmptile)[1] - if extension == '.domain': - extension = os.path.splitext(tmptile)[0] - gridname_ ='' - if extension == '.til': - gridname_ = linecache.getline(tmptile, 3).strip() - else: - nc_file = netCDF4.Dataset(tmptile,'r') - gridname_ = nc_file.getncattr('Grid_Name') - # in case it is an old name: SMAP-EASEvx-Mxx - gridname_ = gridname_.replace('SMAP-','').replace('-M','_M') + gridname_ = get_gridname(self.ExeInputs['TILING_FILE']) self.ExeInputs['GRIDNAME'] = gridname_ if 'POSTPROC_HIST' not in self.ExeInputs: @@ -867,6 +855,7 @@ def createLnRstBc(self) : config['output']['surface']['wemin'] = wemin_out if RESTART_str == "M" : # restart from merra2 + config['input']['surface']['zoom'] = '2' yyyymm = int(YYYYMMDDHH[0:6]) merra2_expid = "d5124_m2_jan10" if yyyymm < 197901 : @@ -898,7 +887,6 @@ def createLnRstBc(self) : catch_obj.remap() if self.with_landice: config['output']['surface']['remap_water'] = True - config['input']['surface']['zoom'] = '2' landice_obj = lake_landice_saltwater(config_obj = config) landice_obj.remap() From 62236cc065876aef09c768af4017837cd9a5d1a0 Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Fri, 15 Aug 2025 10:54:01 -0400 Subject: [PATCH 19/21] move get_gridname from remap to setup_utils --- GEOSldas_App/setup_utils.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/GEOSldas_App/setup_utils.py b/GEOSldas_App/setup_utils.py index 8a856efc..ed8aff99 100644 --- a/GEOSldas_App/setup_utils.py +++ b/GEOSldas_App/setup_utils.py @@ -5,7 +5,8 @@ from collections import OrderedDict from datetime import timedelta - +import netCDF4 +import linecache def generate_echo(inpfile, ladas_cpl = 0): """ @@ -311,3 +312,18 @@ def hours_to_hhmmss(hours): # Format as HHMMSS return f"{hours:02d}{minutes:02d}{seconds:02d}" + +def get_gridname(tilefile): + gridname_ ='' + tmptile = os.path.realpath(tilefile) + extension = os.path.splitext(tmptile)[1] + if extension == '.domain': + extension = os.path.splitext(tmptile)[0] + if extension == '.til': + gridname_ = linecache.getline(tmptile, 3).strip() + else: + nc_file = netCDF4.Dataset(tmptile,'r') + gridname_ = nc_file.getncattr('Grid_Name') + # in case it is an old name: SMAP-EASEvx-Mxx + gridname_ = gridname_.replace('SMAP-','').replace('-M','_M') + return gridname_ From d762dec80c836d7dcd09914f4aac510c30c26761 Mon Sep 17 00:00:00 2001 From: Rolf Reichle <54944691+gmao-rreichle@users.noreply.github.com> Date: Fri, 15 Aug 2025 11:36:53 -0400 Subject: [PATCH 20/21] added comments to get_gridname() (setup_utils.py) --- GEOSldas_App/setup_utils.py | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/GEOSldas_App/setup_utils.py b/GEOSldas_App/setup_utils.py index ed8aff99..7b8338c6 100644 --- a/GEOSldas_App/setup_utils.py +++ b/GEOSldas_App/setup_utils.py @@ -314,16 +314,21 @@ def hours_to_hhmmss(hours): return f"{hours:02d}{minutes:02d}{seconds:02d}" def get_gridname(tilefile): - gridname_ ='' - tmptile = os.path.realpath(tilefile) - extension = os.path.splitext(tmptile)[1] - if extension == '.domain': - extension = os.path.splitext(tmptile)[0] - if extension == '.til': - gridname_ = linecache.getline(tmptile, 3).strip() - else: - nc_file = netCDF4.Dataset(tmptile,'r') - gridname_ = nc_file.getncattr('Grid_Name') - # in case it is an old name: SMAP-EASEvx-Mxx - gridname_ = gridname_.replace('SMAP-','').replace('-M','_M') - return gridname_ + """ + get name of atmospheric grid from header/attributes of tile file (*.til) + """ + + gridname_ ='' + tmptile = os.path.realpath(tilefile) + extension = os.path.splitext(tmptile)[1] + if extension == '.domain': + extension = os.path.splitext(tmptile)[0] + if extension == '.til': + gridname_ = linecache.getline(tmptile, 3).strip() + else: + nc_file = netCDF4.Dataset(tmptile,'r') + gridname_ = nc_file.getncattr('Grid_Name') + # in case it is an old name: SMAP-EASEvx-Mxx: change to EASEvx_Mxx + gridname_ = gridname_.replace('SMAP-','').replace('-M','_M') + return gridname_ + From d0f1774a0256fc155db1bd1721b5b4f51edf36f9 Mon Sep 17 00:00:00 2001 From: Rolf Reichle Date: Mon, 25 Aug 2025 15:59:06 -0400 Subject: [PATCH 21/21] added documentation for CatchCNCLM51 (GEOSldas_App/GEOSldas_LDAS.rc, GEOSldas_App/setup_utils.py) --- GEOSldas_App/GEOSldas_LDAS.rc | 3 ++- GEOSldas_App/setup_utils.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/GEOSldas_App/GEOSldas_LDAS.rc b/GEOSldas_App/GEOSldas_LDAS.rc index 8ca6018c..0f1d0430 100644 --- a/GEOSldas_App/GEOSldas_LDAS.rc +++ b/GEOSldas_App/GEOSldas_LDAS.rc @@ -31,8 +31,9 @@ CATCHMENT_SPINUP: 0 # ---- Choice of land surface model (for LAND tiles) # -# 1 : Catchment model (default) +# 1 : Catchment model (default) # 2 : CatchmentCN-CLM4.0 +# 4 : CatchmentCN-CLM5.1 (edit "ntasks-per-node" in batinp file to increase memory unless on EASEv2_M36) # LSM_CHOICE: 1 diff --git a/GEOSldas_App/setup_utils.py b/GEOSldas_App/setup_utils.py index 7b8338c6..15af4d65 100644 --- a/GEOSldas_App/setup_utils.py +++ b/GEOSldas_App/setup_utils.py @@ -269,7 +269,9 @@ def printResourceInputSampleFile(): print ('# IMPORTANT REQUIREMENT: total #writers = writers-per-node * oserver_nodes >= 2;') print ('# jobs will hang when oserver_nodes = writers-per-node = 1.') print ('# - ntasks-per-node = requesting fewer ntasks-per-node than total number of cores per node increases allocated memory;') - print ('# ntasks_model should be a multiple of ntasks-per-node') + print ('# defaults to number of cores per node;') + print ('# ntasks_model should be a multiple of ntasks-per-node;') + print ('# edit ntasks-per-node when running CatchCNCLM51 on resolution other than EASEv2_M36') print ('# - constraint = name of chip set(s) (NCCS default is "[mil|cas]", NAS default is "cas_ait")') print ('#') for key in optionalKeys: