You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/pdaf.md
+95-62Lines changed: 95 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,8 +56,9 @@ unset ESMF_ABI
56
56
PDAF version 3.0 is not compatible with previous version (2.3.1 and older), so if you have previous version, please update it to the latest one.
57
57
58
58
Get PDAF 3.0 from github
59
-
59
+
```
60
60
git clone https://github.com/PDAF/PDAF.git
61
+
```
61
62
62
63
Choose build option from folder make.arch or make one and put into it.
63
64
@@ -67,146 +68,178 @@ Change compiling option if necessary. PDAF requires BLAS and LAPACK library. If
67
68
68
69
Here we use linux_ifort_impi.h as example, define marco as following then build the lib
69
70
71
+
```
70
72
export ARCH=linux_ifort_impi
71
-
72
73
export PDAF_ARCH=$ARCH
73
-
74
74
make
75
+
```
75
76
76
77
If successful, libraries & module files are located in lib and include respectively.
77
-
78
78
79
79
80
-
1.3 Build SCHISM
80
+
##Build SCHISM
81
81
82
-
Follow https://schism-dev.github.io/schism/stable/getting-started/getting-sourcecode.html and https://schism-dev.github.io/schism/stable/getting-started/compilation.html#cmake to build schism libs.
83
-
84
-
Note: schism_pdaf only support scribe-IO under fully parallel mode (all ensembles run concurrently), and OLDIO (schout output nc files) under flexible mode (ensembles members run in batches, for under-resourced platform).
85
-
86
-
If users wish to use scribe-IO, build schism with OLDIO=OFF. If OLDIO is preferred, set OLDIO=ON.
87
-
88
-
schism_pdaf also supports static domain decomposition without ParMetis (requires partition.prop as input). If this feature is used, set NO_PARMETIS=ON.
82
+
Follow [cmake instructions on this web](../getting-started/typical-workflow.md) to build schism libs.
89
83
84
+
!!!Note
85
+
1. schism_pdaf only support scribe-IO under fully parallel mode (all ensembles run concurrently), and OLDIO (schout output nc files) under flexible mode (ensembles members run in batches, for under-resourced platform).
86
+
2. If users wish to use scribe-IO, build schism with OLDIO=OFF. If OLDIO is preferred, set OLDIO=ON.
87
+
3. schism_pdaf also supports static domain decomposition without ParMetis (requires partition.prop as input). If this feature is used, set NO_PARMETIS=ON.
export SCHISM_BUILD_DIR= where schism build is located
103
-
104
103
export PDAF_LIB_DIR=where PDAF lib is located
105
-
106
104
export SCHISM_NO_PARMETIS=off (If you wish to use static decomposition, then set it on)
105
+
```
107
106
108
107
If any library like Intel-MKL, OpenBLAS, AOCL (AMD)… is used when compiling PDAF, remember to check LDFLAGS within corresponding compiler section in the beginning of Makefile, make sure linking path & compile options are correct.
109
108
110
109
Then we can build schism_pdaf with the following:
111
110
111
+
```
112
112
make distclean
113
-
114
113
make pdaf
114
+
```
115
115
116
116
If successful, an executable schism_pdaf will be there.
117
-
118
117
119
118
120
-
2.Prepare the inputs
119
+
#Prepare the inputs
121
120
122
121
The input files include:
123
122
124
-
i. standard schism inputs, these files depend on user case setups
125
-
126
-
ii. schism_pdaf control files
127
-
128
-
schism_pdaf.cfg: control ensemble size, # of concurrent members, scribe cores (if used), ics_set (same as ics in param.nml: coordinate system)
129
-
130
-
131
-
132
-
global.nml: control parameters for ESMF & PDAF coupling info, set starting date and run hours and DA steps. Note that the time origin info, duration and SCHISM time step need to be consistent with param.nml (under any ihot setting). Specify the DA interval with ‘num_schism_dt_in_couple’ (# of SCHISM steps when calling PDAF), and this value should always be identical as delt_obs in pdaf.nml.
123
+
1. standard schism inputs, these files depend on user case setups
124
+
2. schism_pdaf control files
125
+
- schism_pdaf.cfg: control ensemble size, # of concurrent members, scribe cores (if used), ics_set (same as ics in param.nml: coordinate system)
126
+
```
127
+
# This ESMF resource file is read by the program `multi_schism`. Its only
128
+
# configuration label is the number of schism instances to launch.
133
129
134
-
135
130
136
-
pdaf.nml: control pdaf parameters such as filter type, localization range…etc.
131
+
# count: integer(ESMF_KIND_I4), must be in the range 1..999
132
+
schism_count: 8
133
+
concurrent_count: 4
134
+
# scribe counter for fully parallel mode
135
+
scribe_count: 6
136
+
# ics_set for scribe cores
137
+
ics_set: 2
138
+
```
139
+
- global.nml: control parameters for ESMF & PDAF coupling info, set starting date and run hours and DA steps. Note that the time origin info, duration and SCHISM time step need to be consistent with param.nml (under any ihot setting). Specify the DA interval with `num_schism_dt_in_couple` (# of SCHISM steps when calling PDAF), and this value should always be identical as delt_obs in `pdaf.nml`.
140
+
```
141
+
&sim_time
142
+
start_year=2000
143
+
start_month=1
144
+
start_day=1
145
+
start_hour=0
146
+
runhours=24 !total run time in hours
147
+
schism_dt=120 !SCHISM dt in sec (must be int)
148
+
num_schism_dt_in_couple=1 !# of SCHISM steps used in the ESMF main stepping
149
+
/
150
+
```
137
151
138
-
152
+
- pdaf.nml: control pdaf parameters such as filter type, localization range…etc.
153
+
```
154
+
!Namelist file for PDAF configuration
155
+
&pdaf_nml
156
+
screen = 3, ! 0 is default, use 3 to debug
157
+
filtertype = 7, ! only accept 4(ETKF),5(LETKF),6(ESTKF),7(LESTKF)
158
+
subtype = 0, ! subtype of filter, check details in http://pdaf.awi.de/trac/wiki/AvailableOptionsforInitPDAF
159
+
delt_obs = 36, ! how many steps to do DA
160
+
rms_obs = 0.5, ! observation error, will be vector later
local_range = 500.0, ! localization range, use lat/lon if ics=2
164
+
varscale = 1.00, ! Init Ensemble Variance
165
+
ihfskip_PDAF = 108, ! ihfskip for DA output, has to be multiple of delt_obs
166
+
nspool_PDAF = 36, ! nspool for DA output, has to be multiple of delt_obs
167
+
outf = 1, ! output handle, 0: no output, 1: ens-mean, 2: members (in schism_001...), 3: both ens-mean & members (has netcdf issues, don't use currently)
nhot_write_PDAF = 36, ! nhot_write for DA hotstart output, must be a multiple of ihfskip_PDAF if nhot_PDAF=1
170
+
rms_type = 1, ! obs error handle, 1: uniform error from rms_obs; 2: specify error from rms_obs2; 3: specify error from obs files with extra column
171
+
rms_obs2 = 0.02, 0.1, 0.1, 0.2, 0.2, ! specified error with different type obs, z/t/s/u/v
172
+
ens_init = 1, ! ens state init option, 1: use eofs & hotstart.nc, 2: same as 1 but use meanstate, 3: restart from ens.bin
173
+
use_global_obs = 0, ! Option to turn on global observation searching, 0=local, 1=global
174
+
Zdepth_limit = 200., ! Control SSH/SSH-A data depth limiter, default: 200m
175
+
min_MSL_acDay = 10., ! Control minimum accumalation MSL day to derived SSH-A, unit: Days
176
+
/
177
+
```
139
178
140
179
141
180
142
-
iii. schism_pdaf ensemble inputs
181
+
3. schism_pdaf ensemble inputs
143
182
144
-
We follow suggestions from PDAF and use Pham’s method (2001) to generate ensemble information. More details can be found from https://pdaf.awi.de/trac/wiki/EnsembleGeneration .
183
+
We follow suggestions from PDAF and use Pham’s method (2001) to generate ensemble information. More details can be found [here](https://pdaf.awi.de/trac/wiki/EnsembleGeneration).
145
184
146
185
In summary, users can do a freerun (no DA) and extract its snapshots for EOFs analysis. Snapshots can be extracted with ncl scripts (extract2bin.ncl or extract2bin_scrio.ncl), and use generate_covar.F90 to generate required inputs as follows:
147
-
186
+
```
148
187
eofs.dat: number of EOFs
149
-
150
188
eofs.bin: EOFs matrix
151
-
152
189
svd.bin: svd values from analysis
153
-
154
190
meanstate.bin (optional): usually only used for twin experiments.
191
+
```
155
192
156
-
Note: generate_covar.F90 is serial program. If any large case needs to be analyzed, large memory is required for analysis and long execution time should be expected. These utility scripts are located at src/PDAF_bindings/utility/gen_cov/
193
+
!!!Note
194
+
generate_covar.F90 is serial program. If any large case needs to be analyzed, large memory is required for analysis and long execution time should be expected. These utility scripts are located at src/PDAF_bindings/utility/gen_cov/
157
195
158
-
159
196
160
-
iv. DA_data: observation inputs, file naming is data_????????.dat (?s with i8.8 format with padding 0s, representing the SCHISM time steps). If the file does not exist, the code still runs with no DA done at that DA step.
197
+
4. DA_data: observation inputs, file naming is `data_????????.dat` (`?`s with i8.8 format with padding 0s, representing the SCHISM time steps). If the file does not exist, the code still runs with no DA done at that DA step.
161
198
162
-
Currently, it supports 6 types of observation including: elevation(z), sea-level anomaly(a), temperature (t), salinity(s), u-velocity(u), and v-velocity(v).
199
+
Currently, we support 6 types of observation including: elevation(z), sea-level anomaly(a), temperature (t), salinity(s), u-velocity(u), and v-velocity(v).
163
200
164
201
These are ascii files and their format are as follows:
165
-
202
+
[here](../assets/pdaf_data_format.png)
166
203
167
204
168
-
1st row is total number of observations, then followed by
169
-
170
-
obs-type, X, Y, Z, obs-values,
205
+
First row is total number of observations, then followed by obs-type, X, Y, Z, obs-values.
171
206
172
207
If rms_type=3, one extra column is needed for observation errors. Users can also specify uniform observation error with rms_type=1,2 in pdaf.nml.
When inputs are ready, users need to create each ensemble folder with naming schism_??? (i3.3 format), and link schism input file inside. makedir.pl (under src/PDAF_bindings/utility) can be used to create each member outputs dir and link input files in each dir.
181
214
182
215
Users also need to create folder DA_output with two subfolder a and f for storing DA outputs after/before the DA step, respectively.
183
-
216
+
```
184
217
DA_output/a : Analysis (After DA)
185
-
186
218
DA_output/f : Forecast (Before DA)
219
+
```
187
220
188
-
To launch the run, users may need to add esmf lib path into LD_LIBRARY_PATH in the job script or environment, like the following:
221
+
To launch the run, users may need to add esmf lib path into `LD_LIBRARY_PATH` in the job script or environment, like the following:
During the run, users can check job screen output which will show PDAF config information and DA status, as well as timing information.
205
238
206
-
If users choose scribe-IO, scribe output will be located in each schism_???/outputs.
239
+
If users choose scribe-IO, scribe output will be located in each `schism_???/outputs`.
207
240
208
-
DA_output/ will store ensemble-mean files in OLDIO format, and users need to combine them, and link local_to_global* from schism_001/outputs/ to perform the combine task.
241
+
DA_output/ will store ensemble-mean files in OLDIO format, and users need to combine them, and link `local_to_global*` from `schism_001/outputs/` to perform the combine task.
209
242
210
-
DA effects in schism_???/output/*.nc (either scribe or schout format) only can be seen after 2nd DA (if DA frequency = output frequency), since model state update always happens at the beginning of next DA cycle. If users need to check instantaneous DA result, it will be only under DA_output/a
243
+
DA effects in `schism_???/output/*.nc` (either scribe or schout format) only can be seen after 2nd DA (if DA frequency = output frequency), since model state update always happens at the beginning of next DA cycle. If users need to check instantaneous DA result, it will be only under `DA_output/a`.
211
244
212
-
If DA frequency > output frequency, DA effects will be seen after 1st DA + 1 output step.
245
+
If DA frequency > output frequency, DA effects will be seen after 1st DA + 1 output step.
0 commit comments