M2M R-script won't work!

I am trying to download data from the pioneer array MET package and I can’t get this M2M script to work. It works fine when used for profiler data.

start***
directory = “my computer path”

user = my user info here" #Change this to match your OOINet username.
token = “My token here” #Change this to match your OOINet token.
site = “CP04OSSM” #PA Offshore Surface Mooring
node = “Surface Buoy”
instrument = “CGINS-METLGR-00037” #Meteorological package ref designator
method = “telemetered”
stream = “metbk_a_dcl_instrument”
start_date = “2021-08-01”
start_time = “00:00:00”
stop_date = “2021-08-19”
stop_time = “23:59:59”
url = ooi_create_url(site=site,

  •                  node=node,
    
  •                  instrument=instrument,
    
  •                  method=method,
    
  •                  stream=stream,
    
  •                  start_date=start_date,
    
  •                  start_time=start_time,
    
  •                  stop_date=stop_date,
    
  •                  stop_time=stop_time)
    

The lookup table couldn’t generate a request URL from your inputs.

I think you need to change your node and instrument designators. If you scroll down the README for the ooim2mr package there are descriptions and examples of how to use each function.

For the node string, if you input more than 5 characters, the assumption is that you are using the simplified node name. The options for simplified node name are

  1. Surface
  2. Midwater
  3. Seafloor
  4. Profiler
  5. Upper_Profiler
  6. Lower_Profiler

It also looks like your instrument value is the designator that is used by asset management. I’m not sure where you got that from. You’ll need to supply the OOINet designator. For your case, that is “06-METBKA000”. Alternatively, you can input “MET” and the function will look for the MET url. To get the reference designator in the future, you can find it through OOINet or the metadata button in Data Explorer.

The rest of yours specified strings look okay. If the problem persists, please let us know.

Hi Ian,

I assumed you had moved on otherwise I would have emailed you directly. Thanks for responding…And on a Sunday no less!

The fix worked… except that the dataset that is collected is a ctd dataset, not the MET dataset I requested. This makes no sense since these are my designators:

site = “CP04OSSM” #PA Offshore Surface Mooring

node = “surface”

instrument = “06-METBKA000” #Meteorological package ref designator

method = “telemetered”

stream = "metbk_a_dcl_instrument "

start_date = “2021-08-01”

start_time = “00:00:00”

stop_date = “2021-08-22”

stop_time = “23:59:59”

wassup?

-Bob

~WRD0001.jpg

Hi Bob,

It’s not a problem. This is the perfect place to troubleshoot issues. Others are able to read this thread and use the solutions we come up with if they experience the same problems. This also gave me a chance to confirm that ooim2mr is compatible with R 4.0.

When you request data from most of the sensors via M2M, OOINet will also curate CTD data for your request. I think this is because some of the data processing algorithms will use CTD data for corrections, so it is also providing that information as a courtesy (or if you wanted to double check it).

For the ooim2mr library, all you need to do is set drop_paired = TRUE in the ooi_get_location function. This will make it so you don’t download curated CTD datasets.

I did notice that there is CT data within the METBK files. There is a CT located on the subsurface panel of the large surface buoys. It may be included because it is considered part of the met bulk package or it is used somewhere to process some met data. Someone more knowledgeable about the surface moorings can correct me.

Here is an example script that pulls METBK data for CP04OSSM. You’ll need to adjust the method and dates to your choosing. You’ll need to add a save directory to the ooi_download_data function as well, otherwise it will save the data to whatever your R is.

Hopefully this solves your issues.

  • Ian
1 Like