Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Error when generating surface data - gridmap_check ERROR from mklakwat: mapping areas not conserved

tomasz

New Member
Hello everybody,

I ran into the following error when trying to generate surface data for a variable mesh:

Code:
Open lake file:
 /cluster/projects/nn1004k/inputdata/vr_setup/inputdata/lnd/clm2/rawdata/mksrf_LakePnDepth_3x3min_simyr2004_csplk_c151015.nc
(gridmap_map_read) reading mapping matrix data...
(gridmap_map_read) * file name                  : /cluster/home/tomaszoe/AMWG_DEMO_FEB22/AMWG_REPO//ne0np4.EUROPE.ne30x8/maps_clm//map_3x3min_nomask_to_ne0np4.EUROPE.ne30x8_nomask_aave_da_c220321.nc
 * matrix dimensions rows x cols :    25920000  x      146450
 * number of non-zero elements:     24764048
 gridmap_check ERROR from mklakwat: mapping areas not conserved
    global sum output field =     0.1513391991E+09
    global sum input  field =     0.1513334049E+09
abort:
ERROR in mksurfdata_map: 34304

This is the same error as described here: Some issues with creating surface datasets for the nldas2 grid... · Issue #1408 · ESCOMP/CTSM and here (see lines 4537 to 4545): https://github.com/ESCOMP/ctsm/blob/master/doc/ChangeLog

I though this might be a module problem but I have been unable to solve it. Could someone help me with this? I'm just posting this here since it seem to be an error other people have encountered in the past.

All the best,
Tómas.
 

tomasz

New Member
Turns out this is indeed a module problem.

I am using CESM2.3.alpha08 where the default driver is nuopc. Apparently, nuopc requires ESMF8.2.0 or later versions of that module to work. I rebuilt all the VRM_tools executables from scratch, making sure I was using ESMF8.2.0. Then I managed to generate the surface data files.

I also had to remove the line in the file genCLMsurfdata_*.sh where the mpi module is loaded since by loading it, the ESMF module was automatically downgraded. This might, however, be machine specific and only apply to my case.
 

Amardeep

Amar Deep Tiwari
New Member
Hi Tómas,
I also got a similar error while creating the surface data. However, there is a bigger difference in my output and input fields than yours. Can you please help me with this problem here?

Code:
Open lake file:
/glade/p/cesm/cseg/inputdata/lnd/clm2/rawdata/mksrf_LakePnDepth_3x3min_simyr2004_csplk_c151015.nc
(gridmap_map_read) reading mapping matrix data...
(gridmap_map_read) * file name                  : ../mkmapdata/map_3x3min_nomask_to_800x700_India_nomask_aave_da_c230803.nc
 * matrix dimensions rows x cols :    25920000  x      560000
 * number of non-zero elements:      2240000
 gridmap_check ERROR from mklakwat: mapping areas not conserved
    global sum output field =     0.9340920638E+07
    global sum input  field =     0.1513334049E+09
abort:
ERROR in mksurfdata_map: 34304

Thanks and Regards,
Amar
 

tomasz

New Member
Hi Amar,
I don't think I can help you very much. I think that the difference is large in your case might be because you are refining a larger area than I did in my example or applying greater refinement, i.e. you ncol is larger. Could that be?

As I said in my comment, the problem I had was module related. Problems with modules are in fact the main issues I have when creating a variable mesh, i.e. which modules to use, which versions etc. I guess you will have to figure out yourself which modules to use since it seems that modules and module bundles have different names on different machines. However, it can be useful to have the modules used on NCAR's computers as a reference (see for example this demo).

Additionally, I only managed to run CESM with variable resolution using CESM2.2.0, so that is something you might want to keep in mind.

All the best and good luck,
Tómas.
 

Amardeep

Amar Deep Tiwari
New Member
Hi Tómas,
Thank you for the reply. I fixed the problem by changing in 'CTSM/tools/mksurfdata_map/src/mkgridmapMod.F90' file at line 503 'if ( trim(mksrf_gridtype) == 'global' ) then' by replacing global to regional.

Code:
    if ( trim(mksrf_gridtype) == 'regional' ) then
       if ( abs(sum_area_o/sum_area_i-1.) > relerr ) then
          write (6,*) subname//' ERROR from '//trim(caller)//': mapping areas not conserved'
          write (6,'(a30,e20.10)') 'global sum output field = ',sum_area_o
          write (6,'(a30,e20.10)') 'global sum input  field = ',sum_area_i
          call abort()
       end if
    end if


Best,
Amar
 
Top