7 March 2011.  B. Fiedler, with a few updates in February 2025

-------------from 2025: ------------------
A messy directory.  But it all does work.

-------------  from 2011: ------------

radcon.py is a python radiative-convective model, based on the Column Radiation Model (CRM)
CRM source code from: http://dust.ess.uci.edu/crm/index.shtml
4 static binaries of the CRM are included here for Linux:
   crm_static : circa 2005 download and compilation with ifort
   crm_revised_static: as above, but with radtpl.F.revised substituted for radtpl.F 
   crm_static_2011: 2011 download and compilation with ifort on Ubuntu 10.04 with Unbuntu netcdf (3 or 4?)
   crm_revised_static_2011: as above, but with radtpl.F.revised substituted for radtpl.F 
The included binaries can be tested from the Linux command line, such as:
$ ./crm_revised_static < crm_inputs/radconeq.in
crm_static, and optionally crm_revised_static, is what drives the website http://12characters.net/xcrm/crm.cgi
Here, by default, crm_revised_static is symbolically linked as crm, which is called repeatedly by radcon.py

------------------------------------------------------------------------------

These command will use radcon.py to reproduce all the simulations seen at 
https://thoughts.12characters.net/doku.php?id=radiativeconvectiveequilibrium

$ ./script_run
$ ./script_plot
$ ./script_transient

(To complete the transient graphic, you will need to insert graft_me.svg into the end of the svg file within transient.)
If the crm  binaries are working for you, then you don't need this section.
The 2011 binaries produce very slightly different results from the earlier binaries.  
The ability to recompile the earlier binaries has been lost.

In 2025, I offer a version of crm that does not use malloc or getmem. 
The new bundle easily compile on Linux.  So ignore this:
----------------------------------------------------------------------------------------------
Here is how the crm_static_2011 was compiled.
First, the Makefile within crm/bld was altered as:
$ diff Makefile Makefile_orig
103,104c103
< # STC := N
<  STC := Y
---
>  STC := N
223c222
<  #LINUX_FC := gfortran
---
>  LINUX_FC := gfortran
225c224
< LINUX_FC := ifort
---
>  #LINUX_FC := ifort

To avoid radcon.py writing out the netcdf file at each time step, comment out or delete
all the lines for "call netcdf( ..." within crm.F 

Then, instead of simply typing "make":


$ NETCDF_ROOT='/usr' NETCDF_INC='/usr/include' NETCDF_LIB='/usr/lib' make OPTS=D NETCDF4=N NETCDFF=Y

Then rename and move bin/crm as appropriate, to crm_static_2011

Then delete obj/radtpl.o
Substitue radtpl.F.revised for radtpl.F (save the original!)
execute the above make statement, and bin/crm is crm_static_revised_2011
 

