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 do I add a new 2d variable in tslist?

Status
Not open for further replies.

kwerner

Administrator
Staff member
These changes are for a 2D variable. If you are interested in adding a 3D variable, see:

It is probably easiest if you use the module share/wrf_timeseries.F as a reference. You can simply fill in one of the existing arrays for time series output (e.g., tslb) with your own information. All model data are available in that routine. If you would like to add one, you will need to modify Registry.EM_COMMON, and then make more changes in wrf_timeseries.F. For example, if you wanted to add ALBEDO and SWDOWN to WRFV4.1.3 timeseries output:

(1) Revise share/wrf_timeseries.F:
- Line 42 should be changed from:
Code:
INTEGER, PARAMETER :: TS_FIELDS = 7
to
Code:
INTEGER, PARAMETER :: TS_FIELDS = 9

- Line 44 should be changed from:
Code:
ts_file_endings = (/ 'UU', 'VV', 'PH', 'TH', 'QV', 'WW', 'PR' /)
to something like (you can choose your suffixes:
Code:
ts_file_endings = (/ 'UU', 'VV', 'PH', 'TH', 'QV', 'WW', 'PR', 'AL', 'SW' /)

-after line 482, add (in the #if EM_CORE block):
grid%ts_albedo(n,i)=grid%albedo(ix,iy)
grid%ts_swdown(n,i)=grid%swdown(ix,iy)

-after new line 580, add (in the #if EM_CORE block):
grid%ts_albedo(n,i) = 1.E30
grid%ts_swdown(n,i) = 1.E30

-after new line 751, add (in the #if EM_CORE block):
ts_buf( : , : )=grid%ts_swdown( : , : )
CALL wrf_dm_min_reals(ts_buf( : , : ),grid%ts_swdown( : , : ),grid%ts_buf_size*grid%max_ts_locs)

ts_buf( : , : )=grid%ts_albedo( : , : )
CALL wrf_dm_min_reals(ts_buf( : , : ),grid%ts_albedo( : , : ),grid%ts_buf_size*grid%max_ts_locs)

-after new line 914, add (in the #if EM_CORE block, write-statement):
...,&
grid%ts_albedo(n,i) &
grid%ts_swdown(n,i)

Remember that the writes should be added in the #if(EM_CORE==1) block, after line 646. You will also need to change the format statement from 14(f13.5,1x) to 16(f13.5,1x).

(2) Revise Registry/Registry.EM_COMMON:

-after line 732, add:
state real ts_albedo ?! misc - - - "TS_ALBEDO" "Albedo"
state real ts_swdown ?! misc - - - "TS_SWDOWN" "shortwave down"

After making these changes, it's mandatory to go back to your WRF directory and issue a "./clean -a," then reconfigure and recompile, in order to see the changes in the output.
 
Last edited:
Status
Not open for further replies.
Top