Opened 10 months ago

Closed 8 months ago

#3138 closed help (answered)

Copy & rename field from dump and add via reconfiguration

Reported by: mtodt Owned by: um_support
Component: UM Reconfiguration Keywords: start dump reconfiguration add field
Cc: Platform: ARCHER
UM Version: 11.5

Description

Hi

I'm trying to use irrigation in my UM suite u-bq387, which requires a soil moisture field for irrigated area in the start dump. However, the start dump I'm using does not contain this additional soil moisture field, only the "regular" unfrozen soil moisture fraction. Is it possible to copy this field, rename it, and prescribe it as soil moisture for the irrigated area? If so, can this be done within the reconfiguration step or do I need to create an extra dump file in advance? Is this the "Transplant Data" option?
Many thanks for your help!

Cheers
Markus

Change History (18)

comment:1 Changed 9 months ago by grenville

Markus

Does the model understand soil moisture for irrigated area ?

Grenville

comment:2 Changed 9 months ago by mtodt

Hi Grenville

Yes, it does. When I turn on irrigation, the model is looking for an initial condition for soil moisture in the irrigated area and for an ancillary file prescribing the irrigated fraction. See the end of the job.out log file:

Output grid
0   85  139968   1     0     2     1  U COMPNT OF WIND AFTER TIMESTEP
...
1    4   52481   1     0   630  2983  UNFROZEN SOIL MOIST. IN IRRIG. FRAC.
1    1   52481   1     0   631  2987   IRRIGATED FRACTION

...

????????????????????????????????????????????????????????????????????????????????
???!!!???!!!???!!!???!!!???!!!       ERROR        ???!!!???!!!???!!!???!!!???!!!
?  Error code: 30
?  Error from routine: RCF_RESET_DATA_SOURCE
?  Error message: Section   0 Item   630 : Required field is not in input dump!
?  Error from processor: 0
?  Error number: 10204
????????????????????????????????????????????????????????????????????????????????

I know irrigation is not yet fully implemented in the UM, but it should work for this step at least.

Cheers
Markus

comment:3 Changed 9 months ago by grenville

Markus

