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

slab ocean model problem with modified domain file - MOVED

I am using the SOM mode with the E compset and trying to do the following:I want to restore SSTs in certain regions to a fixed value while running the SOM model freely in other regions. To do this, I modified the 'mask' variable in the domain file (e.g. domain.ocn.gx3v7.090903.nc), by including additional integers (e.g. 2,3,4,5...) in certain regions. This way I can use the mask combined with logical expressions in the data ocean subroutine to access certain areas of the domain (The original file has only two integer values, 1 for ocean and 0 for land areas). However, I ran into a model crash that occurs if the mask variable in the domain file includes integers other than 1 and 0. The error message from the ccsm log file is attached below. Any tips what causes the problem in the domain_check_grid_mct routine with integers larger than 1? Thanks! CalcWorkPerBlock: Total blocks:    16 Ice blocks:    12 IceFree blocks:     4 Land blocks:     0MCT::m_Router::initp_: GSMap indices not increasing...Will correctMCT::m_Router::initp_: RGSMap indices not increasing...Will correctMCT::m_Router::initp_: RGSMap indices not increasing...Will correctMCT::m_Router::initp_: GSMap indices not increasing...Will correct (domain_check_grid_mct) ERROR: incompatible domain grid coordinates(domain_check_grid_mct) : incompatible domain grid coordinates009.MCT(MPEU)::die.: from (domain_check_grid_mct)() (domain_check_grid_mct) ERROR: incompatible domain grid coordinates(domain_check_grid_mct) : incompatible domain grid coordinates004.MCT(MPEU)::die.: from (domain_check_grid_mct)() (domain_check_grid_mct) ERROR: incompatible domain grid coordinates(domain_check_grid_mct) : incompatible domain grid coordinates007.MCT(MPEU)::die.: from (domain_check_grid_mct)() (domain_check_grid_mct) ERROR: incompatible domain grid coordinates EDITS:This should really go in the Data Models thread. I can't move just your comment though. Generally when users modify the CESM out-of-the-box configuration, we cannot support these configurations. However, what version of CESM are you using? I believe the 1.0 version had an issue with the gx3v7 grid domain. I would highly recommend using 1.1 or newer. Otherwise, try a domain file with a newer date on it.DaveREPLIES:- I moved the post to the correct section of the forum.- I am using CESM1.0.3, regrettably I am not able to use a newer version is this is the one installed on a large cluster I use. I don't have super user access there. - Is the domain file mask used somewhere else in the CESM code beside the data ocean model routine, so that I have to be careful with adding larger integers than 1 in the file? Otherwise it might be easiest to just bypass the part in the domain_check_grid_mct routine where it causes the crash.- Can you maybe point me to the latest gx3v7 domain file? Thanks!
 

dbailey

CSEG and Liaisons
Staff member
O.k. The better domain file is available through the input data repository at:https://svn-ccsm-inputdata.cgd.ucar.edu/trunk/inputdata/share/domains/domain.ocn.gx3v7.120406.ncDownload this from the repo and you can point your DOCN namelist variable 'domainfile' to it, wherever you put it on your system.Dave
 
As suggested, I tried using the newer gx3v7 domain file as a template, however I get exactly the same error message as described in my earlier post.The error occurs in the "drv/driver/seq_domain_mct.F90" subroutine in the following code section:
   ! Only check consistency where mask is greater than zero, if mask is present    max_diff = 0.0_R8   ndiff = 0   do n=1,npts      if (lmask(n) > eps_tiny) then         diff = abs(data1(n)-data2(n))         max_diff = max(max_diff,diff)         if (diff > eps) then!debug            write(logunit,*)'n= ',n,' data1= ',data1(n),' data2= ',data2(n),' diff= ',diff, ' eps= ',eps            ndiff = ndiff + 1         endif      end if   end do    call mpi_reduce(max_diff,tot_diff,1,MPI_REAL8,MPI_MAX,0,mpicom,ier)   if (iamroot) then      write(logunit,F02) " maximum           difference for ",trim(attr),tot_diff      write(logunit,F02) " maximum allowable difference for ",trim(attr),eps      call shr_sys_flush(logunit)   endif   call mpi_barrier(mpicom,ier)    if (ndiff > 0) then      write(logunit,*) trim(subname)," ERROR: incompatible domain grid coordinates"      call shr_sys_flush(logunit)      call mct_die(subName,"incompatible domain grid coordinates")   endif 
