Opened 10 years ago

Closed 10 years ago

#389 closed help (fixed)

Cannot use 'home-made' vegetation ancillary (vegfunc)

Reported by: jsau Owned by: jeff
Component: UM Model Keywords:
Cc: Platform:
UM Version: 6.1



I have problems using vegetation ancillaries that I made using xancil - more precisely the vegfunc ancillary. When reconfiguring, the model tells me:

  REPLANCA - time interpolation for field  84
  time,time1,time2  5484. 5040. 5760.
  hours,int,period  5484 720 8640
  Information used in checking ancillary data set: position of lookup table in dataset: 43
  Position of first lookup table referring to data type  1
  Interval between lookup tables referring to data type  6  Number of steps 7
  STASH code in dataset  129   STASH code requested  217
 'Start' position of lookup tables for dataset in overall lookup array  4753
 129 217 84
 UM ERROR (Model aborting) :
 Routine generating error: UP_ANCIL
 Error code:  284
 Error message:

(IN xemqt000.xemqt.d10047.t111809.leave)

Field 84 is Leaf Area of Plant Func Types. I understand that xancil has put the wrong header on this particular ancillary file. But why on this one ? Yet everything seems to run well when I convert my netCDF into ancillaries, xancil recognizes the 3 relevant fields and seems to convert them well, I can view them on xconv without detecting anything wrong… But the model won't use them.

Alternative question: if I really can't make usable ancillary files for vegetation, can I set the model to run without a vegetation scheme? I have tried many configurations (vegfunc fields not used, vegfrac field not used, etc.) but none worked.

Thank you,

Change History (16)

comment:1 Changed 10 years ago by jsau

The ancillary is:

comment:2 Changed 10 years ago by jeff

  • Owner changed from um_support to jeff
  • Status changed from new to accepted

Hi Jerome

This is a bug in xancil, I will update the executables soon. I'll let you know when I've done it.


comment:3 Changed 10 years ago by jeff

Hi Jerome

I have fixed and updated the xancil executables on hector and the downloadable versions ( So try creating your ancillaries again.


comment:4 Changed 10 years ago by jsau

Hi Jeff

I am afraid I still have the same error message when trying to use the new vegfunc ancillary file (STASH code in dataset 129 STASH code requested 217). Have I done it wrong? I simply opened xancil and ran it as I used to, same job, same everything. Do I have to update anything?


comment:5 Changed 10 years ago by jsau

Another question: since I cannot make a complete set of ancillary files (including vegetation) yet, can I run the model without vegetation ancillary files? If so, what should I change in the settings? Thanks.

comment:6 Changed 10 years ago by jeff

Where is your newly created ancil file? Did you just run xancil on hector. What does "which xancil"

No you can't run without veg ancil files.


comment:7 Changed 10 years ago by jsau

My new ancillaries, made this morning with xancil on hector, are on: /work/n02/n02/jsau/ancil/xanciloutput (that you should have access to)

"which xancils" returns /work/n02/n02/hum/bin/xancil


comment:8 Changed 10 years ago by jeff

What is the job id of your latest run with these ancillary files?


comment:9 Changed 10 years ago by jsau

In xesib I tried to use the newly created vegfunc (just to see if it was accepted) and got the classical "PP headers do not match" answer.

comment:10 Changed 10 years ago by jeff

I think the problem is your UM job expects leaf area index and canopy height to have 5 plant functional types but your file only has 1. If your input file only has 1 type then I'm not sure how you would fix this problem. Do you have any idea about this?


comment:11 Changed 10 years ago by jsau

I think I see what caused the problem: I started from the ancil file qrparm.veg.func_seasonal on /work/n02/n02/jsau/ancil/vn6.1/n96_hadgem1 (which works well when used by the model). I did not understand that the time dimension was 60 because 5typesx12months… I thought it was instead 5yearsx12months. So I just took the 12 first timesteps and dropped the rest.

Now I understand this was wrong. However I started doing that BECAUSE xancil would not take the NetCDF file as is. A very simple example: I converted several ancillary files on /work/n02/n02/jsau/ancil/vn6.1/n96_hadgem1 into a netCDF called Now when I try to get a vegfunc ancillary from this netCDF I always get an error. Either the number of plant types is set to 5 and I get "ERROR: number of plant functional types in netcdf file 1 is less than value specified in xancil 5", or it is 1 and I get "ERROR: in procedure get_ncdata_r 2 : NetCDF error number -40 : NetCDF: Index exceeds dimension bound". I saved this job as vegfunc.test.job if you want to see. It appears to me that xancil does not understand that the 60timestep series is a 5typesx12months series.

What do you suggest? Is xconv misinterpreting the data and then misconverting it into NetCDF? Or am I doing somethnig the wrong way?

comment:12 Changed 10 years ago by jeff

Okay it makes sense now. The vegfunc ancil file in /work/n02/n02/jsau/ancil/vn6.1/n96_hadgem1/ doesn't have the correct headers so xconv doesn't know there are 5 pseudo levels in it and that's why your netcdf file is incorrect, the UM doesn't care about the incorrect headers. To fix this I have written a utility called fix_veg, run

~jwc/bin/fix_veg vegfuncfile

and then hopefully xconv will produce a correct netcdf file. You should probably take a copy of your ancil file before running fix_veg just in case it does something strange.


comment:13 Changed 10 years ago by jsau

Thank you Jeff, fix_veg seems to have done a good job. Now I'll try using the new ancillaries in UM runs and I'll keep you posted.

comment:14 Changed 10 years ago by jsau

OK, now I am able to change the vegetation ancillary and to have the UM accept it. For example, I tried a run with all soil and vegetation parameters (soil, smow, slt, vegfrac, vegfunc) averaged over all continents (the set of ancillaries is in /work/n02/n02/jsau/ancil/averaged_fields). It went well.

Now I am trying to change the shape of continents (the set of ancillaries is in /work/n02/n02/jsau/ancil/averaged_fields2). I find that suppressing continents is not a problem, but I cannot add continents where there was previously ocean. See for example my xemqm000.xemqm.d10056.t103945.leave run. More strange still, when I do the same from an aquaplanet startdump, the run won't stop, even if it has ample time to model a single day, and I end up with a "walltime exceeded" message (see my xesia000.xesia.d10056.t104100.leave).

I have been having this kind of seemingly irrational problems for a month now, and I thought that a well-formed vegfunc ancil would be the solution. But it is not.

comment:15 Changed 10 years ago by jeff

I think in both cases your run is unstable and either crashing or getting into a infinite loop somewhere. What you are doing looks to be pretty extreme for the UM so I'm not surprised it doesn't like it. You need to talk to someone who has done something like this before because I would have no idea where to start.


comment:16 Changed 10 years ago by jeff

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.