[Thread Prev][Thread Next][Index]

Re: [las_users] LAS Error of JGOFS customisation.



Hi Takaya,

las_users please note:
I'm cc'ing las_users just to finish out this thread, but I realize my response is not related to LAS.

Your question:
Could I use OPeNDAP/JGOFS Server for the data input to
ferret or matlab like
use "http://localhost/cgi-bin/nph-dods/test"?
Only I know the way of OPeNDAP/JGOFS in browser,
http://localhost/cgi-bin/nph-dods/test.dds or
http://localhost/cgi-bin/nph-dods/test.asc to see the
data.

and my answer:
Yes Matlab can read JGOFS format via the loaddods utility.  loaddods should be in a subdirectory included in the OPeNDAP installation.  [ $DODS_root/bin/loaddods.m ]

-- remember to add DODS/bin subdirectory to MATLAB path defn in your statrup.m
[ something like this ]
% OPeNDAP utilities
% geturl  loaddods.m  loaddods.mexglx  Ncview  opendap-config  whodods.m  writeval
path( path,'/usr/local/DODS/bin' );


then from within a Matlab session, you can use loaddods to read in NetCDF files and JGOFS format objects:

>> SMPdata=loaddods ('-A','http://usjgofs.whoi.edu/dods-bin/nph-dods/dods/data/thompson/test.nc')

>> JGdata=loaddods ('-A','http://usjgofs.whoi.edu/dods-bin/nph-dods/jgofs/merged_objects/US_JGOFS/North_Atlantic/bottle_nabe')
>> JGdata.Level_0
ans =  [ ... lists all the parameter names; note the .Level_0 ]

>> JGdata.Level_0.depth
   [   lists the depth param attrs   ]
 
ans =
 
                units: '"meters"'
                width: '"5"'
    DODS_ML_Real_Name: 'depth'
         DODS_ML_Type: 'String'


You can add selections and projections to the URI too:
>> JGdata=loaddods ('-A','http://usjgofs.whoi.edu/dods-bin/nph-dods/jgofs/merged_objects/US_JGOFS/North_Atlantic/bottle_nabe?date,lon,lat,depth,NO3')
>> JGdata.Level_0

ans =

    DODS_ML_Real_Name: 'Level_0'
         DODS_ML_Type: 'Sequence'
                 date: [1x1 struct]
                  lon: [1x1 struct]
                  lat: [1x1 struct]
                depth: [1x1 struct]
                  NO3: [1x1 struct]


>> help loaddods
[ will tell you more ]



I'm not much of a ferret user, but I believe this will get you started:
The USE command is an alias for SET DATA/FORMAT=cdf

the content returned from this URI is a list of ASCII records:
http://usjgofs.whoi.edu/dods-bin/nph-dods/jgofs/merged_objects/US_JGOFS/North_Atlantic/bottle_nabe.asc?date,lon,lat,depth,NO3
Dataset: bottle_nabe
Level_0.date, Level_0.lon, Level_0.lat, Level_0.depth, Level_0.NO3
"19890420", "-20.6583", "59.7418", "28", "13.2"
"19890420", "-20.6583", "59.7418", "53", "13.2"
"19890420", "-20.6583", "59.7418", "78", "13.2"
"19890420", "-20.6583", "59.7418", "103", "13.3"
"19890420", "-20.6583", "59.7418", "152", "13.4"
"19890420", "-20.6583", "59.7418", "201", "13.4"

so you'll want to specify ASCII data type:
SET DATA/FORMAT=free  or it's alias command FILE
you would want to subset the JGOFS object to just grab the variables of interest
and you'd also need to setup the axes correctly (see
User Guide: Ch2 Sec5. ASCII DATA)
probably some combination of DEFINE AXIS and DEFINE GRID commands

followed by the
'Read the data' command, something like:
FILE/ORDER=TXYZ/VARIABLES="date,lon,lat,depth,nitrate" "http://usjgofs.whoi.edu/dods-bin/nph-dods/jgofs/merged_objects/US_JGOFS/North_Atlantic/bottle_nabe.asc?date,lon,lat,depth,NO3"

For more complete documentation, there is an excellent, comprehensive online ferret User Guide:
http://ferret.pmel.noaa.gov/Ferret/Documentation/Users_Guide/current/fer_html.htm

and ferret User Guide is available as a PDF, if you want a local copy:
http://ferret.pmel.noaa.gov/Ferret/Documentation/Users_Guide/current/ferret_users_guide_v581.pdf


Also, there is an updated version of the JGOFS data system available here:
http://usjgofs.whoi.edu/~chandler/
latest jgofs ddms files Updated: 06 Jan 2004

If you want a full JGOFS DBMS installation (especially if you're installing on a linux system), you may want to install the current version (v 1.8.4) available from the address link above.

Regards,
Cyndy



Namba Takaya wrote:
Dear Cyndy

Thank you very much for your very kind and detailed
information.

I am very interested both in JGOFS OPeNDAP/JGOFS and JGOFS
server because I have many satellite and insitu data off
Argentine.

I did read through the documents you suggested and
I had installed OPeNDAP/JGOFS and JGOFS server 1.72(JGOF
Data system) without any problem (In fact, I could not
install JGOFS server 1.73 with a error of "list"
compiling. But it does not matter).

I had tested some samples both in OPeNDAP/JGOFS and JGOFS
server and they work very well.

I understand that JGOFS server is very useful to me for
insitu data. However, I do not understand how
OPeNDAP/JGOFS Server is useful for me. I have used
OPeNDAP/HDF and netcdf for the satellite data with ferret
and it is extremely useful to me as it is to you.

Could I use OPeNDAP/JGOFS Server for  the data input to
ferret or matlab like 
use "http://localhost/cgi-bin/nph-dods/test"?
Only I know the way of  OPeNDAP/JGOFS in browser,
http://localhost/cgi-bin/nph-dods/test.dds or
http://localhost/cgi-bin/nph-dods/test.asc to see the
data.

Anyhow, I would like to say again 
"thank you very much for your kindness". 
I will have some more questions. However, I need the time
to digest your suggestion first.

Best Regards,

Takaya Namba




--------------------------------------
Know more about Breast Cancer
http://pr.mail.yahoo.co.jp/pinkribbon/

  


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cyndy Chandler		| voice: (508) 289-2765
MS #43, WHOI		| Office hrs: M-F ~ 9-4
Woods Hole, MA  02543	| FAX: (508) 457-2161
cchandler@whoi.edu | http://www.whoi.edu/people/cchandler
Ocean Carbon and Biogeochemistry Data Management Office
Department of Marine Chemistry and Geochemistry
Woods Hole Oceanographic Institution

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement