Skip navigation
NASA Logo, National Aeronautics and Space Administration
Modeling Guru Banner
100 Views 8 Replies Latest reply: Apr 22, 2021 1:43 PM by Brendan McAndrew RSS
Currently Being Moderated

Apr 20, 2021 2:00 PM

LIS unable to read from MERRA2 directory

Hi,

I am trying to using MERRA2 as a secondary forcing for a NoahMP3.6 run but LIS is unable to read into the MERRA2 directory and gives the error "MERRA2 forcing directory: not defined Stopping'. However, I have specified the location as per the config file available at https://github.com/NASA-LIS/LISF/blob/master/lis/testcases/metforcing/merra2/lis .config.

 

I am attaching my lis config file and log file for reference and the output from "$ls -l /home/civil/phd/cez198621/scratch/MET_FORCING/MERRA2/" looks like this :

 

ls -l /home/civil/phd/cez198621/scratch/MET_FORCING/MERRA2/

total 310744940

-rw-r--r-- 1 cez198621 cez19 419045561 May 15  2019 MERRA2_100.tavg1_2d_slv_Nx.19800101.nc4

-rw-r--r-- 1 cez198621 cez19 417934989 May 15  2019 MERRA2_100.tavg1_2d_slv_Nx.19800102.nc4

-rw-r--r-- 1 cez198621 cez19 417559084 May 15  2019 MERRA2_100.tavg1_2d_slv_Nx.19800103.nc4

-rw-r--r-- 1 cez198621 cez19 417167610 May 15  2019 MERRA2_100.tavg1_2d_slv_Nx.19800104.nc4

 

 

 

Please help me rectify the issue.

 

Thank you

 

Bhanu

Attachments:
  • Currently Being Moderated
    Apr 20, 2021 2:40 PM (in response to Bhanu Magotra)
    Re: LIS unable to read from MERRA2 directory

    Hi Bhanu,

     

    That error message indicates that LIS could not find the configuration option "MERRA2 forcing directory:" in your lis.config file, either because it is missing or misspelled. I just checked your lis.config file and that option, along with others required for MERRA2 forcing, is not present.

     

    See the MERRA2 Forcing section of the LIS Users Guide for the full list of MERRA2 forcing options: https://github.com/NASA-LIS/LISF/blob/master/lis/configs/lis.config.adoc#merra2

     

    The example config file you linked also has these settings beginning on line 161: https://github.com/NASA-LIS/LISF/blob/master/lis/testcases/metforcing/merra2/lis .config#L161

     

    Good luck!

     

    Brendan

      • Currently Being Moderated
        Apr 20, 2021 3:50 PM (in response to Bhanu Magotra)
        Re: LIS unable to read from MERRA2 directory

        Hi Bhanu,

         

        My apologies. I used control+F to search your config file and had case-sensitive search enabled so it missed the other entries. I see now that you have the correct entries. Still, this error message indicates LIS did not find the "MERRA2 forcing directory:" entry in your lis.config file for some reason. I do not see anything obvious so I am going to try running LIS with your config on my side to see if I can replicate the error. Please stand by.

         

        Brendan

        • Currently Being Moderated
          Apr 20, 2021 4:08 PM (in response to Brendan McAndrew)
          Re: LIS unable to read from MERRA2 directory

          Brendan,

           

          If you are able to replicate the error, it may be because the code is looking for more than one column of the MERRA2 forcing directory.  If you put in the same path twice for the entry - does the error message go away?

           

          MERRA2forcing directory:  path_to_data   path_to_data

           

          It may be that the second forcing metforcing source is being treated as a second "nest" in some parts of the code:

           

            call ESMF_ConfigFindLabel(LIS_config,"MERRA2 forcing directory:",rc=rc)

            do n=1,LIS_rc%nnest

               call ESMF_ConfigGetAttribute(LIS_config,merra2_struc(n)%merra2dir,&

                    rc=rc)

               call LIS_verify(rc,&

                    'MERRA2 forcing directory: not defined')

            enddo

           

          NLDAS has the "LIS_verify" outside the "do n" loop:

           

            call ESMF_ConfigFindLabel(LIS_config,"NLDAS2 forcing directory:",rc=rc)

            call LIS_verify(rc, 'NLDAS2 forcing directory: not defined')

            do n=1,LIS_rc%nnest   

               call ESMF_ConfigGetAttribute(LIS_config,nldas2_struc(n)%nldas2dir,rc=rc)

            enddo

           

          Just a suggestion - I may be wrong.

           

          David

          • Currently Being Moderated
            Apr 20, 2021 5:04 PM (in response to David Mocko)
            Re: LIS unable to read from MERRA2 directory

            David,

             

            Thanks for sharing this suggestion. Since I don't have Bhanu's parameter file and LDT-generated forcings I tried running the MERRA2 testcase from our suite, adding NLDAS2 as the primary forcing to simulate his use of two forcing sources. I left the MERRA2-specific entries as is (i.e., the path and settings are listed just once). The test run proceeds past the point where Bhanu's run failed and begins to read both forcing sets so it does not appear that the second forcing is being treated as a second "nest" in this instance. I also pulled it up in TotalView and can confirm that LIS_rc%nnest is set to 1.

             

            Brendan

              • Currently Being Moderated
                Apr 21, 2021 9:37 AM (in response to Bhanu Magotra)
                Re: LIS unable to read from MERRA2 directory

                Hi Bhanu,

                 

                I'm glad you were able to continue your run. Thank you for sharing this information with us. I was able to replicate this issue on our side as well and will look into it.

                 

                Brendan

                • Currently Being Moderated
                  Apr 22, 2021 1:43 PM (in response to Brendan McAndrew)
                  Re: LIS unable to read from MERRA2 directory

                  Update: I identified the source of this issue and it turns out that the use of an absolute path was not the problem. The pre-mature exit is due to the length of the path.

                   

                  The problem originates in merra2_forcingMod.F90 where the merra2dir variable in the merra2_struc is initialized with a length of just 40 characters. Absolute paths tend to be longer as it was in your case Bhanu where the forcing path was 54 characters. Then, in readcrd_merra2.F90, when the ESMF_ConfigGetAttribute call reads the path into merra2_struc%merra2dir it returns a return code value of 8, indicating that this operation was unsuccessful (because the path is truncated?). The subsequent call to LIS_verify then causes the exit due to the non-zero return code value.

                   

                  David, I think you were onto something with your suggestion re: the location of the call to LIS_verify. I think the LIS_verify(rc, 'MERRA2 forcing directory: not defined') call should be moved out of the nest loop to follow the ESMF_ConfigFindLabel call so that the error message more accurately indicates that the entry is missing. Another LIS_verify should probably follow the call to ESMF_ConfigGetAttribute call within the nest loop to verify that the attribute is actually read properly.

                   

                  I will take a look at the other metforcing readers to look for other instances of this to fix. I will also update the pull request that expands the LIS filename char length in LIS metforcing readers to expand the directory character length as well.

                   

                  Thanks for bringing this issue to our attention Bhanu!

                   

                  Best,

                  Brendan

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points
USAGov logo NASA Logo - nasa.gov