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

TSMP-PDAF Update #228

Merged
merged 75 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
eafedfa
dco: mention size limit for `obs_filename`
jjokella May 22, 2024
6d4cdb4
doc: update CLM5-PDAF build-commands
jjokella May 23, 2024
1377681
intf_oas3/clm5_0: update `NODENAME_REGEX` for JUWELS
jjokella May 23, 2024
9b2bd82
doc: updating CLM5 build and setup commands
jjokella May 23, 2024
fdfdaad
clm5 debug output of state vector, first implementation
jjokella May 23, 2024
0fe6142
bugfix: use `tstartcycle`
jjokella May 23, 2024
e10c31f
clm5 debug output of obs_index_p, first implementation
jjokella May 23, 2024
3f7eddb
debug output of `clm_statevec` to double precision
jjokella May 24, 2024
0e5f6b6
CLM5-PDAF: update setting of state vector
May 29, 2024
04da2e7
Merge branch 'master' into jjokella-master
jjokella May 29, 2024
d5fb137
eclm: update interface routines with clm5_0
jjokella May 29, 2024
57d1ab2
CLM5-PDAF: update setting of state vector
May 29, 2024
e8725de
Merge branch 'master' into jjokella-master
jjokella May 29, 2024
7547336
CLM5-PDAF: update setting of state vector
May 29, 2024
a64fcf9
Merge branch 'master' into jjokella-master
jjokella May 29, 2024
4df0203
Merge branch 'master' into jjokella-master
jjokella May 29, 2024
0dbb062
enkf_clm_mod_5: debug output of CLM5 index bounds
jjokella Jun 3, 2024
d70522d
clm5 debug output of read and set `swc` array
jjokella Jun 4, 2024
4f8114c
clm5_debug output for `h2osoi_liq` and `h2osoi_ice`
jjokella Jun 4, 2024
c978cc5
add input `mype` to `define_clm_statevec`
jjokella Jun 4, 2024
2ccaeda
bugfix `tstartcycle`
jjokella Jun 4, 2024
c5e583f
update_clm: new indexing for updating `swc` array
jjokella Jun 4, 2024
9293d51
clm5-pdaf: state vector including SWC values from all columns
jjokella Jun 5, 2024
46d8e95
bugfix double plus
jjokella Jun 5, 2024
e371ad3
clm5-pdaf: index fix for multiple processors
jjokella Jun 5, 2024
c72a4a0
Input `CLM:t_printensemble`: time step for ensemble debug output
jjokella Jun 6, 2024
0a7c7f0
clm5: propagate correct mype_world
jjokella Jun 6, 2024
7d59acb
eclm: adapat to changes in clm5_0 interface
jjokella Jun 6, 2024
f27ad00
rename `clm5_init` to `clm_init`
jjokella Jun 7, 2024
1bfcc6e
separate function CLM5 / CLM3.5 function calls in wrapper
jjokella Jun 7, 2024
2154b04
Merge branch 'master' into jjokella-master
jjokella Jun 7, 2024
6c3d96a
doc: update doc for `CLM:update_swc`
jjokella Jun 10, 2024
783d3a0
clm3_5: include cell and pft index bounds
jjokella Jun 10, 2024
2f20b1d
clm5_0: style changes
jjokella Jun 10, 2024
aa18dd4
eclm: style changes
jjokella Jun 10, 2024
2b59398
clm3_5: `clm_advance` with debug output
jjokella Jun 11, 2024
7233099
style updates
jjokella Jun 11, 2024
6c8a9c0
clm5_0/eclm: `set_clm_statevec` only called for `CLMSA`
jjokella Jun 11, 2024
8a6abfa
clm3_5: debug output for `update_clm`
jjokella Jun 11, 2024
be454be
clm5_0: style updates
jjokella Jun 11, 2024
9fbb8c9
eclm: style updates
jjokella Jun 11, 2024
944b671
clm3_5: style updates
jjokella Jun 11, 2024
70d82a4
clm3_5: use factor `100.0` for `real` multiplication
jjokella Jun 11, 2024
e84d7d3
clm5_0/eclm: remove duplication for `clmupdate_texture`
jjokella Jun 11, 2024
f6701de
clm5_0/eclm: `implicit none` included
jjokella Jun 11, 2024
cc32d22
clm5_0/eclm: dummy values for min/max of lat/lon
jjokella Jun 11, 2024
3777318
clm3_5: `clm_init` with same input as for clm5_0
jjokella Jun 11, 2024
d90e114
enkfpf.par: input `DA:print_obs_index`
jjokella Jun 11, 2024
6f8f1e2
doc for enkfpf.par input `CLM:update_T`
jjokella Jun 12, 2024
74d676f
clm5_0: include update stubs from clm3_5 for later implementation
jjokella Jun 12, 2024
42f2c2b
style updates
jjokella Jun 13, 2024
0126c09
doc on LAI parameter array `clm_paramarr`
jjokella Jun 13, 2024
8242c60
updating and aligning `define_clm_statevec`
jjokella Jun 13, 2024
3bb55cf
small error change
jjokella Jun 16, 2024
2369275
doc: update doc of CLM-related time stepping
jjokella Jun 16, 2024
be480ce
doc: latex style update
jjokella Jun 16, 2024
cae7156
doc: latex style update
jjokella Jun 16, 2024
ac4b10a
bugfix
jjokella Jun 16, 2024
1ea77f7
clm5_0: implicit none
jjokella Jun 17, 2024
188d8d8
clm3_5: stub for clmstatevec_allcol
jjokella Jun 17, 2024
b5730b6
doc
jjokella Jun 17, 2024
aaa8a1e
clm5_0/eclm: stub for `clmupdate_swc.eq.2`
jjokella Jun 17, 2024
cd6f83e
clm5_0/eclm: stub for `clmupdate_T.eq.1`
jjokella Jun 17, 2024
0c71e8a
clm3_5 style update
jjokella Jun 17, 2024
52f7df7
clm3_5: include stub for `clmupdate_texture.eq.2`
jjokella Jun 17, 2024
eae92e5
style updates
jjokella Jun 18, 2024
b8e70ec
clm5_0/eclm: adapt iterator variable in updating swc
jjokella Jun 18, 2024
dced9db
clm3_5/clm5_0/eclm: introduce `watmin_check`/`watmin_set`
jjokella Jun 18, 2024
9788ff5
clm3_5/clm5_0/eclm: style and doc updates
jjokella Jun 18, 2024
38ef92e
clm3_5: `update_clm`, set state vector index inside loop
jjokella Jun 18, 2024
8431c7c
clm3_5: add `clmt_printensemble`, bugfix
jjokella Jun 18, 2024
633f7fa
clm3_5/clm5_0/eclm: `enkfpf.par` input `CLM:watmin_check`
jjokella Jun 18, 2024
ec6c227
doc updates
jjokella Jun 18, 2024
756f38c
bugfix for `clmt_printensemble`, check against correct `tstartcycle`
jjokella Jun 20, 2024
e9f7fb8
doc for LST equation observation operator routine
jjokella Jun 20, 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
16 changes: 15 additions & 1 deletion bldsva/intf_DA/pdaf/framework/init_dim_obs_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ SUBROUTINE init_dim_obs_pdaf(step, dim_obs_p)
dampfac_state_time_dependent_in, dampfac_param_time_dependent_in
use mod_tsmp, &
only: idx_map_subvec2state_fortran, tag_model_parflow, enkf_subvecsize, &
nx_glob, ny_glob, nz_glob, crns_flag, &
nx_glob, ny_glob, nz_glob, crns_flag, da_print_obs_index, &
#ifndef CLMSA
#ifndef OBS_ONLY_CLM
xcoord, ycoord, zcoord, xcoord_fortran, ycoord_fortran, &
Expand Down Expand Up @@ -170,6 +170,8 @@ SUBROUTINE init_dim_obs_pdaf(step, dim_obs_p)
#endif
#endif

