# 10 weather case studies Gemini suggests -- this cell is set to raw, not active from merra2_download_script_final import download_merra2_data, COLLECTIONS_TO_DOWNLOAD, MERRA2_VERSION, SERVER_GOLDSMR4, SERVER_GOLDSMR5 import slice # ------------------------------------------------------------------------- # Define all 10 Case Studies # ------------------------------------------------------------------------- # Default constants for CONUS region and Troposphere levels DEFAULT_LAT_BOX = slice(20, 50) DEFAULT_LON_BOX = slice(-130, -70) DEFAULT_LEVELS = slice(1000, 100, 2) CASE_STUDY_LIST = [ { 'case_name': 'Malakis', 'username': 'BrianMapes', 'time_start': '2010-09-23 00:00', 'time_end': '2010-10-03 00:00', 'lat_box': DEFAULT_LAT_BOX, 'lon_box': DEFAULT_LON_BOX, 'levels': DEFAULT_LEVELS, 'collections_config': COLLECTIONS_TO_DOWNLOAD }, { 'case_name': 'Hurricane_Dorian', 'username': 'StormTrack', 'time_start': '2019-09-01 00:00', 'time_end': '2019-09-08 00:00', 'lat_box': slice(15, 45), # Atlantic/Southeast US 'lon_box': slice(-90, -50), 'levels': DEFAULT_LEVELS, 'collections_config': COLLECTIONS_TO_DOWNLOAD }, { 'case_name': 'California_Heatwave', 'username': 'ClimateWest', 'time_start': '2021-06-25 00:00', 'time_end': '2021-07-02 00:00', 'lat_box': slice(30, 50), 'lon_box': slice(-130, -100), 'levels': DEFAULT_LEVELS, 'collections_config': COLLECTIONS_TO_DOWNLOAD }, { 'case_name': 'Midwest_Tornado_Outbreak', 'username': 'SevereWeather', 'time_start': '2011-04-25 00:00', 'time_end': '2011-04-28 00:00', 'lat_box': slice(30, 45), 'lon_box': slice(-105, -80), 'levels': DEFAULT_LEVELS, 'collections_config': COLLECTIONS_TO_DOWNLOAD }, { 'case_name': 'Arctic_Vortex', 'username': 'PolarStudy', 'time_start': '2014-01-01 00:00', 'time_end': '2014-01-07 00:00', 'lat_box': slice(30, 70), # Extending North 'lon_box': slice(-140, -60), 'levels': slice(1000, 50, 2), # Deeper levels 'collections_config': COLLECTIONS_TO_DOWNLOAD }, { 'case_name': 'Pacific_Storm', 'username': 'OceanDynamics', 'time_start': '2018-11-10 00:00', 'time_end': '2018-11-15 00:00', 'lat_box': slice(35, 55), 'lon_box': slice(-150, -120), 'levels': DEFAULT_LEVELS, 'collections_config': COLLECTIONS_TO_DOWNLOAD }, { 'case_name': 'EastCoast_Blizzard', 'username': 'SnowWatch', 'time_start': '2016-01-21 00:00', 'time_end': '2016-01-25 00:00', 'lat_box': slice(30, 45), 'lon_box': slice(-90, -65), 'levels': DEFAULT_LEVELS, 'collections_config': COLLECTIONS_TO_DOWNLOAD }, { 'case_name': 'Texas_Freeze', 'username': 'PowerGrid', 'time_start': '2021-02-13 00:00', 'time_end': '2021-02-18 00:00', 'lat_box': slice(25, 40), 'lon_box': slice(-110, -85), 'levels': DEFAULT_LEVELS, 'collections_config': COLLECTIONS_TO_DOWNLOAD }, { 'case_name': 'GulfCoast_Rain', 'username': 'Hydrology', 'time_start': '2017-08-01 00:00', 'time_end': '2017-08-07 00:00', 'lat_box': slice(20, 35), 'lon_box': slice(-100, -80), 'levels': DEFAULT_LEVELS, 'collections_config': COLLECTIONS_TO_DOWNLOAD }, { 'case_name': 'Precip_Tracking', 'username': 'GeneralData', 'time_start': '2020-03-15 00:00', 'time_end': '2020-03-25 00:00', 'lat_box': DEFAULT_LAT_BOX, 'lon_box': DEFAULT_LON_BOX, 'levels': DEFAULT_LEVELS, 'collections_config': COLLECTIONS_TO_DOWNLOAD } ] # ------------------------------------------------------------------------- # Execution Loop # ------------------------------------------------------------------------- if __name__ == '__main__': print(f"--- Starting Download of {len(CASE_STUDY_LIST)} Case Studies ---") for case in CASE_STUDY_LIST: # We unpack the dictionary directly into the function call download_merra2_data(**case) print("\nAll case study download attempts have been processed. Please check the output logs and directories.")
https://goldsmr4.gesdisc.eosdis.nasa.gov/thredds/dodsC/MERRA2_aggregation/M2T1NXSLV.5.12.4/M2T1NXSLV.5.12.4_Aggregation_2019.ncml https://goldsmr4.gesdisc.eosdis.nasa.gov/thredds/dodsC/MERRA2_aggregation/M2T1NXSLV.5.12.4/M2T1NXSLV.5.12.4_Aggregation_2019.ncml