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

WRF Timeseries Output Inverse Density 'alt'

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


New member

I am currently attempting at extracting the instantaneous inverse density as a timeseries with the TSLIST option. I have been following the guide here :

I believe I may be missing something in my own version with this error during compilation ,
       ts_file_endings = (/ 'UU', 'VV', 'PH', 'TH', 'QV' ,'WW', 'PR', 'QP', 'RHO' /)
Error: Different CHARACTER lengths (2/3) in array constructor at (1)

                   WRITE(ts_profile_filename(i-1:i),'(A2)') ts_file_endings(j)
Error: Function ‘ts_file_endings’ at (1) has no IMPLICIT type

                DO j=1,SIZE(ts_file_endings)

Here QP is a new variable we have previously added with no problem so likely that isn't the error. I'm not really comfortable with FORTRAN but I believe the error comes from this line that is added in the #EM_CORE block,

 grid%ts_rho_profile(n,i,k) = grid%alt(ix,k,iy)

I can provide any additional changes I've made if that helps spot the problem.

Thank You,
Update 18 Jan 2021

A colleague of mine was able to diagnose the issue I was having prior, as it turns out the ts_file_endings is expecting only characters of length 2 where as my variable name was 'RHO' it should have read 'RH'. The correct line is as such

      ts_file_endings = (/ 'UU', 'VV', 'PH', 'TH', 'QV' ,'WW', 'PR', 'QP', 'RH' /)

Also for ease of life we can store the value of 'alt' density as follows

             grid%ts_rho_profile(n,i,k) = 1/grid%alt(ix,k,iy)

After this fix I am able to compile ... Sadly my new issue is the associated CSV files are not saving during runtime :^)

* Update 19 Jan 2021

I found the solution to my problem but it's rather specific to my own WRF build so I'm not sure how much it would help others.

- Jesse
Thanks for the detailed description of the problem and solution. We appreciate your kindness to share this information with the community.