Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto PR - develop β†’ MAPL-v3 - GEOSldas branch for testing of GCM GC branch feature/rreichle/snow_check_after_apply_LDAS_incr #677

Merged
merged 6 commits into from
Oct 18, 2023
13 changes: 13 additions & 0 deletions src/Applications/LDAS_App/tile_bin2nc4.F90
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,19 @@ FUNCTION getAttribute (SHORT_NAME, LNAME, UNT) result (str_atr)
case ('WESNN1'); LONG_NAME = 'snow_mass_layer_1'; UNITS = 'kg m-2'
case ('WESNN2'); LONG_NAME = 'snow_mass_layer_2'; UNITS = 'kg m-2'
case ('WESNN3'); LONG_NAME = 'snow_mass_layer_3'; UNITS = 'kg m-2'
case ('HTSNNN1'); LONG_NAME = 'heat_content_snow_layer_1'; UNITS = 'J m-2'
case ('HTSNNN2'); LONG_NAME = 'heat_content_snow_layer_2'; UNITS = 'J m-2'
case ('HTSNNN3'); LONG_NAME = 'heat_content_snow_layer_3'; UNITS = 'J m-2'
case ('SNDZN1'); LONG_NAME = 'snow_depth_layer_1'; UNITS = 'm'
case ('SNDZN2'); LONG_NAME = 'snow_depth_layer_2'; UNITS = 'm'
case ('SNDZN3'); LONG_NAME = 'snow_depth_layer_3'; UNITS = 'm'
case ('FICE1'); LONG_NAME = 'snow_frozen_fraction_layer_1'; UNITS = '1'
case ('FICE2'); LONG_NAME = 'snow_frozen_fraction_layer_2'; UNITS = '1'
case ('FICE3'); LONG_NAME = 'snow_frozen_fraction_layer_3'; UNITS = '1'
case ('ALBVR'); LONG_NAME = 'surface_reflectivity_for_visible_beam'; UNITS = '1'
case ('ALBVF'); LONG_NAME = 'surface_reflectivity_for_visible_diffuse'; UNITS = '1'
case ('ALBNR'); LONG_NAME = 'surface_reflectivity_for_near_infared_beam'; UNITS = '1'
case ('ALBNF'); LONG_NAME = 'surface_reflectivity_for_near_infrared_diffuse'; UNITS = '1'
case ('HLWUP'); LONG_NAME = 'surface_emitted_longwave_flux'; UNITS = 'W m-2'
case ('GWETPROF'); LONG_NAME = 'ave_prof_soil_wetness'; UNITS = '1'
case ('GWETROOT'); LONG_NAME = 'root_zone_soil_wetness'; UNITS = '1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ module clsm_ensdrv_drv_routines

! ********************************************************************

subroutine check_cat_progn( N_cat, cat_param, cat_progn )
subroutine check_cat_progn( check_snow, N_cat, cat_param, cat_progn )

! wrapper for subroutine check_catch_progn() which has been
! moved to "catch_iau.F90" in GEOScatch_GridComp - reichle, 3 Apr 2012

implicit none

logical, intent(in) :: check_snow

integer, intent(in) :: N_cat

type(cat_param_type), dimension(N_cat), intent(in) :: cat_param
Expand Down Expand Up @@ -124,7 +126,8 @@ subroutine check_cat_progn( N_cat, cat_param, cat_progn )
cat_progn%qa1, cat_progn%qa2, cat_progn%qa4, &
cat_progn%capac, cat_progn%catdef, &
cat_progn%rzexc, cat_progn%srfexc, &
ghtcnt, wesn, htsn, sndz )
ghtcnt, wesn, htsn, sndz, &
check_snow=check_snow)

! copy 2-d arrays back into cat_progn fields

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &

integer :: n, n_e

logical :: cat_progn_has_changed
logical :: cat_progn_has_changed, check_snow

character(len=*), parameter :: Iam = 'apply_enkf_increments'
character(len=400) :: err_msg
Expand All @@ -1278,17 +1278,19 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &
! apply increments

cat_progn_has_changed = .true. ! conservative initialization


check_snow = .true. ! conservative initialization

select_update_type: select case (update_type)

case (1,2) select_update_type ! soil moisture update

if (logit) write (logunit,*) &
'apply_enkf_increments(): applying soil moisture increments'

do n=1,N_catd
do n_e=1,N_ens

cat_progn(n,n_e)%srfexc = &
cat_progn(n,n_e)%srfexc + cat_progn_incr(n,n_e)%srfexc
cat_progn(n,n_e)%rzexc = &
Expand Down Expand Up @@ -1369,6 +1371,8 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &

cat_progn_has_changed = .true.

check_snow = .false. ! turn off for now to maintain 0-diff w/ SMAP Tb DA test case

case default

call ldas_abort(LDAS_GENERIC_ERROR, Iam, 'unknown update_type')
Expand All @@ -1383,7 +1387,7 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &

do n_e=1,N_ens

call check_cat_progn( N_catd, cat_param, cat_progn(:,n_e) )
call check_cat_progn( check_snow, N_catd, cat_param, cat_progn(:,n_e) )

end do

Expand Down