metno / emep-ctm

Open Source EMEP/MSC-W model
GNU General Public License v3.0
30 stars 20 forks source link

Adding country codes in emission files #110

Closed sarajutterstrom closed 1 year ago

sarajutterstrom commented 2 years ago

Hi,

I have previously used the option of reading in the emission files with “sourceFiles”, which worked very well. Now, however I would like to use a femis-file to lower emissions from certain countries, so I added a variable “Code” for the country code numbers on the same grid as my emissions in my netcdf emission files (matching the country numbers in my femis-file), but it seems like this variable is not read. Which means that even though my femis file seems to be correctly read in, it is not used to reduce my emissions. So, I was wondering how I should add the country numbers in an emission file properly?

Best wishes, Sara

gitpeterwind commented 2 years ago

Hi Sara, The syntax is to use country_ISO as defined in Country_mod.f90 (for example ‘FR’ for France) see Does that work for you, or do have regions/countries not defined in the Country_mod.f90?

Best wishes, Peter

sarajutterstrom commented 2 years ago

Hi Peter,

Thank you for responding so quickly! :)

For the shipping emissions I have used country_ISO INTSHIPS when I read in the emissions (which works), but for the other ones I just have one file for each species over Europe so I'm not quite sure how to set the Country_ISO for those sources. So I made a matrix with country numbers like the "Codes" variable in GNFRemis_EMEP01_2015.nc and added that to my nc emission files to see if that would work, which it didn't.

gitpeterwind commented 2 years ago

I can see that this might be easier. It would not be too difficult to implement, and will try to include it for later versions.

sarajutterstrom commented 2 years ago

That would be great! I will try to format the emissions so I can read them with inputlist and see if that works.

Cheers, Sara

gitpeterwind commented 2 years ago

Hi Sara, I have tried to include a countrycode option. I do not have an emission file with those codes ready, so if you could try it out, that would be useful. Here is a patch.txt (lines starting with a + must be added, lines starting with a - removed) Any way it will included in next release.

Best wishes, Peter PS: the line numbers correspond to our internal latest version, and are slightly different from the last open source version!