Skip navigation
NASA Logo, National Aeronautics and Space Administration
Modeling Guru Banner
54 Views 4 Replies Latest reply: Apr 4, 2021 12:24 PM by Bhanu Magotra RSS
Currently Being Moderated

Apr 1, 2021 2:06 AM

Segmentation Fault Error in LIS

Hi,

 

I am facing "forrtl: severe (174): SIGSEGV, segmentation fault occurred"  while trying to run a LIS simulation using "genMetforc" plugin and a custom forcing which resembles LDT generated forcing. I am attaching the lislog as well as the error I am getting.

 

I do not face any error while using "Princetonv2.2" or "NLDAS" forcings.

 

Kindly help regarding possible solution.

Attachments:
  • Currently Being Moderated
    Apr 1, 2021 5:03 PM (in response to Bhanu Magotra)
    Re: Segmentation Fault Error in LIS

    Hi Bhanu,

     

    Thanks for attaching the lislog and the error message.  The error message indicates the crash occurs about line 95 in NoahMP36_f2t.F90, which is the end of this block of code:

     

    ------

        !!! GET FORCING FIELDS FROM LIS

        ! get near surface air temperature

        call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Tair%varname(1)), tmpField, rc=status)

        call LIS_verify(status, "NoahMP36_f2t: error getting Tair")

     

     

        call ESMF_FieldGet(tmpField, localDE = 0, farrayPtr = tmp, rc = status)

        call LIS_verify(status, "NoahMP36_f2t: error retrieving Tair")

    ------

     

    It's hard to diagnose what's going on without seeing your custom metforcing code to read in this dataset.  For starters, please share your lis.config file.  But would you feel comfortable sharing your code?

     

    It would be easiest if you could commit the code back into your branch.  Please follow the instructions on the "Working with Github" document, particular to includ Section 5 "Collaborating with others":

     

    https://github.com/NASA-LIS/LISF/blob/master/docs/working_with_github/working_wi th_github.adoc

     

    Without yet seeing the code, it appears the code is crashing because it is looking for the LIS_FORC_Tair forcing state, which should be set in your custom metforcing code.

     

    Another consideration is that line 95 is right BEFORE these lines of code:

     

    ------

        ! get near surface specific humidity

        call ESMF_StateGet(LIS_FORC_State(n), trim(LIS_FORC_Qair%varname(1)), q2Field, rc=status)

        call LIS_verify(status, "NoahMP36_f2t: error getting Qair")

     

     

        call ESMF_FieldGet(q2Field, localDE = 0, farrayPtr = q2, rc = status)

        call LIS_verify(status, "NoahMP36_f2t: error retrieving Qair")

    ------

     

    However, it appears that your custom metforcing does not read Qair.  So, LIS could be crashing trying to read a variable that is not available.

     

    [INFO] Allocating and Initializing Forcing Variables --

      ** LDT-generated variable being read in: Rainf_tavg

      ** LDT-generated variable being read in: LWdown_tavg

      ** LDT-generated variable being read in: SWdown_tavg

      ** LDT-generated variable being read in: Psurf_tavg

      ** LDT-generated variable being read in: Tair_tavg

    [INFO] Number of LDT-generated forcing fields:            5

     

    In your forcing_variables.txt file, you are asking for 7 forcing variables, as shown here:

     

    [INFO] Opening Forcing Variables list file

    ../NoahMP_InputFiles/forcing_variables.txt                                    

                         

    [INFO] FORCING: Near Surface Air Temperature           1 K        

    [INFO] FORCING: Incident Shortwave Radiation           1 W/m2     

    [INFO] FORCING: Incident Longwave Radiation           1 W/m2     

    [INFO] FORCING: Eastward Wind           1 m/s      

    [INFO] FORCING: Northward Wind           1 m/s      

    [INFO] FORCING: Surface Pressure           1 Pa       

    [INFO] FORCING: Rainfall Rate           1 kg/m2s   

     

    -----

     

    I hope this can get you started.  If not, please consider committing your code to your GitHub repository, and pointing us to it so we can examine the code.

     

    David

    • Currently Being Moderated
      Apr 1, 2021 6:32 PM (in response to David Mocko)
      Re: Segmentation Fault Error in LIS

      Hi Bhanu,

       

      Thanks to Brendan (we briefly chatted about this offline), who reminded me that you are using the LDT-generated forcing and thus the genMetForc metforcing plugin.  So, there's no need for you to commit your code and share it with us at this time, as this code is already in the repository.

       

      So, it seems likely that the code is crashing because you haven't generated Qair forcing with LDT.  However, Qair is required as a forcing variable for the Noah-MP-3.6 LSM.  Eastward Wind and Northward Wind are also required, but not available in your forcing.

       

      Are you able to generate these fields (Qair, east wind, and north wind) with your dataset(s), similar to the other fields that you have generated?

       

      If so, please do so, and try again.  If not, you may need to use the "overlay" method to use multiple forcing datasets.  Please see the LIS Users' Guide.  If you set to the order of the forcings correctly as indicated in the Users' Guide, LIS will take Tair, etc. from your LDT-generated forcing and then grab Qair and the winds from your secondary backup forcing.

       

      David

More Like This

  • Retrieving data ...

Bookmarked By (0)

USAGov logo NASA Logo - nasa.gov