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 output new upper-air with tslist?

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.

sekluzia

Member
Dear Colleges,

I want to add the REFL_10CM(Time, bottom_top, south_north, west_east) variable in tslist and output high-frequency simulations for specified locations. How can I do that?

Best regards,
Artur
 
Artur,
Take a look at this FAQ to see if it helps:
https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=74&t=147
 
Hi,

Thanks for your reply! I tried to follow the recommendations provided in your link and modified the Registry.EM_COMMON and wrf_timeseries.F files.
Please, find attached the files. I am using the WRF version 4.1.3. You can see that in the wrf_timeseries. F file I added the following records (line numbers are indicated with l):

l439: grid%ts_refl_10cm(n,i,k) = grid%refl_10cm(ix,k,iy)


l573-576:
DO k=1,grid%max_ts_level
ts_buf:),:) = grid%ts_refl_10cm:),:,k)
CALL wrf_dm_min_reals(ts_buf:),:),grid%ts_refl_10cm:),:,k),grid%ts_buf_size*grid%max_ts_locs)
END DO

l795-812
!Write radar reflectivity profile to separate file
iunit = get_unused_unit()
IF ( iunit <= 0 ) THEN
CALL wrf_error_fatal('Error in write_ts: could not find a free Fortran unit.')
END IF
!Recreate filename for water vapor mixing ratio profiles
k = LEN_TRIM(ts_profile_filename)
WRITE(ts_profile_filename(k-1:k),'(A2)') 'RF'

OPEN(UNIT=iunit, FILE=TRIM(ts_profile_filename), STATUS='unknown', POSITION='append', FORM='formatted')

DO n=1,grid%next_ts_time - 1

WRITE(UNIT=iunit,FMT=profile_format) &
grid%ts_hour(n,i), &
grid%ts_refl_10cm(n,i,1:grid%max_ts_level)
END DO
CLOSE(UNIT=iunit)


Then I added the following record at 742 in the Registry.EM_COMMON
state real ts_refl_10cm ?!k misc - - - "TS_REFL_10CM" "Radar reflectivity (lamda = 10 cm)" "dBZ"


Finally, I made ./clean -a, configured and successfully compiled the WRF. However, the wrf does not add the reflectivity files, i.e the *RF files are not created after running the wrf. Could you help to understand what is still missing?

Kind regards,
Artur
 

Attachments

  • Registry.EM_COMMON
    385.4 KB · Views: 59
  • wrf_timeseries.F
    35.3 KB · Views: 77
Hi Artur,
It looks like you're not modifying the code in the correct places, which is understandable since the description I gave in the FAQ was so out of date (for code V3.2). I've updated the FAQ now for WRFV4.1.3 code, which should make it easier for you to find the correct places to insert the mods. Try again and see if that helps at all. If you still have problems, we will have to dig a bit deeper.
https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=74&t=147&p=306#p306
 
Hi,

Thanks for your reply! I will try and inform you! However, the issue is that I want to add an upper level variable which has vertical levels, while your example is for adding surface variables. Do you still think that I should make changes at the specified parts of the code?

Kind regards,
Artur
 
