Skip to content

Instantly share code, notes, and snippets.

@sanAkel
sanAkel / try1.py
Last active August 1, 2020 00:25
Thanks to @yvikhlya for the help!
import xarray as xr
import matplotlib.pyplot as plt
ds=xr.open_mfdataset('/discover/nobackup/sakella/m6_test/holding/geosgcm_surf/*/m6_test.geosgcm_surf.*_1200z.nc4')
frice = ds['FRSEAICE']
frocn = ds['FROCEAN']
ts = ds['TS']
t2m = ds['T2M']

Imports

Following list has been gathered from: https://github.com/GEOS-ESM/GEOSgcm_GridComp/blob/develop/GEOS_GcmGridComp.F90 , scan for:

  1. call DO_O2A (impSKIN,' var_name' , GEX(OGCM), 'var_name' , RC=STATUS)
  2. call DO_O2A_SUBTILES_R{x}R{y}(expSKIN ,'var_name', SUBINDEX_{x1}, GIM(OGCM), 'var_name' , SUBINDEX_{y1}, RC=STATUS) NOTE: above
    • where x1 = O, A; y1 = A, O, respectively
    • where x = 4, 8; y = 8, 4, respectively
      above sequence in x, y and x1, y1 may be incorrect! One should carefully scan the above (URL to) GEOS_GcmGridComp.F90
@sanAkel
sanAkel / plot_bcs.py
Last active March 16, 2022 23:39
To plot binary SST, ICEC, mask (within GEOS-ESM)
#!/usr/bin/env python
'''
to plot the SST and SIC boundary conditions (binary files) that are used by the GCM
SA, Jul 2018, Aug 2020, Mar 2022
'''
#-----------------------------------------------------------------
import argparse

Dir structure the top level:

lrwxrwxrwx  1 santha.akella emc   40 Nov 15 17:34 large_fs -> /lfs/h2/emc/couple/noscrub/santha.akella
lrwxrwxrwx  1 santha.akella emc   31 Nov 15 19:29 my_ptmp -> /lfs/h2/emc/ptmp/santha.akella/
drwxr-xr-x 15 santha.akella emc 2048 Nov 15 17:08 rtofs.v2.5.0

Clone and build src code:

santha.akella@dlogin09:~> ls -1 rtofs.v2.5.0/

Sources:

  • MOM6 from Zulema's experiment: /lfs/h2/emc/couple/noscrub/zulema.garraffo/FV3_RT/DATM_INPUT/GFS.20230301-20231231.nc_hCk_positive.nc
  • RTOFS my experiment: /lfs/h2/emc/couple/noscrub/santha.akella/prod/com/rtofs/v2.5/rtofs.20241208/
Field name Available to use in MOM6 Used in RTOFS Long name of field (units)
slmsksfc Y ? sea-land-ice mask (0-sea, 1-land, 2-ice) (1)
icecsfc Y ? sea-ice coverage/fraction, proportion (1)
--- --- --- ---
psurf Y ? surface pressure (Pa)