Land Surface Configuration does not match Ancillary

Dear CMS,

I am trying to run u-dj021 with a new ancillary for the land surface, specifically Fraction of Surface Types (216). However, the suite fails at recon with the error:

Land Surface configuration does not match ancillary

My ancillary should make changes to the following pseudo levels in Fraction of Surface Types: 101 (Broadleaf Deciduous Trees), 102 (Broadleaf Evergreen Tropical), 4 (C4 Grass) and 501 (Deciduous Shrubs). The other 23 pseudo levels which make up the remaining PFTs and sea-ice will be unchanged.

So far I cannot work out how to write this data to an ancillary file using Xancil in a way that the model will accept it.

I’ve tried writing the ancillary in two ways:

  1. With 4 separate fields having the same stash code (216). This matches the form of the field in the AINITIAL file - Fractions of Surface Types is split into four records holding, 5, 3, 5 and 14 separate levels in sequence.

  2. With one field combining all 27 levels into one

In both cases, the model fails and Xconv crashes when opening the ancillary file so I can’t inspect it.

Can you please advise?

Thanks
Alfred

I should clarify two things.

Firstly, the above error from a fail on recon:

“Land Surface configuration does not match ancillary”

was occurring when I tried running the model with an ancillary that had less than 27 surface types in it.

When running the ancil files that I describe above, the model fails on atmos_main with:

“A total of X points had negative mass in set_thermodynamic. This indicates the pressure fields are inconsistent between different levels and the model is about to fail”

Some additional information to add as well:

The current Xancil job file that I’m using is Vegetation_ancil.job and can be found in /work/n02/n02/ajw1g19/um/ancil_jobs/. This job creates an ancil file as in option 2 above

Thanks,
Alfred

Hi

Xconv will not read these ancil files because it will try and use the pseudo level number as a vertical coordinate and because they are not monotonically increasing it won’t like it and crash. I suggest using cf-python to convert these files to netcdf. Do you have access to cf-python on Archer2? If not you could use a version here /home/n02/n02/simon/cf-local/env, I run these commands to include this in my environment

module load cray-python
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/n02/n02/simon/cf-local/env/lib
export PATH=/home/n02/n02/simon/cf-local/env/bin:$PATH

Here is script I use to convert UM files to netcdf

import numpy
import cf
import sys

datatype={numpy.dtype('int64'): numpy.dtype('int32')}

for umfile in sys.argv[1:]:
  f = cf.read(umfile)
  ncfile = umfile + '_cf.nc'
  cf.write(f, ncfile, datatype=datatype)

You can use xconv to look at these netcdf files or another plotting package of your choice.

Do you have an ancil file with 27 pseudo levels that works in the UM? If you do link it here and I can compare the header values with the xancil produced one and see if there are any differences.

Jeff.

Hi Jeff,

Thanks for getting back to me!

After some more rooting through the forum and experimenting with Xancil, I did eventually get a working ancillary which applied the necessary changes to surface fractions. The error on atmos_main was due to a corrupt initial start file which I fixed and now have a working model.

I very much appreciate your advice and your time, I will certainly borrow that script for the future!

Thanks,
Alfred

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.