Skip to content

Instantly share code, notes, and snippets.

View uturuncoglu's full-sized avatar

Ufuk Turunçoğlu uturuncoglu

View GitHub Profile
@uturuncoglu
uturuncoglu / config.yaml
Last active July 2, 2024 22:37
Testing CDEPS driver under UWTools
cdeps:
execution:
executable: /usr/bin/date
batchargs:
nodes: 1
stdout: /work2/noaa/nems/tufuk/COASTAL/ufs-coastal-app/sorc/uwtools/runscript.out
walltime: "00:05:00"
atm_in:
update_values:
datm_nml:
@uturuncoglu
uturuncoglu / README.md
Last active May 13, 2024 04:49
FV3 CDEPS Inline for GL FVCOM Data
@uturuncoglu
uturuncoglu / plot_cubed.ncl
Last active January 19, 2024 18:59
AMS 2024 Tutorial
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/ut_string.ncl"
procedure add_box(wks,plot,ll[2],width,cname,oval)
local xbox, ybox, gsres, dumstr
begin
xbox = (/ll(0),ll(0)+width,ll(0)+width,ll(0),ll(0)/)
ybox = (/ll(1),ll(1),ll(1)+width,ll(1)+width,ll(1)/)
gsres = True
gsres@gsFillColor = cname
@uturuncoglu
uturuncoglu / reshape.ncl
Created November 10, 2023 22:47
Convert regional FV3ATM output on mediator history file from 1d to 2d
begin
;--- arguments ---
nx = 720
ny = 600
;--- get list of files ---
files = systemfunc("ls -al ufs.hafs.cpl.hi.* | awk '{print $9}' | grep -v '_reshp.nc'")
nfiles = dimsizes(files)
;--- loop over files and reshape atm ones ---
@uturuncoglu
uturuncoglu / plot_fvcom.ncl
Last active March 22, 2024 14:55
WW3 NCL script
begin
;--- arguments ---
vname = "zeta"
vname = "uwind_speed"
vname = "vwind_speed"
tindx = 71
;--- open file ---
nc = addfile("sci_0001.nc", "r")
@uturuncoglu
uturuncoglu / README.md
Last active September 25, 2023 17:24
ESMF Mesh file for unstructured grid
@uturuncoglu
uturuncoglu / README.txt
Last active January 8, 2024 23:51
Material for Noah-MP Workshop & Tutorial 2023
# install docker
https://www.docker.com
# create container and prepare for development
docker run -it ubuntu:latest
apt-get -qq update
apt-get -qq install tar unzip file gringo
apt-get -qq install build-essential binutils-dev gfortran
apt-get -qq install python3-dev python3-pip python3-boto3 python3-yaml
@uturuncoglu
uturuncoglu / calc_ekman.m
Created November 9, 2022 19:37
Calculates Ekman Transport related variables from RegCM output using Climate Data Tools for Matlab
% commands to use this script
% grid.txt:
% #
% # gridID 1
% #
% gridtype = lonlat
% gridsize = 129600
% datatype = float
% xsize = 360
% ysize = 360
@uturuncoglu
uturuncoglu / create_mesh.job
Created February 17, 2022 18:52
Create ESMF Mesh using NCL
#!/bin/bash
#PBS -A P93300606
#PBS -N mesh
#PBS -j oe
#PBS -q premium
#PBS -l walltime=03:00:00
#PBS -l select=1:mpiprocs=36
#PBS -o log.out
#export TMPDIR=/glade/scratch/$USER/temp
@uturuncoglu
uturuncoglu / plot_cubed.ncl
Last active October 15, 2021 20:03
A set of tool chain to analyze the CMEPS mediator history files and and converts 1d FV3 related fields in it to 2d representations and writes into a new file as tiles
; Note for user:
; The orog.tile*.nc files can be generated by simply using following command
; for each tile of surface output.
; ncks -v orog sfcf000.tile1.nc orog.tile1.nc
begin
;--- arguments ---
ntiles = 6
did = 0
diff = True
mask_land = False