Yes, you could make a netcdf file from the regular soil moisture, change field values for your missing field, then use xancil to create a UM ancillary file (see http://cms.ncas.ac.uk/documents/xancil/)

Grenville

comment:4 Changed 9 months ago by mtodt

Hi Grenville

I've created a netCDF file containing the field I want to add to the start dump during reconfiguration. However, I don't know which STASH code and PP code to provide for xancil. When reading in my netCDF file values are automatically assumed, which I think stem from the initial soil moisture field in the start dump that I copied. Can I assign any codes to my new field as long as I prescribe them later on (in a namelist or such) or are there already codes associated with this new field (or any field for that matter) that the UM is specifically looking for? And if so, how can I find out what these are?
Thanks a lot for your help!

Cheers
Markus

comment:5 Changed 9 months ago by jeff

Hi Markus

You can see the STASH code from your error message i.e.

0630 for "UNFROZEN SOIL MOIST. IN IRRIG. FRAC." and 0631 for " IRRIGATED FRACTION".

I don't think the PP codes really matter but you can get the correct values from the STASHmaster file, see $UMDIR/vn11.5/ctldata/STASHmaster/STASHmaster_A and search for the ancil field names. The PP code is the second entry on the fifth line, i.e.

1385 for 0630 and 326 for 0631.

Jeff.

comment:6 Changed 9 months ago by mtodt

Hi Jeff

Thanks a lot for your help! I see now, 1385 is used for several soil moisture-related fields including the field I copied initially.

How do I read the field from this extra dump file during reconfiguration? Should I add a new items namelist or use Transplant Data?

Cheers
Markus

comment:7 Changed 9 months ago by mtodt

I've created a new items namelist for my field:

[namelist:items(6ba112f9)]
ancilfilename='/home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00'
domain=1
!!interval=0
l_ignore_ancil_grid_check=.false.
!!netcdf_varname=''
!!period=1
source=2
stash_req=630
update_anc=.false.
!!user_prog_ancil_stash_req=0
!!user_prog_rconst=0

However, RECON fails with the following warnings and error message:

????????????????????????????????????????????????????????????????????????????????
??????????????????????????????      WARNING       ??????????????????????????????
?  Warning code: -15000
?  Warning from routine: ANCIL_CHECK_HORIZONTAL_GRID
?  Warning message: Mismatch between model and ancil field y grid spacing
?          Expected y grid spacing : 0.5555555556
?          Ancil    y grid spacing : -0.5555572510
?          Ancil file : /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00
?          Lookup num : 4
?          Stashcode  : 630
?  Warning from processor: 0
?  Warning number: 10210
????????????????????????????????????????????????????????????????????????????????


????????????????????????????????????????????????????????????????????????????????
??????????????????????????????      WARNING       ??????????????????????????????
?  Warning code: -15000
?  Warning from routine: ANCIL_CHECK_HORIZONTAL_GRID
?  Warning message: Mismatch between model and ancil field p grid y start
?          Expected p grid y start : -90.2777777778
?          Ancil    p grid y start : 90.2777786255
?          Ancil file : /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00
?          Lookup num : 4
?          Stashcode  : 630
?  Warning from processor: 0
?  Warning number: 10211
????????????????????????????????????????????????????????????????????????????????


????????????????????????????????????????????????????????????????????????????????
??????????????????????????????      WARNING       ??????????????????????????????
?  Warning code: -15000
?  Warning from routine: ANCIL_CHECK_VERTICAL_GRID
?  Warning message: Mismatch between model and ancil field soil depth
?          Expected soil depth : 0.0500000000
?          Ancil    soil depth : 0.1000000000
?          Ancil file : /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00
?          Lookup num : 5
?          Stashcode  : 630
?  Warning from processor: 0
?  Warning number: 10212
????????????????????????????????????????????????????????????????????????????????


????????????????????????????????????????????????????????????????????????????????
??????????????????????????????      WARNING       ??????????????????????????????
?  Warning code: -15000
?  Warning from routine: ANCIL_CHECK_VERTICAL_GRID
?  Warning message: Mismatch between model and ancil field soil depth
?          Expected soil depth : 0.2250000000
?          Ancil    soil depth : 0.2500000000
?          Ancil file : /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00
?          Lookup num : 5
?          Stashcode  : 630
?  Warning from processor: 0
?  Warning number: 10213
????????????????????????????????????????????????????????????????????????????????


????????????????????????????????????????????????????????????????????????????????
??????????????????????????????      WARNING       ??????????????????????????????
?  Warning code: -15000
?  Warning from routine: ANCIL_CHECK_VERTICAL_GRID
?  Warning message: Mismatch between model and ancil field soil depth
?          Expected soil depth : 0.6750000000
?          Ancil    soil depth : 0.6500000000
?          Ancil file : /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00
?          Lookup num : 5
?          Stashcode  : 630
?  Warning from processor: 0
?  Warning number: 10214
????????????????????????????????????????????????????????????????????????????????


????????????????????????????????????????????????????????????????????????????????
???!!!???!!!???!!!???!!!???!!!       ERROR        ???!!!???!!!???!!!???!!!???!!!
?  Error code: 1001
?  Error from routine: ANCIL_CHECK_MOD::REPORT_ANCIL_ERRORS
?  Error message:
?        ERRORS: 1 ancil files have failed ancil checking and resulted in this abort:
?        -- /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00
?
?        Any fields causing an error will have produced an ereport
?        warning earlier in the run, please search the log files for
?        each ancil filename for more details on each failure.
?  Error from processor: 0
?  Error number: 10215
????????????????????????????????????????????????????????????????????????????????

I don't quite understand how these inconsistencies occur as I simply copied the soil moisture field from the start dump. I prescribed the soil levels asked for in the above warnings during xancil and only the horizontal grid is complained about now. But those soil levels don't add up to 3m anymore, and they are not the standard soil levels, so I don't understand why the model demands them.

When setting l_ignore_ancil_grid_check to true, RECON fails with the following error message:

OPEN: File /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00 to be Opened on Unit 13 Exists
IO: Open: /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00 on unit  13
replanca_rcf_replanca: UPDATE REQUIRED FOR FIELD   630 : UNFROZEN SOIL MOIST. IN IRRIG. FRAC.

????????????????????????????????????????????????????????????????????????????????
???!!!???!!!???!!!???!!!???!!!       ERROR        ???!!!???!!!???!!!???!!!???!!!
?  Error code: 10
?  Error from routine: RCF_READFLDS
?  Error message: Invalid dump addressing: Possibly data file is ill-formed
?  Error from processor: 0
?  Error number: 10205
????????????????????????????????????????????????????????????????????????????????

Which refers to the resolution issues, I suppose.

Cheers
Markus

comment:8 Changed 9 months ago by jeff

Hi Markus

You need to change the UM version number in xancil, in the Configuration/General Configuaration panel. You currently have this set to 4.5, change it to 11.5.

Jeff.

comment:9 Changed 9 months ago by mtodt

Hi Jeff

Thanks again! I still don't understand why the soil levels are different to the standard ones. I also still get an error from the horizontal grid test:

????????????????????????????????????????????????????????????????????????????????
??????????????????????????????      WARNING       ??????????????????????????????
?  Warning code: -15000
?  Warning from routine: ANCIL_CHECK_HORIZONTAL_GRID
?  Warning message: Mismatch between model and ancil field y grid spacing
?          Expected y grid spacing : 0.5555555556
?          Ancil    y grid spacing : 0.5555572510
?          Ancil file : /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00.new
?          Lookup num : 4
?          Stashcode  : 630
?  Warning from processor: 0
?  Warning number: 10207
????????????????????????????????????????????????????????????????????????????????


????????????????????????????????????????????????????????????????????????????????
???!!!???!!!???!!!???!!!???!!!       ERROR        ???!!!???!!!???!!!???!!!???!!!
?  Error code: 1001
?  Error from routine: ANCIL_CHECK_MOD::REPORT_ANCIL_ERRORS
?  Error message:
?        ERRORS: 1 ancil files have failed ancil checking and resulted in this abort:
?        -- /home/n02/n02/mtodt/startdumps/SMFirrg_from_SMF.ai718a.da19820101_00.new
?
?        Any fields causing an error will have produced an ereport
?        warning earlier in the run, please search the log files for
?        each ancil filename for more details on each failure.
?  Error from processor: 0
?  Error number: 10208
????????????????????????????????????????????????????????????????????????????????

Cheers
Markus

comment:10 Changed 9 months ago by jeff

Hi Markus

I'm not sure why the soil levels are different either.

The grid spacing mismatch is usually caused by creating a netCDF file with 32 bit floating point numbers instead of 64 bit. You will need to redo your ancil file. If you created your netCDF file with xconv go into the Setup -> Setup Xconv Defaults panel and change Netcdf output precision to 64 bit.

Jeff.

comment:11 Changed 9 months ago by mtodt

Thanks a lot, Jeff!

comment:12 Changed 9 months ago by mtodt

Hi Jeff

I've created ancillary files for the two irrigation fields that the model needs, 630 soil moisture in irrigated area and 631 irrigation fraction. While 631 is a typical ancillary field in that it is not a prognostic variable, 630 should only be used for initialisation. I was wondering whether I need to set update_anc to true and interval and period to the model time step in the items namelist in order for 630 to be simulated and overwritten? Or do I need to set that in a different namelist or file? Many thanks for your help!

Cheers
Markus

comment:13 Changed 9 months ago by jeff

Hi Markus

Sorry I don't understand what you mean here. You say 630 should only be used for initialisation, so why do you you want to set it to be updated?

Jeff.

comment:14 Changed 9 months ago by mtodt

I assumed not updating would mean that it stays constant, since the field is read as an ancillary file. Which is what is needed for the irrigation fraction but not soil moisture.

comment:15 Changed 9 months ago by jeff

Hi Markus

The reconfiguration program will copy the ancillary file into the dump. The UM reads 630 from the the dump and uses it to initialise the prognostic. Then the UM (jules in this case) will use/update the variable as it progresses. Updating is not needed in this process.

Jeff.

comment:16 follow-up: Changed 9 months ago by mtodt

Hi Jeff

Thanks a lot for clarifying this! I wasn't sure whether the UM/JULES would automatically distinguish between initial fields and ancillary fields. Just for my understanding, does updating mean that a particular field is periodically overwritten by the values provided?

Cheers
Markus

comment:17 in reply to: ↑ 16 Changed 9 months ago by jeff

Hi Markus

Yes, the ancillary file is usually a timeseries or annual climatology of monthly mean fields. The UM then interpolates to the time requested via the update options.

Jeff.

comment:18 Changed 8 months ago by grenville

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