Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have downloaded the meteorological data in NetCDF format from two different sites. I need to merge two files to put in my ocean model. when running the model with the merged file I got the below error.

Error occurred in NetCDF routine NF90_get_att NetCDF: Attribute not found.

I think before merging I have to same the attributes of two NetCDF files. but I don't know how to do it. could you please tell me How can I fix this ? Here is the link that I have shared the two files and the piece of the code. this code is a part of my ocean model that reads the meteorological file. https://drive.google.com/open?id=1GB4VbweJvZrKLkK8rUxBXz1gjVcj_n3N Any help would be appreciated.

You shouldn't ask the same question twice if you (1) don't get an answer, or (2) want to edit your question. That's why they invented the edit button :-) – Bart Mar 3, 2019 at 8:40

Firstly, you are reading relative humidity into a variable that seems to be for dew point temperature. This seems to be fundamentally wrong, so please check.

It appears that your code is looking for variable attributes scale_factor and add_offset in all variables. But your rhum variable is stored as percent with no scaling. You could try adding scale_factor=1.0 and add_offset=0 to rhum. To do this, look at the documentation for ncatted.

Alternatively, modify the fortran code so that scaling is not used for this variable.

Dear Robert, could you please explain to me how to modify the fortran code so that scaling is not used for this variable? @Robert Davy – Pooran khedri Apr 14, 2019 at 9:34

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.