Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

488

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

524

525

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

#!/usr/bin/env python 

 

""" 

@file:   ion/integration/eoi/validation/cdm_validation_service.py 

@author: Tim LaRocque 

@brief:  CdmValidationService and CdmValidationClient definitions for validating 

         user-provided datasets against OOICI Common Data Model requirements and 

         Climate and Forecast conventions. 

""" 

 

 

 

# Imports: Builtin 

import re, urllib 

 

 

# Imports: Twisted 

from twisted.internet import defer 

from twisted.web.client import getPage 

 

 

# Imports: ION core 

from ion.core.process.service_process import ServiceProcess, ServiceClient 

from ion.core.process.process import ProcessFactory 

from ion.core.messaging.message_client import MessageClient 

from ion.core.object import object_utils 

 

 

# Imports: ION utils, configuration and logging 

import logging 

from ion.core import ioninit 

from ion.util import ionlog 

from ion.util.os_process import OSProcess, OSProcessError 

import os 

 

log = ionlog.getLogger(__name__) 

CONF = ioninit.config(__name__) 

 

 

# Imports: Message types 

VALIDATION_REQUEST_TYPE = object_utils.create_type_identifier(object_id=7101, version=1) 

VALIDATION_RESPONSE_TYPE = object_utils.create_type_identifier(object_id=7102, version=1) 

 

 

 

