diff --git a/bldsva/intf_DA/pdaf/arch/config/linux_gfortran_openmpi.h b/bldsva/intf_DA/pdaf/arch/config/linux_gfortran_openmpi.h index b53c0c54..75858308 100644 --- a/bldsva/intf_DA/pdaf/arch/config/linux_gfortran_openmpi.h +++ b/bldsva/intf_DA/pdaf/arch/config/linux_gfortran_openmpi.h @@ -49,6 +49,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -J + # Include path for MPI header file MPI_INC = __MPI_INC__ diff --git a/bldsva/intf_DA/pdaf/arch/config/linux_ifort.h b/bldsva/intf_DA/pdaf/arch/config/linux_ifort.h index 52e9e792..ecf25bed 100644 --- a/bldsva/intf_DA/pdaf/arch/config/linux_ifort.h +++ b/bldsva/intf_DA/pdaf/arch/config/linux_ifort.h @@ -53,6 +53,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = __MPI_INC__ diff --git a/bldsva/intf_DA/pdaf/framework/mod_read_obs.F90 b/bldsva/intf_DA/pdaf/framework/mod_read_obs.F90 index 1e9ffda5..cdbec599 100755 --- a/bldsva/intf_DA/pdaf/framework/mod_read_obs.F90 +++ b/bldsva/intf_DA/pdaf/framework/mod_read_obs.F90 @@ -536,8 +536,11 @@ end subroutine clean_obs_pf !> @param[in] fn Filename of the observation file !> @param[out] nn number of observations in `fn` !> @details - !> Reads the content of the variable name `no_obs` from NetCDF - !> file `fn` using subroutines from the NetCDF module. + !> Reads the content of the variable (!) named `no_obs` from + !> NetCDF file `fn`. + !> + !> Uses subroutines from the NetCDF module. + !> !> The result is returned in `nn`. !> !> The result is used to decide if the next observation file is diff --git a/bldsva/intf_DA/pdaf/framework/obs_op_pdaf.F90 b/bldsva/intf_DA/pdaf/framework/obs_op_pdaf.F90 index df932ade..23a755d4 100644 --- a/bldsva/intf_DA/pdaf/framework/obs_op_pdaf.F90 +++ b/bldsva/intf_DA/pdaf/framework/obs_op_pdaf.F90 @@ -117,6 +117,10 @@ SUBROUTINE obs_op_pdaf(step, dim_p, dim_obs_p, state_p, m_state_p) 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 + ! + ! Comment: Fractional vegetation cover (Eq(8) from Kustas2009) + ! currently implemented with simplified settings: Vegetation + ! clumping parameter `Omega=1`; radiometer view angle `phi=0` m_state_p(i) & = (exp(-0.5*clm_paramarr(obs_index_p(i))) & *state_p(obs_index_p(i))**4 & diff --git a/bldsva/intf_DA/pdaf/framework/parser_mpi.F90 b/bldsva/intf_DA/pdaf/framework/parser_mpi.F90 index 9c5d654b..3262455f 100644 --- a/bldsva/intf_DA/pdaf/framework/parser_mpi.F90 +++ b/bldsva/intf_DA/pdaf/framework/parser_mpi.F90 @@ -82,6 +82,8 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -215,6 +217,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -234,6 +238,21 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for cut strings longer than 100 characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, a)') "called handle=", string + WRITE (*,'(2x, a, a)') "parsed handle=", str1 + WRITE (*,'(2x, a, a)') "parsed input(cut)=", str2 + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN ! Format specifier is needed for reading paths. Using diff --git a/bldsva/intf_DA/pdaf/model/clm5_0/enkf_clm_mod_5.F90 b/bldsva/intf_DA/pdaf/model/clm5_0/enkf_clm_mod_5.F90 index 8b32cd1c..b9c436a0 100755 --- a/bldsva/intf_DA/pdaf/model/clm5_0/enkf_clm_mod_5.F90 +++ b/bldsva/intf_DA/pdaf/model/clm5_0/enkf_clm_mod_5.F90 @@ -266,6 +266,7 @@ end subroutine set_clm_statevec subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm") use clm_varpar , only : nlevsoi + use clm_time_manager , only : update_DA_nstep use shr_kind_mod , only : r8 => shr_kind_r8 use ColumnType , only : col use clm_instMod, only : soilstate_inst, waterstate_inst @@ -343,6 +344,11 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm") error stop "Not implemented: clmupdate_swc.eq.2" endif + ! CLM5: Update the Data Assimulation time-step to the current time + ! step, since DA has been done. Used by CLM5 to skip BalanceChecks + ! directly after the DA step. + call update_DA_nstep() + ! write updated swc back to CLM if(clmupdate_swc.ne.0) then diff --git a/doc/content/setup_tsmp/input_cmd.md b/doc/content/setup_tsmp/input_cmd.md index 0935c37b..b1013683 100644 --- a/doc/content/setup_tsmp/input_cmd.md +++ b/doc/content/setup_tsmp/input_cmd.md @@ -49,9 +49,12 @@ filter. See [Command Line Examples](#command-line-examples). `obs_filename` (string) Prefix for observation files. Note: The prefix for observation files cannot be longer than 100 -characters! Otherwise, the observation filename will be cropped. In -these cases, usually an error message `No such file or directory` is -thrown in `next_observation_pdaf.F90`. +characters! Otherwise, the observation filename will be cropped. + +Tip: Try to use relative paths as input to `obs_filename`. + +If observation filenames are not found, an error message `No such file +or directory` is printed out in `next_observation_pdaf.F90`. ## rms_obs ##