Sorry to bother you, but I need some help converting one of my ancillary files (that I have modified, as a netCDF) to a UM format file. I am doing this on ARCHER2, at /work/n02/n02/cjrw09/gc31/pliod/coupling_weights_v2. The file I am trying to convert is atmo_mask_fracarea_anc_ns_mync_new.nc. The original UM format version of the file is atmo_mask_fracarea_anc_ns in the same directory, but as you can see if you compare the 2, the UM format version is upside down. It should be the right way up. I have therefore created my version, which is the right way up, so now need to convert it back into a UM format file. I have tried using xancil, either using the land fraction option or generalised ancillary files option, but both produces the same error:
cjrw09@ln02:/work/n02/n02/cjrw09/gc31/pliod/coupling_weights_v2> Creating namelist file /mnt/lustre/a2fs-work2/work/n02/n02/cjrw09/gc31/pliod/coupling_weights_v2/xancil.namelist
Running mkancil executable /mnt/lustre/a2fs-work1/work/y07/shared/umshared/bin/mkancil0.58
Output from /mnt/lustre/a2fs-work1/work/y07/shared/umshared/bin/mkancil0.58 executable:
ERROR: UM model version number 4.5 not compatible with ENDGame atmospheric grid
I tried changing the version number to 0.9 (which is what the original UM format version is), but same error.
Please can you help?
If you’re really interested and want to know why I’m doing this, see my last ticket and in particular the response to Grenville dated 30 May (message 33).
Thanks very much, yes, that worked and it now generates a file.
However, no matter what options I choose, the newly created UM format file has the wrong attributes (e.g. long and short field name). Looking at the original, the long field name is “Stash code = 505”, the short field name is “lsm” and the standard field name is blank. This is exactly how I have set up my input netcdf file to be.
But, if I then use the “Land fraction” option, it gives me a long field name of “Land fraction in grid box”, a short field name of “lsm” and a standard field name of “land_area_fraction”. If I use the “Generalised ancillary file” option, and I leave the stash code and PP code blank, it gives me a long field name of “Stash code = 0”, a short field name of “unspecified” and the standard field name is blank. If I fill in the stash code as 505, then it gives me a long field name of “Land fraction in grid box”, a short field name of “unspecified” and a standard field name of (again) “land_area_fraction”.
I don’t even know if any of the above matters, but given the sensitivity of the model and the fact that I am trying to track down a problem (see my other message), surely it needs to be right? Is there anyway to force xancil to simply make a copy of the input file, without changing any of the attributes? Or maybe manually change the attribute name afterwards, using something like ncatted (or maybe this doesn’t work on UM format files)?
Using the “Land fraction” option should give you a correct ancillary file.
Ancillary files don’t contain any strings with names in, they just have arrays of numbers which correspond to certain defined attributes (https://code.metoffice.gov.uk/doc/um/latest/papers/umdp_F03.pdf). Xconv translates these numbers into useful information the best it can. The value of long_name etc. can change with what you set STASH code to and the UM version number can also make a difference.
Thanks Jeff. Being honest, I will say I don’t entirely understand that, but maybe that doesn’t matter! Is there any way of finding out what meta data (eg. UM version number) is associated with the original ancillary file (that I have subsequently modified) in order to make xancil create a new ancillary file that is identical in all its attributes?
The version number really doesn’t matter it won’t affect anything. If your file was made by the Met. Office it will probably have the version number of the software used to create it instead of the UM version number. Xancil still puts in a UM version number because I thought this was slightly more useful than a random Xancil version number, but as I said it will make no difference to how the model runs.
I am trying to run the model now, with this new ancillary. I don’t think this will resolve my problem (see my other message), because I don’t particularly believe this was the problem, but it was worth trying.