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 - add ascat mask to read_obs #724

Merged
merged 131 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
f3c6c84
MODIS snow cover assimilation
jpark50 Jul 19, 2021
edf1282
new updates
jpark50 Aug 2, 2021
ca73339
Debugging completed (still need to include MODIS observation reader)
jpark50 Sep 10, 2021
e8083f2
Added 1/2 of the MODIS SCA observation reader
jpark50 Sep 16, 2021
c1c85ee
Updates on MODIS SCA DA
jpark50 Sep 30, 2021
86a28ad
deleting the swo file
jpark50 Sep 30, 2021
765e145
Updating the MODIS SCA assimilation based on meeting 10/9/21
jpark50 Oct 12, 2021
580d123
pusing the update until 10/15/2021
jpark50 Oct 15, 2021
030da9c
Summary of updates regarding on 10/29/2021
jpark50 Oct 29, 2021
c1a3f23
Summary of the commits made on 11/08/2021
jpark50 Nov 8, 2021
fbf9703
Request for reviewing the SnowDA code in GEOSldas[12/15/2021]
jpark50 Dec 15, 2021
d953d2a
cleaned up obsolete cat_diagS changes
gmao-rreichle Dec 15, 2021
d0599e5
miscellaneous cleanup
gmao-rreichle Dec 15, 2021
e3ad8f9
land_assim: yes; pertubation:0; no mwRTM file
weiyuan-jiang Jan 7, 2022
07206bc
Merge pull request #509 from GEOS-ESM/feature/wjiang/MODIS_snow_cover…
jpark50 Jan 7, 2022
a6aaa4e
components.yaml: point to associated GEOSgcm_GridComp branch
gmao-rreichle Jan 10, 2022
3196f30
commented out bad and redundant statements in MODIS SCA reader (clsm_…
gmao-rreichle Jan 10, 2022
288f77b
fix read_obs
weiyuan-jiang Jan 13, 2022
019e31c
added "met_force" to Analysis Load Balance in get_enkf_increments()
gmao-rreichle Jan 13, 2022
a495966
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Jan 28, 2022
99f1801
fixing previous commit's conflict resolution for components.yaml
gmao-rreichle Jan 28, 2022
c4d9ec2
updates to lines 4518-4619
Feb 4, 2022
4c2c093
merged with develop and resolved conflicts
Apr 28, 2022
09a2049
Snow DA modifications to calculate increments
May 27, 2022
48a4a30
dummy commit (added one space in components.yaml)
gmao-rreichle May 27, 2022
f721e68
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Jul 16, 2022
001bbe1
reverting components.yaml
Jul 29, 2022
c4b53dc
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Sep 12, 2022
740cac9
updates to snow da, correct cat_progn_incr
Sep 15, 2022
78431e5
updates to snow fraction assimilation
Sep 21, 2022
1342aa2
updates to sno depth incr
Sep 30, 2022
0419be6
Additional snow analysis changes (clsm_ensupd_upd_routines.F90):
gmao-rreichle Oct 7, 2022
44f78ef
fixed silly errors in previous commmit
gmao-rreichle Oct 7, 2022
7b1837d
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Oct 12, 2022
c706ddc
Update to re-add asnow_ana
Oct 14, 2022
b14a78e
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Oct 25, 2022
3dbff06
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Oct 26, 2022
c7ed242
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Nov 16, 2022
b0259a6
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Nov 29, 2022
f85ef51
modification to snow DA heat content corr
Nov 30, 2022
ec351db
alpha update to 0.4
Dec 1, 2022
6ba7b44
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Dec 3, 2022
5a7504a
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Dec 8, 2022
a2adbb2
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Dec 9, 2022
8d83c1b
fix to negative sno increment calc
Dec 9, 2022
a060d8e
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Jan 6, 2023
3ac33dd
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Feb 2, 2023
4426674
now SCA / CI_Index
Feb 2, 2023
74ee3a5
small updates to read MODIS v06.1
Feb 2, 2023
34beacd
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Mar 14, 2023
18f4cab
Merged branch 'develop' into 'feature/rreichle/MODIS_snow_cover_fract…
gmao-rreichle Mar 23, 2023
2e53aac
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Apr 17, 2023
02698b4
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Jun 29, 2023
c3f0bc0
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Jul 6, 2023
2698c97
clean up of modis scf assimilation
Jul 11, 2023
64a7ba4
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Jul 11, 2023
3a2619c
make longnames for albedo consistent with recent HISTORY updates for …
gmao-rreichle Jul 14, 2023
73b37a5
cleaned up ensupd nml specs for MODIS Terra SCF obs
gmao-rreichle Jul 14, 2023
098ece1
undoing white-space changes in GEOS_LandAssimGridComp.F90 by revertin…
gmao-rreichle Jul 14, 2023
3a823ec
undoing superfluous white-space changes in clsm_bias_routines.F90 by …
gmao-rreichle Jul 14, 2023
ae7d88b
minor clean-up for MODIS SCF DA, incl white-space changes to minimize…
gmao-rreichle Jul 14, 2023
f3cd1c3
minor cleanup of MODIS SCF DA: removed obsolete log statements and co…
gmao-rreichle Jul 14, 2023
9078068
additional minor cleanup for MODIS SCF DA (clsm_ensupd_enkf_update.F9…
gmao-rreichle Jul 14, 2023
91c948a
cleanup of MODIS SCF analysis subroutine and other minor cleanup (cls…
gmao-rreichle Jul 15, 2023
c44a71b
fixed build errors in previous commit (clsm_ensupd_upd_routines.F90, …
gmao-rreichle Jul 15, 2023
d89cf9d
fixed build error in earlier commit (clsm_ensupd_upd_routines.F90)
gmao-rreichle Jul 15, 2023
1416f9e
initial cleanup of MODIS SCF reader (variable names, some simplificat…
gmao-rreichle Jul 15, 2023
bae24fa
fixed build error in previous commit; additional minor cleanup (clsm_…
gmao-rreichle Jul 15, 2023
04f8980
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Aug 9, 2023
42972ee
fix to clsm_ensup_read_obs for modis file name
Aug 25, 2023
f26332c
minor fix to MODISscf obs file name (clsm_ensupd_read_obs.F90)
gmao-rreichle Aug 25, 2023
ced4ef6
Merge branch 'bugfix/rreichle/longwave_longnames' into feature/rreich…
gmao-rreichle Sep 19, 2023
5844ce9
fix default obs_param values of non-MODIS-SCF species to match "devel…
gmao-rreichle Sep 21, 2023
3ac6d3b
Revert "fix default obs_param values of non-MODIS-SCF species to matc…
gmao-rreichle Sep 21, 2023
c7dcf27
additional edits re. comments about satellite viewing angles in obs_p…
gmao-rreichle Sep 21, 2023
cf25d17
minor fix in comment about SCF_ANA_BETA parameter (clsm_ensupd_glob_p…
gmao-rreichle Sep 21, 2023
e02ac5f
fixed indentation (clsm_ensupd_enkf_update.F90)
gmao-rreichle Sep 21, 2023
012c979
updated snow depth increment calculation
Sep 22, 2023
06e22cd
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Sep 26, 2023
eedea53
fixed indentation (clsm_ensupd_upd_routines.F90)
gmao-rreichle Sep 27, 2023
5de7aa4
fixed error (I think) in update of snow depth (missing division by as…
gmao-rreichle Sep 27, 2023
c886542
if total SWE incr is zero, skip unnecessary layer-specific snow incre…
gmao-rreichle Sep 27, 2023
c0cd075
minor white space fixes (clsm_ensupd_upd_routines.F90)
gmao-rreichle Sep 29, 2023
2916f0c
fixed use statement (clsm_ensupd_upd_routines.F90)
gmao-rreichle Sep 29, 2023
d896270
minimal tweak to comment re. unconventional use of StieglitzSnow_calc…
gmao-rreichle Sep 29, 2023
2ca6b75
Merge branch 'feature/rreichle/snow_check_after_apply_LDAS_incr' into…
gmao-rreichle Oct 6, 2023
15fc00f
Merge branch 'feature/rreichle/snow_check_after_apply_LDAS_incr' into…
gmao-rreichle Oct 6, 2023
7291692
adjust to new interfaces of cleaned-up StieglitzSnow module (clsm_ens…
gmao-rreichle Oct 6, 2023
ff47324
determine snow heat content analysis by keeping snow temperature cons…
gmao-rreichle Oct 7, 2023
e8f85d7
simplify using improved interface of StieglitzSnow_calc_asnow() (clsm…
gmao-rreichle Oct 7, 2023
0d2c860
add missing use statement for StieglitzSnow_calc_tpsnow() (clsm_ens…
gmao-rreichle Oct 7, 2023
dca3bf0
make work with latest modifications of associated GCM GC branch
gmao-rreichle Oct 14, 2023
b836c19
replaced SCF_ANA_MINFCSTSWE (=0.01) with StieglitzSnow_MINSWE (=0.013…
gmao-rreichle Oct 17, 2023
9dc2d12
fix use statement for CATCH_SNOW_DZPARAM (clsm_ensupd_upd_routines.F90)
gmao-rreichle Oct 17, 2023
5922225
reverting GEOSgcm_GridComp branch back to develop (components.yaml)
gmao-rreichle Oct 18, 2023
64d1e24
added very rough draft of revised MODIS SCF reader (commented out wit…
gmao-rreichle Oct 21, 2023
f493541
more work on MODIS SCF reader (clsm_ensupd_upd_routines.F90)
gmao-rreichle Oct 23, 2023
5095b32
preliminary version of revised MODIS SCF reader
gmao-rreichle Oct 24, 2023
a9873c2
more fixes for MODIS SCF reader (clsm_ensupd_read_obs.F90)
gmao-rreichle Oct 26, 2023
c4719c4
change FOV for MODIS SCF obs back to 0. (LDASsa_DEFAULT_inputs_ensupd…
gmao-rreichle Oct 26, 2023
4b24e31
fixed missing init of lat/lon in MODIS SCF reader; changed variable n…
gmao-rreichle Oct 27, 2023
6818873
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Oct 27, 2023
cbb94c0
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Nov 7, 2023
8ad334a
Bug fix in new MODIS SCF obs reader (clsm_ensupd_read_obs.F90)
gmao-rreichle Nov 13, 2023
3eb985e
minor edit to optimize MODIS SCF obs reader (clsm_ensupd_read_obs.F90)
gmao-rreichle Nov 14, 2023
36b45ed
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Dec 3, 2023
27e109b
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Dec 7, 2023
b8da393
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Dec 7, 2023
ebbb5b5
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Jan 31, 2024
ed94868
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Feb 7, 2024
4403b86
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Feb 8, 2024
3fffdb1
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Feb 16, 2024
962d2ec
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
lcandre2 Feb 23, 2024
74f0ffb
Add Aqua to DEFAULT.nml and change N_obs_species
Feb 23, 2024
af7d2ac
add ascat mask to read_obs
amfox37 Feb 26, 2024
9ebf438
Merge branch 'feature/amfox/smap_ascat' into feature/amfox/ascat_mask
amfox37 Feb 27, 2024
399c6b0
replace loops with minloc
amfox37 Feb 28, 2024
dff4212
Merge branch 'feature/amfox/ascat_mask' of github.com:GEOS-ESM/GEOSld…
amfox37 Feb 28, 2024
f208e3f
move to fixed lat/lon ascat mask
amfox37 Feb 28, 2024
0692efa
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Feb 28, 2024
6f6b52a
moved MODIS SCF species into adjacent blocks in LDASsa_DEFAULT_inputs…
gmao-rreichle Feb 28, 2024
85733b7
ascat mask tidy up
amfox37 Feb 28, 2024
510e6dd
Merge branch 'develop' into feature/amfox/ascat_mask
amfox37 Feb 28, 2024
9687ac9
remove mask_name declaration
amfox37 Feb 28, 2024
0a07f81
renamed variables for ASCAT mask for clarity (clsm_ensupd_read_obs.F90)
gmao-rreichle Feb 28, 2024
bd32c8e
added %maskpath and %maskname fields to obs_param (enkf_types.F90, LD…
gmao-rreichle Feb 29, 2024
bcfbbe2
fix typo in previous commit (clsm_ensupd_read_obs.F90)
gmao-rreichle Feb 29, 2024
4a526c8
switch to lon-by-lat
amfox37 Feb 29, 2024
ba4c406
Read and apply mask during ASCAT QC (#723)
gmao-rreichle Feb 29, 2024
7bb6a84
Merge branch 'develop' into feature/rreichle/MODIS_snow_cover_fractio…
gmao-rreichle Feb 29, 2024
970dbb8
MODIS snow cover fraction assimilation
biljanaorescanin Mar 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
272 changes: 224 additions & 48 deletions src/Applications/LDAS_App/LDASsa_DEFAULT_inputs_ensupd.nml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Applications/LDAS_App/tile_bin2nc4.F90
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ FUNCTION getAttribute (SHORT_NAME, LNAME, UNT) result (str_atr)
case ('TB_LAND_1410MHZ_40DEG_VPOL'); LONG_NAME = 'brightness_temperature_land_1410MHz_40deg_Vpol'; UNITS = 'K'

! Done for SM_L4

case ('Tair'); LONG_NAME = 'air_temperature_at_RefH'; UNITS = 'K'
case ('TA'); LONG_NAME = 'air_temperature_at_RefH'; UNITS = 'K'
case ('Qair'); LONG_NAME = 'specific_humidity_at_RefH'; UNITS = 'kg kg-1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
obs_param(i).units = fscanf(fid, '%s ', 1);
obs_param(i).path = fscanf(fid, '%s ', 1);
obs_param(i).name = fscanf(fid, '%s ', 1);
obs_param(i).maskpath = fscanf(fid, '%s ', 1);
obs_param(i).maskname = fscanf(fid, '%s ', 1);
obs_param(i).scalepath = fscanf(fid, '%s ', 1);
obs_param(i).scalename = fscanf(fid, '%s ', 1);
obs_param(i).flistpath = fscanf(fid, '%s ', 1);
Expand All @@ -59,9 +61,11 @@
obs_param(i).descr = obs_param(i).descr( 2:end-1);
obs_param(i).FOV_units = obs_param(i).FOV_units(2:end-1);
obs_param(i).varname = obs_param(i).varname( 2:end-1);
obs_param(i).units = obs_param(i).units( 2:end-1);
obs_param(i).path = obs_param(i).path( 2:end-1);
obs_param(i).name = obs_param(i).name( 2:end-1);
obs_param(i).units = obs_param(i).units( 2:end-1);
obs_param(i).maskpath = obs_param(i).maskpath( 2:end-1);
obs_param(i).maskname = obs_param(i).maskname( 2:end-1);
obs_param(i).scalepath = obs_param(i).scalepath(2:end-1);
obs_param(i).scalename = obs_param(i).scalename(2:end-1);
obs_param(i).flistpath = obs_param(i).flistpath(2:end-1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ module clsm_ensupd_enkf_update
MAPL_TICE

USE CATCH_CONSTANTS, ONLY : &
N_gt => CATCH_N_GT
N_gt => CATCH_N_GT, &
N_snow => CATCH_N_SNOW

use catchment_model, ONLY: &
catch_calc_tsurf
Expand Down Expand Up @@ -110,6 +111,7 @@ module clsm_ensupd_enkf_update
apply_adapt_R

use LDAS_ensdrv_mpi, ONLY: &
MPI_met_force_type, &
MPI_cat_param_type, &
MPI_cat_progn_type, &
root_proc, &
Expand Down Expand Up @@ -292,14 +294,18 @@ subroutine get_enkf_increments( &
integer :: nTiles_ana, nTilesAna_vec(numprocs)
integer, dimension(:), allocatable :: indTiles_l, indTiles_f, indTiles_ana
type(varLenIntArr) :: indTilesAna_vec(numprocs)

type(tile_coord_type), dimension(:), pointer :: tile_coord_ana ! input to cat_enkf_increment() is a pointer

type(met_force_type), dimension(:), allocatable :: met_force_f, met_force_ana
type(cat_param_type), dimension(:), allocatable :: cat_param_f, cat_param_ana

type(cat_progn_type), allocatable :: cat_progn_f(:), cat_progn_ana(:,:)
type(cat_progn_type), allocatable :: tmp_cat_progn_ana(:)
type(cat_progn_type), allocatable :: cat_progn_incr_f(:), cat_progn_incr_ana(:,:)
type(cat_progn_type), allocatable :: recvBuf(:)

! Obs related
! obs related
integer :: nObs_ana
integer :: nObsAna_vec(numprocs)
integer :: N_obsf_assim, N_obsl_assim
Expand All @@ -320,8 +326,8 @@ subroutine get_enkf_increments( &

character(12) :: tmpstr12

character(len=*), parameter :: Iam = 'get_enkf_increments'
character(len=400) :: err_msg
character(len=*), parameter :: Iam = 'get_enkf_increments'
character(len=400) :: err_msg

! **********************************************************************
!
Expand Down Expand Up @@ -394,7 +400,7 @@ subroutine get_enkf_increments( &
tile_coord_f%pert_i_indg, tile_coord_f%pert_j_indg, &
pert_grid_f, maxval(N_tile_in_cell_ij_f), tile_num_in_cell_ij_f )
else
allocate(N_tile_in_cell_ij_f(0,0)) !for debugging
allocate(N_tile_in_cell_ij_f(0,0)) ! for debugging
end if

! *********************************************************************
Expand Down Expand Up @@ -427,7 +433,7 @@ subroutine get_enkf_increments( &


! --------------------------------------------------------------------

if (found_obs_f) then

! ++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -510,7 +516,6 @@ subroutine get_enkf_increments( &

if (allocated(obsbias_ok)) deallocate(obsbias_ok)


! IF NEEDED, INCLUDE WITHHOLDING SUBROUTINE HERE.
! SUCH A SUBROUTINE SHOULD CHANGE Observations(i)%assim TO FALSE
! IF THE OBSERVATION IS TO BE WITHHELD
Expand All @@ -520,7 +525,7 @@ subroutine get_enkf_increments( &

! count observations across all processors that are left after
! model-based QC (done within get_obs_pred())

#ifdef LDAS_MPI

call MPI_AllReduce( &
Expand Down Expand Up @@ -605,7 +610,7 @@ subroutine get_enkf_increments( &
! them evenly among all procs, indTiles_ana. The corresponding
! numbers are nTiles_l, nTiles_f, nTiles_ana. Root needs
! nTilesAna_vec, indTilesAna_vec (list of nTiles_ana,
! indTiles_ana on each proc) to distribute cat_param, cat_progn.
! indTiles_ana on each proc) to distribute cat_param, cat_progn, etc.
!
! IMPORTANT: Regardless of update_type, obs from *all* species are
! considered (ie, N_select_species=0). This could result in
Expand Down Expand Up @@ -638,7 +643,7 @@ subroutine get_enkf_increments( &

!-AnaLoadBal-Prereq-starts-here-
! Step 1a: identify obs w/ obs%assim==.true.
allocate(ind_obsl_assim(N_obsl), source=-99)
allocate(ind_obsl_assim(N_obsl), source=-99)
call get_ind_obs_assim(N_obsl, Observations_l%assim, N_obsl_assim, ind_obsl_assim)
! its easier to write ptr2indx than ind_obsl_assim(1:N_obsl_assim)
ptr2indx => ind_obsl_assim(1:N_obsl_assim)
Expand Down Expand Up @@ -696,7 +701,7 @@ subroutine get_enkf_increments( &
if (root_proc) then
allocate(indTiles_f(nTiles_f), source=-99)
else
allocate(indTiles_f(0)) ! for debugging mode
allocate(indTiles_f(0)) ! for debugging mode
endif

if (root_proc) then
Expand Down Expand Up @@ -734,7 +739,7 @@ subroutine get_enkf_increments( &
if (allocated(indTiles_f)) deallocate(indTiles_f)

! Step 2d: indTiles_ana -> indTilesAna_vec (on root)
! root needs indTiles_ana from each proc to distribute cat_param, cat_progn etc.
! root needs indTiles_ana from each proc to distribute cat_param, cat_progn, etc.
if (root_proc) then
do iproc=1,numprocs
allocate(indTilesAna_vec(iproc)%ind(nTilesAna_vec(iproc)))
Expand Down Expand Up @@ -831,15 +836,44 @@ subroutine get_enkf_increments( &
Obs_ana = Obs_f_assim(indObs_ana(1:nObs_ana))
if (allocated(Obs_f_assim)) deallocate(Obs_f_assim)

! step 4b: tile_coord_ana
! Step 4b: tile_coord_ana
allocate(tile_coord_ana(nTiles_ana))
tile_coord_ana = tile_coord_f(indTiles_ana)

! Step 4c: cat_param(N_catl) -> cat_param_f (on root) -> cat_param_ana
! Step 4c: met_force(N_catl) -> met_force_f (on root) -> met_force_ana
if (root_proc) then
allocate(met_force_f(N_catf))
else
allocate(met_force_f(0)) ! for debugging mode
endif
call MPI_Gatherv( &
met_force, N_catl, MPI_met_force_type, &
met_force_f, N_catl_vec, low_ind-1, MPI_met_force_type, &
0, mpicomm, mpierr )
allocate(met_force_ana(nTiles_ana))
if (root_proc) then
met_force_ana = met_force_f(indTilesAna_vec(1)%ind)
do dest=1,numprocs-1
sendtag = dest
sendct = nTilesAna_vec(dest+1)
call MPI_Send(met_force_f(indTilesAna_vec(dest+1)%ind), &
sendct,MPI_met_force_type, &
dest,sendtag,mpicomm,mpierr)
end do
else
! source = 0
recvtag = myid
recvct = nTiles_ana
call MPI_Recv(met_force_ana,recvct,MPI_met_force_type, &
0,recvtag,mpicomm,mpistatus,mpierr)
end if
if (allocated(met_force_f)) deallocate(met_force_f)

! Step 4d: cat_param(N_catl) -> cat_param_f (on root) -> cat_param_ana
if (root_proc) then
allocate(cat_param_f(N_catf))
else
allocate(cat_param_f(0)) !for debugging mode
allocate(cat_param_f(0)) ! for debugging mode
endif
call MPI_Gatherv( &
cat_param, N_catl, MPI_cat_param_type, &
Expand All @@ -864,12 +898,12 @@ subroutine get_enkf_increments( &
end if
if (allocated(cat_param_f)) deallocate(cat_param_f)

! Step 4d: cat_progn -> cat_progn_f (on root) -> cat_progn_ana
! Step 4e: cat_progn -> cat_progn_f (on root) -> cat_progn_ana
! one ensemble at a time
if (root_proc) then
allocate(cat_progn_f(N_catf))
else
allocate(cat_progn_f(0)) ! for debugging mode
allocate(cat_progn_f(0)) ! for debugging mode
endif

allocate(cat_progn_ana(nTiles_ana,N_ens))
Expand Down Expand Up @@ -916,12 +950,12 @@ subroutine get_enkf_increments( &
if (allocated( tmp_cat_progn_ana)) deallocate(tmp_cat_progn_ana)
if (allocated(cat_progn_f)) deallocate(cat_progn_f)

! Step 4e: Obs_pred_l (obs%assim=.true.) -> Obs_pred_f_assim (on root) -> Obs_pred_ana
! Step 4f: Obs_pred_l (obs%assim=.true.) -> Obs_pred_f_assim (on root) -> Obs_pred_ana
! one ensemble at a time
if (root_proc) then
allocate(Obs_pred_f_assim(N_obsf_assim))
else
allocate(Obs_pred_f_assim(0)) ! for debugging mode
allocate(Obs_pred_f_assim(0)) ! for debugging mode
endif
allocate(Obs_pred_ana(nObs_ana,N_ens), source=0.)
if (root_proc) then
Expand Down Expand Up @@ -978,6 +1012,7 @@ subroutine get_enkf_increments( &
! of Observations_l and Obs_pred_l that are "good"
! [allocation of these arrays in get_obs_pred() is larger
! than eventual size]

call get_halo_obs( N_ens, N_obsl, &
Observations_l(1:N_obsl), Obs_pred_l(1:N_obsl,1:N_ens), &
tile_coord_l, xcompact, ycompact, &
Expand Down Expand Up @@ -1042,6 +1077,7 @@ subroutine get_enkf_increments( &
Obs_ana, & ! size: nObs_ana
Obs_pred_ana, & ! size: (nObs_ana,N_ens)
Obs_pert_tmp, &
met_force_ana, &
cat_param_ana, &
xcompact, ycompact, fcsterr_inflation_fac, &
cat_progn_ana, cat_progn_incr_ana)
Expand Down Expand Up @@ -1070,9 +1106,10 @@ subroutine get_enkf_increments( &
Observations_lH(1:N_obslH), &
Obs_pred_lH(1:N_obslH,1:N_ens), &
Obs_pert_tmp, &
met_force, &
cat_param, &
xcompact, ycompact, fcsterr_inflation_fac, &
cat_progn, cat_progn_incr )
cat_progn, cat_progn_incr, met_force )
#endif

#ifdef LDAS_MPI
Expand All @@ -1085,7 +1122,7 @@ subroutine get_enkf_increments( &
allocate(cat_progn_incr_f(N_catf))
allocate(recvBuf(maxval(nTilesAna_vec))) ! temp storage of incoming data
else
allocate(cat_progn_incr_f(0)) ! for debugging
allocate(cat_progn_incr_f(0)) ! for debugging
end if
do iEns=1,N_ens
! cat_progn_incr_ana -> cat_progn_incr_f
Expand Down Expand Up @@ -1149,6 +1186,7 @@ subroutine get_enkf_increments( &
if (allocated( indObs_ana)) deallocate(indObs_ana)
if (allocated( cat_progn_ana)) deallocate(cat_progn_ana)
if (allocated( cat_param_ana)) deallocate(cat_param_ana)
if (allocated( met_force_ana)) deallocate(met_force_ana)
do iproc=1,numprocs
if (allocated(indTilesAna_vec(iproc)%ind)) &
deallocate(indTilesAna_vec(iproc)%ind)
Expand Down Expand Up @@ -1258,7 +1296,7 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &

! -----------------

integer :: n, n_e
integer :: n, n_e, ii

logical :: cat_progn_has_changed, check_snow

Expand Down Expand Up @@ -1355,21 +1393,44 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &
cat_progn(n,n_e)%tc2 + cat_progn_incr(n,n_e)%tc2
cat_progn(n,n_e)%tc4 = &
cat_progn(n,n_e)%tc4 + cat_progn_incr(n,n_e)%tc4

cat_progn(n,n_e)%ght(1) = &
cat_progn(n,n_e)%ght(1) + cat_progn_incr(n,n_e)%ght(1)

end do
end do

cat_progn_has_changed = .true.

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

case(11) select_update_type ! empirical MODIS SCF update

do n=1,N_catd ! for each tile

do n_e=1,N_ens ! for each ensemble member

do ii=1,N_snow ! for each snow layer

cat_progn(n,n_e)%wesn(ii) = &
cat_progn(n,n_e)%wesn(ii) + cat_progn_incr(n,n_e)%wesn(ii)

cat_progn(n,n_e)%sndz(ii) = &
cat_progn(n,n_e)%sndz(ii) + cat_progn_incr(n,n_e)%sndz(ii)

cat_progn(n,n_e)%htsn(ii) = &
cat_progn(n,n_e)%htsn(ii) + cat_progn_incr(n,n_e)%htsn(ii)

end do
end do
end do

cat_progn_has_changed = .true.

case default

call ldas_abort(LDAS_GENERIC_ERROR, Iam, 'unknown update_type')

end select select_update_type

! ------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,19 @@ module clsm_ensupd_glob_param
public :: FT_ANA_LOWERBOUND_ASNOW
public :: FT_ANA_LOWERBOUND_TEFF
public :: FT_ANA_UPPERBOUND_TEFF
public :: SCF_ANA_ALPHA
public :: SCF_ANA_BETA
public :: SCF_ANA_MAXINCRSWE
public :: SCF_ANA_MINFCSTSWE

public :: echo_clsm_ensupd_glob_param

! -----------------------------------------------------------------------
!
! total number of all obs species defined in namelist file
! total number of all obs species defined in "ensupd" namelist file
! (regardless of whether "assim" flag is true or false)

integer, parameter :: N_obs_species_nml = 51
integer, parameter :: N_obs_species_nml = 53

! ----------------------------------------------------------------------
!
Expand Down Expand Up @@ -93,7 +97,7 @@ module clsm_ensupd_glob_param

! ----------------------------------------------------------------
!
! parameter for freeze/thaw (FT) analysis
! parameters for freeze/thaw (FT) analysis

real, parameter :: FT_ANA_FT_THRESHOLD = 0.5

Expand All @@ -103,6 +107,15 @@ module clsm_ensupd_glob_param
real, parameter :: FT_ANA_UPPERBOUND_TEFF = +1.0 + MAPL_TICE ! [Kelvin]

! ----------------------------------------------------------------
!
! parameters for snow cover area fraction (SCF) analysis (modified from Toure et al. 2018)

real, parameter :: SCF_ANA_ALPHA = 0.60 ! [-] add snow if asnow_fcst < asnow_obs*SCF_ANA_alpha (w/ "bias" adjustment for obs)
real, parameter :: SCF_ANA_BETA = 0.55 ! [-] remove snow if asnow_fcst >= asnow_obs*SCF_ANA_alpha .AND. asnow_obs < SCF_ANA_beta
real, parameter :: SCF_ANA_MAXINCRSWE = 5.0 ! [kg/m2] max total SWE increment
real, parameter :: SCF_ANA_MINFCSTSWE = 0.01 ! [kg/m2] threshold below which the ratio of swe_ana/swe_fcst becomes unreasonable

! ----------------------------------------------------------------

contains

Expand Down
Loading
Loading