0

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.

2
  • Possible duplicate of NetCDF: Attribute not found when merging 2 data files Commented Mar 3, 2019 at 8:39
  • 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 :-) Commented Mar 3, 2019 at 8:40

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Dear Robert, Many Many thanks for your help. The problem has solved. God bless you
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.