MPAS-Dev / MPAS-Model

Repository for MPAS models and shared framework releases.
239 stars 319 forks source link

Implemented the Noah-MP Land Surface Model #1161

Closed ldfowler58 closed 3 months ago

ldfowler58 commented 5 months ago

This PR adds the implementation of the Noah-MP land surface model (LSM):

mgduda commented 4 months ago

I think we may have discussed what to do about this before (apologies for my poor memory!), but we get a compilation error with recent GNU compilers:

RunoffSurfaceDynamicVicMod.F90:205:4:

  151 |                           goto 1003
      |                                   2
......
  205 | 1003                if ( DepthYTmp <= 0.0 ) DepthYTmp = 0.0
      |    1
Error: Legacy Extension: Label at (1) is not in the same block as the GOTO statement at (2)
RunoffSurfaceDynamicVicMod.F90:205:4:

  175 |                              goto 1003
      |                                      2
......
  205 | 1003                if ( DepthYTmp <= 0.0 ) DepthYTmp = 0.0
      |    1
Error: Legacy Extension: Label at (1) is not in the same block as the GOTO statement at (2)

Should we try to fix this locally (since we have a copy of the Noah-MP code) and separately feed a fix upstream to the Noah-MP repository?

ldfowler58 commented 4 months ago

I modified RunoffSurfaceDynamicVicMod.F90 so that the file can be compiled with gcc/12.2.0. I am not entirely sure if the modified file breaks the logic of the sourcecode or not.

ldfowler58 commented 4 months ago

modified sourcecode accordingly.

ldfowler58 commented 4 months ago

I rewinded the sourcecode to get back to the original sourcecode for RunoffSurfaceDynamicVicMod.F90. Also removed print statements that are printed to the logfiles during the initialization of Noah-MP. As we talked about, Michael will modify the flags used to compile Noah-MP so that we can run MPAS-Model with the latest versions of the gnu compiler with optimization.

ldfowler58 commented 3 months ago

Thanks for your help.