Skip to content

Commit

Permalink
update padding keyword error handling + using ksha in example config …
Browse files Browse the repository at this point in the history
…for prediciton
  • Loading branch information
yingkaisha committed Oct 17, 2024
1 parent e94dedf commit 56cb245
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/example_physics_single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ predict:
# (e.g., duration: 384 for 365-day rollout using 32 GPUs)
days: 2 # forecast lead time as days (1 means 24-hour forecast)

save_forecast: '/glade/derecho/scratch/ksha/CREDIT/fuxi_6h/'
save_forecast: '/glade/derecho/scratch/$USER/CREDIT/fuxi_6h/'
save_vars: ['SP','t2m','V500','U500','T500','Z500','Q500']

# turn-off low-pass filter
Expand Down
2 changes: 1 addition & 1 deletion config/wxformer_1dg_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ predict:
# (e.g., duration: 384 for 365-day rollout using 32 GPUs)
days: 2 # forecast lead time as days (1 means 24-hour forecast)

save_forecast: '/glade/derecho/scratch/ksha/CREDIT/wxformer_1h/'
save_forecast: '/glade/derecho/scratch/$USER/CREDIT/wxformer_1h/'
save_vars: ['SP','t2m','V500','U500','T500','Z500','Q500']

# turn-off low-pass filter
Expand Down
4 changes: 4 additions & 0 deletions credit/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ def CREDIT_main_parser(conf, parse_training=True, parse_predict=True, print_summ
assert all(p >= 0 for p in pad_lon), 'padding size for longitude dim must be non-negative.'
assert all(p >= 0 for p in pad_lat), 'padding size for latitude dim must be non-negative.'

assert conf['model']['padding_conf']['mode'] in ['mirror', 'earth'], (
'Padding options must be "mirror" or "earth". Got ""'.format(
conf['model']['padding_conf']['mode']))

# ======================================================== #
# postblock opts
# turn-off post if post_conf does not exist
Expand Down

0 comments on commit 56cb245

Please sign in to comment.