Artur,
Yes, you're right. I apologize. I'm attaching wrf_timeseries_modified.F and Registry_modified.EM_COMMON files that should work to output timeseries of refl_10cm. You can compare these files to the one you modified to see the differences (some of which weren't mentioned on the FAQ - but I will work to update that again). Another note: the output variable refl_10cm is not actually output unless you are using mp_physics options 40, 50, 51, or 52. So while you may get a tslist output file for it, everything may be 0 unless you are using one of those schemes.
 

Attachments

  • Registry_modified.EM_COMMON
    385.5 KB · Views: 71
  • wrf_timeseries_modified.F
    35.4 KB · Views: 76
Hi!

Thanks a lot for the modified scripts! I have not tried those, yet.
However, I want to ask clarifications about your note regarding the radar reflectivity with other microphysical options. In my simulations with the mp_physics options 18, 22 the output variable refl_10cm and REFD_MAX are available in the wrf out files when I use nwp_diagnostics = 1 and do_radar_ref=1. What do you mean by not actually output? I should not use those?

Kind regards,
Artur
 
Hi Artur,
Oops, I forgot that you were using the options output diagnostics option, with do_radar_ref - although the documentation says that the do_radar_ref option only currently works with mp_physics = 2,4,6,7,8,10,14,16,28. If you are able to get it with options 18 and 22, and the values look reasonable, then perhaps the documentation just needs to be updated (this code is contributed to us from an outside source). You can test to see.
 
Hi,

Thanks for your reply! Yes, the values of radar reflectivity look reasonable.
Now, I also need simulated equivalent radar reflectivity (https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=40&t=8914). I would much appreciate If you have helpful suggestions on that.

Kind regards,
Artur
 
Hi,

I just want to inform you that I have successfully added both needed 2D and 3D variables using your updated post https://forum.mmm.ucar.edu/phpBB3/viewtopic.php?f=74&t=147

My next question is:

Is it possible to control (modify) the start and end times of tslist output? I am usually not interested in the first 9-12 h simulation results due to spin-up issue.

Kind regards,
Artur
 
Hi Artur,
I apologize for the delay in response to this. Things have been crazy around here lately and we are trying to figure out our schedules working from home, so haven't been able to address all the forum posts.

There is no option to set that at this time, but just looking at the code, it seems like this section of the wrf_timeseries.F file may be able to be manipulated to set the output time it how you'd like:

Code:
! Determine simulation start time
      ierr = 0
      CALL nl_get_simulation_start_year   ( 1 , simulation_start_year   )
      CALL nl_get_simulation_start_month  ( 1 , simulation_start_month  )
      CALL nl_get_simulation_start_day    ( 1 , simulation_start_day    )
      CALL nl_get_simulation_start_hour   ( 1 , simulation_start_hour   )
      CALL nl_get_simulation_start_minute ( 1 , simulation_start_minute )
      CALL nl_get_simulation_start_second ( 1 , simulation_start_second )
      WRITE ( simulation_start_date , FMT = '(I4.4,"-",I2.2,"-",I2.2,"_",I2.2,":",I2.2,":",I2.2)' ) &
              simulation_start_year,simulation_start_month,simulation_start_day,simulation_start_hour, &
              simulation_start_minute,simulation_start_second
!     WRITE(message,*)'wrf_timeseries: SIMULATION_START_DATE = ',simulation_start_date(1:19)
!     CALL wrf_debug ( 0, TRIM( message ) )
 
Hi,

I tried to add the following variables in the tslist output: QNCCN, QNDROP,QNRAIN, QNICE,QNSNOW,QNGRAUPEL,QNHAIL,QVGRAUPEL, QVHAIL and LWP. The log file says that "This is not a field name that is defined in the encompassing structure" for all upper-level cloud variables, while it seems it does not recognize the LWP (cloud liquid water path) variable at all. Please find attached my modified Registry.EM_COMMON, wrf_timeseries.F and log.compile files.
Does it mean that the above mentioned variables cannot be added in the tslist output?

Best regards,
Artur
 

Attachments

  • log.compile
    1.1 MB · Views: 55
  • wrf_timeseries.F
    51.9 KB · Views: 71
  • Registry.EM_COMMON
    388.1 KB · Views: 69
Artur,
I'm attaching a modified wrf_timeseries.F file. Note the differences between your file and mine. All of the variables you were receiving errors for are scalars, and therefore needed to be coded a bit differently. For example, for "QNCCN," you'll notice in the Registry, it's print-out name is QNCCN, but the variable used in the code is 'qnn.' And the structure should be like:
Code:
grid%ts_qnccn_profile(n,i,k) = moist(ix,k,iy,p_qnn)
I modified all of those, plus fixed a small syntax error later in the code (just missing a comma). It now builds for me. Hopefully this works for you too!
 

Attachments

  • wrf_timeseries.F
    51.9 KB · Views: 67
Hi,

Thanks for your help! It works.
Now, I worked on the modification of the wrf_timeseries.F code for the latest WRF V4.2. Please, find attached the modified wrf_timeseries.F and Registry.EM_COMMON files. It works fine when I am not using the solar_diagnostics = 1 option. However, I am very interested in the Solar forecasting diagnostics as well and when I turn on the solar_diagnostics = 1 option the vertical profile files are written incorrectly. For example the "PR" file (pressure) I have 0 values, the first level in the "PH" file is negative, the vertical velocities are negative in the "WW" file. The files are attached.

I have one more issue. I want to add also the vertical profile for the RIMI variable:
state real rimi ikj misc 1 - irh "RIMI" "riming intensity" "fraction"
I changed the Registry.EM_COMMON and wrf_timeseries.F files.
However, during the compilation of the WRF the following error is shown:

wrf_timeseries.f90:428:69:

grid%ts_rimi_profile(n,i,k) = grid%moist(ix,k,iy,p_rimi)
1
Error: Symbol ‘p_rimi’ at (1) has no IMPLICIT type


The log.compile file is also attached.

Kind regards,
Artur
 

Attachments

  • Zvart.d02.PH.txt
    140.9 KB · Views: 20
  • Zvart.d02.PR.txt
    140.9 KB · Views: 27
  • Zvart.d02.WW.txt
    140.9 KB · Views: 61
  • Registry.EM_COMMON.txt
    396.1 KB · Views: 60
  • wrf_timeseries.F
    63.4 KB · Views: 60
  • log.compile.txt
    1.2 MB · Views: 54
If you stay with the official WRFV4.2, and don't do any modification, but turn on solar_diagnostgics and tslist option, can you get correct results?
 
Hi,

I tried with the default version of the WRF 4.2 and the same issues appear when I use solar_diagnostgics and tslist option, i.e. 0 pressure values in the "PR". It seems there is a bug. However, now the first level in the "PH" file is written correctly, I can't understand why. Again, the the files are written correctly when the solar_diagnostgics option is turned off.

How can I add the water vapor path, liquid water path, ice water path, snow water path, total water path (liquid + ice + snow), liquid cloud effective radius, ice effective radius, snow effective radius, liquid cloud, cloud base height, and cloud top height variables without activating the solar_diagnostgics option?

I would appreciate your help in adding the rimi variable ("riming intensity" "fraction") as well.

Kind regards,
Artur
 
Arthur,
I run a test case using the official version of WRFv4.2. solar_diagnostics is turned on. All variables including PR, PH etc. are correctly output. I am perplexed why your unmodified WRFV4,2 cannot give you correct results?
Please double check.
 
Hi,

Please find attached the files including my namelist, tslits, the time-series output files for the first station (location). You can also find the configure and log.compile files for the WRF v4.2 default installation. I also attached the wrfinput_d01 and wrfbdy_d01 files in the case you want to rerun the WRF with my namelist file.
Please also find attached the run.log file from the WRF run.

Kind regards,
Artur
 

Attachments

  • tslist.tar.gz
    90.2 MB · Views: 29
  • run.txt.log
    14.7 KB · Views: 12
Top