ACCESS-rAM3 perturbing SSTs via OSTIA ancil

Hi @Paul.Gregory,

As you are aware, @Leena and I are working on PGW simulations for the SHEP project with ACCESS-rAM3. We are perturbing ERA5 data for atmosphere initial and boundary conditions, however we’ll also want to manually adjust the SSTs. I understanding we can do this after running the OSTIA ancillary suite. Is there a good way to manually apply a “Delta” to the SSTs in the completed OSTIA ancillary file before returning it back to run in the model?

Cheers,

Sam

Hi Sam, Paul is on leave :skier: for the rest of this week.

@cbengel may be able to advise, as she did all the work to get rAM3 running with OSTIA SSTs. But I think it’s likely that she will say that modifying model input files (which are fields file format) once they have been created is a tricky process.

Since you’re applying a delta, could you apply it to a local copy of the OSTIA input data before running the OSTIA ancillary suite, and then point the suite to read the modified input data?

Hi @bethanwhite and @sdahl,

yes, making a modified version of the raw OSTIA files is probably the simplest solution for many different reasons.

Let me know if you need help with paths and configs, etc.

Best regards,

@cbengel

thanks @cbengel and @bethanwhite!

I see that SSTs are included in the GRIB files created inside dm_ec_ic_lbc_dir when running the model. Am I correct in assuming that at this stage, I can simply perturb the SSTS here like I would the atmospheric variables? In other words, once the model gets to this stage, the OSTIA files are not used anymore? That would make things a lot easier!

No. There are SSTs in the GRIB files but they are from ERA5.

The OSTIA data goes in through the USE_OSTIA pathway.

For the BARRA/SHEP work though, I have another option for you that I will discuss with you and @Leena separately.

Hi @sdahl and @Leena,

Just reporting back here so the community can also access the fix.

Because you are running from the ERA5 initial conditions with daily OSTIA SSTs the easiest way is:

  1. to create an archive of modified raw OSTIA files, then

  2. run the u-dk517 suite pointing to your modified OSTIA files

  3. run the u-by395/nci_access_ram3 suite as normal.

As @andrewb1 pointed out a while back though, in the vk83 modules the replace land surface is replacing the SSTs in the first timestep. Using OSTIA with high resolution land/surface data in rAM3 - #20 by clairecarouge

I have created a new branch with the correct behaviour when using OSTIA.

This new branch is not plumbed into the vk83 module yet.

Further then is one modification needed in the rose/cylc suite – which I will include in a u-by395 later update.

To use this code in the interim it is possible to put it back into the suite and use it rather than the vk83 module. I will give instructions via email. Anyone else interested in using the code before it is “released” please reach out and I will help you get it into your suite.

Tagging @bethanwhite too because you will probably want to include this in the Flagship runs.

Fantastic, thanks so much @cbengel :star_struck:

@mlipson @bethanwhite @andrewb1 to make life easier I have downloaded the code from GitHub and folded it (along with the necessary suite changes) into a new branch:

u-by395/nci_access_ram3_ostia_first_step_bob

Please let me know if you have any issues.

@sdahl and @Leena, @mlipson can help you push these changes into your existing suite.

Thanks @cbengel. @mlipson just helped us to incorporate all of the changes in nci_access_ram3_ostia_first_step_bob to our suite.

However, we are confused where we are actually making the changes to our SSTs now. Can you clarify if we are doing this in the OSTIA suite or in our model suite? We are unsure of the workflow.

Hi @sdahl, to modify the OSTIA SSTs via netcdf you would need to modify the OSITA input files prior to running u-dk517 on the newly-modified files. The new branch ensures that “your modifications” to SST values are applied in the first step of the model run as they were defaulting back to the BARRA SSTs instead of OSTIA for that timestep alone.

Okay, excellent! We’ll let you know how it goes. Thanks, Chermelle!

Hi @cbengel,

I am planning to do the same thing as @sdahl has mentioned, but using the 21st Century Weather Flagship suite for my rAM3.

What would the workflow look like for me? Would there be any changes compared with what @sdahl has done?

I was also wondering - can we modify the .anc files currently sitting in /scratch/gb02/mm6452/OSTIA_ANCIL/ and then directly provide the path to those modified files when running the RNS suite? Or is there another step needed to incorporate the modified SST fields into the model?

Any guidance would be greatly appreciated. Thanks!

