Closed dhruvbalwada closed 7 years ago
The metadata is normally found in the ~data.diagnostics
~ available_diagnostics.log
file. Can you double check that KPPhbl
appears in ~data.diagnostics
~ available_diagnostics.log
?
(edit: the metadata is not the same as the .meta file...that alone doesn't contain enough info to build a variable.)
No KPP related files are not mentioned in the data.diagnostics file.
The data.diagnostics files looks like -
&diagnostics_list diag_mnc=.FALSE., frequency(1) = 31104000., filename(1) = 'surface_forcing', fields(1,1) = 'oceTAUX ', 'TFLUX ', & &DIAG_STATIS_PARMS & ~
It doesn't even have mention of the U,V,W, etc files in it.
Sorry I wrote the wrong file name. I mean available_diagnostics.log
(possibly relevant documentation: http://xmitgcm.readthedocs.io/en/latest/usage.html#expected-files)
available_diagnostics.log is not even generated. The output of KPP is obtained by setting a flag in data.kpp and not data.diagnostics. As it is not a diagnostic variable, there is no available_diagnostics.log file being generated.
Ok, I think I understand. The output you are getting from KPP bypasses the diagnostics package completely, similar to the standard dump and tave output.
There are two solutions:
As you can see if you follow that link, the metadata from the standard "state files" had to be hard coded.
This is basically the same issue as #5
Yeah, okay I see the problem now. I will try to add the metdata corresponding to the KPP related files. Thank you. Dhruv
I'm not sure exactly how you will do that without at least looking at an available_diagnostics.log file. It's kind of impossible to know that the variables mean just from their names. I would try running for one timestep with diagnostics enabled to see an available_diagnostics.log file with KPP stuff in it.
If you go this route, please submit your changes as a PR.
I am posting this issue because I am unable to open files generated by the KPP package in the MITgcm model. Here is an example of the code that will reproduce this error.
The data files are stored in - /swot/SUM05/dbalwada/channel_model_output/varying_res/20km/run_kpp_out_test on the Sverdrup server. If you don't have access to this then please let me know, and I can email the files to you.
The command that I used to open the files is -
ds = open_mdsdataset(data_dir, delta_t=1200, iters = [2594160], prefix=['U'], ignore_unknown_vars=False, geometry='cartesian')
when I open the U velocity files, the file opens.However when I replace the prefix
ds = open_mdsdataset(data_dir, delta_t=1200, iters = [2594160], prefix=['KPPhbl'], ignore_unknown_vars=False, geometry='cartesian')
I get the error `KeyErrorTraceback (most recent call last)