comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: ms2gt MODIS reprojection toolkit
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: ms2gt MODIS reprojection toolkit [message #70624] Tue, 27 April 2010 10:37 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Maarten writes:

> * Can someone supply me with a working set of configuration files to
> start with MODIS 1KM data (so the 250 and 500 m channels are
> aggregated into 1 km bins) and end up with a Cylindrical Equidistand
> grid?

For some reason (which I am investigating) the gpd and mpp
files you downloaded from the web page were in DOS
format. In other words, they contained an extra ^M character
on each line. I ran the UNIX command dos2unix on both files,
and then they worked as they were suppose to work.

I'll see what I can do to get the files updated on the web page.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: ms2gt MODIS reprojection toolkit [message #70625 is a reply to message #70624] Tue, 27 April 2010 09:14 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Maarten writes:

> Actually the mpp file _does_ contain a space in the map projection.
> Just to add: in my attempts I have tried both, without difference. The
> name as listed in the mapx error message, and in the list of accepted
> projections is the same (I actually copied my name from the list in
> the error message, just to ensure I didn't mistype...)

OK, I think the most *likely* answer is that the gpd file
is "corrupted" in the sense that it is missing (or maybe
has too many) ^M line control characters. The mapx
program has been known to choke under these conditions
and issue exactly this kind of "unknown projection" error.
This kind of corruption can be caused by improper settings
when doing an ftp of the file from one machine to another,
or by e-mailing the file, etc.

The easiest way to see these "problem" line endings
is to open the file in an emacs editor. Perhaps it is
best to download a "valid" gpd file from the NSIDC web
page and see what the endings are suppose to look like,
then make sure the endings of your gpd file match.

Let me know.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
Re: ms2gt MODIS reprojection toolkit [message #70626 is a reply to message #70625] Tue, 27 April 2010 06:32 Go to previous messageGo to next message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Apr 27, 3:14 pm, David Fanning <n...@dfanning.com> wrote:
> Maarten writes:
>> Actually the mpp file _does_ contain a space in the map projection.
>> Just to add: in my attempts I have tried both, without difference. The
>> name as listed in the mapx error message, and in the list of accepted
>> projections is the same (I actually copied my name from the list in
>> the error message, just to ensure I didn't mistype...)
>
> And the mapx is recent? Installed at the same time
> you installed ms2gt?

Yes.

> Also, I assume some kind of 32-bit OS?

Yes, Linux 2.6.16.46-0.12-smp (a rather old SuSE system)

> Have to tried a different projection, just to see if
> you can get something to work?

Cylindrical Equal-Area sort of worked, but gave a different error
(some 250 m / 1 km mixup, it seems).

Best,

Maarten
Re: ms2gt MODIS reprojection toolkit [message #70627 is a reply to message #70626] Tue, 27 April 2010 06:14 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Maarten writes:

> Actually the mpp file _does_ contain a space in the map projection.
> Just to add: in my attempts I have tried both, without difference. The
> name as listed in the mapx error message, and in the list of accepted
> projections is the same (I actually copied my name from the list in
> the error message, just to ensure I didn't mistype...)

And the mapx is recent? Installed at the same time
you installed ms2gt?

Also, I assume some kind of 32-bit OS?

Have to tried a different projection, just to see if
you can get something to work?

I have to do some car shuffling this morning, but
off to work soon.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: ms2gt MODIS reprojection toolkit [message #70628 is a reply to message #70627] Tue, 27 April 2010 05:46 Go to previous messageGo to next message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Apr 27, 2:29 pm, David Fanning <n...@dfanning.com> wrote:
> Maarten writes:
>> * Can someone supply me with a working set of configuration files to
>> start with MODIS 1KM data (so the 250 and 500 m channels are
>> aggregated into 1 km bins) and end up with a Cylindrical Equidistand
>> grid?
>
> I can't really work on this until I get to my LINUX machine
> at work, but I do notice that the onedegree.mpp file spells
> CylindricalEquidistant without a space, and the listed map
> projections spells it with a space: Cylindrical Equidistant.
>
> It would be just like a computer program to think this was
> a problem. Have you tried inserting a space?

Actually the mpp file _does_ contain a space in the map projection.
Just to add: in my attempts I have tried both, without difference. The
name as listed in the mapx error message, and in the list of accepted
projections is the same (I actually copied my name from the list in
the error message, just to ensure I didn't mistype...)

Best,

Maarten
Re: ms2gt MODIS reprojection toolkit [message #70629 is a reply to message #70628] Tue, 27 April 2010 05:29 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Maarten writes:

> * Can someone supply me with a working set of configuration files to
> start with MODIS 1KM data (so the 250 and 500 m channels are
> aggregated into 1 km bins) and end up with a Cylindrical Equidistand
> grid?

I can't really work on this until I get to my LINUX machine
at work, but I do notice that the onedegree.mpp file spells
CylindricalEquidistant without a space, and the listed map
projections spells it with a space: Cylindrical Equidistant.

It would be just like a computer program to think this was
a problem. Have you tried inserting a space?

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: ms2gt MODIS reprojection toolkit [message #70630 is a reply to message #70629] Tue, 27 April 2010 05:29 Go to previous messageGo to next message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Apr 27, 2:18 pm, David Fanning <n...@dfanning.com> wrote:
> Maarten writes:
>> * Can someone supply me with a working set of configuration files to
>> start with MODIS 1KM data (so the 250 and 500 m channels are
>> aggregated into 1 km bins) and end up with a Cylindrical Equidistant
>> grid?
>
> Can you show me the actual command you are using.
> And perhaps the content of the gpd file, too.

Command:

mod02.pl Aqua/A20100415-1155 A20100415-1155 listfile.txt
quarterdegree.gpd chanfile.txt

with listfile.txt quarterdegree.gpd chanfile.txt all available within
Aqua/A20100415-1155 A20100415-1155 as symbolic links to the actual
files.

Error message:

>>> Tue Apr 27 14:26:19 2010
MOD02: MESSAGE:
> dirinout = /nobackup/users/sneep/MODIS-L1/Eyjafjallajokull/Aqua/A201004 15-1155
> tag = A20100415-1155
> listfile = listfile.txt
> gpdfile = quarterdegree.gpd
> chanfile = chanfile.txt
> ancilfile = none
> latlon_src = 1
> ancil_src = 1
> keep = 0
> rind = 50
>>> Tue Apr 27 14:26:19 2010 contents of listfile:
MYD02SSH.A2010105.1155.005.2010106223112.hdf>>>Tue Apr 27 14:26:19
2010 contents of chanfile:
1 reflectance avg 65535
4 reflectance avg 65535
3 reflectance avg 65535
mapx: unknown projection Cylindrical Equidistant
valid types are:
Albers Conic Equal-Area
Albers Conic Equal-Area Ellipsoid
Azimuthal Equal-Area
Azimuthal Equal-Area Ellipsoid
Cylindrical Equal-Area
Cylindrical Equal-Area Ellipsoid
Cylindrical Equidistant
Interupted Homolosine Equal-Area
Lambert Conic Conformal Ellipsoid
Mercator
Mollweide
Orthographic
Polar Stereographic
Polar Stereographic Ellipsoid
Sinusoidal
init_mapx: error reading map projection parameters file
init_grid: error reading grid parameters definition file
>>> Tue Apr 27 14:26:20 2010 MOD02: FATAL: error opening gpdfile: quarterdegree.gpd
at /nobackup/users/sneep/software/ms2gt/src/scripts/mod02.pl line 246

GPD file:

onedegree.mpp /* map projection parameters # equatorial cylindrical
equidistant */
1440 720 /* columns rows # quarter degree */
4 4 /* grid cells per map unit # */
719.5 359.5 /* map origin column row */


for good measure: mpp file:
Map Projection: Cylindrical Equidistant
Map Reference Latitude: 0.0
Map Reference Longitude: 0.0
Map Second Reference Latitude: 0.0
Map Rotation: 0.0
Map Scale: 1.0
Map Origin Latitude: 0.0
Map Origin Longitude: 0.0
Map Equatorial Radius: 6378.137


> The ms2gt software has been the bane of my existance.
> The best that can be said of it is that it works
> wonderfully well if you can ever get the damn thing
> set up correctly. :-)

I'm still hoping to get to that stage...

Best,

Maarten
Re: ms2gt MODIS reprojection toolkit [message #70631 is a reply to message #70630] Tue, 27 April 2010 05:18 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Maarten writes:

> * Can someone supply me with a working set of configuration files to
> start with MODIS 1KM data (so the 250 and 500 m channels are
> aggregated into 1 km bins) and end up with a Cylindrical Equidistand
> grid?

Can you show me the actual command you are using.
And perhaps the content of the gpd file, too.

The ms2gt software has been the bane of my existance.
The best that can be said of it is that it works
wonderfully well if you can ever get the damn thing
set up correctly. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: ms2gt MODIS reprojection toolkit [message #70716 is a reply to message #70624] Wed, 28 April 2010 01:48 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Apr 27, 7:37 pm, David Fanning <n...@dfanning.com> wrote:
> Maarten writes:
>> * Can someone supply me with a working set of configuration files to
>> start with MODIS 1KM data (so the 250 and 500 m channels are
>> aggregated into 1 km bins) and end up with a Cylindrical Equidistant
>> grid?
>
> For some reason (which I am investigating) the gpd and mpp
> files you downloaded from the web page were in DOS
> format. In other words, they contained an extra ^M character
> on each line. I ran the UNIX command dos2unix on both files,
> and then they worked as they were suppose to work.
>
> I'll see what I can do to get the files updated on the web page.

Thanks for investigating. I didn't even notice that. Had I created the
files myself, they would have been proper UNIX files. Still no luck
though, but at least we're getting past stage one.

Best,

Maarten
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Is there a way to plot with axis breaks in IDL?
Next Topic: Re: Question on MODIS Conversion Toolkit

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:34:09 PDT 2025

Total time taken to generate the page: 0.00497 seconds