class CdmValidationService(ServiceProcess): 

    """ 

    @brief: ServiceProcess used in validating user-provided datasets against OOICI Common Data Model requirements and Climate and Forecast conventions. 

    """ 

 

 

    declare = ServiceProcess.service_declare(name='cdm_validation_service', 

                                             version='0.1.0', 

                                             dependencies=[]) 

 

 

    def __init__(self, *args, **kwargs): 

        ''' 

        @brief: Initialize the CdmValidationService instance, init instance fields, etc. 

        ''' 

        # Step 1: Delegate initialization to parent "ServiceProcess" 

        log.info('') 

        log.info('Initializing class instance...') 

        ServiceProcess.__init__(self, *args, **kwargs) 

 

        # Step 2: Create class attributes 

        self._cfchecks_binary = None 

        self._cfchecks_args = None 

 

 

    def slc_init(self): 

        ''' 

        @brief: Initialization upon Service spawning.  Sets up clients, etc. 

         

        @attention Nothing to yield -- this is NOT an inlineCallback 

        ''' 

        if log.getEffectiveLevel() <= logging.DEBUG: 

            log.debug(" -[]- Entered slc_init(); state=%s" % (str(self._get_state()))) 

 

        # Step 1: Perform Initialization 

        self.mc = MessageClient(proc=self) 

 

 

    @defer.inlineCallbacks 

    def op_validate(self, content, headers, msg): 

        """ 

        @brief: Validate the given cdm_validation_request (GPB{7101}) against the common data model (CDM) and then 

                against Climate and Forecast (CF) conventions.  CDM validation is inacted against the CDM Validation 

                Web Service provided by the config as 'cdmvalidator_base_url' using the command provided by 

                'cdmvalidator_command' (usu. 'validate').  CF validation is inacted against the CfChecks python 

                script provided by the config as 'cfchecks_binary'. 

                 

                Here is an example setup of the CdmValidationService's configuration: 

                 

                        'ion.integration.eoi.validation.cdm_validation_service':{ 

                            'validation_timeout' : 60, 

                            'cfchecks_binary' : '/Users/tlarocque/Development/OOI/code/ioncore-python/run_cf_checks', 

                            'cdmvalidator_base_url' : 'http://motherlode.ucar.edu:8080/cdmvalidator', 

                            'cdmvalidator_command' : 'validate', 

                        } 

                 

        @note:  If CDM validation fails, CF Checking will be skipped. 

         

        @return: Sends an instance of a cdm_validation_response (GPB{7102}) resource to the remote caller. 

        """ 

        log.info('<<<---@@@ (service) Received operation "validate".  Extracting data_url to perform validation') 

        if not hasattr(content, 'MessageType') or content.MessageType != VALIDATION_REQUEST_TYPE: 

            raise TypeError('The given content must be an instance or a wrapped instance of %s.  Given: %s' % (repr(VALIDATION_REQUEST_TYPE), type(content))) 

 

        # Step 1: Get the data_url 

        log.debug('op_validate(): Retrieving data_url...') 

        data_url = str(content.data_url) 

 

        # Step 1a: Check that this is a DAP server by ensuring that the reply to a simple HTTP GET of "data_url + .das" does NOT return an error 

        try: 

            #fetch file 

            surl = str(data_url) 

            dasfile = yield getPage(surl + ".das") 

            das_result = {'cdm_result':True} 

        except Exception, ex: 

            log.error('Invalid URL: the dataset is not hosted on a DAP server and cannot be validated') 

            das_result = {'cdm_result':False, 'exception':'Invalid URL: the dataset is not hosted on a DAP server and cannot be validated'} 

 

        # Step 2: Validate the URL against the CDM Validator WebService 

        if das_result['cdm_result']: 

            try: 

                cdm_output = yield self.validate_cdm(data_url) 

                cdm_resp = yield self.process_cdm_validation_output(cdm_output) 

            except Exception, ex: 

                log.warn('CDM Validation or validation output processing failed:  Cause: %s' % str(ex)) 

                cdm_resp = {'cdm_result':False, 'exception':'Could not perform CDM Validation.  Please check the CDM Validator configuration.  Inner exception: %s' % ex} 

        else: 

                cdm_resp=das_result 

 

        # Step 3: Validate the URL against the CF Checks Script 

        cf_resp = {} 

        if cdm_resp['cdm_result']: 

            try: 

                cf_result = yield self.validate_cf(data_url) 

                cf_resp   = self.process_cf_validation_output(cf_result) 

            except Exception, ex: 

                log.warn('CF Validation or validation output procssing failed.  Cause: %s' % str(ex)) 

                cf_resp = {'exception':'Could not perform CF Validation.  Please check the CF Checker configuration.  Inner exception: %s' % ex} 

 

 

 

        # Step 4: Combine outputs and respond to the originating message 

        cdm_resp.update(cf_resp) 

        response = yield self.build_response_msg(msg, **cdm_resp) 

 

 

        log.info('@@@--->>> (service) Sending OK response to originator') 

        yield self.reply_ok(msg, response) 

 

 

    @defer.inlineCallbacks 

    def validate_cdm(self, data_url): 

        """ 

        @brief: Validates the given data_url against the CDM Validation Webservice 

        @param data_url: The url to validate 

         

        @return: The resultant XML from the CDM Validation Service 

        @see:    CdmValidationService.op_validate() 

        """ 

        base_url = str(self.cdmvalidator_base_url) 

        command = str(self.cdmvalidator_command) 

        data_url = str(data_url) 

 

        full_url = '%s/%s?URL=%s&xml=true' % (base_url, command, urllib.quote(data_url)) 

 

        log.debug('validate_cdm(): Requesting validation from CDMValidator WS: \n\n"%s"\n\n' % full_url) 

        result = yield getPage(full_url) 

 

        defer.returnValue(result) 

 

 

    @defer.inlineCallbacks 

    def validate_cf(self, data_url): 

        """ 

        @brief: Validates the given data_url against the CfChecks python script 

        @param data_url: The url to validate 

         

        @return: The resultant string data from the CfChecks Python script 

        @see:    CdmValidationService.op_validate() 

        """ 

        log.debug('') 

        try: 

            # Send the url to the cfchecks script 

            binary = self.cfchecks_binary 

            args   = list(self.cfchecks_args) 

            args.append(data_url) 

 

            # @todo:  Error if binary is None 

            if None == binary or not os.path.exists(binary): 

                raise OSError("CfChecks binary (given by configuration as 'cfchecks_binary' does not specify a valid filepath: '%s'" % binary) 

 

            newenv = os.environ.copy() 

            ld_library_path = CONF.getValue('LD_LIBRARY_PATH', None) 

            if ld_library_path: 

                newenv['LD_LIBRARY_PATH'] = ld_library_path 

 

            proc = OSProcess(binary, args, env=newenv) 

 

            # Start the process 

            if log.getEffectiveLevel() <= logging.DEBUG: 

                log.debug('validate_cf(): Requesting validation from CFChecks validation script: \n\n"%s %s"\n\n' % (binary, " ".join([str(item) for item in args]))) 

            res = yield proc.spawn() 

 

        except (AttributeError, ValueError), ex: 

            raise RuntimeError("validate_cf(): Received invalid spawn arguments from ionconfig.  Inner Exception: %s"  % str(ex)) 

 

        except OSError, ex: 

            raise OSError("validate_cf(): Failed to spawn the cfchecks script.  Cause: %s" % (str(ex))) 

 

        except OSProcessError, ex: 

            # This exception is thrown by OSProcess when the underlying binary terminates with an 

            #     exit code other than 0. In this case, we are only concerned with the results 

            #     (inside ex.message) and will later return the error condition to higher application 

            #     levels  

            res = ex.message 

 

 

        defer.returnValue(res) 

 

 

    @property 

    def cdmvalidator_base_url(self): 

        """ 

        @return: The value of the field 'cdmvalidator_base_url' from the CdmValidationService configuration 

        """ 

        url = CONF.getValue('cdmvalidator_base_url', None) 

        log.info('Retrieved cdmvalidator base url: "%s"' % url) 

        return url 

 

 

    @property 

    def cdmvalidator_command(self): 

        """ 

        @return: The value of the field 'cdmvalidator_command' from the CdmValidationService configuration 

        """ 

        cmd = CONF.getValue('cdmvalidator_command', None) 

        log.info('Retrieved cdmvalidator command: "%s"' % cmd) 

        return cmd 

 

 

    @property 

    def cfchecks_binary(self): 

        """ 

        @return: The value of the field 'cfchecks_binary' from the CdmValidationService configuration 

        """ 

        binary = CONF.getValue('cfchecks_binary', None) 

        log.info('Retrieved cfchecks binary: "%s"' % binary) 

        return binary 

 

 

    @property 

    def cfchecks_args(self): 

        """ 

        @return: The value of the field 'cfchecks_args' from the CdmValidationService configuration 

        """ 

        args = CONF.getValue('cfchecks_args', []) 

        if log.getEffectiveLevel() <= logging.INFO: 

            log.info('Retrieved cfchecks args:   "%s"' % str(args)) 

        return args 

 

 

    def process_cdm_validation_output(self, cdm_output): 

        """ 

        @brief: Parses the output from the CDM Validation WebService to determine passage/failure 

        @param cdm_output: The XML response from the CDM Validation WebService as returned from 

                           CdmValidationService.validate_cdm() 

        @note:  Currently this mechanism simply ensures that the dataset being validated contains 

                time axis information -- if it does not, it cannot be handled by the system 

 

        @return: A dictionary containing values for the keys: 

                   'cdm_output' 

                   'cdm_result' 

        """ 

        #---------------------------------------# 

        # Process CdmValidator output... 

        #---------------------------------------# 

        log.info('process_cdm_validation_output(): Processing CDM Validator output...') 

 

        cdm_result = {} 

 

        # Check for failed HTTP status 

        if re.search('(?m)Error report.*?(?=HTTP Status ([0-9]+))', cdm_output): 

 

            err_code = re.search('(?m)Error report.*?(?=HTTP Status ([0-9]+))', cdm_output).group(1) 

            exception = '' 

 

            if err_code == '404': 

                exception = 'HTTP Status 404: CDM Validator command may be invalid.  Please check CDM Validator configuration.' 

            elif err_code == '500': 

                exception = 'HTTP Status 500: Internal Server Error.  The given Dataset location may be invalid.' 

            else: 

                exception = 'HTTP Status %s: CDM Validation failed.  Please review the cdm_output' % err_code 

 

            result = False 

            cdm_result['exception']  = exception 

 

        else: 

 

            # Parse cdm output to determine pass/fail 

            cdm_axis_list = [] 

            for m in re.finditer(r'<axis.*?type=\"(?P<axis_type>.*?)\"', cdm_output): 

                cdm_axis_list.append(m.groupdict()['axis_type']) 

            if log.getEffectiveLevel() <= logging.DEBUG: 

                log.debug('Available CDM axis:  %s' % cdm_axis_list) 

            result = 'Time' in cdm_axis_list 

 

 

        cdm_result['cdm_result'] = result 

        cdm_result['cdm_output'] = cdm_output 

 

 

        return cdm_result 

 

 

    def process_cf_validation_output(self, cf_output): 

        """ 

        @brief: Parses the output from the CfChecks Python script to determine the number of 

                errors, warnings, and info messages associated with the dataset being validated. 

         

        @param cf_output: The string response from the CfChecks Python script as returned from 

                          CdmValidationService.validate_cf() 

         

        @return: A dictionary containing values for the keys: 

                   'cf_errors' 

                   'cf_warnings' 

                   'cf_infomation' 

                   'cf_exitcode' 

                   'cf_output' 

        """ 

        #---------------------------------------# 

        # Process CFChecks output... 

        #---------------------------------------# 

        log.info('process_validation_output(): Processing CFChecks validation output...') 

 

        # Step 1: Retrieve the output data 

        exitcode = cf_output.get('exitcode', 0) 

        outlines = cf_output.get('outlines', []) 

        errlines = cf_output.get('errlines', []) 

 

        outlines.extend(errlines) 

        cf_output_string = '\n'.join(outlines) 

 

        # Step 2: Parse the output to determine pass/fail 

        cf_result_dict = {} 

        for m in re.finditer(r'(?P<level>ERRORS|WARNINGS|INFORMATION).+?\: (?P<number>\d+)', cf_output_string): 

            cf_result_dict['cf_%s' % m.groupdict()['level'].lower()] = int(m.groupdict()['number']) 

 

        cf_result_dict['cf_exitcode'] = exitcode 

        cf_result_dict['cf_output'] = cf_output_string 

 

        #-------------------------------------------------------------------------------- 

        # 

        # @attention:      IMPORTANT NOTE!! 

        # 

        #     exitcode 0 means success 

        #     exitcode 255 is returned from shell when cfchecks returns an invalid exit code. 

        #     .. this is expected behavior because when there are no errors but warnings are 

        #        present, cfchecks will return a negative exit code -- negative exit codes 

        #        are considered invalid by shell -- ergo exitcode 255 means warnings ONLY 

        # 

        #        There was concern that cfchecks may produce a response of 255 when it 

        #        in fact has failed, and the CdmValidationService may incorrectly report 

        #        success.  This WILL NOT happen, however, because in this case, the analysis 

        #        of the cfchecks output will reveal the actual number of errors, allowing an 

        #        accurate pass/fail response 

        #-------------------------------------------------------------------------------- 

        # 

        if exitcode == 255: exitcode = 0 

 

        if exitcode != 0 and cf_result_dict.get('cf_errors', 0) == 0: 

            # There are no cf_errors because processing terminated with 

            # an exitcode.. 

            cf_result_dict['exception'] = 'Recieved failure exitcode (%i) during CF Validation.  Please check the CF Checker configuration.  Inner exception: %s' % (exitcode, cf_output_string) 

            cf_result_dict['cf_errors'] = 1 

 

        return cf_result_dict 

 

 

    @defer.inlineCallbacks 

    def build_response_msg(self, msg, **kwargs): 

        """ 

        @brief: Constructs a cdm_validation_response (GPB{7102}) resource from the parameters passed through kwargs. 

        @param kwargs: Parameters used in building the cdm_validation_response object.  These are the results from 

                       the methods process_cdm_validation_output() and process_cf_validation_output() 

                        

                       Accepted parameters are the following: 

                           exception 

                           cdm_output 

                           cdm_result 

                           cf_output 

                           cf_exitcode 

                           cf_errors 

                           cf_warnings 

                           cf_information 

                           cf_exitcode 

                        

        @note: Example Use: 

         

                       cdm_res = self.process_cdm_validation_output(cdm_output) 

                       cf_res  = self.process_cf_validation_output(cf_output) 

                       cdm_res.update(cf_res) 

                        

                       response_resource = yield self.build_response_msg(**cdm_res) 

                        

        @return: a deferred containing the cdm_validation_response resource 

        """ 

        log.debug('build_response_msg(): Replying to caller...') 

        #---------------------------------------# 

        # Produce a response 

        #---------------------------------------# 

        log.info('build_response_msg(): Building a response object for this validation request...') 

 

        # Retrieve values from kwargs 

        exception   = kwargs.get('exception', None) 

        cdm_output  = kwargs.get('cdm_output', '') 

        cdm_result  = kwargs.get('cdm_result', False) 

        cf_output   = kwargs.get('cf_output', '') 

        cf_errors   = kwargs.get('cf_errors', 0) 

        cf_warnings = kwargs.get('cf_warnings', 0) 

        cf_information = kwargs.get('cf_information', 0) 

        cf_exitcode = kwargs.get('cf_exitcode', 0) 

 

 

        # Build the response object 

        response = yield self.mc.create_instance(VALIDATION_RESPONSE_TYPE) 

        R = response.ResponseType 

        response.response_type = R.ERROR if exception else \ 

                                 R.CDM_FAILURE if not cdm_result else \ 

                                 R.CF_FAILURE if cf_errors else \ 

                                 R.PASS 

        response.cdm_output       = cdm_output 

        response.cf_output        = cf_output 

        response.cf_error_count   = cf_errors 

        response.cf_warning_count = cf_warnings 

        response.cf_info_count    = cf_information 

        response.err_msg          = exception or ('CfChecks exited with return code %s' % str(cf_exitcode) if cf_exitcode != 0 else '') 

 

        defer.returnValue(response) 

 

 

