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 the new variables are transferred to the land surface model?

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.

youhuiqi7455

New member
Hello,wrf experts
I try to add new variables, such as rock, to the clm mode of wrf, and modify the corresponding parameterization scheme. At present I have added new variables to'geogrid' and modified the following files:
Registry.EM_COMMON
module_first_rk_step_part1.F
module_sf_clm.F
module_surface_driver.F
The recompilation was successful, but there was a problem with'wrf.exe', and the error message:'Segmentation fault-invalid memory reference.'
Display in rsl.out:'BalanceCheck: soil balance error nstep = 1 point = 2 imbalance =************ W/m2'
I want to know the possible causes of these problems.

In addition, I think I should modify more files. For example, I don't know how the newly added variables of'geogrid' are transferred to the land mode, but I also need to modify the corresponding files?
What I currently know is that'module_sf_clm.F' has variables such as'sand' and'clay', which are related to my new parameterization scheme, so I think I can use them to find out how to pass variables. But I did not find more useful parts with'sand' and'clay' in the related files, and they are not defined in'Registry.EM_COMMON', I wonder if they were transformed from'sandfrac' and'clayfrac'?

Thanks for any help!
 

Attachments

  • rsl.error.0000.txt
    2 KB · Views: 29
  • rsl.out.0000.txt
    206.4 KB · Views: 27
Hi,
This error looks more like a physical issue other than a data issue, although it could be indirectly linked to the data. This error is related to imbalance in soil energy budget.
Note that sand(19) and clay(19) etc are specified in CLM, indicating the percentage of sand and clay in each type of soil:
Code:
    real(r8) :: sand(19)                           ! percent sand
    real(r8) :: clay(19)                           ! percent clay
    integer  :: soic(19)

    integer, allocatable :: plant(:,:)
    real(r8),allocatable :: cover(:,:)


    data(sand(i), i=1,19)/92.,80.,66.,20.,5.,43.,60.,&
      10.,32.,51., 6.,22.,39.7,0.,100.,54.,17.,100.,92./

    data(clay(i), i=1,19)/ 3., 5.,10.,15.,5.,18.,27.,&
      33.,33.,41.,47.,58.,14.7,0., 0., 8.5,54.,  0., 3./

Sorry that I don't know the details of your data and cannot provide more concrete opinions, but probably you can refer to the above codes and somehow manage to make your 'rock' available in CLM?
 
hi,@Ming Chen
Yes, I noticed this code. At first I didn't understand its meaning, and this code does not exist in clm in other modes (such as regcm), so I didn't add'rock' here.
After reading your explanation, I think my data does not fit the format of these codes. My data is the volume percentage of 10 levels of'rock', not the percentage of soil type. How can I modify the code here for my data?
In fact, what I do is port the code verified in regcm to wrf. I found that the surface data in wrf is very different from regcm. For example, in regcm, variables such as'sand' are the content of each level, but in wrf, I did not even find these variables.

Another question is whether the definition of'rock' in'Registry.EM_COMMON' is correct.
Code:
state    real  rock   ikj   misc    1   Z   i4h    "rock"    "rock content"    "% of volume"
At <dims>, I saw many forms, such as igj and ikj. What is the difference between them?

I would be very grateful for any help!
 
Hi,
CLM has been evolving all the time. We know that different versions of CLM and its coupling with various models can be very different. Due to limited human power here in NCAR and multiple projects we have to take care simultaneously, unfortunately we cannot provide support for users to code and program schemes beyond the scope of WRF.
 
Ming Chen said:
Hi,
CLM has been evolving all the time. We know that different versions of CLM and its coupling with various models can be very different. Due to limited human power here in NCAR and multiple projects we have to take care simultaneously, unfortunately we cannot provide support for users to code and program schemes beyond the scope of WRF.
I understand, thank you for your patient reply.
I tried to modify my code step by step. I found that when I finished the definition of ‘rock’ in the registry, the ‘rock’ in wrfinput was blank. I wonder if I need to modify ‘moudue_initialize_real.f’ to get my data?
 
Top