Sorry @cbengel, I’m still a little confused about this, so I just wanted to make sure I understand the workflow correctly.

  1. What exactly do you mean by “create an archive of modified raw OSTIA files”? I’m not sure how I would modify the .anc files, as my SST perturbations are currently in .nc files.

  2. Am I understanding correctly that the OSTIA_ANCIL files are created when we run the u-dk517 suite? If so, these would be the files that I need to modify for my PGW experiment. In that case, I’m not quite sure why I would then need to run/re-run u-dk517 again, pointing it to the modified OSTIA files. Or am I misunderstanding the workflow?

Sorry if I’m missing something obvious here!

Thank you in advance for your help!

I’ll leave Chermelle to explain her preferred way to vary the .anc files. But for your question:

I was also wondering - can we modify the .anc files currently sitting in /scratch/gb02/mm6452/OSTIA_ANCIL/ and then directly provide the path to those modified files when running the RNS suite? Or is there another step needed to incorporate the modified SST fields into the model?

For these types of situations, it’s always useful to do a bit of digging into your roses suite folder to see how it works under the hood. For example, to find how the suite links to that directory, I’d go into your ~/roses/ram3_flagship and type:

grep -r OSTIA_ANCIL

Then I get:

.svn/pristine/87/871e87863e0353ca2ac741068f7f3a87690b6304.svn-base:global_ostia_dir="/scratch/$PROJECT/$USER/OSTIA_ANCIL"

rose-suite.conf:global_ostia_dir="/scratch/$PROJECT/$USER/OSTIA_ANCIL"

The first “.svn/pristine/” part can be ignored, as that is part of the version tracking. But the second part tells you that in rose-suite.conf there is a variable global_ostia_dir that defines where the suite will look for OSTIA data. So after you’ve copied your OSTIA .anc files and updated them, you would change your rose-suite.conf to point to that new location.

The point being, grep is a very powerfull tool to find variables within code, and it’s probably my most used command other than cd.

Hi Moulik,

You need to modify the source files from cm45. I have some code and documentation to do this, but I need to clean it up quite a bit. I’m not sure I’ll get to it this week, but when I do, I wil pass it along to you!

Cheers,

Sam

Hi @Moulik, @mlipson and @sdahl,

There are multiple ways to do what you want to do. They vary in complexity.

The most straightforward way is to take a copy of the relevant raw OSTIA files sitting in cm45 (in netcdf format), modify them, then run u-dk517 on them and point your rose/cylc suite to that output. That way you can modify the OSTIA files once and they will be passed correctly to each level of the nest.

The next way in terms of complexity is to modify the OSTIA ancillary files created in the suite on-the-fly. In the suite, OSTIA ancillaries are produced that are cut to the exact region and resolution of each of your nests. If you want to take that route you would need to modify the OSTIA ancillary files in each nest separately at the right time. Please let me know if you want to take that route and I can plan time to help.

The answer for you will depend on your perturbations (do they vary for each nest?), how simple you want the steps to be and the level of support.

This might be best discussed in a meeting with you and your supervisor. Please let me know if you want to meet via email.

@bethanwhite and @mlipson it sounds like it would be good to arrange a tutorial on modifying start conditions for ACCESS-rAM3.

Hi @cbengel - this sounds like a easy way to do this.

I can see some OSTIA SSTs are here /g/data/cm45/access-nri/esacci/sea_surface_temperature/v3.0.1/2007/06/ under cm45. Are these the files I am supposed to modify?

If so, where should I make a copy of these files and how can I point out to those modified OSTIA SST files while running the u-dk517?

No my perturbations don’t vary for each nest.

Thank you so much!

Thanks a lot @sdahl! No rush at all. In the meantime, I would like to give a try following the instructions from @cbengel, and if I struggle to reproduce those steps, then quickly get back to you. Cheers,

Hi @Moulik ,

If I was you, I would make a copy on a folder on scratch.

Keep the code to apply the perturbations in your home directory (along with the code to produce the perturbations).

You can then use netcdf tools to modify your scratch copy of the raw OSTIA files.

In the u-by395/nci_access_ram3 suite you need to then update the global_ostia_dir.

This can be found in the rose UI by clicking on:

suite-conf → Nesting Suite → Cycling options.

Remember that the OSTIA fields are updated every cycle so in the Lismore example this means every 24 hours. This means you need to apply the perturbation for all OSTIA files in the entire run, i.e. if you have a 5-day run you need to apply the perturbation to 5 OSTIA files.

Reach out if you need any more help.