Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add param.nml to the global attributes of the merged netcdf #153

Open
pmav99 opened this issue Jul 7, 2023 · 4 comments
Open

Add param.nml to the global attributes of the merged netcdf #153

pmav99 opened this issue Jul 7, 2023 · 4 comments

Comments

@pmav99
Copy link
Collaborator

pmav99 commented Jul 7, 2023

I just checked an ADCIRC output file and its global attributes are like these:

Global attributes:
	:_FillValue = -99999.0
	:model = ADCIRC
	:version = noaa.stofs.2d.glo.v1.1.0r2-19-g38d8d4e
	:grid_type = Triangular
	:description = Shinnecock Inlet V20051108               ! UPTO 32 CHARACTER ALPHANUMERIC RUN D
	:agrid = Shinacock Inlet Coarse Grid
	:rundes = Shinnecock Inlet V20051108               ! UPTO 32 CHARACTER ALPHANUMERIC RUN D
	:runid = ADCIRC V45.08                            ! UPTO 24 CHARACTER ALPANUMERIC RUN ID
	:title = adcirc.org netcdf examples project
	:institution = UNC CH Institute of Marine Sciences
	:source = adcirc.org examples page
	:history = based on Shinnecock Inlet but with netcdf output
	:references = http://adcirc.org/home/documentation/example-problems/shinnecock-inlet-ny-with-t
	:comments = netcdf4 format was used (fully compatible with hdf5)
	:host = adcirc.org
	:convention = CF
	:Conventions = UGRID-0.9.0
	:contact = [email protected]
	:creation_date = 2022-12-01 19:50:16  00:00
	:modification_date = 2022-12-01 19:50:16  00:00
	:fort.15 = ==== Input File Parameters (below) ====
	:dt = 2.0
	:ihot = 567
	:ics = 2
	:nolibf = 2
	:nolifa = 2
	:nolica = 1
	:nolicat = 1
	:nwp = 0
	:ncor = 1
	:ntip = 1
	:nws = 17
	:nramp = 1
	:tau0 = 0.005
	:statim = 0.0
	:reftim = 0.0
	:rnday = 14.0
	:dramp = 7.0
	:a00 = 0.35
	:b00 = 0.3
	:c00 = 0.35
	:h0 = 0.05
	:slam0 = -72.43
	:sfea0 = 40.66
	:cf = 0.0025
	:eslm = 5.0
	:cori = 0.0001
	:ntif = 5
	:nbfr = 5

I think it can be useful to have the param.nml contents as netcdf metadata. It shouldn't be too difficult to add this info when we merge the data.

@brey thoughts?

@brey
Copy link
Collaborator

brey commented Jan 21, 2024

just adding the parameters dict gives:

Screenshot 2024-01-21 at 20 40 09

Do you think it's ok?

@pmav99
Copy link
Collaborator Author

pmav99 commented Jan 21, 2024

I guess that the difference is that the dictionary is coupled with pyPoseidon, while the param.nml is coupled with schism. Both should work.

On second thought, a potential issue with the dictionary is that if there is a bug or even an update in pyPoseidon the dictionary might not be directly usable. You will need to track the version of pyPoseidon, too, in order to recreate the param.nml. With the param.nml there will be no such problems.

Another option would be to add both files. Metadata are cheap :)

@brey
Copy link
Collaborator

brey commented Jan 22, 2024

You mean add the param.nml as json? How else can you add it?

@pmav99
Copy link
Collaborator Author

pmav99 commented Jan 22, 2024

I assume you can add it as a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants