Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Static, terrestrial field processing with 60-3km resolution

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

dashline

Member
I use the x20.835586.grid.nc to generate my SouthChina.grid.nc. And then I edit the namelist.init_atmosphere and streams.init_atmosphere, and run the init_atmosphere_model. The srcipt run nearly two hours and stop without a log.init_atmosphere.0000.err. Everthing in log.init_atmosphere.0000.out looks normal:
Code:
----------------------------------------------------------------------
Beginning MPAS-init_atmosphere Output Log File for task       0 of       1
    Opened at 2021/10/14 19:51:36
----------------------------------------------------------------------


 Using default single-precision reals

 Reading namelist from file namelist.init_atmosphere
 Reading streams configuration from file streams.init_atmosphere
 Found mesh stream with filename template SouthChina.grid.nc
 Using default io_type for mesh stream
  ** Attempting to bootstrap MPAS framework using stream: input
 Bootstrapping framework with mesh fields from input file 'SouthChina.grid.nc'
WARNING: Attribute file_id not found in SouthChina.grid.nc
WARNING:   Using '' for the previous file_id.
WARNING: Attribute parent_id not found in SouthChina.grid.nc
WARNING:   Setting parent_id to ''
WARNING: Attribute mesh_spec not found in SouthChina.grid.nc
WARNING:   Setting mesh_spec to '0.0'
  * Requested field lbc_scalars is deactivated due to packages, or is a scratch variable.
  * Requested field lbc_u is deactivated due to packages, or is a scratch variable.
  * Requested field lbc_w is deactivated due to packages, or is a scratch variable.
  * Requested field lbc_rho is deactivated due to packages, or is a scratch variable.
  * Requested field lbc_theta is deactivated due to packages, or is a scratch variable.

Parsing run-time I/O configuration from streams.init_atmosphere ...

 -----  found immutable stream "input" in streams.init_atmosphere  -----
         filename template:  SouthChina.grid.nc
         filename interval:  none
         direction:          input
         reference time:     initial_time
         record interval:    -
         input alarm:        initial_only

 -----  found immutable stream "output" in streams.init_atmosphere  -----
         filename template:  SouthChina.static.nc
         filename interval:  none
         direction:          output
         reference time:     initial_time
         record interval:    -
         output alarm:       initial_only
         package:            initial_conds
         
......

 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/greenfrac_fpar_modis/38401-39600.20401-21600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/greenfrac_fpar_modis/39601-40800.20401-21600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/greenfrac_fpar_modis/40801-42000.20401-21600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/greenfrac_fpar_modis/42001-43200.20401-21600
 --- end interpolate GREENFRAC
 Using MODIS 0.05-deg data for climatological monthly albedo
    Dataset will be supersampled by a factor of 3
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/00001-01200.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/01201-02400.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/02401-03600.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/03601-04800.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/04801-06000.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/06001-07200.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/00001-01200.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/01201-02400.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/02401-03600.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/03601-04800.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/04801-06000.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/06001-07200.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/00001-01200.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/01201-02400.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/02401-03600.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/03601-04800.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/04801-06000.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/06001-07200.02401-03600
 --- end interpolate ALBEDO12M

 Computing GWDO static fields on the native MPAS mesh
It seems to stop accidentally, but I try twice and face same situation. My MPAS version is 7.1.
My slurm output is as follow:
Code:
The Script begin at 2021-10-14 19:51:35
forrtl: severe (41): insufficient virtual memory
Image              PC                Routine            Line        Source             
init_atmosphere_m  0000000001168E8E  Unknown               Unknown  Unknown
init_atmosphere_m  0000000001167926  Unknown               Unknown  Unknown
init_atmosphere_m  0000000001114242  Unknown               Unknown  Unknown
init_atmosphere_m  00000000010B971B  Unknown               Unknown  Unknown
init_atmosphere_m  00000000010F0573  Unknown               Unknown  Unknown
init_atmosphere_m  00000000009B33F6  mpas_init_atm_gwd         126  mpas_init_atm_gwd.F
init_atmosphere_m  00000000006456CD  init_atm_cases_mp         231  mpas_init_atm_cases.F
init_atmosphere_m  00000000006408B6  init_atm_core_mp_          84  mpas_init_atm_core.F
init_atmosphere_m  0000000000435A6A  mpas_subdriver_mp         347  mpas_subdriver.F
init_atmosphere_m  0000000000430591  MAIN__                     16  mpas.F
init_atmosphere_m  000000000043050C  Unknown               Unknown  Unknown
libc.so.6          0000003BD661ECDD  Unknown               Unknown  Unknown
init_atmosphere_m  0000000000430439  Unknown               Unknown  Unknown
yhrun: error: cn1599: task 0: Exited with exit code 41
 

