Replies: 6 comments 11 replies
-
Hi @jyoo8 Quick question - did you add the proper lines in your lis/make/default.cfg file to add this subLSM? |
Beta Was this translation helpful? Give feedback.
-
That "enabled" should be set to "True" - or your LISF/lis/make/user.cfg has to have a line: |
Beta Was this translation helpful? Give feedback.
-
I assume that you ran "gmake realclean" in your LISF/lis/make directory, and then re-compiled? |
Beta Was this translation helpful? Give feedback.
-
Where is your working directory on discover? I will take a closer look. |
Beta Was this translation helpful? Give feedback.
-
Hello @jyoo8, The code that you gave me was missing the [Urban] section in the make/default.cfg file. I added it. Note that you may have a typo. You specified
but the path is
Uppercase U vs lower case u. I corrected the default.cfg file. I get this error:
You are calling noahmp_urban with too many variables. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have prepared Urban Canopy Model as a subLSM for NoahMP.4.0.1 as Crocus model and Snowmodel in the LIS.
I think I have set up everything for the coupling but I am getting a Segmentation fault error as soon as I execute the LIS retrospective run.
It seems that the error occurs when the LIS runs through LIS_sublsm_FTable.c file.
Specifically, at the function of void FTN(sublsminit)(char *j,int *kk, int len).
The section of the code in the LIS_sublsm_FTable.c file looks as below:
//BOP
// !ROUTINE: sublsminit
// \label{sublsminit}
//
// !INTERFACE:
void FTN(sublsminit)(char *j,int *kk, int len)
//
//
// !DESCRIPTION:
// Invokes the routine from the registry to perform
// land surface model initialization
//
// \begin{description}
// \item[j]
// name of the SUBLSM
// \item[kk]
// index of the SUBLSM
// \end{description}
//EOP
{
struct sublsminitnode* current;
int found ;
current = sublsminit_table;
while(strcmp(current->name,j)!=0){
current = current->next;
}
current->func(kk);
}
I noticed that "current" in my case is "null" even after the line "current = sublsminit_table;" and the LIS crashed even before going into the while(strcmp(current->name,j)!=0){} section.
I think this is related with pnode in the void FTN(registersublsminit)(char *j, void (func)(int),int len) but my LIS retrospective run didn't go through the void FTN(registersublsminit)(char *j, void (func)(int),int len) section.
Also, I do have LIS_sublsm_pluginMod.F90 for Urban (Canopy Model) under plugins directory as below:
#if ( defined SM_Urban )
call registersublsminit(trim(LIS_UrbanId)//char(0),Urban_ini)
call registersublsmsetup(trim(LIS_UrbanId)//char(0),Urban_setup)
call registersublsmf2t(trim(LIS_UrbanId)//"+"//&
trim(LIS_retroId)//char(0),Urban_f2t)
call registersublsmf2t(trim(LIS_UrbanId)//"+"//&
trim(LIS_agrmetrunId)//char(0),Urban_f2t)
call registersublsmrun(trim(LIS_UrbanId)//char(0),Urban_main)
call registersublsmrestart(trim(LIS_UrbanId)//char(0),Urban_readrst)
call registersublsmdynsetup(trim(LIS_UrbanId)//char(0),Urban_dynsetup)
call registersublsmwrst(trim(LIS_UrbanId)//char(0),Urban_writerst)
call registersublsmfinalize(trim(LIS_UrbanId)//char(0),Urban_finalize)
!wirings between NoahMP and URBAN
call registersublsmsetLSMimport(trim(LIS_UrbanId)//char(0),&
Urban_setLSMimport)
#if ( defined SM_NOAHMP_4_0_1 )
call registerlsm2sublsmgetexport(trim(LIS_noahmp401Id)//"+"//&
trim(LIS_UrbanId)//char(0),NoahMP401_getURBANexport)
call registerlsmsetsublsmimport(trim(LIS_noahmp401Id)//char(0),&
NoahMP401_setURBANimport)
call registersublsm2lsmgetexport(trim(LIS_noahmp401Id)//"+"//&
trim(LIS_UrbanId)//char(0),Urban_getLSMexport)
#endif
#endif
Any help and comment will be highly appreciated.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions