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

Undefined Reference When Adding New State Variables (ZT, ZQ) for MYNN Scheme

Yxx

New member
Hello professor,

I find the following lines in Registry.EM_COMMON:
state real ZNT ij misc 1 - i3r "ZNT" "TIME-VARYING ROUGHNESS LENGTH" "m"
state real CK ij misc 1 - r "CK" "ENTHALPY EXCHANGE COEFF AT 10 m" ""
state real CKA ij misc 1 - r "CKA" "ENTHALPY EXCHANGE COEFF AT LOWEST MODEL LVL" ""
state real CD ij misc 1 - r "CD" "DRAG COEFF AT 10m" ""
state real CDA ij misc 1 - r "CDA" "DRAG COEFF AT LOWEST MODEL LVL" ""
state real UST ij misc 1 - rh "UST" "U* IN SIMILARITY THEORY" "m s-1"

I know these variables can be output with rh for MYNN PBL options.
However, variables(z_t,z_q) in module_sf_mynn.F are not exit in Registry.EM_COMMON.
I followed Question regarding boundary layer turbulent exchange coefficient and flux with PBL scheme and learned the mentioned ‘You may find this presentation useful for adding new variables to the code: https://www2.mmm.ucar.edu/wrf/users/tutorial/202001/gill_registry.pdf’. I think ‘Example 3: Add an Array’ is what I need to learn.
So firstly I add variables(ZT>>z_t,ZQ>>z_q) before CK like ZNT in Registry.EM_COMMON.The model can be compiled successfully and run normal with output ZT and ZQ.However, the values of z_t and z_q were not passed to ZT and ZQ.

state real ZT ij misc 1 - h "ZT" "TIME-VARYING Thermal Roughness Length" "m"
state real ZQ ij misc 1 - h "ZQ" "TIME-VARYING Moisture Roughness Length" "m"

Then I add ZT,ZQ,ZT_OUT,ZQ_OUT to pass values of z_t and z_q in module_sf_mynn.F. From line 132 to line 1160. Then clean and compile again. However,the model compile with the following message:
module_dm.f90:(.text+0x16dae7): undefined reference to `cd_feedback_mask_'
/usr/bin/ld: module_dm.f90:(.text+0x16dd94): undefined reference to `cd_feedback_mask_'
/usr/bin/ld: module_dm.f90:(.text+0x16e0c7): undefined reference to `cd_feedback_mask_'
/usr/bin/ld: module_dm.f90:(.text+0x16e36e): undefined reference to `cd_feedback_mask_'
/usr/bin/ld: module_dm.f90:(.text+0x16f877): undefined reference to `cd_feedback_mask_'
/usr/bin/ld: /home/yxx/model/Build_COAWST/src/COAWST/WRF/main/libwrflib.a(module_dm.o):module_dm.f90:(.text+0x172918): more undefined references to `cd_feedback_mask_' follow
/usr/bin/ld:


I'm confused about which step went wrong. Here are the files that I made changes to after the successful compilation.
 

Attachments

  • module_sf_mynn.F
    91.4 KB · Views: 0
I also find ZNT、cd、ck in module_first_rk_step_part1.F and module_surface_driver.F.Are these two F files necessary to be modified?
 
Top