class CdmValidationClient(ServiceClient): 

    """ 

    Test client for direct (RPC) interaction with the CdmValidationService 

    """ 

 

    def __init__(self, *args, **kwargs): 

        # Step 1: Delegate initialization to parent "ServiceClient" 

        kwargs['targetname'] = 'cdm_validation_service' 

        ServiceClient.__init__(self, *args, **kwargs) 

 

        # Step 2: Perform Initialization 

        self.mc = MessageClient(proc=self.proc) 

 

 

    @defer.inlineCallbacks 

    def validate(self, data_url): 

        ''' 

        Builds the data_url into a cdm_validation_response message and sends it to the 

        CdmValidationService to validate the dataset specified by that url 

        ''' 

        # Ensure a Process instance exists to send messages FROM... 

        #   ...if not, this will spawn a new default instance. 

        yield self._check_init() 

 

        # Create the validation request instance 

        request = yield self.mc.create_instance(VALIDATION_REQUEST_TYPE) 

        request.data_url = data_url 

 

        # Invoke [op_]validate() on the target service 'cdm_validation_service' via RPC 

        log.info("@@@--->>> (client) Sending 'validate' rpc to cdm_validation_service") 

 

        (content, headers, msg) = yield self.rpc_send('validate', request, timeout=self.validation_timeout) 

        log.info("<<<---@@@ (client) Retrieve validation reponse from cdm_validation_service") 

 

        def response_type_pretty(self): 

            reasons = {self.ResponseType.NONE:               'No reason', 

                       self.ResponseType.PASS:               'Validation Passed!', 

                       self.ResponseType.CDM_FAILURE:        'CDM (time-axis) validation failed', 

                       self.ResponseType.CF_FAILURE:         'CF compliance failed', 

                       self.ResponseType.ERROR:              'ERROR.  View err_msg field for more'} 

            return reasons[self.response_type] 

 

 

        if log.getEffectiveLevel() == logging.INFO: 

            log.info('%-25s %s' % ('Passes Validation:', content.response_type == content.ResponseType.PASS)) 

            log.info('%-25s %s' % ('Response:',          response_type_pretty(content))) 

            log.info('%-25s %s' % ('Error Message:',     content.err_msg)) 

        elif log.getEffectiveLevel() <= logging.DEBUG: 

            log.debug('') 

            log.debug('') 

            log.debug('%-25s %s' % ('Passes Validation:', content.response_type == content.ResponseType.PASS)) 

            log.debug('%-25s %s' % ('Response:',          response_type_pretty(content))) 

            log.debug('%-25s %i' % ('CF Error count:',    content.cf_error_count)) 

            log.debug('%-25s %i' % ('CF Warning count:',  content.cf_warning_count)) 

            log.debug('%-25s %i' % ('CF Info count:',     content.cf_info_count)) 

            log.debug('%-25s %s' % ('Error Message:',     content.err_msg)) 

            log.debug('') 

            log.debug('') 

 

 

        defer.returnValue(content) 

 

 

    @property 

    def validation_timeout(self): 

        timeout = CONF.getValue('validation_timeout', 60) 

        log.info('Retrieved validation timeout: %i' % timeout) 

        return timeout 

 

 

 

