txt FINN files to netcdf

75 views
Skip to first unread message

Lin Lu

unread,
Jun 2, 2023, 6:06:45 AM6/2/23
to wrf-chem-fire_emiss
Hi all, 

I am looking for a way to convert the FINN txt files to netcdf using python.
Does someone know how to do? or has already done it?


Thanks
Lin

ummed singh

unread,
Jun 2, 2023, 9:27:22 AM6/2/23
to Lin Lu, wrf-chem-fire_emiss
Dear Lu, 

open txt with pandas 
pandas.read_csv('FINNv2.4_MODVRS_MOZART_2018_c20210615.txt')
#### shift first row as header
rm=rm.rename(columns=rm.iloc[0]).drop(rm.index[0])

Now your pandas dataframe is ready. you may use this to save as netcdf 

ummed singh




--
To unsubscribe from this group and stop receiving emails from it, send an email to wrf-chem-fire_e...@ucar.edu.
Reply all
Reply to author
Forward
0 new messages