Attachments

  • log.init_atmosphere.0000.out.txt
    642 KB · Views: 40
Your slurm output contains the message
Code:
forrtl: severe (41): insufficient virtual memory
From your log.init_atmosphere.0000.out file it looks like you may have config_nvertlevels and config_nfglevels set to their default values:
Code:
 Assigning remaining dimensions from definitions in Registry.xml ...
        THREE = 3
        FIFTEEN = 15
        TWENTYONE = 21
        R3 = 3
        nVertLevels = 55 (config_nvertlevels)
        nSoilLevels = 4 (config_nsoillevels)
        nFGLevels = 38 (config_nfglevels)
        nFGSoilLevels = 4 (config_nfgsoillevels)
        nVertLevelsP1 = 56
        nMonths = 12 (config_months)

As recommended in Section 7.2.1 of the MPAS-Atmosphere Model User's Guide, you can significantly reduce the memory that is allocated during the static interpolation step by setting
Code:
&dimensions
    config_nvertlevels = 1
    config_nsoillevels = 1
    config_nfglevels = 1
    config_nfgsoillevels = 1
/
in your namelist.init_atmosphere file. Could you try these namelist settings and see whether that prevents the "insufficient virtual memory" error?
 
I set dimension to be 1, but I get new error:
Code:
The Script begin at 2021-10-17 09:47:53
forrtl: severe (408): fort: (3): Subscript #2 of the array BOX has value 0 which is less than the lower bound of 1

Image              PC                Routine            Line        Source             
init_atmosphere_m  0000000001168E8E  Unknown               Unknown  Unknown
init_atmosphere_m  0000000001167926  Unknown               Unknown  Unknown
init_atmosphere_m  0000000001114242  Unknown               Unknown  Unknown
init_atmosphere_m  00000000010B971B  Unknown               Unknown  Unknown
init_atmosphere_m  00000000010B9C31  Unknown               Unknown  Unknown
init_atmosphere_m  00000000009CABA7  mpas_init_atm_gwd         897  mpas_init_atm_gwd.F
init_atmosphere_m  00000000009B8122  mpas_init_atm_gwd         270  mpas_init_atm_gwd.F
init_atmosphere_m  00000000006456CD  init_atm_cases_mp         231  mpas_init_atm_cases.F
init_atmosphere_m  00000000006408B6  init_atm_core_mp_          84  mpas_init_atm_core.F
init_atmosphere_m  0000000000435A6A  mpas_subdriver_mp         347  mpas_subdriver.F
init_atmosphere_m  0000000000430591  MAIN__                     16  mpas.F
init_atmosphere_m  000000000043050C  Unknown               Unknown  Unknown
libc.so.6          0000003BD661ECDD  Unknown               Unknown  Unknown
init_atmosphere_m  0000000000430439  Unknown               Unknown  Unknown
yhrun: error: cn1399: task 0: Exited with exit code 152
And I still don't get log.init_atmosphere.0000.err. According to user's guide 7.2.1, I set config_supersample_factor = 1.
The log.init_atmosphere.0000.out seems to stop in the same place:
Code:
 --- end interpolate GREENFRAC
 Using MODIS 0.05-deg data for climatological monthly albedo
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/00001-01200.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/01201-02400.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/02401-03600.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/03601-04800.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/04801-06000.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/06001-07200.00001-01200
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/00001-01200.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/01201-02400.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/02401-03600.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/03601-04800.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/04801-06000.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/06001-07200.01201-02400
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/00001-01200.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/01201-02400.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/02401-03600.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/03601-04800.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/04801-06000.02401-03600
 /vol6/home/tianxj/yhluo/mpas/mpas_tutorial/geog/albedo_modis/06001-07200.02401-03600
 --- end interpolate ALBEDO12M
 
 Computing GWDO static fields on the native MPAS mesh
 
 --- Using GMTED2010 terrain dataset for GWDO static fields
 

Attachments

  • log.init_atmosphere.0000.out (2).txt
    642 KB · Views: 38
This looks like a bug in the code to compute the "ol1" and "ol2" fields used by the GWDO scheme in MPAS-A.

I have a tentative fix for this issue in this commit in my fork of the MPAS-Model repository. If you're familiar with how to checkout branches from a git repository, could you give a try with this code change and see whether that resolves the issue for you?
 
