From f9f5c51e365bc2c9ac9c6f66674d416a2336c3b0 Mon Sep 17 00:00:00 2001 From: lbusschaert Date: Mon, 21 Oct 2024 17:00:57 +0200 Subject: [PATCH 1/2] BUG: fixed uninitialized variable --- .../noahmp.4.0.1/irrigation/noahmp401_getirrigationstates.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lis/surfacemodels/land/noahmp.4.0.1/irrigation/noahmp401_getirrigationstates.F90 b/lis/surfacemodels/land/noahmp.4.0.1/irrigation/noahmp401_getirrigationstates.F90 index f6a550e2d..db5319a1c 100755 --- a/lis/surfacemodels/land/noahmp.4.0.1/irrigation/noahmp401_getirrigationstates.F90 +++ b/lis/surfacemodels/land/noahmp.4.0.1/irrigation/noahmp401_getirrigationstates.F90 @@ -212,7 +212,7 @@ subroutine noahmp401_getirrigationstates(n,irrigState) t=(i-1)*LIS_rc%nensem(n)+m - timestep = NOAHMP401_struc(n)%dt + timestep = NOAHMP401_struc(n)%ts soiltyp = noahmp401_struc(n)%noahmp401(t)%soiltype From 0279dba9fa4fa6f239bc9606c69dee68ab1f468a Mon Sep 17 00:00:00 2001 From: Mahdi Navari Date: Fri, 25 Oct 2024 14:30:36 -0400 Subject: [PATCH 2/2] Fix the bug in writing model output in 2D ensemble grid space #1627 See pull request #1628. (cherry picked from commit 5cae22d1b5039072187c938052cca02e4d39e437) --- lis/core/LIS_historyMod.F90 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lis/core/LIS_historyMod.F90 b/lis/core/LIS_historyMod.F90 index eafc2f03a..aa394e38d 100644 --- a/lis/core/LIS_historyMod.F90 +++ b/lis/core/LIS_historyMod.F90 @@ -66,6 +66,8 @@ module LIS_historyMod ! used in GRIB1 & GRIB2 format ! 18 Oct 2018: David Mocko: Check lis.config entry for option to turn off ! writing ASCII stats files with netCDF output format +! 25 Oct 2024: Mahdi Navari: updated the code to fix the bug in writing +! model output in 2D ensemble grid space (see https://github.com/NASA-LIS/LISF/issues/1627 ) ! ! !USES: use LIS_coreMod @@ -3440,16 +3442,16 @@ subroutine defineNETCDFheaderVar(n,ftn,dimID, dataEntry, non_model_fields) ! lat/lon field output will write in 1D if(LIS_rc%nlatlon_dimensions == '1D') then if(nmodel_status.eq.1) then - call LIS_verify(nf90_def_var(ftn,trim(short_name),& + call LIS_verify(nf90_def_var(ftn,trim(dataEntry%short_name),& nf90_float,& dimids = dimID(2), varID=dataEntry%varId_def),& - 'nf90_def_var for '//trim(short_name)//& + 'nf90_def_var for '//trim(dataEntry%short_name)//& 'failed in defineNETCDFheadervar') elseif(nmodel_status.eq.2) then - call LIS_verify(nf90_def_var(ftn,trim(short_name),& + call LIS_verify(nf90_def_var(ftn,trim(dataEntry%short_name),& nf90_float,& dimids = dimID(1), varID=dataEntry%varId_def),& - 'nf90_def_var for '//trim(short_name)//& + 'nf90_def_var for '//trim(dataEntry%short_name)//& 'failed in defineNETCDFheadervar') else call LIS_verify(nf90_def_var(ftn,trim(dataEntry%short_name)//'_tavg',& @@ -3460,10 +3462,10 @@ subroutine defineNETCDFheaderVar(n,ftn,dimID, dataEntry, non_model_fields) endif ! latlon field output will write in 2D else - call LIS_verify(nf90_def_var(ftn,trim(short_name),& + call LIS_verify(nf90_def_var(ftn,trim(dataEntry%short_name),& nf90_float,& dimids = dimID(1:2), varID=dataEntry%varID_def),& - 'nf90_def_var for '//trim(short_name)//& + 'nf90_def_var for '//trim(dataEntry%short_name)//& 'failed in defineNETCDFheadervar') endif