NCL

1 program Added 2025-10-22T10:08:46Z Model: meta-llama/llama-3.1-70b-instructTemp: 0.4 Evidence Report issue View issues
Aliases: Nested Context Language
Provenance: commit 36075ef504 · authored 2025-10-22T12:08:46+02:00 · model meta-llama/llama-3.1-70b-instruct

Sources mentioning this language

5 sources · pl_id: pl/ncl
LLM (this repo) · 1PldbLinguistPygmentsHyperpolyglot

Extensions claimed by this language

2 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.ncllinguistprimary103.7K files
.nclpygmentsprimary103.7K files

Related languages

NCAR Command Language (0.31)Nyx (0.29)Control Language (0.29)ECL (0.29)GCL (0.29)

LLM-contributed programs

NCL Media Player

Provenance: commit 36075ef504 · authored 2025-10-22T12:08:46+02:00 · model meta-llama/llama-3.1-70b-instruct · Temp 0.4
code.ncl · license: MIT · added: 2025-10-22T10:08:46Z
media nclMediaPlayer {
	area = "main";
	region = "main";
	descriptor = "nclDescriptor";
	property name="mediaTime" value="0";
	property name="mediaDuration" value="0";
	property name="mediaState" value="playing";
	property name="mediaType" value="video";
	property name="mediaSource" value="";
	property name="mediaSink" value="";
	property name="mediaLoop" value="false";
	property name="mediaAutoplay" value="true";
	property name="mediaControls" value="true";
	property name="mediaFullScreen" value="false";
}

Real programs from Software Heritage

1 sample mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
mean_increment.ncl · 3278 B · ext .ncl · seen 4× in SWH
via heuristicrule h/linguist/.ncl/4
swh:1:cnt:1798e231bb4c8594a892fd74f477c889519058b0;origin=https://github.com/NCAR/DART;anchor=swh:1:rev:bc9f6b16a7dcac3aa852dfacc54bf69961e0c6a6;path=/models/wrf/shell_scripts_csh/mean_increment.ncl
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
; find the mean state space increment, output the fields to a single mean file
; that can be used to make plots
; G. Romine 2011-12
; Run for parent domain (d01) only B. Raczka 2024-08
begin

; get the list of files to read in
 fname = "analysis_increment_d01.nc"
 flist = systemfunc("ls ../*/" + fname)
 nfils = dimsizes(flist)
; if we only want say the last 7 days, then grab only the last 28
; here we practice with 3 days
 anl_days = 7
 ntimes = anl_days*4
 if (nfils .gt. ntimes) then
   tempf = flist(nfils-ntimes:nfils-1) 
   delete(flist)
   flist = tempf
   nfils = ntimes
   delete(tempf)
 end if 
 fil   = addfiles(flist, "r")
 ListSetType(fil, "join")

 pull_2D_field_names = (/"T2", "Q2", "U10", "V10", "PSFC"/)
 pull_3D_field_names = (/"U", "V", "THM", "QVAPOR"/)
 npulls = dimsizes(pull_2D_field_names)

; Below will dump out the data to a file for replotting later
    cnew = addfile("mean_increments_d01"+".nc","c")
; work through 2D fields
  do i=0,npulls-1
   print("   Extracting 2d variable "+pull_2D_field_names(i))
   do fil_num=0,nfils-1
;   print(" reading file "+flist(fil_num))
; dimensions are ncljoin, Time, south_north, west_east
; copy zero is the ensemble mean 
    pull_var = fil[fil_num]->$pull_2D_field_names(i)$(:,:,:,:)
    dims = dimsizes(pull_var)
    if (fil_num .eq. 0) then  ; first iteration, make var
     alltimes_var = new ( (/nfils,dims(2),dims(3)/), typeof(pull_var) )
    end if
;    printVarSummary(pull_var)
    alltimes_var(fil_num,:,:) = pull_var(0,0,:,:)
;   printVarSummary(alltimes_var)
    delete(pull_var)
   end do
; average over time (first dimension)
  mean_alltimes_var = dim_avg_n(alltimes_var,0)
; standard deviation over time (first dimension)
  stdv_alltimes_var = dim_stddev_n(alltimes_var,0)
; write to new file
   varname ="mean_"+pull_2D_field_names(i)
   cnew->$varname$ = mean_alltimes_var
   delete(varname)
   varname ="stdv_"+pull_2D_field_names(i)
   cnew->$varname$ = stdv_alltimes_var
   delete(varname)
   delete(alltimes_var)
   delete(mean_alltimes_var)
   delete(stdv_alltimes_var)
   delete(dims)
  end do

; work through 3D fields
 npulls = dimsizes(pull_3D_field_names)
  do i=0,npulls-1
   print("   Extracting 3d variable "+pull_3D_field_names(i))
   do fil_num=0,nfils-1
;    print(" reading file "+flist(fil_num))
; dimensions are ncljoin, Time, level, south_north, west_east
; copy zero is the ensemble mean
    pull_var = fil[fil_num]->$pull_3D_field_names(i)$(:,:,:,:,:)
    dims = dimsizes(pull_var)
    if (fil_num .eq. 0) then  ; first iteration, make var
     alltimes_var = new ( (/nfils,dims(2),dims(3),dims(4)/), typeof(pull_var) )
    end if
;    printVarSummary(pull_var)
    alltimes_var(fil_num,:,:,:) = pull_var(0,0,:,:,:)
    delete(pull_var)
   end do
; average over time (first dimension)
  mean_alltimes_var = dim_avg_n(alltimes_var,0)
; standard deviation over time (first dimension)
  stdv_alltimes_var = dim_stddev_n(alltimes_var,0)
; write to new file
   varname ="mean_"+pull_3D_field_names(i)
   cnew->$varname$ = mean_alltimes_var
   delete(varname)
   varname ="stdv_"+pull_3D_field_names(i)
   cnew->$varname$ = stdv_alltimes_var
   delete(varname)
   delete(alltimes_var)
   delete(mean_alltimes_var)
   delete(stdv_alltimes_var)
   delete(dims)
  end do

end

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.ncl/4.nclpredicates[{"kind": "any", "regexes": ["^load \"", "^begin$", "[0-9]\\.$", "^;"]}]

Contribute — propose a file extension

Tell us where to find evidence about NCL (mapped to pl/ncl). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/NCL/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← NCAR Command Language NDBall →