From: Doutriaux, C. <dou...@ll...> - 2022-01-05 02:39:42
|
Hi Ken, I would use cdscan to make all the files look like one big file (something like: cdscan -x big.xlm *.nc) Then open that file and loop through lat/lon as you want. C. From: Ken Caldeira <kca...@ca...> Sent: Tuesday, January 4, 2022 5:23 PM To: cdat-discussion <cda...@li...> Cc: Lei Duan <le...@ca...> Subject: [Cdat-discussion] How to transpose lat, lon, time variables across a suite of netcdf files to time, lat lon? Hi, We have a problem where we need to loop by latitude and longitude and then process all time periods for that grid cell, but the database is organized so time is spread across many files. Is there a way to transpose a variable contained in a set of netcdf files and write it out into another set of netcdf files such that all time periods for one variable and one grid cell are contained in a single netcdf file? Thanks in advance for your help. Best, Ken Ken Caldeira Senior Scientist (Emeritus) Carnegie Institution for Science Dept of Global Ecology 260 Panama St, Stanford CA 94305 USA +1 650 704 7212 kca...@ca...<mailto:kca...@ca...> https://dge.carnegiescience.edu/labs/caldeira-lab<https://urldefense.us/v3/__https:/dge.carnegiescience.edu/labs/caldeira-lab__;!!G2kpM7uM-TzIFchu!jUqj_e-B9eAD70kIbJiJIpdQWootFckMGpjCw3b9CC-YO41mdF0wr5InSANrfMICAPM$> Senior Scientist, Breakthrough Energy: https://www.breakthroughenergy.org/team/bios/ken-caldeira<https://urldefense.us/v3/__https:/www.breakthroughenergy.org/team/bios/ken-caldeira__;!!G2kpM7uM-TzIFchu!jUqj_e-B9eAD70kIbJiJIpdQWootFckMGpjCw3b9CC-YO41mdF0wr5InSANrkYvF8PQ$> https://www.reuters.com/investigates/special-report/climate-change-scientists-caldeira/<https://urldefense.us/v3/__https:/www.reuters.com/investigates/special-report/climate-change-scientists-caldeira/__;!!G2kpM7uM-TzIFchu!jUqj_e-B9eAD70kIbJiJIpdQWootFckMGpjCw3b9CC-YO41mdF0wr5InSANrPsQEbyk$> |