Skip to content

Problems with soda3.3.2_5dy_ocean_reg dataset, #15

@gorsol

Description

@gorsol

Dear Tron:

Thanks in advance to share, maintain and support the model2roms code.

I´m try to make the ROMS forcing files with “soda3.3.2_5dy_ocean_reg” dataset, downloaded from:

http://dsrs.atmos.umd.edu/DATA/soda3.3.2/REGRIDED/ocean/

After configure the configM2R.py file, with the next parameters:

  • self.time_frequency_inputdata = "5days"
  • self.ocean_indata_type = 'SODA3_5DAY'
  • self.fillvaluein = -1.e+20 (extracted from the downloaded dataset)

and the proper's define_ocean_forcing_data_path, define_roms_grid_path and the roms out grid stretching properties,

when I run the, runM2R.py file, there next error appear:

File "/Work/Python/model2roms/model2roms.py", line 274, in get_3d_data
str(confM2R.input_varnames[varN]), float(data.min()), float(data.max())))

UnboundLocalError: local variable 'data' referenced before assignment

I check the “get_3d funtion” in the model2roms.py file, and realize that there is not any option to mach with the “confM2R.ocean_indata_type == "SODA3_5DAY"” case. So I added the next code in the model2roms.py :

`	   if confM2R.ocean_indata_type == "SODA3_5DAY":
                data = cdf.variables[confM2R.input_varnames[varN]][0, :, :, :]
	        data = np.where(data.mask, confM2R.fillvaluein, data)_

`
All runs ok, with no errors, but I’m not sure about the solution, the result files are inconsistent. Can you confirm that the added code is right? Any other suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions