Can you give me some advices? l2gen result image is the hdf format ,but don't open it.

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
xiao_0.026
Posts: 17
Joined: Wed Jun 12, 2019 9:47 pm America/New_York
Answers: 0

Can you give me some advices? l2gen result image is the hdf format ,but don't open it.

by xiao_0.026 » Sun Jun 16, 2019 11:11 pm America/New_York

Hi teachers
Can i ask some question for the l2gen processing result? When i operating the l2gen take the modis L1B 1km file and 500m file ,resolution=500m,geofile is the MOD03 at the same name. I set the l2gen result image format is the HDF, just the follow,"2018001.0315.hdf,2018002.0220.hdf, ....". But i can't open the result image to use the seadas ,beam,envi software. I want to know the why?

Filters:

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Can you give me some advices? l2gen result image is the hdf format ,but don't open it.

by gnwiii » Mon Jun 17, 2019 5:53 am America/New_York

Have you tried using the processing an L1A file downloaded from modaps with l2gen workflow given in Sean's reply?

If you are still having problems, you should mention your SeaDAS and l2gen versions and show us your l2gen command line.

xiao_0.026
Posts: 17
Joined: Wed Jun 12, 2019 9:47 pm America/New_York
Answers: 0

Can you give me some advices? l2gen result image is the hdf format ,but don't open it.

by xiao_0.026 » Tue Jun 18, 2019 8:14 am America/New_York

I download the L1B file and MOD03 file for make the L2 file use the l2gen.
What is more, I has download a lot of L1b file as my paper used.
Nowadays, I set the format to the netcdf4, and success open L2 file.
Have the other format to set the l2gen result image? just like 'geotiff,jpg', or thers.
My software version is seadas7.5 and l2gen version is l2gen 9.3.0-seadas-vxx.xxx.xx.xx.

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Can you give me some advices? l2gen result image is the hdf format ,but don't open it.

by gnwiii » Tue Jun 18, 2019 9:42 am America/New_York

SeaDAS is now at version 7.5.3. If you upgrade to the current version and still have a problem others should be able to reproduce the issue, but you will need to provide enough detail for others to reproduce a calculation that fails for you.  The full l2gen command line (and contents of the par file if you used one) should be enough.

Unless you are also using older software that doesn't support NetCDF4-CF data, NetCDF4-CF has a number of advantages.  With hdf4, software had to support the ad-hoc metadata format.   NetCDF4-CF is much more widely supported in current software.  In addition, NetCDF4-CF can use internal compression which greatly reduces file size.   Maybe there is a way you can use NetCDF4-CF format level-2 files.

xiao_0.026
Posts: 17
Joined: Wed Jun 12, 2019 9:47 pm America/New_York
Answers: 0

Can you give me some advices? l2gen result image is the hdf format ,but don't open it.

by xiao_0.026 » Wed Jun 19, 2019 5:15 am America/New_York

Beacuse i locat in the China, If to upgrade the version,may have internet connection questions.
my set the python l2gen is follow,,
======================
ifile1=os.path.join(datapath,dfile2)
      geofile1=os.path.join(gpfpath,gfile[j])
      ofile1=os.path.join(resultpath,gfile[j][7:19]+".L2_LAC_OC")
      print(ifile1)
      print(geofile1)
      print(ofile1)
      l2gencmd2 = 'l2gen' + ' ifile=' + ifile1 + ' resolution=' + '500' + ' geofile=' + geofile1 + ' ofile=' + ofile1 +' maskland='+'off'+' maskcloud='+'off'+' maskhilt='+'off'+' maskstlight='+'off'
=======================
the command line --"ofile1=os.path.join(resultpath,gfile[j][7:19]+".L2_LAC_OC")" is to set the output file directory and the l2gen result image format, I set the ".L2_LAC_OC" output the result image is the nc format. I can sucsses open the result image. If i set the ".HDF", I don't open the result image.
the command line --"l2gencmd2 =  'l2gen' + ' ifile=' ...." is to operate the ocssw l2gen command.

Thank you reply.
Use the netcdf format also good.

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Can you give me some advices? l2gen result image is the hdf format ,but don't open it.

by gnwiii » Wed Jun 19, 2019 9:29 am America/New_York

I understand that upgrading may be difficult for you, but it is also difficult for others to reproduce a problem with an old version of SeaDAS.  If you are able to use the NetCDF4-CF format, all these difficulties can be avoided.  That may be your best option.

xiao_0.026
Posts: 17
Joined: Wed Jun 12, 2019 9:47 pm America/New_York
Answers: 0

Can you give me some advices? l2gen result image is the hdf format ,but don't open it.

by xiao_0.026 » Tue Jun 25, 2019 9:16 am America/New_York

Yes, Very thank you and your team.

Post Reply