how to merge more fire granule to one file and add all field to .txt file

VIIRS Environmental Data Records
Post Reply
PrasitGistda
Posts: 3
Joined: Wed Jun 21, 2023 8:51 pm

how to merge more fire granule to one file and add all field to .txt file

Post by PrasitGistda »

Hi all,

I use cspp_active_fire_noaa.sh to process fire products but the output is more granule. How can I merge more fire granules to one file and for .txt a field in .txt is not equal .nc file how can I add all fields to .txt

Best regard.
Thank you very much.
kathys
Posts: 500
Joined: Tue Jun 22, 2010 4:51 pm

Re: how to merge more fire granule to one file and add all field to .txt file

Post by kathys »

To remove the header information and concatenate the granule based CSPP Active Fire output .txt files (example: AFIMG_j01_d20230621_t1838523_e1840150_b28963_c20230621192728707386_cspp_dev.txt), you can use the command:

For I-Band resolution files:

cat AFIMG*cspp_dev.txt | grep -v '#' | sed 's/ //g' > AFIMG_all.txt

For M-Band resolution files:

cat AFMOD*.txt | grep -v '#' | sed 's/ //g' > AFMOD_all.txt

Where AFIMG_all.txt and AFMOD_all.txt are the output concatenated text files.

Good luck,

Kathy
PrasitGistda
Posts: 3
Joined: Wed Jun 21, 2023 8:51 pm

Re: how to merge more fire granule to one file and add all field to .txt file

Post by PrasitGistda »

Now we can solve .txt and another problem How can I merge more .nc fire granules into one file?

Thank you
Post Reply