R/merra_subset.R
fDate.Rd
Create date-time character string from year, month, hour, and timezone.
fDate(year, month, day, hour, tz = "UTC")
integer, year
integer, month (1-12)
integer (1-31) or character ("last"), day of the month.
integer, hour (0-23)
Olson timezone code (`OlsonNames()`), "UTC" by default.
A utility function to create input in format used `get_merra2_subset`.
fDate(2010, 12, "last", 23)
#> [1] "2010-12-31 23"
fDate(2010, 1, 1, 0)
#> [1] "2010-01-01 00"
OlsonNames()
#> [1] "Africa/Abidjan" "Africa/Accra"
#> [3] "Africa/Addis_Ababa" "Africa/Algiers"
#> [5] "Africa/Asmara" "Africa/Asmera"
#> [7] "Africa/Bamako" "Africa/Bangui"
#> [9] "Africa/Banjul" "Africa/Bissau"
#> [11] "Africa/Blantyre" "Africa/Brazzaville"
#> [13] "Africa/Bujumbura" "Africa/Cairo"
#> [15] "Africa/Casablanca" "Africa/Ceuta"
#> [17] "Africa/Conakry" "Africa/Dakar"
#> [19] "Africa/Dar_es_Salaam" "Africa/Djibouti"
#> [21] "Africa/Douala" "Africa/El_Aaiun"
#> [23] "Africa/Freetown" "Africa/Gaborone"
#> [25] "Africa/Harare" "Africa/Johannesburg"
#> [27] "Africa/Juba" "Africa/Kampala"
#> [29] "Africa/Khartoum" "Africa/Kigali"
#> [31] "Africa/Kinshasa" "Africa/Lagos"
#> [33] "Africa/Libreville" "Africa/Lome"
#> [35] "Africa/Luanda" "Africa/Lubumbashi"
#> [37] "Africa/Lusaka" "Africa/Malabo"
#> [39] "Africa/Maputo" "Africa/Maseru"
#> [41] "Africa/Mbabane" "Africa/Mogadishu"
#> [43] "Africa/Monrovia" "Africa/Nairobi"
#> [45] "Africa/Ndjamena" "Africa/Niamey"
#> [47] "Africa/Nouakchott" "Africa/Ouagadougou"
#> [49] "Africa/Porto-Novo" "Africa/Sao_Tome"
#> [51] "Africa/Timbuktu" "Africa/Tripoli"
#> [53] "Africa/Tunis" "Africa/Windhoek"
#> [55] "America/Adak" "America/Anchorage"
#> [57] "America/Anguilla" "America/Antigua"
#> [59] "America/Araguaina" "America/Argentina/Buenos_Aires"
#> [61] "America/Argentina/Catamarca" "America/Argentina/ComodRivadavia"
#> [63] "America/Argentina/Cordoba" "America/Argentina/Jujuy"
#> [65] "America/Argentina/La_Rioja" "America/Argentina/Mendoza"
#> [67] "America/Argentina/Rio_Gallegos" "America/Argentina/Salta"
#> [69] "America/Argentina/San_Juan" "America/Argentina/San_Luis"
#> [71] "America/Argentina/Tucuman" "America/Argentina/Ushuaia"
#> [73] "America/Aruba" "America/Asuncion"
#> [75] "America/Atikokan" "America/Atka"
#> [77] "America/Bahia" "America/Bahia_Banderas"
#> [79] "America/Barbados" "America/Belem"
#> [81] "America/Belize" "America/Blanc-Sablon"
#> [83] "America/Boa_Vista" "America/Bogota"
#> [85] "America/Boise" "America/Buenos_Aires"
#> [87] "America/Cambridge_Bay" "America/Campo_Grande"
#> [89] "America/Cancun" "America/Caracas"
#> [91] "America/Catamarca" "America/Cayenne"
#> [93] "America/Cayman" "America/Chicago"
#> [95] "America/Chihuahua" "America/Ciudad_Juarez"
#> [97] "America/Coral_Harbour" "America/Cordoba"
#> [99] "America/Costa_Rica" "America/Creston"
#> [101] "America/Cuiaba" "America/Curacao"
#> [103] "America/Danmarkshavn" "America/Dawson"
#> [105] "America/Dawson_Creek" "America/Denver"
#> [107] "America/Detroit" "America/Dominica"
#> [109] "America/Edmonton" "America/Eirunepe"
#> [111] "America/El_Salvador" "America/Ensenada"
#> [113] "America/Fort_Nelson" "America/Fort_Wayne"
#> [115] "America/Fortaleza" "America/Glace_Bay"
#> [117] "America/Godthab" "America/Goose_Bay"
#> [119] "America/Grand_Turk" "America/Grenada"
#> [121] "America/Guadeloupe" "America/Guatemala"
#> [123] "America/Guayaquil" "America/Guyana"
#> [125] "America/Halifax" "America/Havana"
#> [127] "America/Hermosillo" "America/Indiana/Indianapolis"
#> [129] "America/Indiana/Knox" "America/Indiana/Marengo"
#> [131] "America/Indiana/Petersburg" "America/Indiana/Tell_City"
#> [133] "America/Indiana/Vevay" "America/Indiana/Vincennes"
#> [135] "America/Indiana/Winamac" "America/Indianapolis"
#> [137] "America/Inuvik" "America/Iqaluit"
#> [139] "America/Jamaica" "America/Jujuy"
#> [141] "America/Juneau" "America/Kentucky/Louisville"
#> [143] "America/Kentucky/Monticello" "America/Knox_IN"
#> [145] "America/Kralendijk" "America/La_Paz"
#> [147] "America/Lima" "America/Los_Angeles"
#> [149] "America/Louisville" "America/Lower_Princes"
#> [151] "America/Maceio" "America/Managua"
#> [153] "America/Manaus" "America/Marigot"
#> [155] "America/Martinique" "America/Matamoros"
#> [157] "America/Mazatlan" "America/Mendoza"
#> [159] "America/Menominee" "America/Merida"
#> [161] "America/Metlakatla" "America/Mexico_City"
#> [163] "America/Miquelon" "America/Moncton"
#> [165] "America/Monterrey" "America/Montevideo"
#> [167] "America/Montreal" "America/Montserrat"
#> [169] "America/Nassau" "America/New_York"
#> [171] "America/Nipigon" "America/Nome"
#> [173] "America/Noronha" "America/North_Dakota/Beulah"
#> [175] "America/North_Dakota/Center" "America/North_Dakota/New_Salem"
#> [177] "America/Nuuk" "America/Ojinaga"
#> [179] "America/Panama" "America/Pangnirtung"
#> [181] "America/Paramaribo" "America/Phoenix"
#> [183] "America/Port-au-Prince" "America/Port_of_Spain"
#> [185] "America/Porto_Acre" "America/Porto_Velho"
#> [187] "America/Puerto_Rico" "America/Punta_Arenas"
#> [189] "America/Rainy_River" "America/Rankin_Inlet"
#> [191] "America/Recife" "America/Regina"
#> [193] "America/Resolute" "America/Rio_Branco"
#> [195] "America/Rosario" "America/Santa_Isabel"
#> [197] "America/Santarem" "America/Santiago"
#> [199] "America/Santo_Domingo" "America/Sao_Paulo"
#> [201] "America/Scoresbysund" "America/Shiprock"
#> [203] "America/Sitka" "America/St_Barthelemy"
#> [205] "America/St_Johns" "America/St_Kitts"
#> [207] "America/St_Lucia" "America/St_Thomas"
#> [209] "America/St_Vincent" "America/Swift_Current"
#> [211] "America/Tegucigalpa" "America/Thule"
#> [213] "America/Thunder_Bay" "America/Tijuana"
#> [215] "America/Toronto" "America/Tortola"
#> [217] "America/Vancouver" "America/Virgin"
#> [219] "America/Whitehorse" "America/Winnipeg"
#> [221] "America/Yakutat" "America/Yellowknife"
#> [223] "Antarctica/Casey" "Antarctica/Davis"
#> [225] "Antarctica/DumontDUrville" "Antarctica/Macquarie"
#> [227] "Antarctica/Mawson" "Antarctica/McMurdo"
#> [229] "Antarctica/Palmer" "Antarctica/Rothera"
#> [231] "Antarctica/South_Pole" "Antarctica/Syowa"
#> [233] "Antarctica/Troll" "Antarctica/Vostok"
#> [235] "Arctic/Longyearbyen" "Asia/Aden"
#> [237] "Asia/Almaty" "Asia/Amman"
#> [239] "Asia/Anadyr" "Asia/Aqtau"
#> [241] "Asia/Aqtobe" "Asia/Ashgabat"
#> [243] "Asia/Ashkhabad" "Asia/Atyrau"
#> [245] "Asia/Baghdad" "Asia/Bahrain"
#> [247] "Asia/Baku" "Asia/Bangkok"
#> [249] "Asia/Barnaul" "Asia/Beirut"
#> [251] "Asia/Bishkek" "Asia/Brunei"
#> [253] "Asia/Calcutta" "Asia/Chita"
#> [255] "Asia/Choibalsan" "Asia/Chongqing"
#> [257] "Asia/Chungking" "Asia/Colombo"
#> [259] "Asia/Dacca" "Asia/Damascus"
#> [261] "Asia/Dhaka" "Asia/Dili"
#> [263] "Asia/Dubai" "Asia/Dushanbe"
#> [265] "Asia/Famagusta" "Asia/Gaza"
#> [267] "Asia/Harbin" "Asia/Hebron"
#> [269] "Asia/Ho_Chi_Minh" "Asia/Hong_Kong"
#> [271] "Asia/Hovd" "Asia/Irkutsk"
#> [273] "Asia/Istanbul" "Asia/Jakarta"
#> [275] "Asia/Jayapura" "Asia/Jerusalem"
#> [277] "Asia/Kabul" "Asia/Kamchatka"
#> [279] "Asia/Karachi" "Asia/Kashgar"
#> [281] "Asia/Kathmandu" "Asia/Katmandu"
#> [283] "Asia/Khandyga" "Asia/Kolkata"
#> [285] "Asia/Krasnoyarsk" "Asia/Kuala_Lumpur"
#> [287] "Asia/Kuching" "Asia/Kuwait"
#> [289] "Asia/Macao" "Asia/Macau"
#> [291] "Asia/Magadan" "Asia/Makassar"
#> [293] "Asia/Manila" "Asia/Muscat"
#> [295] "Asia/Nicosia" "Asia/Novokuznetsk"
#> [297] "Asia/Novosibirsk" "Asia/Omsk"
#> [299] "Asia/Oral" "Asia/Phnom_Penh"
#> [301] "Asia/Pontianak" "Asia/Pyongyang"
#> [303] "Asia/Qatar" "Asia/Qostanay"
#> [305] "Asia/Qyzylorda" "Asia/Rangoon"
#> [307] "Asia/Riyadh" "Asia/Saigon"
#> [309] "Asia/Sakhalin" "Asia/Samarkand"
#> [311] "Asia/Seoul" "Asia/Shanghai"
#> [313] "Asia/Singapore" "Asia/Srednekolymsk"
#> [315] "Asia/Taipei" "Asia/Tashkent"
#> [317] "Asia/Tbilisi" "Asia/Tehran"
#> [319] "Asia/Tel_Aviv" "Asia/Thimbu"
#> [321] "Asia/Thimphu" "Asia/Tokyo"
#> [323] "Asia/Tomsk" "Asia/Ujung_Pandang"
#> [325] "Asia/Ulaanbaatar" "Asia/Ulan_Bator"
#> [327] "Asia/Urumqi" "Asia/Ust-Nera"
#> [329] "Asia/Vientiane" "Asia/Vladivostok"
#> [331] "Asia/Yakutsk" "Asia/Yangon"
#> [333] "Asia/Yekaterinburg" "Asia/Yerevan"
#> [335] "Atlantic/Azores" "Atlantic/Bermuda"
#> [337] "Atlantic/Canary" "Atlantic/Cape_Verde"
#> [339] "Atlantic/Faeroe" "Atlantic/Faroe"
#> [341] "Atlantic/Jan_Mayen" "Atlantic/Madeira"
#> [343] "Atlantic/Reykjavik" "Atlantic/South_Georgia"
#> [345] "Atlantic/St_Helena" "Atlantic/Stanley"
#> [347] "Australia/ACT" "Australia/Adelaide"
#> [349] "Australia/Brisbane" "Australia/Broken_Hill"
#> [351] "Australia/Canberra" "Australia/Currie"
#> [353] "Australia/Darwin" "Australia/Eucla"
#> [355] "Australia/Hobart" "Australia/LHI"
#> [357] "Australia/Lindeman" "Australia/Lord_Howe"
#> [359] "Australia/Melbourne" "Australia/NSW"
#> [361] "Australia/North" "Australia/Perth"
#> [363] "Australia/Queensland" "Australia/South"
#> [365] "Australia/Sydney" "Australia/Tasmania"
#> [367] "Australia/Victoria" "Australia/West"
#> [369] "Australia/Yancowinna" "Brazil/Acre"
#> [371] "Brazil/DeNoronha" "Brazil/East"
#> [373] "Brazil/West" "CET"
#> [375] "CST6CDT" "Canada/Atlantic"
#> [377] "Canada/Central" "Canada/Eastern"
#> [379] "Canada/Mountain" "Canada/Newfoundland"
#> [381] "Canada/Pacific" "Canada/Saskatchewan"
#> [383] "Canada/Yukon" "Chile/Continental"
#> [385] "Chile/EasterIsland" "Cuba"
#> [387] "EET" "EST"
#> [389] "EST5EDT" "Egypt"
#> [391] "Eire" "Etc/GMT"
#> [393] "Etc/GMT+0" "Etc/GMT+1"
#> [395] "Etc/GMT+10" "Etc/GMT+11"
#> [397] "Etc/GMT+12" "Etc/GMT+2"
#> [399] "Etc/GMT+3" "Etc/GMT+4"
#> [401] "Etc/GMT+5" "Etc/GMT+6"
#> [403] "Etc/GMT+7" "Etc/GMT+8"
#> [405] "Etc/GMT+9" "Etc/GMT-0"
#> [407] "Etc/GMT-1" "Etc/GMT-10"
#> [409] "Etc/GMT-11" "Etc/GMT-12"
#> [411] "Etc/GMT-13" "Etc/GMT-14"
#> [413] "Etc/GMT-2" "Etc/GMT-3"
#> [415] "Etc/GMT-4" "Etc/GMT-5"
#> [417] "Etc/GMT-6" "Etc/GMT-7"
#> [419] "Etc/GMT-8" "Etc/GMT-9"
#> [421] "Etc/GMT0" "Etc/Greenwich"
#> [423] "Etc/UCT" "Etc/UTC"
#> [425] "Etc/Universal" "Etc/Zulu"
#> [427] "Europe/Amsterdam" "Europe/Andorra"
#> [429] "Europe/Astrakhan" "Europe/Athens"
#> [431] "Europe/Belfast" "Europe/Belgrade"
#> [433] "Europe/Berlin" "Europe/Bratislava"
#> [435] "Europe/Brussels" "Europe/Bucharest"
#> [437] "Europe/Budapest" "Europe/Busingen"
#> [439] "Europe/Chisinau" "Europe/Copenhagen"
#> [441] "Europe/Dublin" "Europe/Gibraltar"
#> [443] "Europe/Guernsey" "Europe/Helsinki"
#> [445] "Europe/Isle_of_Man" "Europe/Istanbul"
#> [447] "Europe/Jersey" "Europe/Kaliningrad"
#> [449] "Europe/Kiev" "Europe/Kirov"
#> [451] "Europe/Kyiv" "Europe/Lisbon"
#> [453] "Europe/Ljubljana" "Europe/London"
#> [455] "Europe/Luxembourg" "Europe/Madrid"
#> [457] "Europe/Malta" "Europe/Mariehamn"
#> [459] "Europe/Minsk" "Europe/Monaco"
#> [461] "Europe/Moscow" "Europe/Nicosia"
#> [463] "Europe/Oslo" "Europe/Paris"
#> [465] "Europe/Podgorica" "Europe/Prague"
#> [467] "Europe/Riga" "Europe/Rome"
#> [469] "Europe/Samara" "Europe/San_Marino"
#> [471] "Europe/Sarajevo" "Europe/Saratov"
#> [473] "Europe/Simferopol" "Europe/Skopje"
#> [475] "Europe/Sofia" "Europe/Stockholm"
#> [477] "Europe/Tallinn" "Europe/Tirane"
#> [479] "Europe/Tiraspol" "Europe/Ulyanovsk"
#> [481] "Europe/Uzhgorod" "Europe/Vaduz"
#> [483] "Europe/Vatican" "Europe/Vienna"
#> [485] "Europe/Vilnius" "Europe/Volgograd"
#> [487] "Europe/Warsaw" "Europe/Zagreb"
#> [489] "Europe/Zaporozhye" "Europe/Zurich"
#> [491] "GB" "GB-Eire"
#> [493] "GMT" "GMT+0"
#> [495] "GMT-0" "GMT0"
#> [497] "Greenwich" "HST"
#> [499] "Hongkong" "Iceland"
#> [501] "Indian/Antananarivo" "Indian/Chagos"
#> [503] "Indian/Christmas" "Indian/Cocos"
#> [505] "Indian/Comoro" "Indian/Kerguelen"
#> [507] "Indian/Mahe" "Indian/Maldives"
#> [509] "Indian/Mauritius" "Indian/Mayotte"
#> [511] "Indian/Reunion" "Iran"
#> [513] "Israel" "Jamaica"
#> [515] "Japan" "Kwajalein"
#> [517] "Libya" "MET"
#> [519] "MST" "MST7MDT"
#> [521] "Mexico/BajaNorte" "Mexico/BajaSur"
#> [523] "Mexico/General" "NZ"
#> [525] "NZ-CHAT" "Navajo"
#> [527] "PRC" "PST8PDT"
#> [529] "Pacific/Apia" "Pacific/Auckland"
#> [531] "Pacific/Bougainville" "Pacific/Chatham"
#> [533] "Pacific/Chuuk" "Pacific/Easter"
#> [535] "Pacific/Efate" "Pacific/Enderbury"
#> [537] "Pacific/Fakaofo" "Pacific/Fiji"
#> [539] "Pacific/Funafuti" "Pacific/Galapagos"
#> [541] "Pacific/Gambier" "Pacific/Guadalcanal"
#> [543] "Pacific/Guam" "Pacific/Honolulu"
#> [545] "Pacific/Johnston" "Pacific/Kanton"
#> [547] "Pacific/Kiritimati" "Pacific/Kosrae"
#> [549] "Pacific/Kwajalein" "Pacific/Majuro"
#> [551] "Pacific/Marquesas" "Pacific/Midway"
#> [553] "Pacific/Nauru" "Pacific/Niue"
#> [555] "Pacific/Norfolk" "Pacific/Noumea"
#> [557] "Pacific/Pago_Pago" "Pacific/Palau"
#> [559] "Pacific/Pitcairn" "Pacific/Pohnpei"
#> [561] "Pacific/Ponape" "Pacific/Port_Moresby"
#> [563] "Pacific/Rarotonga" "Pacific/Saipan"
#> [565] "Pacific/Samoa" "Pacific/Tahiti"
#> [567] "Pacific/Tarawa" "Pacific/Tongatapu"
#> [569] "Pacific/Truk" "Pacific/Wake"
#> [571] "Pacific/Wallis" "Pacific/Yap"
#> [573] "Poland" "Portugal"
#> [575] "ROC" "ROK"
#> [577] "Singapore" "Turkey"
#> [579] "UCT" "US/Alaska"
#> [581] "US/Aleutian" "US/Arizona"
#> [583] "US/Central" "US/East-Indiana"
#> [585] "US/Eastern" "US/Hawaii"
#> [587] "US/Indiana-Starke" "US/Michigan"
#> [589] "US/Mountain" "US/Pacific"
#> [591] "US/Samoa" "UTC"
#> [593] "Universal" "W-SU"
#> [595] "WET" "Zulu"
#> attr(,"Version")
#> [1] "2023c"
fDate(2010, 1, 1, 0, tz = "America/New_York")
#> [1] "2010-01-01 05"
fDate(2010, 1, 1, 0, tz = "Pacific/Auckland")
#> [1] "2009-12-31 11"
fDate(2010, 1, 1, 0, tz = "Asia/Kolkata")
#> [1] "2009-12-31 18"