Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Failed to output var into iulog

CaliFornia

CF
New Member
I'm trying to output a variable (prc_coef) used in this code: E3SM/components/eam/src/physics/cam/micro_mg_utils.F90

I want to write(iulog,*) prc_coef so that the values of this variable can be checked in the log file. However, it seems impossible to add this new line into elemental subroutine kk2000_liq_autoconversion where it is calculated.

I have already added use cam_logfile, only: iulog at the beginning of micro_mg_utils.F90. But this will result in an error when building the model. Anyone have any ideas on this issue? Thank you.
 

peverley

Courtney Peverley
Moderator
Hello!

What is the build error you are getting when trying to write the variable?

Courtney
 

CaliFornia

CF
New Member
It seems like a syntax error. Info stored in the log file shows this at the end:

Target liblnd.a built in 1.313702 seconds
gmake[2]: Leaving directory '/global/cscratch1/sd/xx/E3SM/Jan152023.10Day.prc_coefANDatm_in_num_float.v2.F2010-CICE.ne30pg2_EC.cori-knl/build/cmake-bld'
[ 50%] Built target lnd
gmake[1]: Leaving directory '/global/cscratch1/sd/xx/E3SM/Jan152023.10Day.prc_coefANDatm_in_num_float.v2.F2010-CICE.ne30pg2_EC.cori-knl/build/cmake-bld'
gmake: *** [Makefile:94: all] Error 2
real 95.18
user 218.26
sys 219.92

My guess is that there is something special needed to be done before writing in an elementary subroutine? Cus I typed use cam_logfile, only:iulog at the beginning of this module code but used write (iulog,*) prc_coef under an elementary subroutine?
 

peverley

Courtney Peverley
Moderator
Thanks for the info.

From a CESM perspective, the "use" statement and the "write" statement pair you're using should work. Unfortunately, your problem may be specific to E3SM so I would suggest reaching out to someone in E3SM for help.

Courtney
 
Top