NOAA-CSL / MELODIES-MONET

MELODIES MONET - diagnostic tool for evaluating models against a variety of observations including surface, aircraft, and satellite data all within a common framework
https://melodies-monet.readthedocs.io
Apache License 2.0
19 stars 21 forks source link

Check if obs and model have same observation name before pairing for aircraft evaluation #217

Open rschwant opened 9 months ago

rschwant commented 9 months ago

This has not come up yet, but might in the future. So let's add in code to check if the observation variable names and model variable names are similar at all. If they are the same then, add "_obs" to the end of the observation variable name. Also add a warning message. And add that this is done in the ReadTheDocs so that people understand how to use the mapping table.

quaz115 commented 5 months ago

@rschwant @colin-harkins , i think this issue is resolved as what @mebruckner mentioned it is there in driver.py now: https://github.com/colin-harkins/MELODIES-MONET/blob/8567a0ca247f1cc6fe3188920d6d4e04305c327b/melodies_monet/driver.py#L1252 & https://github.com/colin-harkins/MELODIES-MONET/blob/8567a0ca247f1cc6fe3188920d6d4e04305c327b/melodies_monet/driver.py#L2165

# Adjust the modvar as done in pairing script, if the species name in obs and model are the same.
                        if obsvar == modvar:
                            modvar = modvar + '_new'
quaz115 commented 5 months ago

@rschwant @colin-harkins , i think this issue is resolved as what @mebruckner mentioned it is there in driver.py now: https://github.com/colin-harkins/MELODIES-MONET/blob/8567a0ca247f1cc6fe3188920d6d4e04305c327b/melodies_monet/driver.py#L1252 & https://github.com/colin-harkins/MELODIES-MONET/blob/8567a0ca247f1cc6fe3188920d6d4e04305c327b/melodies_monet/driver.py#L2165

# Adjust the modvar as done in pairing script, if the species name in obs and model are the same.
                        if obsvar == modvar:
                            modvar = modvar + '_new'

Need to just add need to add obsvar = obsvar + '_obs' in the if block i think

rschwant commented 5 months ago

We discussed in the last meeting, that we should update this to make sure that the model variable becomes var_mod and obs variable becomes var_obs. Then update in the documents that you need to include this in the mapping dictionary too. Also need to confirm this happens for all observations.