Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 18 additions & 12 deletions components/elm/bld/ELMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3764,20 +3764,26 @@ sub add_default {

# query the definition to find out if the variable is an input pathname
my $is_input_pathname = $definition->is_input_pathname($var);


# The default values for input pathnames are relative. If the namelist
# variable is defined to be an absolute pathname, then prepend
# the E3SM inputdata root directory.
if (not defined $settings{'no_abspath'}) {
if (defined $settings{'set_abspath'}) {
$val = set_abs_filepath($val, $settings{'set_abspath'});
} else {
if ($is_input_pathname eq 'abs') {
$val = set_abs_filepath($val, $inputdata_rootdir);
}
}
if ($is_input_pathname eq 'landroot') {
my $landroot = abs_path("$ProgDir/..");
$val = set_abs_filepath($val,$landroot);
} else {
# The default values for input pathnames are relative. If the namelist
# variable is defined to be an absolute pathname, then prepend
# the E3SM inputdata root directory.
if (not defined $settings{'no_abspath'}) {
if (defined $settings{'set_abspath'}) {
$val = set_abs_filepath($val, $settings{'set_abspath'});
} else {
if ($is_input_pathname eq 'abs') {
$val = set_abs_filepath($val, $inputdata_rootdir);
}
}
}
}

# query the definition to find out if the variable takes a string value.
# The returned string length will be >0 if $var is a string, and 0 if not.
my $str_len = $definition->get_str_len($var);
Expand Down
8 changes: 4 additions & 4 deletions components/elm/bld/namelist_files/namelist_defaults.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<paramfile nu_com="RD" use_crop=".false." >lnd/clm2/paramdata/clm_params_c180524_phs.nc</paramfile>


<!-- ================================================================== -->
<!-- FATES default parameter file -->
<!-- ================================================================== -->
<fates_paramfile >lnd/clm2/paramdata/fates_params_api.41.0.0_14pft_c250813.nc</fates_paramfile>
<!-- ======================================================================== -->
<!-- FATES default parameter file (path relative to E3SM/components/elm/) -->
<!-- ======================================================================== -->
<fates_paramfile >src/external_models/fates/parameter_files/fates_params_default.json</fates_paramfile>

<!-- soil order related parameters (relative to {csmdata}) -->
<fsoilordercon >lnd/clm2/paramdata/CNP_parameters_c131108.nc</fsoilordercon>
Expand Down
2 changes: 1 addition & 1 deletion components/elm/bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ constants for biogeochem modules
</entry>

<entry id="fates_paramfile" type="char*256" category="datasets"
input_pathname="abs" group="elm_inparm" valid_values="" >
input_pathname="landroot" group="elm_inparm" valid_values="" >
Full pathname datafile with fates parameters
</entry>

Expand Down
2 changes: 1 addition & 1 deletion components/elm/src/external_models/fates
Submodule fates updated 143 files
9 changes: 0 additions & 9 deletions components/elm/src/main/elm_initializeMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module elm_initializeMod
use readParamsMod , only : readSharedParameters, readPrivateParameters
use ncdio_pio , only : file_desc_t
use ELMFatesInterfaceMod , only : ELMFatesGlobals1,ELMFatesGlobals2
use ELMFatesParamInterfaceMod, only: FatesReadPFTs
use BeTRSimulationELM, only : create_betr_simulation_elm
use SoilLittVertTranspMod, only : CreateLitterTransportList
use iso_c_binding
Expand Down Expand Up @@ -345,14 +344,6 @@ subroutine initialize1( )

call soilorder_conrd()

! Read in FATES parameter values early in the call sequence as well
! The PFT file, specifically, will dictate how many pfts are used
! in fates, and this will influence the amount of memory we
! request from the model, which is relevant in set_fates_global_elements()
if (use_fates) then
call FatesReadPFTs()
end if

! Read surface dataset and set up subgrid weight arrays
call surfrd_get_data(begg, endg, ldomain, fsurdat)

Expand Down
17 changes: 6 additions & 11 deletions components/elm/src/main/elmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module ELMFatesInterfaceMod
use elm_varctl , only : use_lch4
use elm_varctl , only : use_century_decomp
use elm_varctl , only : carbon_only,carbonnitrogen_only,carbonphosphorus_only
use elm_varctl , only : fates_paramfile
use elm_varcon , only : tfrz
use elm_varcon , only : spval
use elm_varcon , only : denice
Expand Down Expand Up @@ -207,9 +208,6 @@ module ELMFatesInterfaceMod

use FatesInterfaceTypesMod , only : bc_in_type, bc_out_type

use ELMFatesParamInterfaceMod, only : fates_param_reader_ctsm_impl
use FatesParametersInterface, only : fates_param_reader_type
use FatesParametersInterface, only : fates_parameters_type

use perf_mod , only : t_startf, t_stopf

Expand Down Expand Up @@ -331,7 +329,7 @@ subroutine ELMFatesGlobals1()
integer :: pass_use_luh2
integer :: pass_masterproc
logical :: verbose_output
type(fates_param_reader_ctsm_impl) :: var_reader


if (use_fates) then

Expand Down Expand Up @@ -378,6 +376,8 @@ subroutine ELMFatesGlobals1()
end if
call set_fates_ctrlparms('masterproc',ival=pass_masterproc)

call set_fates_ctrlparms('parteh_mode',ival=fates_parteh_mode)

end if

! The following call reads in the parameter file
Expand All @@ -394,8 +394,8 @@ subroutine ELMFatesGlobals1()
! want fates to handle crops, so again, it should be ignored.
! (RGK 07-2022)

call SetFatesGlobalElements1(use_fates,natpft_size,0,var_reader)

call SetFatesGlobalElements1(use_fates,natpft_size,0,fates_paramfile)
natpft_size = fates_maxPatchesPerSite
max_patch_per_col= max(natpft_size, numcft, maxpatch_urb)

Expand Down Expand Up @@ -476,7 +476,6 @@ subroutine ELMFatesGlobals2()
call set_fates_ctrlparms('hlm_name',cval='ELM')
call set_fates_ctrlparms('hio_ignore_val',rval=spval)
call set_fates_ctrlparms('soilwater_ipedof',ival=get_ipedof(0))
call set_fates_ctrlparms('parteh_mode',ival=fates_parteh_mode)
call set_fates_ctrlparms('seeddisp_cadence',ival=fates_seeddisp_cadence)

call set_fates_ctrlparms('hist_hifrq_dimlevel',ival=fates_history_dimlevel(1))
Expand Down Expand Up @@ -842,7 +841,6 @@ subroutine init(this, bounds_proc, flandusepftdat)

use spmdMod, only : npes
use decompMod, only : procinfo
use FatesInterfaceMod, only : FatesReportParameters
use FatesParameterDerivedMod, only : param_derived
use FatesInterfaceTypesMod, only : numpft_fates => numpft
use elm_varsur, only : wt_nat_patch
Expand Down Expand Up @@ -1079,9 +1077,6 @@ subroutine init(this, bounds_proc, flandusepftdat)

call this%init_history_io(bounds_proc)

! Report Fates Parameters (debug flag in lower level routines)
call FatesReportParameters(masterproc)

! Fire data to send to FATES
call create_fates_fire_data_method( this%fates_fire_data_method )

Expand Down
225 changes: 0 additions & 225 deletions components/elm/src/main/elmfates_paraminterfaceMod.F90

This file was deleted.