Skip to content

Instantly share code, notes, and snippets.

View everdaniel's full-sized avatar
🏠
Working from home

Ever Daniel Barreto everdaniel

🏠
Working from home
View GitHub Profile
#!/bin/csh -f
# m3fake script to create a dummy ocean file
setenv GRIDDESC /root/CMAQ-5.2.1/data/CMAQ-ASU1K/cctm_input/GRIDDESC
setenv GRID_NAME CMAQ-ASU1K
setenv OUTFILE /root/CMAQ-5.2.1/data/CMAQ-ASU1K/cctm_input/land/ocean_file.dummy.$GRID_NAME.ncf
/opt/model/ioapi/Linux2_x86_64/m3fake << EOF
@everdaniel
everdaniel / config_cmaq.csh
Created September 10, 2018 01:24
CMAQ 5.2.1 CCTM runtime error
#!/bin/csh -f
# ================= CMAQv5.2.1 Configuration Script ================= #
# Requirements: I/O API & netCDF libraries #
# PGI, Intel, or Gnu Fortran compiler #
# MPICH for multiprocessor computing #
# Optional: Git for GitHub source code repository #
# #
# Note that this script was configured/tested on Red Hat Linux O/S #
# #
@everdaniel
everdaniel / dominio2.txt
Last active June 7, 2018 22:19
dominio2.ctl
File 1 : OUTPUT FROM WRF V3.8.1 MODEL
Descriptor: dominio2.ctl
Binary: dominio2.dat
Type = Gridded
Xsize = 84 Ysize = 84 Zsize = 19 Tsize = 17 Esize = 1
Number of Variables = 112
xlat 1 0 LATITUDE, SOUTH IS NEGATIVE (degree_north)
xlong 1 0 LONGITUDE, WEST IS NEGATIVE (degree_east)
lu_index 1 0 LAND USE CATEGORY (-)
var_sso 1 0 variance of subgrid-scale orography (m2)
@everdaniel
everdaniel / dominio2.txt
Created June 7, 2018 22:17
dominio2.nc
File "dominio2.nc"
File type: NetCDF-3/CDM
netcdf file:/Users/everdaniel/Downloads/salidaswrf/dominio2.nc {
dimensions:
time = UNLIMITED; // (17 currently)
lon = 84;
lat = 84;
lev = 1;
@everdaniel
everdaniel / json.html
Created October 27, 2013 19:53
Return Low Search results as JSON
{
{exp:low_search:results query="{segment_3}" limit="10"}
{if count == 1}
"search_keywords": "{low_search_keywords}",
"total_results": {total_results},
{/if}
{if count == 1}
"results": [
{/if}
{
@everdaniel
everdaniel / WRF_example.ipynb
Created August 6, 2016 14:49 — forked from darothen/WRF_example.ipynb
Simple WRF analysis/plotting examples
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@everdaniel
everdaniel / ex.js
Created January 21, 2016 00:41 — forked from JeffreyWay/ex.js
Laracasts.com Episode: Algolia + JavaScript + Vue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Algolia with JS</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
@everdaniel
everdaniel / jsonapi.md
Created December 10, 2013 03:03 — forked from wycats/jsonapi.md

JSON API

There are two JSON API styles:

  • The ID Style
  • The URL Style

The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.

The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.

@everdaniel
everdaniel / wp_caption.php
Created October 23, 2013 22:30
WordPress Image Caption Filter
<?php
add_filter( 'img_caption_shortcode', 'cleaner_caption', 10, 3 );
function cleaner_caption( $output, $attr, $content ) {
$output2 = null;
$output3 = null;
$pattern = 'http://';
/* We're not worried abut captions in feeds, so just return the output here. */
<?xml version='1.0' encoding='UTF-8'?>
<ResponseDetails>
<Result>Fail</Result>
<ErrorSeverity>Error</ErrorSeverity>
<ErrorDetails></ErrorDetails>
</ResponseDetails>