Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

How to add a local variable in a scheme to history file?


New member
I adjusted YSU PBL scheme to output more variables, like pblh_ysu and buoy_ysu. The adjusted .F is as attached.
Afterwards, I would like to adjust Registry.xml, and I read add a new variable to mpas history output file and restart file. However, I still
don't know where to insert the following code:

type (block_type), pointer :: block_ptr
type (mpas_pool_type), pointer :: my_var_struct
real (kind=RKIND), dimension:)), pointer :: my_var

block_ptr => domain % blocklist

call mpas_pool_get_subpool(block_ptr % structs, 'my_var_struct', my_var_struct)
call mpas_pool_get_array(my_var_struct, 'my_var', my_var)

my_var:)) = 0

So I can only add somthing like this in Registry.xml:
<var name="buoy_ysu_3d" type="real" dimensions="nVertLevels nCells Time" units="K m^{1} s^{-1}"
description="buoyancy flux"

However, a critical error happens.
WARNING: Error: Field pblh_ysu_2d not found in pool.
ERROR: Requested field pblh_ysu_2d not available
CRITICAL ERROR: xml stream parser failed: streams.atmosphere

My questions are:
1. The scripts attached are "adding new variables in diagnostic file", but what I want is output to history file. Could anyone suggest me how to add output to history file?
2. Where can I add the new variables into pool to avoid the error?

Thanks in advance.



  • module_bl_ysu.F
    68.5 KB · Views: 0
Last edited: