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

ncl scripts to create SST/ICE data files to drive an F compset using B compset history files

hannay

Cecile Hannay
AMWG Liaison
Staff member
Attached are two scripts that allows to create SST/ice files to process B compset history output and create SST/ICE data files to drive an F compset.
There are 2 versions of the script depending if you want to use the icesst tool or not. Both scripts use single variable timeseries of SST and aice (SH and NH) 1. create_SST_files_from_B_case_without_bcgen.ncl
Regrid the SST and sea-ice data from the B compset and create files in an appropriate format to run with CAM2. create_SST_files_from_B_case_with_bcgen.ncl
Regrid the SST and sea-ice data from the B compset and create files in an appropriate format for processing with bcgen (you need to run bcgen afterwards to have a SST/ICE dataset in an appropriate format to run with CAM
 

Attachments

  • create_SST_files_from_B_case.tar
    30 KB · Views: 135
Dear Hannay,
I read you ncl code to create the SST and SIC fields for F compset. at the end of script you used the SST-ICE consistency steps as described in Hurrell et at 2008. I read the hurrell's paper and try to understand each step. I feeel that Hurrell doesn't used the step number 3 (as Written in NCL Script) but you had mentioned here. I am trying to unserstand how step 3 is different from 5. I feel that if i use only step number 5, step 3 will be covered under it.I tried to avoid step 3 but bcgen throughs error latitude =           172  longitude =           110
 does not convergeI request you to please explain the difference between the step number 3 and 5. why is it nacessary to use both ??Thanking you in anticipation.
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
The reason I am doing these 5 steps is that if I use mean SST and sea-ice without any correction, there will be inconstitency along the ice edge. My script doesn't follow the procedure from Hurrell but it uses the relationship in Hurrell. The reason I decided to use the relationship both way if I was concerned there might be instances that step 3 doesn't necesssary capture every inconsistency. This is not an official CESM script. This is my own script that I wrote for my own purpose. I share it with others for their convenience. You are welcome to use step 5 instead of step 3 and then look at the fields to see if there is any inconsistency. Or to modify the script in a way that you want.   
 
Dear Hannay,Thanks for sharing the ncl scripts. I found another procedure of creating the SST/ICE data file from the CESM user guide FAQ section. It looks like that method doesn't require regridding to a the 1x1 grid, but instead making changes on the original gx16 grid.  I'm wondering if these two methods would yield the same forcing file for CAM. If not, which one would be the prefered method?  In addition, I found that the SST filed in the B compset output has missing values over land, while the other SST/ICE forcing files from the input repository (e.g. AMIP) do not treat the land as missing. This difference will cause the model to crush. The cesm user guid suggests changing the missing values over land to -1.8, and I'm wondering where does the value of -1.8 come from? Thank you very much in advance. Hui 
 
Hi Hanny, I am wondering why you would like to use ice files from North Hemisphere and South Hemisphere instead of just using one ice file for the whole globe? Another thing is that we need to change the SST and ice's time to the mid of each month. What should we do for February with 28 days then? Thank you!Yu
 
Hi Hui,May I ask how did you create your SST data in the last? I am troubled by this problem too. When I tried to follow CESM guide, then I found that I need to do many things manually, when I read Hanny's code I found I do not understand why she split the globe into NH and SH and how she defined mid of days. Can you give me some help?Thank you.Yu
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
The reason we have ice fiels from NH and SH instead of a single global ice files is that we save a lot of space. For most of the the globe, sea-ice is zero. We don't want files with a bunch of zeros that use a lot of space. Our  SST files are monthly. So February is monthly. 
 
Hi Hanny,I understand why you split sea ice files now. I modified the code and dealt with sea ice with the same strategy as what you did to SST because I used a global sea ice time series.Thank you so much for your kind help! Yu
 
Hi Hanny, Sorry to bother you again. I found that you ncl file generally regrids all data to a 1x1 format. Does CESM automatically change this 1x1 grid of SST to some other grid form I want when I run this F case? For example, if I want to run f19_g16 F_ case, is that ok for me to use your ncl file to creat SST? In this case, my SST/ICE domain should have 1x1 grid but the other domains/grids will still be f19_g16 right?Thanks a lot!
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
I think that if you want to run a F case with with f19_g16 resolution, you need to have your data on that grid.Not that we usually run the F case with everybody on the same grid, in your case it would be a f19_f19 resolution.  
 
Hi Hanny,I agree that I should run the F case on the f19_f19 grid but I still have 2 further questions about this.The first question is I want to use a B f19_g16 case SST/ICE to drive a f19_f19 F case, then should I re-grid the final SST/ICE to f19_f19 or 1x1 grid?I have a problem with running bcgen package so I checked that NCL script without bcgen you shared with us. The second question is in your NCL script to process the SST/ICE data, how should I modify this /ESMF_regrid_with_weights(SEAICE_tmp,"map_gx1v6_TO_1x1_blin.130423.nc" command to regrid the data to f19xf19 instead of regird to 1x1?Many thanks to you!Yu
 
Also I read your create_SST_files_from_B_case_with_bcgen.ncl and create_SST_files_from_B_case_without_bcgen.ncl but I do not see many differences. Is there any reason for the cesm user guide to suggest us to use the bcgen tool?
 

abanks

Alison Banks
New Member
Hello Hannay, I see that you attached the two scripts, but I think they did not migrate with the forum when it moved. Would you re-attach them?
 

Varunesh Chandra

New Member
I am trying to create SST/ICE data files to drive an F2000_CAM5 compset using B compset history files. I am getting these difficulties.
1. I need a interoperation grid file (map_gx1v6_to_fv0.5x0.5_bilin_da_090309.nc) on the f05_f05 resolution to interpolate a data . I have already search but I am unable to get.
2. I have created a SST/ICE data on f09_f09 resolution thorough this NCL script and submitted the run but I am getting this below error:
LVD not found, all data is after yearLast (shr_sys_abort) ERROR: (shr_stream_findBounds) ERROR: LVD not found, all data is after yearLast (shr_sys_abort) WARNING: calling shr_mpi_abort() and stopping.

Please help me. Thank you so much in advance!
 

Varunesh Chandra

New Member
I am trying to create SST/ICE data files to drive an F2000_CAM5 compset using B compset history files. I am having these difficulties.
1. I need a interpolation grid file (map_gx1v6_to_fv0.5x0.5_bilin_da_090309.nc) on the f05_f05 resolution to interpolate data . I have already searched but I am unable to get.
2. I have created a SST/ICE data on f09_f09 resolution thorough this NCL script and submitted the run but I am getting this below error:
LVD not found, all data is after yearLast (shr_sys_abort) ERROR: (shr_stream_findBounds) ERROR: LVD not found, all data is after yearLast (shr_sys_abort) WARNING: calling shr_mpi_abort() and stopping.

Please help me. Thank you so much in advance!
 

hannay

Cecile Hannay
AMWG Liaison
Staff member
For question 1: you could use the map files to interpolate on 1x1 grid file and then interpolate to the f05xf05 when you run the bcgen tool.

For question 2, make sure you set startyear and endyear that are compatible with your B compset history files.
startyear = 1500
endyear = 1510
year_range="150001-151012"
 

Varunesh Chandra

New Member
Okay, thank you so much for response. Can you provide me map_gx1v6_TO_1x1_blin.130423.nc file? I am unable to get this.

Thank you so much!
 

Varunesh Chandra

New Member
Thank you Hannay! Now model is running without error. I have one more doubt.

1. I am using your NCL (create_SST_files_from_B_case_without_bcgen.ncl) script for creating the SST/ICE data and driving the F compset directly without processing with bcgen. but It is reproducing only the monthly means if I want to computes a climatology to drive the F compset then how can I do that? and please suggest me is it right process?
2. I guesss, bcgen computes both a climatology and monthly means.
 
Top