Skip to content

Instantly share code, notes, and snippets.

View MiCurry's full-sized avatar

Miles Curry MiCurry

View GitHub Profile
@MiCurry
MiCurry / init_atmosphere.warnings.gnu
Created June 25, 2021 17:17
init_atmosphere.warnings.gnu
make[5]: warning: -jN forced in submake: disabling jobserver mode.
ESMF_BaseMod.F90:178:52:
178 | ESMF_TF_FALSE = ESMF_Logical(3)
| 1
Warning: Unused PRIVATE module variable ‘esmf_tf_false’ declared at (1) [-Wunused-value]
ESMF_BaseMod.F90:177:51:
177 | ESMF_TF_TRUE = ESMF_Logical(2), &
| 1
@MiCurry
MiCurry / add_cam_mpas_topo_atts.py
Created May 18, 2021 00:50
CAM-MPAS Topo Attributes
import os
import sys
import configparser
import argparse
from datetime import datetime
from netCDF4 import Dataset
# Add attributes to a topography file created by Peter's Topo Tool.
@MiCurry
MiCurry / issues.md
Created May 12, 2021 23:54
CESM - CAM Error Messages which are confusing

This is just a document to keep track of error messages which could be updated to be more helpful!

incompatible domain grid coordinates - when adding new grid/resolution

When running the f2000climo case with newly generated domain and mapping files the follow message is produced:

140:seq_domain_check_grid - n:*** d1: 2.393198 d2: 2.393198 diff: 0.00000000000000 eps: 0.00000000000000 140: (seq_domain_check_grid) ERROR: incompatible domain grid coordinates 140: ERROR: (seq_domain_check_grid) incompatible domain grid coordinates

@MiCurry
MiCurry / supersample.f90
Last active December 9, 2020 17:50
Supersample
program supersample_fac
implicit none
integer :: i, j, ii, jj
integer :: supersample
integer :: tile_nx, tile_ny
integer :: tile_bdr
real :: lat, lon, latp, lonp
real :: known_lat
@MiCurry
MiCurry / timers.py
Created September 10, 2020 19:35
Simple Python Timers
import time
class PyTimers:
""" A small timer class in a similar vain as MPAS timers. Probably no the most efficent, but
its easy to use. """
def __init__(self):
self.timers = {}
def finalize(self):
Name: temp
Type: channel
Upper-lat: 23.43676
Lower-lat: 66.33333
@MiCurry
MiCurry / static_interp.F
Last active April 9, 2020 16:49
Static interpolation psuedocode
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! OG - Terrain static interpolation
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@MiCurry
MiCurry / index
Last active April 6, 2020 20:50
mpas_init_atm_core.F for mpas_parse_geoindex.F
#
# Boolean
#
signed=NO
#
# Integer
#
category_max=13
category_min = 1
filename_digits=5
@MiCurry
MiCurry / changeCase.f90
Last active February 21, 2020 22:40
Fortran to Upper and To Lower
program case
implicit none
character(len=100) :: arg
call getarg(1,arg)
write(0,*) "capitalize: ", capitalize(arg)
write(0,*) "lowercase: ", lowercase(arg)
@MiCurry
MiCurry / mpas_init_atm_core.F
Last active July 13, 2020 16:27
MPAS Init Atm Core for testing the MPAS KD Tree
! Copyright (c) 2013, Los Alamos National Security, LLC (LANS)
! and the University Corporation for Atmospheric Research (UCAR).
!
! Unless noted otherwise source code is licensed under the BSD license.
! Additional copyright and license information can be found in the LICENSE file
! distributed with this code, or at http://mpas-dev.github.com/license.html
!
module init_atm_core