Opened 12 years ago

Closed 12 years ago

#109 closed help (fixed)

Modifying an Ancillary file

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

Description

Hi,

I have an soil moisture ancillary file at 1km resolution from the Central Ancillary Program. I would like to modify this and use the modified version in the UM. I am a bit confused on the proper procedure to do this. I know there are programs available (xancil, mkancil, pptoanc etc), but what is the correct way to modify the file in the first place? Should I convert the ancillary file to netcdf, modify this (using IDL for example), then use xancil to convert this to a new ancillary file? Or is there a more reliable way to doing this?

Gerry

Change History (10)

comment:1 Changed 12 years ago by jeff

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

Hi Gerry

There is no correct way to do this, do whatever you think is easiest. Most people seem to copy what their colleagues do. If you are starting from scratch then converting the ancil to netcdf (using xconv), modify the file in IDL and convert the netcdf file back into ancil format using xancil is probably a good method to use. You have to use the latest version of xancil (xancil0.40) for soil moisture files, this is in ~umx/bin on hpcx. Let me know if you need any help with this.

Jeff.

comment:2 Changed 12 years ago by jeff

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:3 Changed 12 years ago by gdevine

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hi Jeff,

I am having a few problems with Xancil0.4. I have now modified the original soil moisture ancillary file and the .nc version looks fine in Xconv. When I pass this through Xancil0.4 however the data is fine, but the times are wrong. I have played about with the settings, initially asking XAncil to use the times already in the input netcdf file, but each time Xancil alters the times/dates. I have even tried modifying the namelist file directly, but to no avail. Am I doing something wrong or does XAncil always change the times/dates? I have put the netcdf file in my devt directory under the name newfile.nc if you want to have a look.

Thanks for your help.
Gerry

comment:4 Changed 12 years ago by jeff

Hi Gerry

Can you also give me access to the job file you used and the input data file. Thanks.

Jeff.

comment:5 Changed 12 years ago by gdevine

Jeff,

I have just saved a job file in the same directory and also generated a namelist from within Xancil. The input netcdf file is newfile.nc. Is this what you need?

Gerry

comment:6 Changed 12 years ago by jeff

Hi Gerry

Are you using xconv to look at the new ancillary file? I think your ancillary file is correct but xconv is giving you the wrong date values. You should try it in the UM and see if it works, the UM is pretty good at rejecting files with the wrong dates. I will look into fixing xconv.

Jeff.

comment:7 Changed 12 years ago by gdevine

Jeff,

yes, I have been using Xconv to look at it. I haven't actually tried the file in the UM yet. I will do that and let you know how it goes. Thanks for your help - Xancil would therefore appear to work quite nicely for what I am doing.

Gerry

comment:8 Changed 12 years ago by gdevine

Hi Jeff,

I have given the modified soil moisture ancillary file a go in a UM run (job xcwob). Unfortunately the Um crashes upon reconfiguration, giving the following error in the .leave file:

Ancillary File 2 : Soil Moisture/Snow? Depth

Inconsistency in Real Headers.
Real Header Values.

1 Anc File 0.360107421875000000E-01 Model Dump 0.359999999999999973E-01
2 Anc File 0.359997749328613281E-01 Model Dump 0.359999999999999973E-01
3 Anc File -5.84999895095825195 Model Dump -5.84999999999999964
4 Anc File 352.223999023437500 Model Dump 352.223999999999990
5 Anc File 76.5000000000000000 Model Dump 76.5000000000000000
6 Anc File 182.500000000000000 Model Dump 182.500000000000000

Error in INANCILA
CMESSAGE INANCILA: REAL header Error.
ErrorStatus? 8

Is the UM actually so specific that each of the values has to match up perfectly, i.e. the values are practically the same? The modified ancillary file was generated from an ancillary file from the CAP program on BADCa and so I dont think I have the capability to be specific down to som many significant figures as the .leave file suggests. Do you know of any ways around this?

Gerry

comment:9 Changed 12 years ago by jeff

Hi Gerry

The UM uses this function to compare the values

LNER(P1,P2) = ((ABS(P1-P2)) .GT. (1.E-6*ABS(P1+P2)))

which is saying that the numbers must match to approximately 6 significant figures. To pass the test for your values you would need to change the LNER function with a mod, something like this

*DECLARE RCF_INANCILA
*D RCF_INANCILA.162

LNER(P1,P2) = ((ABS(P1-P2)) .GT. (1.E-3*ABS(P1+P2)))

This would need to be added to the reconfiguration mods.

Another possible way to fix the problem is to convert your original ancil file to a 64 bit netcdf file and use that in xancil, this may give more accurate numbers. To do this use xconv on HPCx and go into the Setup, Setup Xconv Defaults window and change netcdf output precision to be 64 bit, then click on either Apply (changes only in affect for this xconv session) or Save (save changes for all future xconv sessions).

Jeff.

comment:10 Changed 12 years ago by jeff

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