Main menu

Navigation

HOW TO add SST anomaly IN SLAB OCEAN MODEL(cesm1.0.6 E compset)

3 posts / 0 new
Last post
dajianzheng@...
HOW TO add SST anomaly IN SLAB OCEAN MODEL(cesm1.0.6 E compset)

Hi there,

The experiment I am trying to run is adding sst anomaly in some region (say tropical Pacific) and see its evolution and impact. As I know from this forum, I should modify code in docn_comp_mod.F90. But either somtp(:) or o2x%rAttr(kt,:) is 1D arrays. My question is how to read and convert 2D arrays containing sst in real map grid in to these kinds of 1D array.

   case('SOM')
      lsize = mct_avect_lsize(o2x)
      do n = 1,SDOCN%nstreams
         call shr_dmodel_translateAV(SDOCN%avs(n),avstrm,avifld,avofld,rearr)
      enddo
      if (firstcall) then
         do n = 1,lsize
            if (.not. read_restart) then
               somtp(n) = o2x%rAttr(kt,n) + TkFrz
            endif
            o2x%rAttr(kt,n) = somtp(n)
            o2x%rAttr(kq,n) = 0.0_r8
         enddo

Thanks,

Jian

dbailey

You should be able to access the lats and lons in 1D vectors as well. I would use these to add the anomaly for a particular region. Look at what is done for the mask.

Dave

dajianzheng@...

Hi Dave,

Thanks for your reply.  After browsing some code files, I found lon/lat could be accessed as following

    klon = mct_aVect_indexRA(ggrid%data,'lon')
    lon(:) = ggrid%data%rAttr(klon,:)

It took me some time to found this method. So I am wondering where could i find the detail structure of ggrid
and what attributes are associated with it.

When I print lon/lat, I see the interval is 1deg. But when I check the output nc file,
the data is on 320*384 grid. This also puzzles me.

Jian
Log in or register to post comments

Who's new

  • jwolff
  • tinna.gunnarsdo...
  • sarthak2235@...
  • eolivares@...
  • shubham.gandhi@...