Skip to content

Commit ad8d321

Browse files
committed
Add area_method:'latlon' to example configs, fix precompute_grid_area for radar coords
- Add area_method: 'latlon' to all 17 example config YAML files - Fix precompute_grid_area() to use lat_coordname/lon_coordname from config when available (e.g., radar data where x/y coords are Cartesian meters) - Use xarray dimension-aware indexing (isel/transpose) instead of hardcoded numpy positional slicing to handle 3D lat/lon arrays safely - Update tests/README.md with test_area_method_utils and test_area_method_clouds descriptions
1 parent c9f47c4 commit ad8d321

19 files changed

+57
-3
lines changed

config/config_csapr500m_example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ z_coord_type: height
133133
# Specify data structure
134134
datatimeresolution: 0.25 # hours
135135
pixel_radius: 0.5 # km
136+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
136137
ref_varname: dbz_comp
137138

138139
# Tracking parameters

config/config_era5_z500_example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ feature_type: 'generic'
4444
# Specify data structure
4545
datatimeresolution: 24.0 # hours
4646
pixel_radius: 200.0 # km
47+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
4748
time_dimname: 'time'
4849
x_dimname: 'lon'
4950
y_dimname: 'lat'

config/config_gridrad_mcs_example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ landmask_y_coordname: 'lat'
5252

5353
# Input dataset structure
5454
pixel_radius: 4.0 # [km] Spatial resolution of the input data
55+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
5556
datatimeresolution: 1.0 # [hour] Temporal resolution of the input data
5657
# Variable names in the input data
5758
tb_varname: 'Tb'

config/config_gridrad_mcs_template.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ landfrac_thresh: [0.9, 1] # Define the range of fraction for land (depends on w
5454

5555
# Input dataset structure
5656
pixel_radius: 4.0 # [km] Spatial resolution of the input data
57+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
5758
datatimeresolution: 1.0 # [hour] Temporal resolution of the input data
5859
# Variable names in the input data
5960
tb_varname: 'Tb'

config/config_himawari_mcs_example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ landmask_y_coordname: 'lat'
4848

4949
# Specific to GPM Tb+IMERG combined dataset
5050
pixel_radius: 5.0 # [km] Spatial resolution of the input data
51+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
5152
datatimeresolution: 1.0 # [hour] Temporal resolution of the input data
5253
# Variable names in the input data
5354
tb_varname: 'tbb_11'

config/config_imerg25km_mcs_tbpf.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ landfrac_thresh: [0.9, 1] # Define the range of fraction for land (depends on w
5353

5454
# Input dataset structure
5555
pixel_radius: 25.0 # [km] Spatial resolution of the input data
56+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
5657
datatimeresolution: 1.0 # [hour] Temporal resolution of the input data
5758
# Variable names in the input data
5859
olr2tb: False

config/config_imerg_mcs_tbpf_example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ landfrac_thresh: [0, 90] # Define the range of fraction for land (depends on wh
5252

5353
# Specific to GPM Tb+IMERG combined dataset
5454
pixel_radius: 10.0 # [km] Spatial resolution of the input data
55+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
5556
datatimeresolution: 1.0 # [hour] Temporal resolution of the input data
5657
# Variable names in the input data
5758
tb_varname: 'Tb'

config/config_mcs_pbc_idealized.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ landmask_varname: 'landseamask'
4949

5050
# Specific to GPM Tb+IMERG combined dataset
5151
pixel_radius: 10.0 # [km] Spatial resolution of the input data
52+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
5253
datatimeresolution: 1.0 # [hour] Temporal resolution of the input data
5354
# Variable names in the input data
5455
tb_varname: 'Tb'

config/config_mcs_saag_example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ landfrac_thresh: [0, 90] # Define the range of fraction for land (depends on wh
5353

5454
# Input dataset structure
5555
pixel_radius: 10.0 # [km] Spatial resolution of the input data
56+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
5657
datatimeresolution: 1.0 # [hour] Temporal resolution of the input data
5758
# Variable names in the input data
5859
tb_varname: 'tb'

config/config_mcs_tbpf_imergv7_mcsmip.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ landfrac_thresh: [0, 90] # Define the range of fraction for land (depends on wh
6666

6767
# Input dataset structure
6868
pixel_radius: 10.0 # [km] Spatial resolution of the input data
69+
area_method: 'latlon' # 'fixed' (default) or 'latlon' for latitude-dependent grid cell area
6970
datatimeresolution: 1.0 # [hour] Temporal resolution of the input data
7071
# Variable names in the input data
7172
tb_varname: Tb

0 commit comments

Comments
 (0)