diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c34eb45..b4edaf6 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -3,3 +3,4 @@ | GitHub user | Real Name | Affiliation | Date | | ----------- | --------- | ----------- | ---- | | james-bruten-mo | James Bruten | Met Office | 2025-12-09 | +| mo-jmanners | James Manners | Met Office | 2025-12-18 | diff --git a/README.md b/README.md index 349b325..eb08f75 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# SOCRATES - Suite Of Community RAdiative Transfer codes based on Edwards and Slingo +# Socrates - Suite Of Community RAdiative Transfer codes based on Edwards and Slingo ## Contributing Guidelines @@ -38,11 +38,11 @@ Please be aware of and follow the Simulation Systems ## What's included? -You should have received this package as a tar file containing the -directories: src/ make/ data/ examples/ idl/ python/ man/ sbin/ docs/ +The Socrates package contains the following directories: +src/ make/ data/ examples/ idl/ python/ man/ sbin/ docs/ -`src/` contains the source code in Fortran 95 (.f90) and a few remaining -in Fortran 77 (.f). +`src/` contains the source code in Fortran 2018 (.f90) and a few remaining +in fixed Fortran format (.f). `make/` contains the Makefile which then accesses the various Mk_* files. @@ -58,7 +58,7 @@ See the CONTENTS in each directory under examples/ for instructions. `idl/` and `python/` contain scripts to generate atmospheric profiles etc in netCDF format to be used as input for the radiation code (l_run_cdf). -`docs/` contain the user guide and technical guide for the ES code. +`docs/` contain the user guide and technical guide for the Socrates code. ## Compiling the source code within the Met Office @@ -93,7 +93,7 @@ your local netCDF installation. The following commands can then be run to build the suite and setup your path to the executables and man pages: -`./build_code` +`./build_code`\ `. ./set_rad_env` See previous section for building individual routines. @@ -103,7 +103,7 @@ See previous section for building individual routines. There are a small number of utilities in sbin/ which are written in C and require compilation. A Makefile has been provided: -`cd $RAD_SCRIPT` +`cd $RAD_SCRIPT`\ `make` ## Running the code @@ -114,7 +114,7 @@ find up-to-date instructions for running the following routines: Two-stream and spherical harmonics radiance codes using netCDF or text CDL input files: -`man Cl_run_cdf` +`man Cl_run_cdf`\ `man Cl_run_cdl` A Mie scattering code for determining optical properties of aerosol @@ -131,8 +131,8 @@ a netCDF input file: Auxillary routines for format conversion, interpolation etc: -`man Ccdf2cdl` -`man Ccdl2cdf` +`man Ccdf2cdl`\ +`man Ccdl2cdf`\ `man Cinterp` These scripts are a command line interface to interactive routines in @@ -146,12 +146,12 @@ of the code. The full suite has been tested with the following compilers: -Intel ifort 19 +Intel ifort 19\ GCC gfortran 12.2 -To use these compilers within the Met Office run, respectively: -`./build_code azure_ifort19` +To use these compilers within the Met Office run, respectively:\ +`./build_code azure_ifort19`\ `./build_code azure_gfortran12` -On the Monsoon3 collaboration machine: +On the Monsoon3 collaboration machine:\ `./build_code monsoon3_gfortran12` diff --git a/docs/userguide/setup.tex b/docs/userguide/setup.tex index 788118c..5fca529 100644 --- a/docs/userguide/setup.tex +++ b/docs/userguide/setup.tex @@ -1,24 +1,13 @@ \section{Obtaining the code} -The master version of the radiation code is held under version control (FCM) -on the Met Office Science Repository Service (MOSRS) at -https://code.metoffice.gov.uk/trac/socrates/wiki. Development information and -instructions are available from this page. Releases are -made from specific revisions of the trunk and made available -as a self-contained tar package. - -To obtain the latest version of the code or to get an account on the MOSRS -please email the radiation code owner at the Met Office, currently -james.manners@metoffice.gov.uk. The code is freely available under a -BSD 3-clause licence. - -Once extracted, instructions for compilation may be found within the -distribution's {\tt README} file. - -The code is written in Fortran 95 and has primarily been tested with the Intel -ifort and GNU gfortran compilers. Scripts are written in the korn or bash -shells and it is recommended that one of these is used as the command shell. -A local installation of the netCDF fortran libraries and modules is also -required if the netCDF functionality is to be used. +The master version of the radiation code is available under a BSD 3-clause +licence from: + +https://github.com/MetOffice/socrates + +The code is written in Fortran 2018 and has primarily been tested with the +GNU gfortran and Intel ifort compilers. A local installation of the netCDF +fortran libraries and modules is required if the netCDF functionality is to +be used. Python scripts use Python 3 and shell scripts are written in bash. \section{Basic operation} diff --git a/examples/cosp/README_COSP b/examples/cosp/README_COSP index 6fb0c77..c860fdf 100755 --- a/examples/cosp/README_COSP +++ b/examples/cosp/README_COSP @@ -1,11 +1,11 @@ -A version of COSP code is included in the fcm repository at src/cosp_github +A version of the COSP code is included here in src/cosp_github -To check if the actual COSP code on github differs from this version run -check_cosp_github.sh and then see if there are any differences by having -a look at cosp_diff_to_github.out +To check if the upstream COSP code at github.com/CFMIP/COSPv2.0 differs +from this version run check_cosp_github.sh and then see if there are any +differences by having a look at cosp_diff_to_github.out -IF YOU ARE REALLY SURE that you want to use the github version rather -than the current fcm version, you can use copy_cosp_github.sh -to overwrite relevant files with their github versions. +IF YOU ARE REALLY SURE that you want to use the upstream version rather +than the version here, you can use copy_cosp_github.sh +to overwrite relevant files with their upstream versions. diff --git a/examples/cosp/check_cosp_github.sh b/examples/cosp/check_cosp_github.sh index bcecca0..66b6556 100755 --- a/examples/cosp/check_cosp_github.sh +++ b/examples/cosp/check_cosp_github.sh @@ -1,5 +1,5 @@ #!/bin/bash -# To check if the actual COSP code on github differs from this version run +# To check if the upstream COSP code on github differs from this version run # check_cosp_github.sh and then see if there are any differences by having # a look at cosp_diff_to_github.out @@ -15,7 +15,7 @@ else exit 0 fi -# Now check the diff to the current fcm version +# Now check the diff to the current Socrates version ierr=0 rm -f cosp_diff_to_github.out diff -r -x cosp2_test.f90 COSPv2.0-master/driver/src ${RAD_DIR}/src/cosp_github/driver/src >> cosp_diff_to_github.out || ierr=1 @@ -24,12 +24,12 @@ diff -r -x cosp_rttov_interface.F90 -x cosp_rttov.F90 -x cosp_rttov11.F90 COSPv2 diff -r COSPv2.0-master/subsample_and_optics_example ${RAD_DIR}/src/cosp_github/subsample_and_optics_example >> cosp_diff_to_github.out || ierr=1 if [ $ierr -gt 0 ] ; then - echo 'COSP code differs from github version' + echo 'COSP code differs from version on github.com/CFMIP/COSPv2.0' exit 1 else rm -f cosp_diff_to_github.out rm -rf COSPv2.0-master rm -f master.zip - echo 'COSP code matches github version' + echo 'COSP code matches github.com/CFMIP/COSPv2.0' exit 0 fi diff --git a/examples/cosp/copy_cosp_github.sh b/examples/cosp/copy_cosp_github.sh index 4dc5c23..2598e0c 100755 --- a/examples/cosp/copy_cosp_github.sh +++ b/examples/cosp/copy_cosp_github.sh @@ -1,15 +1,15 @@ -# IF YOU ARE REALLY SURE that you want to use the github version rather -# than the current fcm version, you can use copy_cosp_github.sh -# to overwrite relevant files with their github versions. +# IF YOU ARE REALLY SURE that you want to use the upstream version rather +# than the version here, you can use copy_cosp_github.sh +# to overwrite relevant files with their upstream versions. -# Get latest github version and unpack it +# Get latest upstream github version and unpack it rm -rf COSPv2.0-master rm -f master.zip wget -nc https://github.com/CFMIP/COSPv2.0/archive/refs/heads/master.zip unzip master.zip -# Now overwrite with the github version +# Now overwrite with the upstream github version cp -R COSPv2.0-master/driver/src ${RAD_DIR}/src/cosp_github/driver cp -R COSPv2.0-master/model-interface ${RAD_DIR}/src/cosp_github cp -R COSPv2.0-master/src ${RAD_DIR}/src/cosp_github diff --git a/make_tar b/make_tar index e2bcbdd..bc7f67f 100755 --- a/make_tar +++ b/make_tar @@ -20,16 +20,14 @@ mkdir ${ESTMP}/socrates${stamp} # Copy package files cp -r sbin data docs examples idl python man src make ${ESTMP}/socrates${stamp}/ -cp README COPYRIGHT.txt build_code ${ESTMP}/socrates${stamp}/ +cp README.md CONTRIBUTORS.md COPYRIGHT.txt build_code ${ESTMP}/socrates${stamp}/ # Update _version.txt file -fcm info | grep '^URL' > ${ESTMP}/socrates${stamp}/_version.txt -fcm info | grep "Last Changed Rev" >> ${ESTMP}/socrates${stamp}/_version.txt -fcm info | grep "Last Changed Date" >> ${ESTMP}/socrates${stamp}/_version.txt +git log -1 > ${ESTMP}/socrates${stamp}/_version.txt # Remove unwanted files cd ${ESTMP}/socrates${stamp}/ && find . -name *~ -exec rm -f {} \; -cd ${ESTMP}/socrates${stamp}/ && find . -name \.svn -exec rm -rf {} \; 2> /dev/null +cd ${ESTMP}/socrates${stamp}/ && find . -name \.git* -exec rm -rf {} \; 2> /dev/null echo 'Building documentation pdfs.' cd ${ESTMP}/socrates${stamp}/docs/techguide