Mispelled variable error when running PISCES on CROCOv2.1.2

Hi everyone,

I just recently tried running my model setup (previously run on CROCOv1.3.1) using the most recent version as of this date (CROCOv2.1.2). I am able to compile the source code, but I get an error when I try to run the model. I have copied below the part of the log file at which the error occurs:


trc_sms_pisces : read PISCES namelists

     file   :
namelist_pisces_ref
  open ok
     unit   =           16
     status = OLD
     form   = FORMATTED
     access = SEQUENTIAL


     file   :
namelist_pisces_cfg
  open ok
     unit   =           17
     status = OLD
     form   = FORMATTED
     access = SEQUENTIAL

number of tracer :           24

===>>> : E R R O R
        ===========

misspelled variable in namelist nampistrc (cfg) iostat =    19

===>>> : E R R O R
        ===========


===>>> : E R R O R
        ===========


===>>> : E R R O R
        ===========

===>>> : E R R O R
        ===========



===>>> : E R R O R


The error seems to have to do with the ‘namelist_pisces_cfg’ file, but does anyone know in more detail which part of the file to modify in order to make the model run correctly? I would greatly appreciate any help and advice.

Lawrence

Hi everyone,

I’d like to follow up on this issue as I finally got my setup to run. The solution was a small modification of the ‘namelist_pisces_cfg’ file. In the original file provided in CROCO version 2.1.2 the definition of tracers is specified as:

&nampistrc ! tracers definition
!,
!
! ! name ! title of the field ! units
! ! ! !
! ! ! !
tracer(1) = 'DIC ’ , 'Dissolved inorganic Concentration ', ‘mmol/m3’
tracer(2) = ‘Alkalini’ , 'Total Alkalinity Concentration ', 'meq/m3 ’
tracer(3) = 'O2 ’ , 'Dissolved Oxygen Concentration ', ‘mmol/m3’
tracer(4) = 'CaCO3 ’ , 'Calcite Concentration ', ‘mmol/m3’
tracer(5) = 'PO4 ’ , 'Phosphate Concentration ', ‘mmol/m3’
tracer(6) = 'POC ’ , 'Small organic carbon Concentration ', ‘mmol/m3’
tracer(7) = 'Si ’ , 'Silicate Concentration ', ‘mmol/m3’
tracer(8) = 'PHY ’ , 'Nanophytoplankton Concentration ', ‘mmol/m3’
tracer(9) = 'ZOO ’ , 'Microzooplankton Concentration ', ‘mmol/m3’
tracer(10) = 'DOC ’ , 'Dissolved organic Concentration ', ‘mmol/m3’
tracer(11) = 'PHY2 ’ , 'Diatoms Concentration ', ‘mmol/m3’
tracer(12) = 'ZOO2 ’ , 'Mesozooplankton Concentration ', ‘mmol/m3’
tracer(13) = 'DSi ’ , 'Diatoms Silicate Concentration ', ‘mmol/m3’
tracer(14) = 'Fer ’ , 'Dissolved Iron Concentration ', ‘mmol/m3’
tracer(15) = 'BFe ’ , 'Big iron particles Concentration ', ‘mmol/m3’
tracer(16) = 'GOC ’ , 'Big organic carbon Concentration ', ‘mmol/m3’
tracer(17) = 'SFe ’ , 'Small iron particles Concentration ', ‘mmol/m3’
tracer(18) = 'DFe ’ , 'Diatoms iron Concentration ', ‘mmol/m3’
tracer(19) = 'GSi ’ , ‘Sinking biogenic Silicate Concentration’, ‘mmol/m3’
tracer(20) = 'NFe ’ , 'Nano iron Concentration ', ‘mmol/m3’
tracer(21) = 'NCHL ’ , 'Nano chlorophyl Concentration ', ‘mg/m3’
tracer(22) = 'DCHL ’ , 'Diatoms chlorophyl Concentration ', ‘mg/m3’
tracer(23) = 'NO3 ’ , 'Nitrates Concentration ', ‘mmol/m3’
tracer(24) = 'NH4 ’ , 'Ammonium Concentration ', ‘mmol/m3’
tracer(25) = 'LGW ’ , 'Ligands Concentration ', ‘mmol/m3’
/

I got my setup to run by deleting the line with tracer(25) (Ligands Concentration). I’m sorry if this seems like a trivial issue, but it was confusing for me since I did not define “key_ligand” in my cppdefs.h and I assumed that that tracer(25) will be ignored automatically. Am I correct in my understanding that certain modifications to the ‘namelist_pisces_ref’ and/or ‘namelist_pisces_cfg’ files may be necessary depending on the PISCES keys activated?

I would greatly appreciate any advice.

Lawrence

1 Like

Hi,
why are you using 25 only, why not up to 40 (p5). I’ve seen some p6 code already there.
Thank you.

Yes absolutely! It is not dynamical. There are 3 different pisces namelist in the PISCES directory to use depending on the version you want to use

  • p2z : pisces-npzd with 9 prognostic tracers
  • p4z : pisces standard with ligand tracer (25 prognostic tracers)
  • p5z : pisces quot with 40 prognostic tracers, ligand included.
    The case when you don’t want to use the explicit representation of ligand tracer was not set in the distributed pisces namelist. So if you don’t want ligand tracers in pisces standard and quota, you need to remove the LGW tracer in the pisces namelist as you have done.
2 Likes

Hi Renaud,

Thank you for kindly clarifying this in detail. I will keep these in mind as I continue to develop my model setup. I looked at some of my older setups more closely and found the main source of my confusion. It turns out the PISCES namelist in CROCO version 1.3.1 already had 25 tracers defined, but my previous setups were able to run even without defining “key_ligand” in cppdefs.h. I wonder if this was a bug or perhaps a small detail in the settings that was resolved or modfied in version 2.1.2.

In any case, I really appreciate the clarification. Thank you again and thank you also @xalpha for joining in on the discussion.

Even in version 1.3.1, if you have deleted the key_ligand and do not update the namelist of pisces, the model should not work because the allocation of passive tracers in CROCO is not dynamic.

Thank you so much for the feedback Renaud. While looking into this issue in more detail, I found these lines in param.h which relate to the number of tracers:

# ifdef BIOLOGY
#  ifdef PISCES
#     ifdef key_pisces_quota
#        ifdef key_ligand
         parameter (ntrc_bio=40)
#        else
         parameter (ntrc_bio=39)
#        endif
#     else
#        ifdef key_ligand
         parameter (ntrc_bio=25)
#        else
         parameter (ntrc_bio=24)
#        endif
#     endif
#  elif defined BIO_NChlPZD
#   ifdef OXYGEN
      parameter (ntrc_bio=6)
#   else
      parameter (ntrc_bio=5)
#   endif
#  elif defined BIO_N2ChlPZD2
      parameter (ntrc_bio=7)
#  elif defined BIO_BioEBUS
#   ifdef NITROUS_OXIDE
      parameter (ntrc_bio=12)
#   else
      parameter (ntrc_bio=11)
#   endif
#  endif
# else
      parameter (ntrc_bio=0)
# endif /* BIOLOGY */

Both versions 1.3.1 and 2.1.2 have these, so I wonder if these do not serve to correctly allocate the number of tracers specified in the PISCES namelist? But nevertheless, I guess it is still best practice to match the variables in the namelist with the version used as you have recommended.

Yes, that is the purpose of the cpp keys in pisces, to adjust the number of passive tracers allocated according to the chosen code version. The namelist must be adjusted accordingly.

1 Like