Sorry, my HPC can not allow me to use git chechout. I change the src/core_init_atmosphere/mpas_init_atm_gwd.F in my directory on the basis of your commit.
Code:
    892       nw = 0
    893       nt = 0
    894    !LYH_bugfree
    895       do j=max(ny/4,1),max((3*ny)/4,1)
    896    !LYH_bugfree
    897          do i=1,nx
    898             if (box(i,j) > hc) nw = nw + 1
    899             nt = nt + 1
    900          end do
    901       end do
    ...
    926       nw = 0
    927       nt = 0
    928
    929       do j=1,ny
    930    !LYH_bugfree
    931          do i=max(nx/4,1),max((3*nx)/4,1)
    932    !LYH_bugfree
    933             if (box(i,j) > hc) nw = nw + 1
    934             nt = nt + 1
    935          end do
    936       end do
However, the error can not be resolved:
Code:
The Script begin at 2021-10-21 14:48:06
forrtl: severe (408): fort: (3): Subscript #2 of the array BOX has value 0 which is less than the lower bound of 1

Image              PC                Routine            Line        Source
init_atmosphere_m  0000000001168E8E  Unknown               Unknown  Unknown
init_atmosphere_m  0000000001167926  Unknown               Unknown  Unknown
init_atmosphere_m  0000000001114242  Unknown               Unknown  Unknown
init_atmosphere_m  00000000010B971B  Unknown               Unknown  Unknown
init_atmosphere_m  00000000010B9C31  Unknown               Unknown  Unknown
init_atmosphere_m  00000000009CABA7  mpas_init_atm_gwd         897  mpas_init_atm_gwd.F
init_atmosphere_m  00000000009B8122  mpas_init_atm_gwd         270  mpas_init_atm_gwd.F
init_atmosphere_m  00000000006456CD  init_atm_cases_mp         231  mpas_init_atm_cases.F
init_atmosphere_m  00000000006408B6  init_atm_core_mp_          84  mpas_init_atm_core.F
init_atmosphere_m  0000000000435A6A  mpas_subdriver_mp         347  mpas_subdriver.F
init_atmosphere_m  0000000000430591  MAIN__                     16  mpas.F
init_atmosphere_m  000000000043050C  Unknown               Unknown  Unknown
libc.so.6          0000003BD661ECDD  Unknown               Unknown  Unknown
init_atmosphere_m  0000000000430439  Unknown               Unknown  Unknown
yhrun: error: cn1401: task 0: Exited with exit code 152
 
Just to confirm, you did recompile the code after making the source-code changes? Otherwise, your modifications look correct to me.
 
mgduda said:
Just to confirm, you did recompile the code after making the source-code changes? Otherwise, your modifications look correct to me.
I did forget to compile it. After I recompiling the code, I smoothly get my static.nc and init.nc without any error. However, I face a warning when I set the cong_use_spechumd = true. My data is from ERA5.
Code:
 --- config_use_spechumd = T
WARNING: config_use_spechumd=T, but specific humidity was not found in ERA5:2018-09-08_00
  *** initializing water vapor mixing ratio using first-guess relative humidity

 Recomputing RH w.r.t. ice below freezing
I indeed download the data with variable specic humidity. The png is the ERA5_pressure_levels data that I use.
 

Attachments

  • 屏幕截图 2021-10-22 202217.png
    屏幕截图 2021-10-22 202217.png
    23.2 KB · Views: 909
  • log.init_atmosphere.0000.out(3).txt
    224.6 KB · Views: 33
Can you check whether the SPECHUMD field is present in your intermediate file at all isobaric levels? You can do this with the rd_intermediate.exe utility program that is provided with the WPS.
 
mgduda said:
Can you check whether the SPECHUMD field is present in your intermediate file at all isobaric levels? You can do this with the rd_intermediate.exe utility program that is provided with the WPS.
I check my intermediate file with rd_intermediate.exe, and I can't find SPECHUMD field. However, I can find RH. I also try to download the era5 data only with Specific humidity but no Relative humidity. Using ungrid.exe to produce my intermediate file with this data, I still can't find neither Specific humidity nor Relative humidity with rd_intermediate.exe.
 
Since our discussion has changed from the original topic of this thread ("Static, terrestrial field processing with 60-3 km resolution"), I'd suggest starting a new topic in the ungrib section of the forum to discuss the issue in obtaining a SPECHUMD field in your intermediate files with the ungrib program.
 
Top