Opened 2 months ago

Closed 2 months ago

#3257 closed help (fixed)

creating ancil files from netcdf

Reported by: EmmaHoward Owned by: um_support
Component: UM Tools Keywords:
Cc: Platform: ARCHER
UM Version: 11.4

Description

Dear CMS,


I'm trying to produce a new ancillary file to initialise soil moisture in the nesting suite with instantaneous rather than climatological data, but I'm having some trouble.


My input soil moisture file is in netcdf format, which I've created using iris, at "/work/n02/n02/emmah/glosea/glosea_sm_20151201.nc". I initially converted this to a fieldsfile using xancil (the generalised option). In my suite, I then changed the SMCIN environmental variable in the ancil_smcsnow app to this file and ran the app. In the log file, I got the error:

Attempting to open file
/work/n02/n02/emmah/glosea/glosea_sm_20151201
Soil Moisture source grid details
POINTS_LAMBDA_SRCE 360
POINTS_PHI_SRCE 180
POINTS_SRCE 64800
LAMBDA_ORIGIN_SRCE 0.5
PHI_ORIGIN_SRCE 89.5
DELTA_LAMBDA_SRCE 1.
DELTA_PHI_SRCE 1.
IGRID_SRCE 2
Dataset has 48 fields
ERROR: SMC levels not as expected
Dataset 4 Expected 4
Dataset 1 Expected 4


Some sleuthing revealed that my problem was with the fixed length header of the input fields file, which has the second dimension of the level dependent constants array equal to 1 rather than 4 in the file created by xancil. I can open the climatology soil moisture field with mule and see that it has a 4x4 level dependent constants array, and that my file has a 4x1 level dependent constants array.

Can you please advise me on how to change 4x1 array in my file to the required 4x4 array? I've tried naively to change these attributes in mule, but even running

ff = mule.UMFile.from_file("glosea_sm_20151201_xancil")
ff.to_file("glosea_sm_20151201_mule")

Outputs a file that is nonsense.

Could you please advise me on how to proceed?

Best wishes,
Emma

Change History (2)

comment:1 Changed 2 months ago by jeff

Hi Emma

You have created an ancillary file for UM version 4.5, I suspect this is not what you intended. In xancil panel Configuration → General Configuration change Version number to the UM model version you are using. It doesn't have to be the exact version but 4.5 won't work on current UM versions.

Jeff.

comment:2 Changed 2 months ago by EmmaHoward

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

Hi Jeff,

Thanks, that's worked. I must have missed that switch!

Emma

Note: See TracTickets for help on using tickets.