1- # Perturbation routines #
1+ # Atmospheric forcing noise #
22
3- This section describes ** perturbation capabilities for eCLM-PDAF** .
4-
5- The implementation of the Soil Hydraulic Parameter perturbation was
6- first introduced by Fernand Eloundou and adapted by Yorck
7- Ewerdwalbesloh.
3+ This section describes ** atmospheric forcing noise for eCLM-PDAF** .
84
95The implementation of the atmospheric forcing perturbation routines
106was first introduced by Yorck Ewerdwalbesloh.
117
12- ## Description
8+ ## General Description
139
1410eCLM implements perturbations for atmospheric forcing variables
1511(temperature, precipitation, longwave radiation, and shortwave
@@ -46,202 +42,7 @@ is adjustable based on application requirements.
4642Perturbation fields are read from preprocessed noise files and applied
4743to atmospheric forcing variables within the eCLM model during runtime.
4844
49- ## Key Components ##
50-
51- ### 1. Soil Parameter Perturbation (` SoilStateInitTimeConstMod.F90 ` ) ###
52-
53- Allows reading perturbed hydraulic parameters from input files instead
54- of computing them via pedotransfer functions.
55-
56- ** Parameters:**
57- - ` THETAS ` - saturated water content
58- - ` SHAPE_PARAM ` - Brooks-Corey shape parameter (` bsw ` )
59- - ` PSIS_SAT ` - saturated matric potential (` sucsat ` )
60- - ` KSAT ` - saturated hydraulic conductivity (` xksat ` )
61-
62- ** Implementation:**
63- - Hydraulic parameters read from surface file
64- - Reads EITHER original parameters (for ` nlevsoifl=10 ` soil layers)
65- and applies organic matter mixing OR: Reads adjusted parameters with
66- ` _adj ` suffix (for all ` nlevgrnd ` layers) and ** overwrites**
67- parameters from organic matter mixing.
68- - Falls back to pedotransfer functions if parameters aren't in the file
69- - Modifies organic matter mixing to preserve perturbed parameter
70- values
71-
72- #### Surface File
73-
74- Soil hydraulic parameters are read from the ** surface dataset file** ,
75- which is specified in the ` lnd_in ` namelist file under key ` fsurdat ` .
76-
77- ##### Sufrace File: Parameter Structure and Dimensions
78-
79- All soil hydraulic parameters are stored as three-dimensional arrays
80- with the structure:
81-
82- ```
83- (nlevgrnd, lsmlat, lsmlon)
84- ```
85-
86- Where:
87- - ` nlevgrnd ` : Number of soil layers (vertical dimension, typically 25
88- layers in eCLM simulations, see namelist file key
89- ` soil_layerstruct ` )
90- - ` lsmlat ` : Number of latitude grid points
91- - ` lsmlon ` : Number of longitude grid points
92-
93- This 3D structure enables depth-varying, spatially-distributed soil
94- properties across the model domain.
95-
96- ##### Surface File: Input Parameter Format
97-
98- Two options
99- - original parameters that undergo organic mixing
100- - adjusted parameters that are used by input values
101-
102- ###### Original Parameters
103-
104- The surface file must contain the following baseline parameters:
105-
106- ``` text
107- THETAS(nlevgrnd, lsmlat, lsmlon)
108- long_name: "Porosity"
109- units: "vol/vol"
110-
111- SHAPE_PARAM(nlevgrnd, lsmlat, lsmlon)
112- long_name: "Shape (b) parameter"
113- units: "unitless"
114-
115- PSIS_SAT(nlevgrnd, lsmlat, lsmlon)
116- long_name: "Saturated soil matric potential"
117- units: "mmH2O"
118-
119- KSAT(nlevgrnd, lsmlat, lsmlon)
120- long_name: "Saturated hydraulic conductivity"
121- units: "mm/s"
122- ```
123-
124- These parameters apply to the first 10 soil layers (` nlevsoifl=10 ` ) and
125- undergo organic matter mixing.
126-
127- ###### Adjusted Parameters for Data Assimilation
128-
129- When running with perturbed soil parameters (e.g., from ensemble data
130- assimilation), the surface file should contain adjusted parameters
131- with the ` _adj ` suffix:
132-
133- ``` text
134- THETAS_adj(nlevgrnd, lsmlat, lsmlon)
135- long_name: "Porosity"
136- units: "vol/vol"
137- _FillValue: 1.e+30
138-
139- SHAPE_PARAM_adj(nlevgrnd, lsmlat, lsmlon)
140- long_name: "Shape (b) parameter"
141- units: "unitless"
142- _FillValue: 1.e+30
143-
144- PSIS_SAT_adj(nlevgrnd, lsmlat, lsmlon)
145- long_name: "Saturated soil matric potential"
146- units: "mmH2O"
147- _FillValue: 1000.0
148-
149- KSAT_adj(nlevgrnd, lsmlat, lsmlon)
150- long_name: "Saturated hydraulic conductivity"
151- units: "mm/s"
152- _FillValue: 1.e+30
153- ```
154-
155- ** Important Notes:**
156- - Adjusted parameters apply to ** all** ` nlevgrnd ` layers
157- - When present, adjusted parameters ** overwrite** the results of organic
158- matter mixing
159- - ` PSIS_SAT_adj ` uses a different fill value (1000.0) compared to other
160- parameters (1.e+30), reflecting special handling for undefined matric
161- potential values
162- - If adjusted parameters are not present in the surface file, eCLM falls
163- back to the original parameters or pedotransfer functions
164-
165- #### Namelist Configuration
166-
167- The soil hydraulic parameter reading behavior is controlled by two
168- namelist settings in the ` clm_soilstate_inparm ` section of the ` lnd_in `
169- namelist file:
170-
171- ##### ` soil_hyd_inparm_from_surfdata `
172-
173- ** Type:** logical
174- ** Default:** ` .false. `
175- ** Description:** Controls whether to read baseline hydraulic parameters
176- from the surface dataset file.
177-
178- When set to ` .true. ` :
179- - eCLM reads ` THETAS ` , ` SHAPE_PARAM ` , ` PSIS_SAT ` , and ` KSAT ` from the
180- surface file
181- - Parameters apply to the first 10 soil layers (` nlevsoifl=10 ` )
182- - Parameters undergo organic matter mixing
183- - If any required variable is missing, the model aborts with an error
184- message
185-
186- When set to ` .false. ` (default):
187- - Hydraulic parameters are computed via pedotransfer functions from
188- sand and clay fractions
189- - No parameters are read from the surface file
190-
191- ##### ` soil_hyd_inparm_from_surfdata_adj `
192-
193- ** Type:** logical
194- ** Default:** ` .false. `
195- ** Description:** Controls whether to read organic-matter-adjusted
196- hydraulic parameters from the surface dataset file.
197-
198- When set to ` .true. ` :
199- - eCLM reads ` THETAS_adj ` , ` SHAPE_PARAM_adj ` , ` PSIS_SAT_adj ` , and
200- ` KSAT_adj ` from the surface file
201- - Parameters apply to ** all** ` nlevgrnd ` soil layers (typically 25
202- layers)
203- - Adjusted parameters ** overwrite** the results from organic matter
204- mixing
205- - If any required variable is missing, the model aborts with an error
206- message
207-
208- When set to ` .false. ` (default):
209- - No organic-matter-adjusted parameters are read from the surface file
210- - Organic matter mixing results are used as final parameter values
211-
212- ##### Example Configuration
213-
214- ``` fortran
215- &clm_soilstate_inparm
216- organic_frac_squared = .false.
217- soil_hyd_inparm_from_surfdata = .false.
218- soil_hyd_inparm_from_surfdata_adj = .true.
219- /
220- ```
221-
222- This configuration:
223- - Reads adjusted parameters from the surface file which override the
224- organic matter mixing results
225- - Is typical for ensemble data assimilation applications with perturbed
226- soil parameters
227-
228- ##### Error Handling
229-
230- Both namelist parameters enforce strict error checking:
231- - If set to ` .true. ` , ** all** required parameters must be present in
232- the surface file
233- - Missing variables trigger an immediate model abort with a descriptive
234- error message
235- - This ensures users are explicitly aware when parameter files are
236- incomplete
237-
238- #### Note about the Brooks-Corey Shape Parameter ####
239-
240- When perturbed soil parameters are read from input files, the organic
241- matter mixing for ` bsw ` uses the file-read value instead of the
242- hard-coded Cosby et al. (1984) Table 5 formula (` 2.91 + 0.159*clay ` ).
243-
244- ### 2. Noise-Based Forcing Perturbation ###
45+ ## 1. Noise-Based Forcing Perturbation ##
24546
24647When having an ensemble run, the memory consumption is too large if
24748the forcing data is perturbed one by one so that I get a file for each
@@ -274,13 +75,13 @@ data assimilation.
27475- Detects noise fields by checking if model field name contains ` "noise" `
27576- Adjusts time coordinate reading to account for ensemble-extended noise files
27677
277- #### Preparing Atmospheric Forcing Noise # ###
78+ ### Preparing Atmospheric Forcing Noise ###
27879
27980This section describes the workflow for generating and configuring
28081spatiotemporally correlated noise fields for atmospheric forcing
28182perturbations.
28283
283- ##### Noise Generation Tool # ####
84+ #### Noise Generation Tool ####
28485
28586The ` correlatedNoise.py `
28687(https://github.com/HPSCTerrSys/eCLM_atm-forcing-generator/pull/8 )
@@ -299,7 +100,7 @@ correlated noise fields for all ensemble members.
299100
300101** Output** : One NetCDF file per month containing noise fields for all ensemble members and all perturbed variables.
301102
302- ##### Stream File Configuration # ####
103+ #### Stream File Configuration ####
303104
304105Stream files configure how eCLM reads and applies noise fields to
305106atmospheric forcing data. Three separate stream files are required
@@ -314,15 +115,15 @@ file must specify the following metadata fields:
314115- ** Perturbation variables** : ` tbot_noise ` (temperature), ` lwdn_noise ` (longwave radiation), ` precn_noise ` (precipitation), ` swdn_noise ` (shortwave radiation)
315116
316117
317- ##### Stream File Examples # ####
118+ #### Stream File Examples ####
318119
319120The following examples demonstrate proper stream file configuration
320121for precipitation, solar radiation, and other atmospheric
321122variables. Each example must be adapted with correct file paths,
322123temporal parameters, and ensemble member IDs for your specific
323124application.
324125
325- ###### Precipitation Noise Stream File # #####
126+ ##### Precipitation Noise Stream File #####
326127
327128** File** : ` user_datm.streams.precip_noise.stream_0000.txt `
328129
@@ -381,7 +182,7 @@ application.
381182</fieldInfo >
382183```
383184
384- ###### Solar Radiation Noise Stream File # #####
185+ ##### Solar Radiation Noise Stream File #####
385186
386187** File** : ` user_datm.streams.solar_noise.stream_0000.txt `
387188
@@ -440,7 +241,7 @@ application.
440241</fieldInfo >
441242```
442243
443- ###### Temperature and Longwave Radiation Noise Stream File # #####
244+ ##### Temperature and Longwave Radiation Noise Stream File #####
444245
445246** File** : ` user_datm.streams.other_noise.stream_0000.txt `
446247
@@ -501,7 +302,7 @@ application.
501302
502303```
503304
504- ### 3 . DATM Integration (` datm_comp_mod.F90 ` ) # ##
305+ ## 2 . DATM Integration (` datm_comp_mod.F90 ` ) ##
505306
506307Passes ensemble information (` inst_index ` , ` dt_option ` , ` ninst ` ) from
507308the data atmosphere (DATM) component to the stream infrastructure,
@@ -510,22 +311,14 @@ CESM's multi-instance framework.
510311
511312## Design Rationale ##
512313
513- 1 . ** Dual perturbation approach** :
514- - Parameter perturbation for soil properties (offline preprocessing)
515- - Forcing perturbation via temporal noise patterns (runtime)
516-
517- 2 . ** Backward compatibility** : All changes are guarded by ` USE_PDAF `
314+ 1 . ** Backward compatibility** : All changes are guarded by ` USE_PDAF `
518315 preprocessor directives
519316
520- 3 . ** Efficiency** : Uses a single noise file for all ensemble members
317+ 2 . ** Efficiency** : Uses a single noise file for all ensemble members
521318 by time-shifting, avoiding storage duplication
522319
523- 4 . ** Flexibility** : Soil parameters can be perturbed or computed
524- traditionally based on file contents
525-
526320## Modified Source Code ##
527321
528- - ` src/clm5/biogeophys/SoilStateInitTimeConstMod.F90 `
529322- ` src/csm_share/streams/shr_stream_mod.F90 `
530323- ` src/csm_share/streams/shr_strdata_mod.F90 `
531324- ` src/csm_share/streams/shr_dmodel_mod.F90 `
0 commit comments