samsrabin / CTSM_cropcals_hist

0 stars 0 forks source link

ny=5 with 4 cases? #2

Open samsrabin opened 3 months ago

samsrabin commented 3 months ago

fig_maps_eachCrop for some reason tries to make a 5-high figure when given 4 cases. This causes an error:

Mapping GDDHARV...
Traceback (most recent call last):
  File "/glade/u/home/samrabin/analysis/CTSM_cropcals_hist/crop_calendars/paper_figs.py", line 1059, in <module>
    maps_eachCrop(
  File "/glade/u/home/samrabin/analysis/CTSM_cropcals_hist/crop_calendars/fig_maps_eachCrop.py", line 632, in maps_eachCrop
    cbar_pos, figsize, hspace, wspace, new_sp_bottom, new_sp_left, suptitle_xpos, suptitle_ypos, cbar_labelpad = get_figure_info(ny, nx, ref_casename)
                                                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/glade/u/home/samrabin/analysis/CTSM_cropcals_hist/crop_calendars/fig_maps_eachCrop.py", line 272, in get_figure_info
    raise ValueError(f"Set up for ny = {ny}")
ValueError: Set up for ny = 5
samsrabin commented 3 months ago

It's because, for at least some figures, a row is included for GGCMI3. E.g.: Map Mean sowing date (1980-2009 growing seasons) Diff rx_sdates rice