Any suggestions what would cause the problem, or even what the error message exactly means? Is this whole code section crucial for the model? Otherwise an if statement to rule out checks for integers larger than 1 might be a work-around.Thanks!
 

dbailey

CSEG and Liaisons
Staff member
Right, the CESM requires that the ocean and sea ice grids are identical. That also means that the land mask needs to be the same. Make sure you also point the CICE model to the same modified domain file.Dave
 
Dear dbailey, thanks for the help so far! It was a bit counter-intuitive that the ice and data ocean models read in different land masks. Regrettably the ice model namelist reads in a binary file, which is not very well documented and hence not possible to prescribe the same mask as in the data ocean model: &grid_nml grid_file              = '$DIN_LOC_ROOT/ocn/pop/gx3v7/grid/horiz_grid_20030806.ieeer8' grid_format            = 'bin' grid_type              = 'displaced_pole' kcatbound              =  0  kmt_file               = '$DIN_LOC_ROOT/ocn/pop/gx3v7/grid/topography_20100105.ieeei4' Are there any netcdf versions of these files available? I could not find any on the website, even though the namelist seems to allow a netcdf grid file:https://svn-ccsm-inputdata.cgd.ucar.edu/trunk/inputdata/ocn/pop/gx3v7/grid/ Is there a documentation of the variables that are read in this step? At which step is the "seq_domain_check_grid_mct" routine called in the data model ("doc_comp_mod")?  I would maybe easiest to read an additional mask variable from the domain file, e.g.      kmaskNEW = mct_aVect_indexRA(ggrid%data,'maskNEW')  which has been added to the domain file before:                             time time            xc   lon            yc   lat            area area            mask mask            maskNEW maskNEW           Or would this new variable also automatically go through the comparison in the "seq_domain_mct" subroutine?  Thank you very much in advance.    
 
A related question has to do with the data ocean build namelist script: There are 3 files that are read for the data ocean routine: set mod_domfile = domain.ocn.gx3v7.NEW.ncset dat_domfile = my_som_forcing.ncset dat_datfile = my_som_forcing.nc For the "dat_domfile" and "dat_datfile" it is possible to define the variables that are read in:             T     t            S     s            U     u            V     v            dhdx  dhdx            dhdy  dhdy            hblt  h            qdp   qbot AND             time time            xc   lon            yc   lat            area area            mask mask  However it is not the mask variable from the forcing file but instead from the domain file that is used in the data ocean subroutine (I did some mask changes tests to figure this out.). My problem is that there is not variable definition list for the domain file (mod_domfile) in the build script, where I could add an additional variable. Where are the variables for this file defined? Thanks! 
 

dbailey

CSEG and Liaisons
Staff member
Well, this is really beyond the level of modifications that we are able to support. You can always add variables to the data stream for DOCN, but this requires modifications to the code. The variables are listed in the docn.stream.txt file in Buildconf (for CESM1.0.4 which is what I believe you are using). In terms of the netcdf grid files, we do have code in the CICE model to read netcdf, but only for the CAM grids. For the POP grids we rely on these binary grid files as this is what the POP ocean model uses as well. Again, you are welcome to modify the CICE code, but this is unsupported. You could possibly try commenting out the domain check in the driver. However, inconsistencies between the DOCN-SOM and the CICE may cause the model to blow up.Dave
 
Hi Dave, I think to avoid all the mask trouble between the different model components (and track the errors through all the coupler subroutines), it seems to be easiest to add a new "mask variable" to the som forcing file instead of modifying the domain file mask. This way the only code changes required will be in the data ocean module and the date ocean namelist generating script I assume. 
 

paekh@uci_edu

New Member
Hi torbenmllr I also want to run CAM5+SOM (CESM1.2 compset E) with prescribed SST in some region and SOM in the other regions. Any suggestion modifying the code would be highly appreciated. 
 

ypeings@uci_edu

New Member
Hello,this topic is close to my concern so I ask my question here. I've downloaded a forcing file for running experiments with CAM5 and SOM (pop_frc.gx1v6.100513.nc). The mask variable into this file has integer values that are differents according to the oceanic region (2 for Pacific, 6 for Atlantic, ...). Is there a way to use this mask variable to activate SOM over some specific regions only ? Is there a key somewhere, or do we have to modify the source code ? Thank you in advance,Yannick
 
Top