From 2e8c884ab6bf14785df4155700cdd80024fd7f9d Mon Sep 17 00:00:00 2001 From: Ming Chen Date: Wed, 1 Apr 2026 15:16:33 -0600 Subject: [PATCH 1/2] Fix the bug in snow initialization --- src/core_atmosphere/physics/mpas_atmphys_initialize_real.F | 7 +++++++ src/core_init_atmosphere/mpas_init_atm_cases.F | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F b/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F index d6dc1bc0c1..8d42456e41 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F +++ b/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F @@ -606,6 +606,7 @@ subroutine physics_init_seaice(mesh, input, dims, configs) real(kind=RKIND),pointer:: tsk_seaice_threshold real(kind=RKIND),dimension(:),pointer :: vegfra real(kind=RKIND),dimension(:),pointer :: seaice,snoalb,xice + real(kind=RKIND),dimension(:),pointer :: snow, snowh, snowc real(kind=RKIND),dimension(:),pointer :: skintemp,tmn,xland real(kind=RKIND),dimension(:,:),pointer:: tslb,smois,sh2o,smcrel @@ -637,6 +638,9 @@ subroutine physics_init_seaice(mesh, input, dims, configs) call mpas_pool_get_array(input, 'seaice', seaice) call mpas_pool_get_array(input, 'xice', xice) + call mpas_pool_get_array(input, 'snowc', xice) + call mpas_pool_get_array(input, 'snowh', xice) + call mpas_pool_get_array(input, 'snow', xice) call mpas_pool_get_array(input, 'vegfra', vegfra) call mpas_pool_get_array(input, 'skintemp', skintemp) @@ -699,6 +703,9 @@ subroutine physics_init_seaice(mesh, input, dims, configs) call mpas_log_write('$i $r $r $r', intArgs=(/iCell/), & realArgs=(/real(landmask(iCell),kind=RKIND),xland(iCell),xice(iCell)/)) xice(iCell) = 0._RKIND + snowc(iCell) = 0._RKIND ! snow = 0 over water points + snowh(iCell) = 0._RKIND + snow(iCell) = 0._RKIND endif enddo diff --git a/src/core_init_atmosphere/mpas_init_atm_cases.F b/src/core_init_atmosphere/mpas_init_atm_cases.F index 5757e16baa..fb67a5164b 100644 --- a/src/core_init_atmosphere/mpas_init_atm_cases.F +++ b/src/core_init_atmosphere/mpas_init_atm_cases.F @@ -4539,9 +4539,6 @@ subroutine init_atm_case_gfs(block, mesh, nCells, nEdges, nVertLevels, fg, state interp_list(2) = W_AVERAGE4 interp_list(3) = 0 - masked = 0 - fillval = 0.0 - nInterpPoints = nCells latPoints => latCell lonPoints => lonCell From 77be0a6c3144a705bb7c2e75ee7b10e6e66add2b Mon Sep 17 00:00:00 2001 From: Ming Chen Date: Fri, 3 Apr 2026 10:18:20 -0600 Subject: [PATCH 2/2] Fix the error in the previous commit --- .../physics/mpas_atmphys_initialize_real.F | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F b/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F index 8d42456e41..b4513f9ba2 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F +++ b/src/core_atmosphere/physics/mpas_atmphys_initialize_real.F @@ -638,9 +638,9 @@ subroutine physics_init_seaice(mesh, input, dims, configs) call mpas_pool_get_array(input, 'seaice', seaice) call mpas_pool_get_array(input, 'xice', xice) - call mpas_pool_get_array(input, 'snowc', xice) - call mpas_pool_get_array(input, 'snowh', xice) - call mpas_pool_get_array(input, 'snow', xice) + call mpas_pool_get_array(input, 'snowc', snowc) + call mpas_pool_get_array(input, 'snowh', snowh) + call mpas_pool_get_array(input, 'snow', snow) call mpas_pool_get_array(input, 'vegfra', vegfra) call mpas_pool_get_array(input, 'skintemp', skintemp) @@ -703,9 +703,11 @@ subroutine physics_init_seaice(mesh, input, dims, configs) call mpas_log_write('$i $r $r $r', intArgs=(/iCell/), & realArgs=(/real(landmask(iCell),kind=RKIND),xland(iCell),xice(iCell)/)) xice(iCell) = 0._RKIND - snowc(iCell) = 0._RKIND ! snow = 0 over water points - snowh(iCell) = 0._RKIND - snow(iCell) = 0._RKIND + if(landmask(iCell) .eq. 0) then + snowc(iCell) = 0._RKIND ! snow = 0 over water points + snowh(iCell) = 0._RKIND + snow(iCell) = 0._RKIND + endif endif enddo