I have a question about the Noah LSM model. It would be great if someone could provide some input to help resolve these bugs.
I am running soil moisture sensitivity experiments on WRF. I first inserted code (below highlighted in bold) in module_sf_noahdrv.F to maintain constant soil moisture during integration for the land region (25-40°N, 125-100°W), then recompiled and built the WRF code.
The model runs real.exe successfully to generate initial and boundary conditions, but it is quite slow, taking ~30 minutes per loop (usually about 3 seconds without the modified code). However, when I run wrf.exe, the model crashes on the first time step with errors related to tiles and memory. Normally, when running standard WRF, 1D-Y tiling works fine.
Please see the changed codes & logs below.
1.Inserted codes (blue colored) within SUBROUTINE lsm in module_sf_noahdrv.F
------------------------------------------------------------------------------------------------------------
1292 SMOIS(I,NS,J)=SMC(NS)
1293 TSLB(I,NS,J)=STC(NS) ! STEMP
1294 SH2O(I,NS,J)=SWC(NS)
1295 80 CONTINUE
1296 ! ENDIF
1297
1298 ! User override: enforce constant soil moisture in specified lat-lon box over land
1299 IF ( PRESENT(XLAT) .AND. PRESENT(XLONG) ) THEN
1300 IF ( XLAND(I,J) .LT. 1.5 ) THEN
1301 IF ( (XLAT(I,J) .GE. 25.0) .AND. (XLAT(I,J) .LE. 40.0) ) THEN
1302 IF ( ((XLONG(I,J) .GE. -125.0) .AND. (XLONG(I,J) .LE. -100.0)) .OR. &
1303 ((XLONG(I,J) .GE. 235.0) .AND. (XLONG(I,J) .LE. 260.0)) ) THEN
1304 DO NS=1,NSOIL
1305 SMC(NS) = 0.10
1306 SWC(NS) = 0.10
1307 SMOIS(I,NS,J) = 0.10
1308 SH2O(I,NS,J) = 0.10
1309 ENDDO
1310 SOILM = 0.0
1311 DO NS=1,NSOIL
1312 SOILM = SOILM + SMC(NS)*SLDPTH(NS)
1313 SMAV(NS) = MAX( 0.0, MIN( 1.0, (SMC(NS)-SMCWLT) / MAX(1.0E-6, (SMCMAX-SMCWLT)) ) )
1314 ENDDO
1315 IF (NROOT .GT. 0) THEN
1316 SOILW = 0.0
1317 DO NS=1,NROOT
1318 SOILW = SOILW + SMAV(NS)
1319 ENDDO
1320 SOILW = SOILW / REAL(NROOT)
1321 ENDIF
1322 ENDIF
1323 ENDIF
1324 ENDIF
1325 ENDIF
1326
1327 FLX4_2D(I,J) = FLX4
1328 FVB_2D(I,J) = FVB
1329 FBUR_2D(I,J) = FBUR
1330 FGSN_2D(I,J) = FGSN
1331
------------------------------------------------------------------------------------------------------------------------------------
2. rsl.log in the real.exe
------------------------------------------------------------------------------------------------------------------------------
150
151 Domain 1: Current date being processed: 2007-06-26_06:00:00.0000, which is loop # 2 out of 5
152 configflags%julyr, %julday, %gmt: 2007 177 6.00000000
153 Yes, this special data is acceptable to use: OUTPUT FROM METGRID V4.6.0
154 Input data is acceptable to use: met_em.d01.2007-06-26_06:00:00.nc
155 metgrid input_wrf.F first_date_input = 2007-06-26_06:00:00
156 metgrid input_wrf.F first_date_nml = 2007-06-26_00:00:00
157 Timing for input 175 s.
158 flag_soil_layers read from met_em file is 1
159 Using sfcprs2 to compute psfc
160 No average surface temperature for use with inland lakes
161 Assume Noah LSM input
162 Timing for processing 1129 s.
163 LBC valid between these times 2007-06-26_00:00:00 and 2007-06-26_06:00:00
164 Timing for output 341 s.
165 Timing for loop # 2 = 1645 s.
166
-----------------------------------------------------------------------------------------------------------
2. rsl.log in the wrf.exe
-----------------------------------------------------------------------------------------------------------------------------
54 Tile Strategy is not specified. Assuming 1D-Y
55 Total number of tiles is too big for 1D-Y tiling. Going 2D. New tiling is 16x 17
56 WRF TILE 1 IS 467 IE 469 JS 254 JE 254
57 WRF TILE 2 IS 470 IE 471 JS 254 JE 254
...
328 WRF NUMBER OF TILES = 272
329
330 Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
331
332 Backtrace for this error:
333
334 Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
335
336 Backtrace for this error:
337 #0 0x7fb5a0a65171 in ???
338 #1 0x7fb5a0a64313 in ???
339 #2 0x7fb59f275b4f in ???
340 #3 0x7fb59f2bf9f4 in ???
341 #4 0x1ed4b50 in ???
342 #5 0x1295771 in ???
343 #6 0x7fb59fa604bd in ???
344 #7 0x7fb59fc851c9 in ???
345 #8 0x7fb59f260e72 in ???
346 #9 0xffffffffffffffff in ???
----------------------------------------------------------------------------------------------------------------------------------------
I am running soil moisture sensitivity experiments on WRF. I first inserted code (below highlighted in bold) in module_sf_noahdrv.F to maintain constant soil moisture during integration for the land region (25-40°N, 125-100°W), then recompiled and built the WRF code.
The model runs real.exe successfully to generate initial and boundary conditions, but it is quite slow, taking ~30 minutes per loop (usually about 3 seconds without the modified code). However, when I run wrf.exe, the model crashes on the first time step with errors related to tiles and memory. Normally, when running standard WRF, 1D-Y tiling works fine.
Please see the changed codes & logs below.
1.Inserted codes (blue colored) within SUBROUTINE lsm in module_sf_noahdrv.F
------------------------------------------------------------------------------------------------------------
1292 SMOIS(I,NS,J)=SMC(NS)
1293 TSLB(I,NS,J)=STC(NS) ! STEMP
1294 SH2O(I,NS,J)=SWC(NS)
1295 80 CONTINUE
1296 ! ENDIF
1297
1298 ! User override: enforce constant soil moisture in specified lat-lon box over land
1299 IF ( PRESENT(XLAT) .AND. PRESENT(XLONG) ) THEN
1300 IF ( XLAND(I,J) .LT. 1.5 ) THEN
1301 IF ( (XLAT(I,J) .GE. 25.0) .AND. (XLAT(I,J) .LE. 40.0) ) THEN
1302 IF ( ((XLONG(I,J) .GE. -125.0) .AND. (XLONG(I,J) .LE. -100.0)) .OR. &
1303 ((XLONG(I,J) .GE. 235.0) .AND. (XLONG(I,J) .LE. 260.0)) ) THEN
1304 DO NS=1,NSOIL
1305 SMC(NS) = 0.10
1306 SWC(NS) = 0.10
1307 SMOIS(I,NS,J) = 0.10
1308 SH2O(I,NS,J) = 0.10
1309 ENDDO
1310 SOILM = 0.0
1311 DO NS=1,NSOIL
1312 SOILM = SOILM + SMC(NS)*SLDPTH(NS)
1313 SMAV(NS) = MAX( 0.0, MIN( 1.0, (SMC(NS)-SMCWLT) / MAX(1.0E-6, (SMCMAX-SMCWLT)) ) )
1314 ENDDO
1315 IF (NROOT .GT. 0) THEN
1316 SOILW = 0.0
1317 DO NS=1,NROOT
1318 SOILW = SOILW + SMAV(NS)
1319 ENDDO
1320 SOILW = SOILW / REAL(NROOT)
1321 ENDIF
1322 ENDIF
1323 ENDIF
1324 ENDIF
1325 ENDIF
1326
1327 FLX4_2D(I,J) = FLX4
1328 FVB_2D(I,J) = FVB
1329 FBUR_2D(I,J) = FBUR
1330 FGSN_2D(I,J) = FGSN
1331
------------------------------------------------------------------------------------------------------------------------------------
2. rsl.log in the real.exe
------------------------------------------------------------------------------------------------------------------------------
150
151 Domain 1: Current date being processed: 2007-06-26_06:00:00.0000, which is loop # 2 out of 5
152 configflags%julyr, %julday, %gmt: 2007 177 6.00000000
153 Yes, this special data is acceptable to use: OUTPUT FROM METGRID V4.6.0
154 Input data is acceptable to use: met_em.d01.2007-06-26_06:00:00.nc
155 metgrid input_wrf.F first_date_input = 2007-06-26_06:00:00
156 metgrid input_wrf.F first_date_nml = 2007-06-26_00:00:00
157 Timing for input 175 s.
158 flag_soil_layers read from met_em file is 1
159 Using sfcprs2 to compute psfc
160 No average surface temperature for use with inland lakes
161 Assume Noah LSM input
162 Timing for processing 1129 s.
163 LBC valid between these times 2007-06-26_00:00:00 and 2007-06-26_06:00:00
164 Timing for output 341 s.
165 Timing for loop # 2 = 1645 s.
166
-----------------------------------------------------------------------------------------------------------
2. rsl.log in the wrf.exe
-----------------------------------------------------------------------------------------------------------------------------
54 Tile Strategy is not specified. Assuming 1D-Y
55 Total number of tiles is too big for 1D-Y tiling. Going 2D. New tiling is 16x 17
56 WRF TILE 1 IS 467 IE 469 JS 254 JE 254
57 WRF TILE 2 IS 470 IE 471 JS 254 JE 254
...
328 WRF NUMBER OF TILES = 272
329
330 Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
331
332 Backtrace for this error:
333
334 Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
335
336 Backtrace for this error:
337 #0 0x7fb5a0a65171 in ???
338 #1 0x7fb5a0a64313 in ???
339 #2 0x7fb59f275b4f in ???
340 #3 0x7fb59f2bf9f4 in ???
341 #4 0x1ed4b50 in ???
342 #5 0x1295771 in ???
343 #6 0x7fb59fa604bd in ???
344 #7 0x7fb59fc851c9 in ???
345 #8 0x7fb59f260e72 in ???
346 #9 0xffffffffffffffff in ???
----------------------------------------------------------------------------------------------------------------------------------------