Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

verifying a change using ncdiff

jzweifel

jzweifel
Member
Hello Forum people!

I'm trying to use ncdiff to verify if change that I successfully implemented in my user_nl_cam and ran was actually realized.

I'm thinking I should use some formant like this where variable_name is the variable I edited, file1.nc is the last history file before implementing the change, file2.nc is the first history file after implementing the change, and diff.nc is the outputted difference:

ncdiff -v variable_name file1.nc file2.nc diff.nc

My question then is, what variable name should I use? This has been a bit of a tricky thing for me to figure out because the emission variable names are not all one word or joined by underscores. Rather I can see in my cam.input_data_list that my change to my model points like this:

srf_emis_specifier for num_a2 = .......

I tried to put the variable_name to srf_emis_specifier for num_a2 as seen above and was getting an error about too many arguments being present (i'm guessing because the variable name is not conjoined)

Any ideas of how to go forward would be appreciated!
 

strandwg

Moderator
Staff member
A very useful tool for netCDF files is "ncdump", for example:

ncdump file1.nc | less

that will show you the contents of the netCDF file, and you can go from there.
 

jzweifel

jzweifel
Member
Hi All (including Rebecca!),

I appreciate your response about GEOV, it is a little easier to use than ncview.

I'm trying to use it to compare the output of two timesteps in a model run where I increased surface emissions of SO4 over the East coast of the U.S. (as referenced above in my original post).

The image below was a side by side comparison of the last April before I implemented my change, and the first April after I implemented my change. To me it looks like now the model is seeing less so4_a2 at the surface (be aware the scales are different).

Am I looking at the correct variable to try and verify this change or should I look at something else besides so4_a2_SRF? There are many variables so I've gotten a bit lost in it all.

I guess I'm just looking for some guidance on how to see that my model change of increased so4 a2 surface emissions actually did increase the output in the model.. (instead of it seemingly doing the opposite!)

Any help or comments or suggestions would be great!

Thanks all! :)



so4_a2_SRF.PNG
 

rrbuchholz

Rebecca Buchholz
CSEG and Liaisons
Staff member
Hi There!
To me it looks like many places are higher on the right than the left (e.g. Amazon). There is also an option to calculate a difference plot in GEOV -- the operator A-B option --- which might be more instructive than just a side by side.
You could also look at the variable SFso4_a2 (surface flux of so4_a2) to make sure what you think you changed was changed. Other processes in the model might be influencing the atmospheric concentration of so4_a2.
Hope that helps.
 

jzweifel

jzweifel
Member
that difference plot sounds like a good idea, thanks for the response! I'll also talk this over with my advisor!

Thanks a lot!
 
Top