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

Cannot open module file ‘urbanparamstype.mod’

Status
Not open for further replies.

Yuan Sun

Yuan Sun
Member
Hi all,

When I run ./case.build, there is an error:

/home/yuansun/Desktop/ForCodeTest/my_cesm_sandbox/components/clm/src/main/controlMod.F90:37:6:

37 | use UrbanParamsType , only: UrbanReadNML
| 1
Fatal Error: Cannot open module file ‘urbanparamstype.mod’ for reading at (1): No such file or directory
compilation terminated.

However, I have checked ''UrbanParamsType.F90' module whose module name is consistent with 'UrbanParamsType'.

If someone know what is wrong? Thank you.

Best,
Yuan
 

slevis

Moderator
Staff member
For future reference, while this is fresh in your mind, please write a few lines explaining how you solved it, if you don't mind.
 

Yuan Sun

Yuan Sun
Member
Sure.

I found that ’make’ drops ‘UrbanParamsType.F90’ because of a circular issue.

The lndlog had a sentence: ‘make: Circular controlMod.o <- urbanparamstype.mod dependency dropped.

Then I checked the ‘UrbanParamstype.F90’ and the module I wrote with the mistake of ‘use controlMod : NLFilename’. It caused the ‘cmake’ to automatically drop ‘UrbanParamstype.F90’ from compiling.

My solution is that: Instead of using 'NLFilename from ‘controlMod.F90’, I used ‘NLfilename_in' from ‘clm_varctl.F90’ to solve this circular issue.
 

Yuan Sun

Yuan Sun
Member
By the way, this error rose because I am modifying the code and writing the new module by myself. This error will not occur when running the default CTSM code.
 
Status
Not open for further replies.
Top