|
| 1 | + |
| 2 | +import MeshArrays, OceanStateEstimation, NetCDF |
| 3 | + |
| 4 | +MeshArrays.GRID_LL360_download() |
| 5 | +γ = MeshArrays.GridSpec("PeriodicChannel",MeshArrays.GRID_LL360) |
| 6 | +Γ = MeshArrays.GridLoad(γ;option="full") |
| 7 | + |
| 8 | +grid_info=( XC=Γ.XC[1], YC=Γ.YC[1], RC=Γ.RC, |
| 9 | + XW=Γ.XW[1], YS=Γ.YS[1], RF=Γ.RF, |
| 10 | + DXC=Γ.DXC[1], DYC=Γ.DYC[1], DRC=Γ.DRC, |
| 11 | + DXG=Γ.DXG[1], DYG=Γ.DYG[1], DRF=Γ.DRF, |
| 12 | + RAW=Γ.RAW[1], RAS=Γ.RAS[1], RAC=Γ.RAC[1], |
| 13 | + hFacC=write(Γ.hFacC), hFacW=write(Γ.hFacW), hFacS=write(Γ.hFacS)); |
| 14 | + |
| 15 | +OceanStateEstimation.get_occa_variable_if_needed("DDtheta") |
| 16 | +OceanStateEstimation.get_occa_variable_if_needed("DDuvel") |
| 17 | +OceanStateEstimation.get_occa_variable_if_needed("DDvvel") |
| 18 | +OceanStateEstimation.get_occa_variable_if_needed("DDwvel") |
| 19 | + |
| 20 | +function rd(filename, varname, month) |
| 21 | + fil = NetCDF.open(filename, varname) |
| 22 | + tmp = fil[:,:,:,month] |
| 23 | + tmp[findall(tmp.<-1e22)] .= 0.0 |
| 24 | + return tmp |
| 25 | +end |
| 26 | + |
| 27 | +month=1 |
| 28 | +pth=OceanStateEstimation.OCCAclim_path |
| 29 | +U=rd(joinpath(pth,"DDuvel.0406clim.nc"),"u",month); |
| 30 | +V=rd(joinpath(pth,"DDvvel.0406clim.nc"),"v",month); |
| 31 | +W=rd(joinpath(pth,"DDwvel.0406clim.nc"),"w",month); |
| 32 | +T=rd(joinpath(pth,"DDtheta.0406clim.nc"),"theta",month); |
0 commit comments