character (len = 27) :: fn !TSMP-PDAF: function name for obs_index_p output

! ****************************************
! *** Initialize observation dimension ***
! ****************************************
Expand Down Expand Up @@ -866,6 +868,18 @@ SUBROUTINE init_dim_obs_pdaf(step, dim_obs_p)

end if

#ifdef PDAF_DEBUG
IF (da_print_obs_index > 0) THEN
! TSMP-PDAF: For debug runs, output the state vector in files
WRITE(fn, "(a,i5.5,a,i5.5,a)") "obs_index_p_", mype_world, ".", step, ".txt"
OPEN(unit=71, file=fn, action="write")
DO i = 1, dim_obs_p
WRITE (71,"(i10)") obs_index_p(i)
END DO
CLOSE(71)
END IF
#endif

end if
end if
call mpi_allreduce(MPI_IN_PLACE,obs_nc2pdaf,dim_obs,MPI_INTEGER,MPI_SUM,comm_filter,ierror)
Expand Down
1 change: 1 addition & 0 deletions bldsva/intf_DA/pdaf/framework/mod_tsmp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module mod_tsmp
integer(c_int), bind(c) :: tag_model_parflow = 1
integer(c_int), bind(c) :: tag_model_cosmo = 2
integer(c_int), bind(c) :: crns_flag
integer(c_int), bind(c) :: da_print_obs_index
type(c_ptr), bind(c) :: pf_statevec
type(c_ptr), bind(c) :: xcoord, ycoord, zcoord
real(c_double), pointer :: xcoord_fortran(:), ycoord_fortran(:), zcoord_fortran(:)
Expand Down
2 changes: 2 additions & 0 deletions bldsva/intf_DA/pdaf/framework/obs_op_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ SUBROUTINE obs_op_pdaf(step, dim_p, dim_obs_p, state_p, m_state_p)
lpointobs = .false.

