pangeo-data / swot_adac_ogcms

Documentation and notebooks for the SWOT Adopt-a-Crossover Model Intercomparison
Apache License 2.0
9 stars 3 forks source link

'sig0s' is not defined in Filter* codes #14

Open yangleir opened 1 year ago

yangleir commented 1 year ago

Hi, @roxyboy

Thanks for your help. Now I can make the scratch files and run examples. But I just find that in each Filter*.ipynb, the sig0s is not defined which rises error. Such as:

nMLDs = z10 + np.abs((sig0s.isel(depth=slice(z10,None)).fillna(0.)
                      - sig0s.isel(depth=z10).fillna(0.)
                     ) - .03).reset_coords(drop=True).argmin(dim='depth').compute()  # indexing needs loading
MLDs = (xr.ones_like(sig0s) 
        * fesom01w.depth).reset_coords(drop=True)[{'depth':nMLDs}]  

Could you check that? Thank you.

Regards

roxyboy commented 1 year ago

Ah, that might be true because I ended up focusing on the winter months for our paper. But sig0s is the potential density during the summer months and you can also compute this using directly from the data on OSN.

yangleir commented 1 year ago

Thanks. By the way, where is the scratch files stored as I just run codes on the Pangeo JupyterHub? I did not change much codes. The save path looks as:

gcs://pangeo-integration-te-3eea-prod-scratch-bucket/yangleir/region01/FIO-COM32/sigma0_fma.zarr

Because some files are really huge. I am bit confused where they are? I do not pay Google Could. And Pangeo may not provide such large storage.

Another question: How to produce the grid file for FIO model? I did not find that.

fio01grid = xr.open_zarr(gcs.get_mapper(f"gcs://meom-ige-scratch/roxyboy/region01/FIO-COM32/grid.zarr"))
rabernat commented 1 year ago

It looks like you're using the Pangeo scratch budget. See https://docs.2i2c.org/en/latest/data/cloud.html#scratch-bucket for more details. You can store as much temporary data as you want, but it only persists for 7 days so does not rack up much cost.

yangleir commented 1 year ago

Thanks @rabernat. This is really nice function.

rabernat commented 1 year ago

@yangleir thanks for your excellent feedback. It helps to have someone go through the examples; that will help us identify gaps in the material we have shared. We can update the notebooks to make things more clear based on your feedback.

yangleir commented 1 year ago

Thanks very much your great Pangeo program. It gives me much convenience to do ocean science.

roxyboy commented 1 year ago

Another question: How to produce the grid file for FIO model? I did not find that.

fio01grid = xr.open_zarr(gcs.get_mapper(f"gcs://meom-ige-scratch/roxyboy/region01/FIO-COM32/grid.zarr"))

The grid file wasn't made publicly available by FIO so I had the grid file privately sent to me. I could send it to you via email if you're interested in having it.

yangleir commented 1 year ago

Thanks @roxyboy. I really need that file to reproduce your results. It will be very helpful to if you can sent it to leiyang@fio.org.cn

roxyboy commented 1 year ago

Thanks @roxyboy. I really need that file to reproduce your results. It will be very helpful to if you can sent it to leiyang@fio.org.cn

Apologies for my belated response. I just send you the file to your email @yangleir .

yangleir commented 1 year ago

I got your grid files. There's no need to apologize. You are helping me. Thanks very much and have a nice day.