# Spawn of the process using the module name 

factory = ProcessFactory(CdmValidationService) 

 

 

 

''' 

 

#----------------------------# 

# Validation Setup 

#----------------------------# 

You MUST add the following entries to ionlocal.config... 

[change the name of 'cfchecks_binary' where appropriate] 

 

'ion.integration.eoi.validation.cdm_validation_service':{ 

    'validation_timeout' : 60, 

    'cfchecks_binary' : '/Users/tlarocque/Development/OOI/code/ioncore-python/run_cf_checks', 

    'cdmvalidator_base_url' : 'http://motherlode.ucar.edu:8080/cdmvalidator', 

    'cdmvalidator_command' : 'validate', 

} 

 

 

 

#----------------------------# 

# Application Startup 

#----------------------------# 

:: bash :: 

bin/twistd -n cc -h amoeba.ucsd.edu -a sysname=eoitest res/apps/resource.app 

 

 

 

#----------------------------# 

# Validation Testing 

#----------------------------# 

:: py :: 

from ion.integration.eoi.validation.cdm_validation_service import CdmValidationClient as cvc 

spawn('cdm_validation_service') 

client = cvc() 

 

 

# PICK ONE of the following 

res_d = client.validate('http://geoport.whoi.edu/thredds/dodsC/usgs/data0/rsignell/data/oceansites/OS_NTAS_2010_R_M-1.nc') 

res_d = client.validate('http://thredds1.pfeg.noaa.gov/thredds/dodsC/satellite/GR/ssta/1day') 

res_d = client.validate('http://tashtego.marine.rutgers.edu:8080/thredds/dodsC/cool/avhrr/bigbight') 

 

 

 

res = res_d.result 

 

'''