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

how to prescribe SST with annual cycle in CESM pop2

wenq@pku_edu_cn

New Member
Hi,      I want to prescribe SST with annual cycle in CESM fully-coupled run with monthly output data, I know that the ocean temperature is stored in TRACER(:,:,k,1,curtime,iblock). I think I should modify the code in step_mod.F90, and I guess that the iblock refers to 'time' dimension. But how to determine the year and month from the 'iblock' . I want to write a  judgment statement to  pick out the month,So I can precribe the SST in this month.         thanks! 
 

njn01

Member
To address the simpler part of your question:
  • You are correct that ocean potential temperature is stored in TRACER(:,:,k,1,:,:).  
  • The full ocean domain is subdivided up into smaller blocks, and computations are done simultaneously or sequentially on each block.  The block index variable is usually defined in the code as "iblock" but sometimes as "bid" is used. See blocks.F90.
  • The ocean time information is set in the time-management module.  See time_management.F90. In particular, most ocean-model modules "use" time_management, and so they know about iyear, imonth, iday, etc.
It is more difficult to answer the main point of your question without knowing exactly what you mean by "prescribe SST".  Do you mean restoring? If so, you can use the mechanisms in forcing_pt_interior, which are controlled via namelist, and modify the code to deal with the surface potential temperature. Time-interpolation is supported in the forcing_pt_interior routine and is controlled by input namelist settings.If you mean something else, you might try asking your question again with more information about what exactly you want to do, and perhaps someone in the community who has done something similar can help you.Whatever your meaning, there is no existing option that allows a user to override model values of SST. In order for you to do this correctly, you will need to become very familiar with the workings of the ocean code and the cesm infrastructure. We can help with small details and help point you in the right direction.   
 

wenq@pku_edu_cn

New Member
   thaks for your replay!   I got a new sst pattern from my sensible experiment, I want to forcing the ocean and atmposphere and another model with this new SST pattern ,So maybe I can change the TRACER(:,:,1,1,iblock) with this new SST data which is a monthy data from climate mean. the problem is ,how to change the TRACER(:,:,1,1,iblock)  by  my new monthly SST data?    I try my best to achive this goal. I add some  code in step_mod.F90:   use time_management        !so I can know the imonth   real (r8), dimension(nx_block,ny_block,max_blocks_clinic),public ::&      SSTjul          !to store the new SST data in july   after           " tmptime = oldtime      oldtime = curtime      curtime = newtime      newtime = tmptime   endif "    I add:     "   do iblock = 1,nblocks_clinic      if (imonth .eq. 7) then         call read_field('nc','/lustre/wenqing/cesm/prescribed_sst_forcing/HOS_0.1Sv.sstForcing_monthly2.1801.1900.nc','SSTjul',SSTjul)         TRACER(:,:,1,1,curtime,iblock) = SSTjul(:,:,iblock)         TRACER(:,:,1,1,newtime,iblock) = SSTjul(:,:,iblock)      end if     end do  "     first , I set a ocean only component run to test if it is right for me to change it. but after 6 years run ,the log file show that: the model did'nt complete, and cpl.log file terminate after:"(seq_diag_print_mct) NET WATER BUDGET (kg/m2s*1e6): period =  monthly: date =  15010701     0                       atm            lnd            ocn         ice nh         ice sh        *SUM*     wfreeze     0.00000000     0.00000000    -2.00712306     0.00108565     2.00603741     0.00000000       wmelt     0.00000000     0.00000000     2.37400313    -1.95967332    -0.42458169    -0.01025189       wrain   -31.21706228     0.00000000    23.65598794     0.06392453     0.01049085    -7.48665897       wsnow    -1.63306309     0.00000000     0.72669532     0.09589874     0.42314107    -0.38732796       wevap     0.00000000     0.00000000   -24.83073157     0.12177208    -0.13639503   -24.84535452     wrunoff     0.00000000    -2.59694073     2.58488526     0.00000000     0.00000000    -0.01205547     wfrzrof     0.00000000     0.00000000     0.00000000     0.00000000     0.00000000     0.00000000       *SUM*   -32.85012537    -2.59694073     2.50371701    -1.67699233     1.87869261   -32.74164881"       i don't know what's wrong with it.       could you please tell me what to do with it? thanks.
 

njn01

Member
I think your POP modifications are incorrect. There is an example in ecosys_mod.F90 that you can follow for the correct usage of read_field. Note that your variable needs to have the "target" attribute, and you should not embed the "call read_field" inside an iblock loop. Also, note that you are reading the same file and same variable every timestep of the month of July 25*31 times in the standard gx1 model, which is inefficient and may or may not be what you intend to do.I suggest that after you make your POP modifications, you verify that you have done this correctly in the ocean model before running the system for six years. I suggest you start with creating ocean "tavg" output files every timestep for the first few days of July (run the model through June, create a restart file, then restart from July 1 and write "nstep" tavg files). You can then view the TEMP field in the tavg output files and determine if your changes are producing the effect you want. The use of "tavg" is covered in the POP FAQ.I am unsure if the results of your your ad-hoc method will produce "earth-like" model solutions; it seems to me entirely possible that your modifications, even when properly implemented, might cause the system to "go off the rails."
 

wenq@pku_edu_cn

New Member
I'm greatly appreciated that you are  so patient to reply my question.  and now,I  think it is't correct too. May be I should try to modify the  set in forcing_pt_interior.F90, and I think it is more resonable than  the previous work I have done. 
 
Hi, I am doing an experiment which requires prescribe SST with annual cycle in a special basin. So could I ask that did you achive your goal in the end? I met some problems and wanna find some help. ThanksMelody
 

ucas_qs

qiushi Zhang
Member
I'm greatly appreciated that you are so patient to reply my question. and now,I think it is't correct too. May be I should try to modify the set in forcing_pt_interior.F90, and I think it is more resonable than the previous work I have done.

Hi, I am doing an experiment which requires prescribe SST with annual cycle in a special basin. So could I ask that did you achive your goal in the end? I met some problems and wanna find some help. ThanksMelody
Hello, is your experiment successful? We also want to do relevant experiments but don't have a clear idea yet, can you describe your code modifications in more detail? Thank you very much.
 
Top