So I several large data files that correspond to temperature and vapor in the form tmp_information_about_dataset.file and vap_information_about_dataset.file
So for every tmp_... file there is a corresponding vap_... file, I'll use both datasets to perform some calculations on and then generate a corresponding output file in the form out_information_about_dataset.file
Just to be clear, each pair of tmp/vap files, after information about the datasets (ie any characters after tmp or vap) are identical, so I'll also want the characters after
out to be identical to information about the datasets from which it was generated.
tmp_123ABC456_model1_2010.nc vap_123ABC456_model1_2010.nc out_123ABC456_model1_2010.nc tmp_123CDF_model2_2010.nc vap_123CDF_model2_2010.nc out_123CDF_model2_2010.nc
Is there a way in which I am able to take all the files in the dictionary, perform the calculation on matching pairs and name the output file with an identical file name after the first 3 characters?
I was thinking something like this answer here would work but the fact I need to use to two files with corresponding name, as opposed to any file in the dictionary as well as want separate output files, is throwing me off a bit.