Error when calling experiments that are stored at cj50

Hi all,

I am trying to reproduce my old code https://github.com/ribeiron/ScriptsChapter3/blob/main/Fig9_b-g.ipynb and keep getting this error:

FileNotFoundError: [Errno 2] No such file or directory: b’/g/data/ik11/outputs/access-om2-01/01deg_jra55v13_ryf9091_easterlies_up10/output1022/ocean/ocean.nc’

I noticed that the “easterlies down/up” experiments have changed location to cj50 since the last time I used them, but I was told that it should still be accessible through the cosima database (as per my code), as long as I have the gdata/cj50 location in my storage line when you open ARE/gadi_jupyter. It was already there though, so I must need to update something else.

Any leads?

Thank you!

Just making sure: Are you a member of cj50 project on NCI?

Yes, it looks like there is nothing wrong with my membership. Still current.

1 Like

I’d guess that the COSIMA Cookbook database hasn’t been updated for the new location.

@micael might be able to assist.

1 Like

As a work around until the COSIMA database is updated (if that’s the problem), you could make your own database for these simulations by following this tutorial.

I just tested accessing this data (which is here /g/data/cj50/access-om2/raw-output/access-om2-01) and the experiments with easterlies in the names still aren’t accessible from the main COSIMA database. Do we need to manually add them to the COSIMA database? @micael @aekiss

The indexing log seems to indicate that there are several experiments in that location with easterlies in the names that are in the database:

Indexing: /g/data/cj50/access-om2/raw-output/access-om2-01/01deg_jra55v13_ryf9091_easterlies_down10
Indexing experiment: 01deg_jra55v13_ryf9091_easterlies_down10
Indexing: /g/data/cj50/access-om2/raw-output/access-om2-01/01deg_jra55v13_ryf9091_easterlies_up10_zonal
Indexing experiment: 01deg_jra55v13_ryf9091_easterlies_up10_zonal
Indexing: /g/data/cj50/access-om2/raw-output/access-om2-01/01deg_jra55v13_ryf9091_easterlies_up10
Indexing experiment: 01deg_jra55v13_ryf9091_easterlies_up10
Indexing: /g/data/cj50/access-om2/raw-output/access-om2-01/01deg_jra55v13_ryf9091_easterlies_up10_meridional
Indexing experiment: 01deg_jra55v13_ryf9091_easterlies_up10_meridional

@adele157 Can you tell me if there are any experiments missing from this list? And are you able to access the experiments from the above list?

Hi Micael. Sorry I am back pestering you about this but I could use a closer look at the wind field of this experiment before I submit my work.
I am trying to access experiment_eup = ‘01deg_jra55v13_ryf9091_easterlies_up10’ and’01deg_jra55v13_ryf9091_easterlies_up10_zonal’. They are both in your list, so that is odd.

I still get this error when trying to access them:
FileNotFoundError: [Errno 2] No such file or directory: b’/g/data/ik11/outputs/access-om2-01/01deg_jra55v13_ryf9091_easterlies_up10/output1032/ocean/ocean.nc’

These are the paths I have written down:

master_session = cc.database.create_session(‘/g/data/ik11/databases/cosima_master.db’)

control = ‘01deg_jra55v13_ryf9091’
experiment_eup = ‘01deg_jra55v13_ryf9091_easterlies_up10’
easterlies_up_zonal = ‘01deg_jra55v13_ryf9091_easterlies_up10_zonal’

$plot anomalies for last 5 years of simulation:
start_time=‘2150-01-01’
end_time=‘2159-12-31’

temp_con = cc.querying.getvar(control,‘temp’, master_session,frequency=‘1 monthly’,start_time=start_time, end_time=end_time) - 273.15
temp_con = temp_con.sel(yt_ocean=lat_slice).sel(xt_ocean=lon_slice).sel(st_ocean=depth_slice)
temp_con = temp_con.load()

temp_up = cc.querying.getvar(experiment_eup,‘temp’,master_session,frequency=‘1 monthly’,start_time=start_time, end_time=end_time) - 273.15
temp_upY = temp_up.sel(yt_ocean=lat_slice).sel(xt_ocean=lon_slice).sel(st_ocean=depth_slice)
temp_upY = temp_upY.load()

temp_up = cc.querying.getvar(easterlies_up_zonal,‘temp’, master_session,frequency=‘1 monthly’,start_time=start_time, end_time=end_time) - 273.15
temp_upX = temp_up.sel(yt_ocean=lat_slice).sel(xt_ocean=lon_slice).sel(st_ocean=depth_slice)
temp_upX = temp_upX.load()

PS: I can try to build my own database as suggested by Adele, but because I just want to do a quick look that won’t even end up on the paper I was hoping I could just do it through the database.

Hi Natalia,

The error message you are getting says it’s trying to open the files in /g/data/ik11/outputs/access-om2-01/01deg_jra55v13_ryf9091_easterlies_up10, but the files are actually in /g/data/cj50/access-om2/raw-output/access-om2-01/01deg_jra55v13_ryf9091_easterlies_up10/.

Not sure why it’s trying to open the files in the wrong location, though.

To be honest, I am not even sure anymore why I was using that path. I suspect I tried to find the experiments at the time and must have seen them there. Also, when I use the cj50 path I get an operational error:

OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: Error Messages — SQLAlchemy 1.4 Documentation)

is the default database at g/data/ik11/databases/cosima_master.db? I always start a session without any path, e.g.,

master_session = cosima_cookbook.database.create_session()

and let the cookbook pick the default.

(Btw, @ribeirosantosn if you enclose code in triple backticks, e.g.,

```
code
```
it comes out formatted much better.)

1 Like