Full Model Emulation

Upload inference configurations

#1
ace2s_inference_config_global.yaml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_dir: /output_directory
2
+ n_forward_steps: 1460
3
+ forward_steps_in_memory: 40
4
+ checkpoint_path: /ACE2S.ckpt
5
+ logging:
6
+ log_to_screen: true
7
+ log_to_wandb: false
8
+ log_to_file: true
9
+ project: ace
10
+ initial_condition:
11
+ path: /initial_conditions/ic_2023.nc
12
+ start_indices:
13
+ times:
14
+ - "2023-01-01T00:00:00"
15
+ forcing_loader:
16
+ dataset:
17
+ data_path: /forcing_data
18
+ num_data_workers: 4
19
+ data_writer:
20
+ files:
21
+ - format:
22
+ name: zarr
23
+ label: output_6hourly_ace2s
24
+ names:
25
+ - PRATEsfc
26
+ - UGRD10m
27
+ - VGRD10m
28
+ separate_ensemble_members: true
29
+ save_monthly_files: false
30
+ save_prediction_files: false
ace2s_inference_config_pnw.yaml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_dir: /output_directory
2
+ n_forward_steps: 14600
3
+ forward_steps_in_memory: 40
4
+ checkpoint_path: /ace2s_xshield_ckpt.tar
5
+ logging:
6
+ log_to_screen: true
7
+ log_to_wandb: false
8
+ log_to_file: true
9
+ project: ace
10
+ initial_condition:
11
+ path: /initial_conditions/ic_2014.nc
12
+ start_indices:
13
+ times:
14
+ - "2014-01-01T00:00:00"
15
+ forcing_loader:
16
+ dataset:
17
+ data_path: /forcing_data
18
+ num_data_workers: 4
19
+ data_writer:
20
+ files:
21
+ - format:
22
+ name: zarr
23
+ label: output_6hourly_ace2s
24
+ names:
25
+ - PRATEsfc
26
+ - UGRD10m
27
+ - VGRD10m
28
+ separate_ensemble_members: true
29
+ save_monthly_files: false
30
+ save_prediction_files: false
hiro_downscaling_ace2s_global_output.yaml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_dir: /output_directory
2
+ patch:
3
+ divide_generation: true
4
+ composite_prediction: true
5
+ coarse_horizontal_overlap: 1
6
+ model:
7
+ checkpoint_path: /HiRO.ckpt
8
+ rename:
9
+ eastward_wind_at_ten_meters: UGRD10m
10
+ northward_wind_at_ten_meters: VGRD10m
11
+ data:
12
+ coarse:
13
+ - data_path: /output_directory
14
+ engine: zarr
15
+ file_pattern: output_6hourly_predictions_ic0000.zarr
16
+ batch_size: 4
17
+ num_data_workers: 2
18
+ strict_ensemble: False
19
+ outputs:
20
+ - name: "Global_HiRO_2023"
21
+ save_vars: ["PRATEsfc"]
22
+ n_ens: 1
23
+ max_samples_per_gpu: 32
24
+ time_range:
25
+ start_time: "2023-01-01T00:00:00"
26
+ stop_time: "2023-12-31T18:00:00"
27
+ lat_extent:
28
+ start: -66.0
29
+ stop: 70.0
30
+ lon_extent:
31
+ start: 0
32
+ stop: 360
33
+ logging:
34
+ log_to_screen: true
35
+ log_to_wandb: false
36
+ log_to_file: true
hiro_downscaling_ace2s_pnw_output.yaml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ experiment_dir: /output_directory
2
+ patch:
3
+ divide_generation: true
4
+ composite_prediction: true
5
+ coarse_horizontal_overlap: 1
6
+ model:
7
+ checkpoint_path: /HiRO.ckpt
8
+ rename:
9
+ eastward_wind_at_ten_meters: UGRD10m
10
+ northward_wind_at_ten_meters: VGRD10m
11
+ data:
12
+ coarse:
13
+ - data_path: /output_directory
14
+ engine: zarr
15
+ file_pattern: output_6hourly_predictions_ic0000.zarr
16
+ batch_size: 4
17
+ num_data_workers: 2
18
+ strict_ensemble: False
19
+ outputs:
20
+ - name: "PNW_ensemble0000"
21
+ save_vars: ["PRATEsfc"]
22
+ n_ens: 1
23
+ max_samples_per_gpu: 32
24
+ time_range:
25
+ start_time: "2014-01-01T00:00:00"
26
+ stop_time: "2023-12-31T18:00:00"
27
+ lat_extent:
28
+ start: 32.9
29
+ stop: 50.0
30
+ lon_extent:
31
+ start: 233.0
32
+ stop: 250.0
33
+ - name: "WA_AR_20230206" # Example of a single event downscaling (may not exist in your data)
34
+ save_vars: ["PRATEsfc"]
35
+ n_ens: 16
36
+ max_samples_per_gpu: 8
37
+ event_time: "2023-02-06T06:00:00"
38
+ lat_extent:
39
+ start: 36.0
40
+ stop: 52.0
41
+ lon_extent:
42
+ start: 228.0
43
+ stop: 244.0
44
+ logging:
45
+ log_to_screen: true
46
+ log_to_wandb: false
47
+ log_to_file: true
run-hiro-ace.sh ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Example script to show the steps needed to downscale ACE
2
+ # using HiRO
3
+
4
+ # Provided are two inference configurations used in the
5
+ # manuscript:
6
+ # 1.) Global inference with ACE for 2023 then downscaled
7
+ # for most of the global (-66S to 70N) using HiRO
8
+ #
9
+ # 2.) Global inference with ACE for 2014 - 2023 then
10
+ # the Pacific NorthWest (PNW) only downscaled with HiRO
11
+
12
+
13
+ # First run coarse ACE2S
14
+ python -m fme.ace.inference ace2s_inference_config_global.yaml
15
+
16
+ # Second downscale ACE2S using HiRO
17
+
18
+ # HiRO is more computationally costly then ACE2S
19
+ # for faster through put more GPUs may be required
20
+ NGPU=1
21
+
22
+ torchrun --nproc_per_node $NGPU -m fme.downscaling.inference hiro_downscaling_ace2s_global_output.yaml