DO i = 1, dim_obs_p
! Equation for LST computation from Kustas2009, Eq(7)
! http://dx.doi.org/10.1016/j.agrformet.2009.05.016
m_state_p(i) &
= (exp(-0.5*clm_paramarr(obs_index_p(i))) &
*state_p(obs_index_p(i))**4 &
Expand Down
14 changes: 10 additions & 4 deletions bldsva/intf_DA/pdaf/model/clm3_5/enkf_clm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
!> @details
!> Initialization routines for the land model analogous to
!> clm3_5/src/main/program_off.F90
subroutine clm_init(finname) bind(C,name="clm_init")
subroutine clm_init(finname, pdaf_id, pdaf_max, mype) bind(C,name="clm_init")
use iso_C_binding
use enkf_clm_mod, only: &
#if (defined COUP_OAS_COS || defined COUP_OAS_PFL)
Expand Down Expand Up @@ -61,6 +61,9 @@ subroutine clm_init(finname) bind(C,name="clm_init")

! character(c_char),target :: finname
character(kind=c_char,len=1),dimension(100),intent(in) :: finname
integer(c_int), intent(in) :: pdaf_id !unused: only for clm5_0
integer(c_int), intent(in) :: pdaf_max !unused: only for clm5_0
integer(c_int), intent(in) :: mype
integer(c_int) :: counter
!character(100),pointer :: pchar

Expand Down Expand Up @@ -143,17 +146,19 @@ subroutine clm_init(finname) bind(C,name="clm_init")


#if defined CLMSA
call define_clm_statevec
call define_clm_statevec(mype)
#endif

end subroutine clm_init


subroutine clm_advance(ntstep) bind(C,name="clm_advance")
subroutine clm_advance(ntstep, tstartcycle, mype) bind(C,name="clm_advance")
use enkf_clm_mod
use iso_c_binding
use mod_clm_statistics
integer(c_int),intent(in) :: ntstep
integer(c_int),intent(in) :: tstartcycle
integer(c_int),intent(in) :: mype
integer :: counter=0

do counter=1,ntstep
Expand Down Expand Up @@ -192,7 +197,8 @@ subroutine clm_advance(ntstep) bind(C,name="clm_advance")
end do

#if defined CLMSA
call set_clm_statevec()
! Calling PDAF Function to set state vector before assimiliation
call set_clm_statevec(tstartcycle, mype)
#endif

end subroutine clm_advance
Expand Down
Loading
Loading